This implementation is used by reset/3 because the continuation cannot be captured if it contains a such a compiled temporary clause.
call((Goal, !))
.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.
-g goal
goals.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 loaded
when called for a QLF file.
Note that 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
elsewhere.
relative_to(FileOrDir)
options
or implicitely relative to the working directory or current
source-file.log(N)
)
version, but sets of file name extensions should be short enough
for this not to matter.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_load
flag according to Options and unify Old
with the old value.sandboxed_load
from Options. Old is
unified with the old flag.
state(FirstTerm:boolean,
Module:atom,
AtEnd:atom,
Stop:boolean,
Id:atom,
Dialect:atom)
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 user
.all
,
a list of optionally mapped predicate indicators or a term
except(Import)
.op(P,A,N)
terms representing the operators
exported from Module.sandboxed_load
is true
, this calls
prolog:sandbox_allowed_directive/1. This call can deny execution
of the directive by throwing an exception.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)
compileFileList()
in pl-wic.c. Gets the files from
"-c file ..." and loads them into the module user.runInitialization()
in pl-wic.c for .qlf files. The
'$run_initialization'/3 is called with Action set to loaded
when called for a QLF file.