|Did you know ...||Search Documentation:|
once(member(E,List)). Implemented in C. If List is partial though we need to do the work in Prolog to get the proper constraint behavior. Needs to be defined early as the boot code uses it.
publicalso plays this role. in SWI,
publicmeans that the predicate can be called, even if we cannot find a reference to it.
This implementation is used by reset/3 because the continuation cannot be captured if it contains a such a compiled temporary clause.
Note that we can technically also push the entire continuation onto the environment and call it. Doing it incrementally as below exploits last-call optimization and therefore possible quadratic expansion of the continuation.
Note that all goals are executed when a program is restored.
runInitialization()in pl-wic.c for .qlf files. The '$run_initialization'/3 is called with Action set to
loadedwhen called for a QLF file.
querychannel. This predicate may be hooked using confirm/2, which must return a boolean.
qlf must be last when searching for Prolog files.
Otherwise use_module/1 will consider the file as not-loaded
because the .qlf file is not the loaded file. Must be fixed
relative_to(FileOrDir)options or implicitely relative to the working directory or current source-file.
I think that the only sensible solution is to have a special statement for this, that may appear both inside and outside QLF `parts'.
qcompile(QlfMode)or, if this is not present, by the prolog_flag qcompile.
Synchronisation is handled using a message queue that exists while the file is being loaded. This synchronisation relies on the fact that thread_get_message/1 throws an existence_error if the message queue is destroyed. This is hacky. Events or condition variables would have made a cleaner design.
verbose_loadflag according to Options and unify Old with the old value.
sandboxed_loadfrom Options. Old is unified with the old flag.
Note that expects_dialect/1 itself may be autoloaded from the library.
module(Module)is given. In that case, use this module and if Module is the load context, ignore the module header.
system, while all normal user modules inherit from
all, a list of optionally mapped predicate indicators or a term
op(P,A,N)terms representing the operators exported from Module.
true, this calls prolog:sandbox_allowed_directive/1. This call can deny execution of the directive by throwing an exception.
call. Add a
calldirective to the QLF file.
loaddirectives continue the compilation into the QLF file.
If the cross-referencer is active, we should not (re-)assert the clauses. Actually, we should make them known to the cross-referencer. How do we do that? Maybe we need a different API, such as in:
expand_term_aux(Goal, NewGoal, Clauses)
on_warningflags. Also used by qsave_toplevel/0.
compileFileList()in pl-wic.c. Gets the files from "-c file ..." and loads them into the module user.