| Did you know ... | Search Documentation: |
| init.pl |
memberchk(?E, ?List) is semidet[private]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.
dynamic +Spec is det[private]
multifile +Spec is det[private]
module_transparent +Spec is det[private]
discontiguous +Spec is det[private]
volatile +Spec is det[private]
thread_local +Spec is det[private]
noprofile(+Spec) is det[private]
public +Spec is det[private]
non_terminal(+Spec) is det[private]
$iso(+Spec) is det[private]
$clausable(+Spec) is det[private]public also plays this role. in SWI,
public means that the predicate can be called, even if we cannot
find a reference to it.
$hide(+Spec) is det[private]
$set_pattr(+Spec, +Module, +From, +Attr)[private]pred or directive.
$pattr_directive(+Spec, +Module) is det[private]
$pi_head(?PI, ?Head)[private]
$head_name_arity(+Goal, -Name, -Arity)[private]
$meta_call(:Goal)[private]This implementation is used by reset/3 because the continuation cannot be captured if it contains a such a compiled temporary clause.
call(:Closure, ?A)[private]
call(:Closure, ?A1, ?A2)[private]
call(:Closure, ?A1, ?A2, ?A3)[private]
call(:Closure, ?A1, ?A2, ?A3, ?A4)[private]
call(:Closure, ?A1, ?A2, ?A3, ?A4, ?A5)[private]
call(:Closure, ?A1, ?A2, ?A3, ?A4, ?A5, ?A6)[private]
call(:Closure, ?A1, ?A2, ?A3, ?A4, ?A5, ?A6, ?A7)[private]
not(:Goal) is semidet[private]
\+ :Goal is semidet[private]
once(:Goal) is semidet[private]call((Goal, !)).
ignore(:Goal) is det[private]
false[private]
catch(:Goal, +Catcher, :Recover)[private]
prolog_cut_to(+Choice)[private]
$ is det[private]
$ :Goal is det[private]
notrace(:Goal) is semidet[private]
reset(:Goal, ?Ball, -Continue)[private]
shift(+Ball)[private]
shift_for_copy(+Ball)[private]
call_continuation(+Continuation:list)[private]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.
catch_with_backtrace(:Goal, ?Ball, :Recover)[private]
$recover_and_rethrow(:Goal, +Term)unwind(Term). Note that we cut to ensure
that the exception is not delayed forever because the recover
handler leaves a choicepoint.
call_cleanup(:Goal, :Cleanup)[private]
setup_call_cleanup(:Setup, :Goal, :Cleanup)[private]
setup_call_catcher_cleanup(:Setup, :Goal, +Catcher, :Cleanup)[private]I_CALLCLEANUP, I_EXITCLEANUP. These
instructions rely on the exact stack layout left by these
predicates, where the variant is determined by the arity. See also
callCleanupHandler() in pl-wam.c.
initialization(:Goal, +When)[private]-g goal goals.Note that all goals are executed when a program is restored.
$run_initialization(?File, +Options) is det[private]
$run_initialization(?File, +Action, +Options) is det[private]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.
$clear_source_admin(+File) is det
default_module(+Me, -Super) is multi[private]
$undefined_procedure(+Module, +Name, +Arity, -Action) is det
$loading(+Library)[private]
$confirm(Spec) is semidet[private]query channel. This
predicate may be hooked using confirm/2, which must return
a boolean.
$expand_file_search_path(+Spec, -Expanded, +Cond) is nondet[private]
expand_file_search_path(+Spec, -Expanded) is nondet[private]
absolute_file_name(+Term, -AbsoluteFile, +Options) is nondet[private]
user:prolog_file_type(?Extension, ?Type)[multifile]
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.
$chk_file(+Spec, +Extensions, +Cond, +UseCache, -FullName)[private]
$relative_to(+Condition, +Default, -Dir)[private]relative_to(FileOrDir) options
or implicitely relative to the working directory or current
source-file.
$chk_alias_file(+Spec, +Exts, +Cond, +Cache, +CWD, -FullFile) is nondet[private]
$file_conditions(+Condition, +Path)[private]
$list_to_set(+List, -Set) is det[private]
$compilation_level(-Level) is det[private]
compiling[private]
$load_msg_level(+Action, +NestingLevel, -StartVerbose, -EndVerbose)[private]
$source_term(+From, -Read, -RLayout, -Term, -TLayout, -Stream, +Options) is nondet[private]
$term_in_file(+In, -Read, -RLayout, -Term, -TLayout, -Stream, +Parents, +Options) is multi[private]
$repeat_and_read_error_mode(-Mode) is multi[private]
$add_encoding(+Enc, +Options0, -Options)[private]
$record_included(+Parents, +File, +Path, +Time, -Message) is det[private]I think that the only sensible solution is to have a special statement for this, that may appear both inside and outside QLF `parts'.
$master_file(+File, -MasterFile)[private]
ensure_loaded(+FileOrListOfFiles)[private]
use_module(+FileOrListOfFiles)[private]
use_module(+File, +ImportList)[private]
reexport(+Files)[private]
reexport(+File, +ImportList)[private]
$consult_user(:Id) is det[private]?- [user].. This is a separate predicate, such that we
can easily wrap this for the browser version.
load_files(:File, +Options)[private]
$noload(+Condition, +FullFile, +Options) is semidet[private]
$qlf_file(+Spec, +PlFile, -LoadFile, -Mode, +Options) is det[private]
$qlf_out_of_date(+PlFile, +QlfFile, -Why) is semidet[private]
$qlf_auto(+PlFile, +QlfFile, +Options) is semidet[private]qcompile(QlfMode) or, if this is not present, by
the prolog_flag qcompile.
$load_file(+Spec, +ContextModule, +Options) is det[private]
$resolved_source_path(+File, -FullFile, +Options) is semidet[private]
$resolve_source_path(+File, -FullFile, +Options) is semidet[private]if(exists) is in Optionsexistence_error(source_sink, File)
$register_resolved_source_path(+Spec, -FullFile) is det[private]
$translated_source(+Old, +New) is det
$register_resource_file(+FullFile) is det[private]
$already_loaded(+File, +FullFile, +Module, +Options) is det[private]
$mt_load_file(+File, +FullFile, +Module, +Options) is det[private]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.
$qdo_load_file(+Spec, +FullFile, +ContextModule, +Options) is det[private]
$qlf_add_dependencies(+File) is det[private]
$do_load_file(+Spec, +FullFile, +ContextModule, -Action, +Options) is det[private]
$save_file_scoped_flags(-State) is det[private]
$restore_file_scoped_flags(-State) is det[private]
$import_from_loaded_module(+LoadedModule, +Module, +Options) is det[private]
$set_verbose_load(+Options, -Old) is det[private]verbose_load flag according to Options and unify Old
with the old value.
$set_sandboxed_load(+Options, -Old) is det[private]sandboxed_load from Options. Old is
unified with the old flag.
$update_autoload_level(+Options, -OldLevel)[private]
$print_message(+Level, +Term) is det[private]
$consult_file(+Path, +Module, -Action, -LoadedIn, +Options)[private]
$save_lex_state(-LexState, +Options) is det[private]
$assert_load_context_module(+File, -Module, -Options)[private]
$admin_file(+File, -PlFile) is det[private]
$add_dialect(+Options0, -Options) is det[private]
$load_ctx_options(+Options, -CtxOptions) is det[private]
$load_file(+Path, +Id, -Module, +Options)[private]
state(FirstTerm:boolean,
Module:atom,
AtEnd:atom,
Stop:boolean,
Id:atom,
Dialect:atom)
$compile_term(+Term, +Layout, +SrcId, +Options) is det[private]
$compile_term(+Term, +Layout, +SrcId, +SrcLoc, +Options) is det[private]
$set_dialect(+Dialect, +State)[private]Note that expects_dialect/1 itself may be autoloaded from the library.
$reset_dialect(+File, +Class) is det[private]swi dialect.
$module3(+Spec) is det[private]
$module_name(?Name, +Id, -Module, +Options) is semidet[private]module(Module) is given. In that case, use this
module and if Module is the load context, ignore the module
header.
$redefine_module(+Module, +File, -Redefine)[private]
$module_class(+File, -Class, -Super) is det[private]system, while all normal user modules inherit
from user.
$import_list(+TargetModule, +FromModule, +Import, +Reexport) is det[private]all,
a list of optionally mapped predicate indicators or a term
except(Import).
$import_all(+Import, +Context, +Source, +Reexport, +Strength)[private]true, add
the imported material to the exports of Context. If Strength is
weak, definitions in Context overrule the import. If strong, a
local definition is considered an error.
$import_all2(+Imports, +Context, +Source, -Imported, -ImpOps, +Strength)[private]
$exported_ops(+Module, -Ops, ?Tail) is det[private]op(P,A,N) terms representing the operators
exported from Module.
$import_ops(+Target, +Source, +Pattern)[private]
$export_list(+Declarations, +Module, -Ops)[private]
$execute_directive(:Goal, +File, +Options) is det[private]
$valid_directive(:Directive) is det[private]sandboxed_load is true, this calls
prolog:sandbox_allowed_directive/1. This call can deny execution
of the directive by throwing an exception.
$add_directive_wic2(+Directive, -Type, +Options) is det[private]load or call. Add a call
directive to the QLF file. load directives continue the
compilation into the QLF file.
$common_goal_type(+Directive, -Type, +Options) is semidet[private]load
or call.
$store_admin_clause(+Clause, ?Layout, +Owner, +SrcLoc) is det[private]
$store_admin_clause(+Clause, ?Layout, +Owner, +SrcLoc, +Mode) is det[private]
$store_clause(+Clause, ?Layout, +Owner, +SrcLoc) is det[private]
$store_clause(+Term, +Id) is det
compile_aux_clauses(+Clauses) is det[private]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)
$stage_file(+Target, -Stage) is det[private]
$install_staged_file(+Catcher, +Staged, +Target, +OnError)[private]
win_rename_file(+From, +To) is det[private]
length(?List, ?N)[private]
$is_options(@Term) is semidet[private]
$option(?Opt, +Options) is semidet[private]
$option(?Opt, +Options, +Default) is det[private]
$select_option(?Opt, +Options, -Rest) is semidet[private]
$merge_options(+New, +Default, -Merged) is det[private]
$options_dict(+Options, --Dict) is det[private]
$exit_code(Code)[private]on_error and on_warning
flags. Also used by qsave_toplevel/0.
at_halt(:Goal)[private]
cancel_halt(+Reason)[private]heartbeat is
non-zero.
$load_additional_boot_files is detcompileFileList() in pl-wic.c. Gets the files from
"-c file ..." and loads them into the module user.