UNPKG

@ciao-lang/ts-ciao-interface

Version:

Simple Ciao interface for node.

146 lines (123 loc) 29.9 kB
<!DOCTYPE HTML><html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><meta name="theme-color" content="#273f79"/><link rel="stylesheet" href="lpdoc.css" type="text/css"/><script type="text/javascript" src="lpdoc.js"></script><title>The interactive top-level shell &mdash; The Ciao System v1.22</title></head><body><div class="lpdoc-page fixleftbar"><a href="#" id="sidebar-toggle-button" class="lpdoc-navbutton"><span id="sidebar-button-arrow">&#9776;</span></a><div id="sidebar" class="lpdoc-sidebar"><div style="height: 40px; margin-left: auto; margin-right: auto"><img src="ciao-logo_autofig.png" width=auto height=100%></div><div class="lpdoc-nav"><span class="lpdoc-on-right"><a class="lpdoc-navbutton" href="DevEnv.html">&#x2191;</a><a class="lpdoc-navbutton" href="DevEnv.html">&#x2190;</a><a class="lpdoc-navbutton" href="debugger_doc.html">&#x2192;</a><a class="lpdoc-navbutton" href="ciaosearch.html">&#x1F50D;</a></span><span><a href="ciaofulltoc.html">TOC</a></span></div><hr></hr><ul class="lpdoc-itemize-sectpath"><li><a href="ciao.html">The Ciao System</a> &raquo;<br/> </li><li><a href="DevEnv.html">PART I - The program development environment</a> &raquo;<br/> </li><li><a href=""><strong>The interactive top-level shell</strong></a></li></ul><hr></hr><em>ON THIS PAGE</em><ul><li><a href="#Shell invocation and startup">Shell invocation and startup</a></li><li><a href="#Shell interaction">Shell interaction</a></li><li><a href="#Entering recursive (conjunctive) shell levels">Entering recursive (conjunctive) shell levels</a></li><li><a href="#Usage and interface">Usage and interface</a></li><li><a href="#Documentation on exports">Documentation on exports</a></li><li><a href="#Documentation on internals">Documentation on internals</a></li><li><a href="#Documentation on imports">Documentation on imports</a></li></ul></div><div class="lpdoc-main"><div id=""><h1>The interactive top-level shell</h1><a class="lpdoc-idx-anchor" href="ciaosearch.html#toplevel"></a> <strong>Author(s):</strong> <a class="lpdoc-idx-anchor" id="Daniel Cabeza" href="ciaosearch.html#Daniel Cabeza">Daniel Cabeza</a>, <a class="lpdoc-idx-anchor" id="The Ciao Development Team" href="ciaosearch.html#The Ciao Development Team">The Ciao Development Team</a>.<p> <a class="lpdoc-idx-anchor" id="0" href="ciaosearch.html#ciaosh"><tt>ciaosh</tt></a> is the Ciao interactive top-level shell. It provides the user with an interactive programming environment with tools for incrementally building programs, debugging programs by following their executions, and modifying parts of programs without having to start again from scratch. If available, it is strongly recommended to use it with the <a class="lpdoc-idx-anchor" id="1" href="ciaosearch.html#emacs interface">emacs interface</a> provided, as it greatly simplifies the operation. This chapter documents general operation in the shell itself.<p><p><div id="Shell invocation and startup"><h2>Shell invocation and startup</h2> <p>When invoked, the shell responds with a message of identification and the prompt <tt>?- </tt> as soon as it is ready to accept input.<p>When the shell is initialized it looks for a file <a class="lpdoc-idx-anchor" id="2" href="ciaosearch.html#.ciaorc"><tt>.ciaorc</tt></a> in the HOME directory and makes an <tt>include</tt> of it, if it exists. This file is useful for including <a class="lpdoc-idx-anchor" id="3" href="#use_module/1"><tt>use_module/1</tt></a> declarations for the modules one wants to be loaded by default, changing <a class="lpdoc-idx-anchor" id="4" href="ciaosearch.html#prolog flag">prolog flag</a>s, etc. (Note that the <a class="lpdoc-idx-anchor" id="5" href="ciaosearch.html#.ciaorc"><tt>.ciaorc</tt></a> file can only contain directives, not actual code; to load some code at startup put it in a separate file and load it using e.g. a <a class="lpdoc-idx-anchor" id="6" href="#use_module/1"><tt>use_module/1</tt></a> declaration.) If the initialization file does not exist, the default package <a class="lpdoc-idx-anchor" id="7" href="ciaosearch.html#default"><tt>default</tt></a> is included, to provide more or less what other prologs define by default. Thus, if you want to have available all builtins you had before adding the initialization file, you have to include <tt>:- use_package(default)</tt> in it. Two command-line options control the loading of the initialization file:<p><dl> <p><dt><tt>-f</tt><dd> Fast start, do not load any initialization file.<p><dt><tt>-q</tt><dd> Quiet, do not show banner.<p><dt><tt>-i</tt><dd> Force interactive even if <tt>stdin</tt> is not a pseudo-terminal.<p><dt><tt>-l</tt> <span class="lpdoc-var">File</span><dd> Look for initialization file <span class="lpdoc-var">File</span> instead of <tt>~/.ciaorc</tt>. If it does not exist, include the default package.<p><dt><tt>-u</tt> <span class="lpdoc-var">File</span><dd> Use module <span class="lpdoc-var">File</span> on startup.<p><dt><tt>-p</tt> <span class="lpdoc-var">Prompt</span><dd> Set <span class="lpdoc-var">Prompt</span> as prompt.<p><dt><tt>-e</tt> <span class="lpdoc-var">Query</span><dd> Call <span class="lpdoc-var">Query</span> on startup.<p></dl> <p></div><div id="Shell interaction"><h2>Shell interaction</h2> <p>After the shell outputs the prompt, it is expecting either an internal command (see the following sections) or a <a class="lpdoc-idx-anchor" id="8" href="ciaosearch.html#query"><em>query</em></a> (a goal or sequence of goals). When typing in the input, which must be a valid prolog term, if the term does not end in the first line, subsequent lines are indented. For example:<p><pre class="lpdoc-codeblock">?- X = f(a, b). X = f(a,b) ? yes ?- </pre> <p>The queries are executed by the shell as if they appeared in the <a class="lpdoc-idx-anchor" id="9" href="ciaosearch.html#user module">user module</a>. Thus, in addition to builtin predicates, predicates available to be executed directly are all predicates defined by loaded user files (files with no module declaration), and imported predicates from modules by the use of <tt>use_module</tt>.<p>The possible answers of the shell, after executing an internal command or query, are:<p><ul> <p><li>If the execution failed (or produced an error), the answer is <tt>no</tt>.<p><li>If the execution was successful and bindings where made (or constraints where imposed) on <a class="lpdoc-idx-anchor" id="10" href="ciaosearch.html#answer variable">answer variable</a>s, then the shell outputs the values of answer variables, as a sequence of bindings (or constraints), and then prints a <tt>?</tt> as a prompt. At this point it is expecting an input line from the user. By entering a carriage-return (<span class="lpdoc-emacskey">RET</span>) or any line starting with <tt>y</tt>, the query terminates and the shell answer <tt>yes</tt>. Entering a `<tt>,</tt>&apos; the shell enters a <a class="lpdoc-idx-anchor" id="11" href="ciaosearch.html#recursive level">recursive level</a> (see below). Finally, any other answer forces the system to backtrack and look for the next solution (answering as with the first solution).<p><li>If the execution was successful, but no <a class="lpdoc-idx-anchor" id="12" href="ciaosearch.html#answer variable">answer variable</a> was bound or constrained, the answer is simply <tt>yes</tt>. This behavior can be changed by setting the <a class="lpdoc-idx-anchor" id="13" href="ciaosearch.html#prolog flag">prolog flag</a> <tt>prompt_alternatives_no_bindings</tt> to <tt>on</tt>, so that if there are more solutions the user will be consulted as explained in the previous point (useful if the solutions produce side effects).<p></ul> <p>To allow using connection variables in queries without having to report their results, variables whose name starts with <tt>_</tt> are not considered in answers, the rest being the <a class="lpdoc-idx-anchor" id="14" href="ciaosearch.html#answer variable"><em>answer variable</em></a>s. This example illustrates the previous points:<p><pre class="lpdoc-codeblock">?- member(a, [b, c]). no ?- member(a, [a, b]). yes ?- member(X, [a|L]). X = a ? ; L = [X|_] ? yes ?- atom_codes(ciao, _C), member(L, _C). L = 99 ? ; L = 105 ? ; L = 97 ? ; L = 111 ? ; no ?- </pre> <p></div><div id="Entering recursive (conjunctive) shell levels"><h2>Entering recursive (conjunctive) shell levels</h2> <p>As stated before, when the user answers with `<tt>,</tt>&apos; after a solution is presented, the shell enters a <a class="lpdoc-idx-anchor" id="15" href="ciaosearch.html#recursive level"><em>recursive level</em></a>, changing its prompt to <em>N</em> <tt>?- </tt> (where <em>N</em> is the recursion level) and keeping the bindings or constraints of the solution (this is inspired by the <a class="lpdoc-idx-anchor" id="16" href="ciaosearch.html#LogIn"><em>LogIn</em></a> language developed by <a class="lpdoc-idx-anchor" id="17" href="ciaosearch.html#H. Ait-Kaci">H. Ait-Kaci</a>, <a class="lpdoc-idx-anchor" id="18" href="ciaosearch.html#P. Lincoln">P. Lincoln</a> and <a class="lpdoc-idx-anchor" id="19" href="ciaosearch.html#Roger Nasr">Roger Nasr</a> [<a class="lpdoc-idx-anchor" id="20" href="ciaorefs.html#E-overview">AKNL86</a>]). Thus, the following queries will be executed within that context, and all variables in the lower level solutions will be reported in subsequent solutions at this level. To exit a recursive level, input an <span class="lpdoc-emacskey">EOF</span> character or the command <tt>up</tt>. The last solution after entering the level is repeated, to allow asking for more solutions. Use command <tt>top</tt> to exit all recursive levels and return to the top level. Example interaction:<p><pre class="lpdoc-codeblock">?- directory_files(&apos;.&apos;,_Fs), member(F,_Fs). F = &apos;stream_utils.po&apos; ? , 1 ?- file_property(F, mod_time(T)). F = &apos;stream_utils.po&apos;, T = 923497679 ? yes 1 ?- up. F = &apos;stream_utils.po&apos; ? ; F = &apos;stream_utils.pl&apos; ? ; F = &apos;stream_utils.itf&apos; ? , 1 ?- file_property(F, mod_time(T)). F = &apos;stream_utils.itf&apos;, T = 923497679 ? yes 1 ?- ^D F = &apos;stream_utils.itf&apos; ? yes ?- </pre> </div><br/><div id="Usage and interface"><h2>Usage and interface</h2><div class="lpdoc-cartouche"><ul><li><strong>Library usage:</strong><br/>The following predicates can be used at the top-level shell natively (but see also the commands available in <a href="debugger_doc.html">The interactive debugger</a> which are also available within the top-level shell).<li><strong>Exports:</strong><br/><ul class="lpdoc-itemize-minus"><li><em>Predicates:</em><br/><a class="lpdoc-idx-anchor" id="21" href="#use_module/1"><tt>use_module/1</tt></a>, <a class="lpdoc-idx-anchor" id="22" href="#use_module/2"><tt>use_module/2</tt></a>, <a class="lpdoc-idx-anchor" id="23" href="#ensure_loaded/1"><tt>ensure_loaded/1</tt></a>, <a class="lpdoc-idx-anchor" id="24" href="#make_exec/2"><tt>make_exec/2</tt></a>, <a class="lpdoc-idx-anchor" id="25" href="#include/1"><tt>include/1</tt></a>, <a class="lpdoc-idx-anchor" id="26" href="#use_package/1"><tt>use_package/1</tt></a>, <a class="lpdoc-idx-anchor" id="27" href="#consult/1"><tt>consult/1</tt></a>, <a class="lpdoc-idx-anchor" id="28" href="#compile/1"><tt>compile/1</tt></a>, <a class="lpdoc-idx-anchor" id="29" href="#./2"><tt>./2</tt></a>, <a class="lpdoc-idx-anchor" id="30" href="#make_po/1"><tt>make_po/1</tt></a>, <a class="lpdoc-idx-anchor" id="31" href="#unload/1"><tt>unload/1</tt></a>, <a class="lpdoc-idx-anchor" id="32" href="#set_debug_mode/1"><tt>set_debug_mode/1</tt></a>, <a class="lpdoc-idx-anchor" id="33" href="#set_nodebug_mode/1"><tt>set_nodebug_mode/1</tt></a>, <a class="lpdoc-idx-anchor" id="34" href="#force_lazy/1"><tt>force_lazy/1</tt></a>, <a class="lpdoc-idx-anchor" id="35" href="#undo_force_lazy/1"><tt>undo_force_lazy/1</tt></a>, <a class="lpdoc-idx-anchor" id="36" href="#dynamic_search_path/1"><tt>dynamic_search_path/1</tt></a>, <a class="lpdoc-idx-anchor" id="37" href="#multifile/1"><tt>multifile/1</tt></a>. </ul></ul></div></div><div id="Documentation on exports"><h2>Documentation on exports</h2><div><div class="lpdoc-defname"><span class="lpdoc-predtag">PREDICATE</span><a class="lpdoc-idx-anchor" id="use_module/1" href="ciaosearch.html#use_module/1">use_module/1</a></div><div class="lpdoc-deftext"><p><span class="lpdoc-usage-header">Usage:</span><span class="lpdoc-usage-decl"><tt>use_module(Module)</tt> </span><p>Load into the top-level the module defined in <span class="lpdoc-var">Module</span>, importing all the predicates it exports.</p><ul class="lpdoc-itemize-minus"><li><em>The following properties should hold at call time:</em><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="38" href="stream_basic.html#sourcename/1"><tt>stream_basic:sourcename/1</tt></a>)</span><span><span class="lpdoc-var">Module</span> is a source name. </span> </ul></div></div><p> <div><div class="lpdoc-defname"><span class="lpdoc-predtag">PREDICATE</span><a class="lpdoc-idx-anchor" id="use_module/2" href="ciaosearch.html#use_module/2">use_module/2</a></div><div class="lpdoc-deftext"><p><span class="lpdoc-usage-header">Usage:</span><span class="lpdoc-usage-decl"><tt>use_module(Module,Imports)</tt> </span><p>Load into the top-level the module defined in <span class="lpdoc-var">Module</span>, importing the predicates in <span class="lpdoc-var">Imports</span>.</p><ul class="lpdoc-itemize-minus"><li><em>The following properties should hold at call time:</em><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="39" href="stream_basic.html#sourcename/1"><tt>stream_basic:sourcename/1</tt></a>)</span><span><span class="lpdoc-var">Module</span> is a source name. </span><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="40" href="basic_props.html#list/2"><tt>basic_props:list/2</tt></a>)</span><span><span class="lpdoc-var">Imports</span> is a list of <span class="lpdoc-var">predname</span>s. </span> </ul></div></div><p> <div><div class="lpdoc-defname"><span class="lpdoc-predtag">PREDICATE</span><a class="lpdoc-idx-anchor" id="ensure_loaded/1" href="ciaosearch.html#ensure_loaded/1">ensure_loaded/1</a></div><div class="lpdoc-deftext"><p><span class="lpdoc-usage-header">Usage:</span><span class="lpdoc-usage-decl"><tt>ensure_loaded(File)</tt> </span><p>Load into the top-level the code residing in file (or files) <span class="lpdoc-var">File</span>, which is user (i.e. non-module) code.</p><ul class="lpdoc-itemize-minus"><li><em>The following properties should hold at call time:</em><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="41" href="#sourcenames/1"><tt>toplevel_doc:sourcenames/1</tt></a>)</span><span><span class="lpdoc-var">File</span> is a source name or a list of source names. </span> </ul></div></div><p> <div><div class="lpdoc-defname"><span class="lpdoc-predtag">PREDICATE</span><a class="lpdoc-idx-anchor" id="make_exec/2" href="ciaosearch.html#make_exec/2">make_exec/2</a></div><div class="lpdoc-deftext"><p><span class="lpdoc-usage-header">Usage:</span><span class="lpdoc-usage-decl"><tt>make_exec(Files,ExecName)</tt> </span><p>Make a Ciao executable from file (or files) <span class="lpdoc-var">Files</span>, giving it name <span class="lpdoc-var">ExecName</span>. If <span class="lpdoc-var">ExecName</span> is a variable, the compiler will choose a default name for the executable and will bind the variable <span class="lpdoc-var">ExecName</span> to that name. The name is chosen as follows: if the main prolog file has no <tt>.pl</tt> extension or we are in Windows, the executable will have extension <tt>.cpx</tt>; else the executable will be named as the main prolog file without extension.</p><ul class="lpdoc-itemize-minus"><li><em>The following properties should hold at call time:</em><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="42" href="#sourcenames/1"><tt>toplevel_doc:sourcenames/1</tt></a>)</span><span><span class="lpdoc-var">Files</span> is a source name or a list of source names. </span> <li><em>The following properties should hold upon exit:</em><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="43" href="basic_props.html#atm/1"><tt>basic_props:atm/1</tt></a>)</span><span><span class="lpdoc-var">ExecName</span> is an atom. </span> </ul></div></div><p> <div><div class="lpdoc-defname"><span class="lpdoc-predtag">PREDICATE</span><a class="lpdoc-idx-anchor" id="include/1" href="ciaosearch.html#include/1">include/1</a></div><div class="lpdoc-deftext"><p><span class="lpdoc-usage-header">Usage:</span><span class="lpdoc-usage-decl"><tt>include(File)</tt> </span><p>The contents of the file <span class="lpdoc-var">File</span> are included in the top-level shell. For the moment, it only works with some directives, which are interpreted by the shell, or with normal clauses (which are asserted).</p><ul class="lpdoc-itemize-minus"><li><em>The following properties should hold at call time:</em><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="44" href="stream_basic.html#sourcename/1"><tt>stream_basic:sourcename/1</tt></a>)</span><span><span class="lpdoc-var">File</span> is a source name. </span> </ul></div></div><p> <div><div class="lpdoc-defname"><span class="lpdoc-predtag">PREDICATE</span><a class="lpdoc-idx-anchor" id="use_package/1" href="ciaosearch.html#use_package/1">use_package/1</a></div><div class="lpdoc-deftext"><p><span class="lpdoc-usage-header">Usage:</span><span class="lpdoc-usage-decl"><tt>use_package(Package)</tt> </span><p>Include the package or packages specified in <span class="lpdoc-var">Package</span>. Most package contents can be handled in the top level, but there are currently still some limitations.</p><ul class="lpdoc-itemize-minus"><li><em>The following properties should hold at call time:</em><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="45" href="#sourcenames/1"><tt>toplevel_doc:sourcenames/1</tt></a>)</span><span><span class="lpdoc-var">Package</span> is a source name or a list of source names. </span> </ul></div></div><p> <div><div class="lpdoc-defname"><span class="lpdoc-predtag">PREDICATE</span><a class="lpdoc-idx-anchor" id="consult/1" href="ciaosearch.html#consult/1">consult/1</a></div><div class="lpdoc-deftext"><p><span class="lpdoc-usage-header">Usage:</span><span class="lpdoc-usage-decl"><tt>consult(File)</tt> </span><p>Provided for backward compatibility. Similar to <a class="lpdoc-idx-anchor" id="46" href="#ensure_loaded/1"><tt>ensure_loaded/1</tt></a>, but ensuring each listed file is loaded in consult mode (see <a href="debugger_doc.html">The interactive debugger</a>).</p><ul class="lpdoc-itemize-minus"><li><em>The following properties should hold at call time:</em><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="47" href="#sourcenames/1"><tt>toplevel_doc:sourcenames/1</tt></a>)</span><span><span class="lpdoc-var">File</span> is a source name or a list of source names. </span> </ul></div></div><p> <div><div class="lpdoc-defname"><span class="lpdoc-predtag">PREDICATE</span><a class="lpdoc-idx-anchor" id="compile/1" href="ciaosearch.html#compile/1">compile/1</a></div><div class="lpdoc-deftext"><p><span class="lpdoc-usage-header">Usage:</span><span class="lpdoc-usage-decl"><tt>compile(File)</tt> </span><p>Provided for backward compatibility. Similar to <a class="lpdoc-idx-anchor" id="48" href="#ensure_loaded/1"><tt>ensure_loaded/1</tt></a>, but ensuring each listed file is loaded in compile mode (see <a href="debugger_doc.html">The interactive debugger</a>).</p><ul class="lpdoc-itemize-minus"><li><em>The following properties should hold at call time:</em><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="49" href="#sourcenames/1"><tt>toplevel_doc:sourcenames/1</tt></a>)</span><span><span class="lpdoc-var">File</span> is a source name or a list of source names. </span> </ul></div></div><p> <div><div class="lpdoc-defname"><span class="lpdoc-predtag">PREDICATE</span><a class="lpdoc-idx-anchor" id="./2" href="ciaosearch.html#./2">./2</a></div><div class="lpdoc-deftext"><p><span class="lpdoc-usage-header">Usage:</span><span class="lpdoc-usage-decl"><tt>[File|Files]</tt> </span><p>Provided for backward compatibility, obsoleted by <a class="lpdoc-idx-anchor" id="50" href="#ensure_loaded/1"><tt>ensure_loaded/1</tt></a>.</p><ul class="lpdoc-itemize-minus"><li><em>The following properties should hold at call time:</em><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="51" href="stream_basic.html#sourcename/1"><tt>stream_basic:sourcename/1</tt></a>)</span><span><span class="lpdoc-var">File</span> is a source name. </span><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="52" href="basic_props.html#list/2"><tt>basic_props:list/2</tt></a>)</span><span><span class="lpdoc-var">Files</span> is a list of <span class="lpdoc-var">sourcename</span>s. </span> </ul></div></div><p> <div><div class="lpdoc-defname"><span class="lpdoc-predtag">PREDICATE</span><a class="lpdoc-idx-anchor" id="make_po/1" href="ciaosearch.html#make_po/1">make_po/1</a></div><div class="lpdoc-deftext"><p><span class="lpdoc-usage-header">Usage:</span><span class="lpdoc-usage-decl"><tt>make_po(Files)</tt> </span><p>Make object (<tt>.po</tt>) files from <span class="lpdoc-var">Files</span>. Equivalent to executing &quot;<tt>ciaoc -c</tt>&quot; on the files.</p><ul class="lpdoc-itemize-minus"><li><em>The following properties should hold at call time:</em><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="53" href="#sourcenames/1"><tt>toplevel_doc:sourcenames/1</tt></a>)</span><span><span class="lpdoc-var">Files</span> is a source name or a list of source names. </span> </ul></div></div><p> <div><div class="lpdoc-defname"><span class="lpdoc-predtag">PREDICATE</span><a class="lpdoc-idx-anchor" id="unload/1" href="ciaosearch.html#unload/1">unload/1</a></div><div class="lpdoc-deftext"><p><span class="lpdoc-usage-header">Usage:</span><span class="lpdoc-usage-decl"><tt>unload(File)</tt> </span><p>Unloads dynamically loaded file <span class="lpdoc-var">File</span>.</p><ul class="lpdoc-itemize-minus"><li><em>The following properties should hold at call time:</em><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="54" href="stream_basic.html#sourcename/1"><tt>stream_basic:sourcename/1</tt></a>)</span><span><span class="lpdoc-var">File</span> is a source name. </span> </ul></div></div><p> <div><div class="lpdoc-defname"><span class="lpdoc-predtag">PREDICATE</span><a class="lpdoc-idx-anchor" id="set_debug_mode/1" href="ciaosearch.html#set_debug_mode/1">set_debug_mode/1</a></div><div class="lpdoc-deftext"><p><span class="lpdoc-usage-header">Usage:</span><span class="lpdoc-usage-decl"><tt>set_debug_mode(File)</tt> </span><p>Set the loading mode of <span class="lpdoc-var">File</span> to <em>consult</em>. See <a href="debugger_doc.html">The interactive debugger</a>.</p><ul class="lpdoc-itemize-minus"><li><em>The following properties should hold at call time:</em><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="55" href="stream_basic.html#sourcename/1"><tt>stream_basic:sourcename/1</tt></a>)</span><span><span class="lpdoc-var">File</span> is a source name. </span> </ul></div></div><p> <div><div class="lpdoc-defname"><span class="lpdoc-predtag">PREDICATE</span><a class="lpdoc-idx-anchor" id="set_nodebug_mode/1" href="ciaosearch.html#set_nodebug_mode/1">set_nodebug_mode/1</a></div><div class="lpdoc-deftext"><p><span class="lpdoc-usage-header">Usage:</span><span class="lpdoc-usage-decl"><tt>set_nodebug_mode(File)</tt> </span><p>Set the loading mode of <span class="lpdoc-var">File</span> to <em>compile</em>. See <a href="debugger_doc.html">The interactive debugger</a>.</p><ul class="lpdoc-itemize-minus"><li><em>The following properties should hold at call time:</em><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="56" href="stream_basic.html#sourcename/1"><tt>stream_basic:sourcename/1</tt></a>)</span><span><span class="lpdoc-var">File</span> is a source name. </span> </ul></div></div><p> <div><div class="lpdoc-defname"><span class="lpdoc-predtag">PREDICATE</span><a class="lpdoc-idx-anchor" id="force_lazy/1" href="ciaosearch.html#force_lazy/1">force_lazy/1</a></div><div class="lpdoc-deftext"><p><span class="lpdoc-usage-header">Usage:</span><span class="lpdoc-usage-decl"><tt>force_lazy(Module)</tt> </span><p>Force module of name <span class="lpdoc-var">Module</span> to be loaded lazily in the subsequent created executables.</p><ul class="lpdoc-itemize-minus"><li><em>The following properties should hold at call time:</em><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="57" href="basic_props.html#atm/1"><tt>basic_props:atm/1</tt></a>)</span><span><span class="lpdoc-var">Module</span> is an atom. </span> </ul></div></div><p> <div><div class="lpdoc-defname"><span class="lpdoc-predtag">PREDICATE</span><a class="lpdoc-idx-anchor" id="undo_force_lazy/1" href="ciaosearch.html#undo_force_lazy/1">undo_force_lazy/1</a></div><div class="lpdoc-deftext"><p><span class="lpdoc-usage-header">Usage:</span><span class="lpdoc-usage-decl"><tt>undo_force_lazy(Module)</tt> </span><p>Disable a previous <a class="lpdoc-idx-anchor" id="58" href="#force_lazy/1"><tt>force_lazy/1</tt></a> on module <span class="lpdoc-var">Module</span> (or, if it is uninstantiated, all previous <a class="lpdoc-idx-anchor" id="59" href="#force_lazy/1"><tt>force_lazy/1</tt></a>).</p><ul class="lpdoc-itemize-minus"><li><em>Call and exit should be compatible with:</em><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="60" href="basic_props.html#atm/1"><tt>basic_props:atm/1</tt></a>)</span><span><span class="lpdoc-var">Module</span> is an atom. </span> </ul></div></div><p> <div><div class="lpdoc-defname"><span class="lpdoc-predtag">PREDICATE</span><a class="lpdoc-idx-anchor" id="dynamic_search_path/1" href="ciaosearch.html#dynamic_search_path/1">dynamic_search_path/1</a></div><div class="lpdoc-deftext"><p><span class="lpdoc-usage-header">Usage:</span><span class="lpdoc-usage-decl"><tt>dynamic_search_path(Name)</tt> </span><p>Asserting a fact to this data predicate, files using <a class="lpdoc-idx-anchor" id="61" href="ciaosearch.html#path alias">path alias</a> <span class="lpdoc-var">Name</span> will be treated as dynamic in the subsequent created executables.</p><ul class="lpdoc-itemize-minus"><li><em>The following properties should hold at call time:</em><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="62" href="basic_props.html#atm/1"><tt>basic_props:atm/1</tt></a>)</span><span><span class="lpdoc-var">Name</span> is an atom. </span> </ul></div></div><p> <div><div class="lpdoc-defname"><span class="lpdoc-predtag">PREDICATE</span><a class="lpdoc-idx-anchor" id="multifile/1" href="ciaosearch.html#multifile/1">multifile/1</a></div><div class="lpdoc-deftext"><p><span class="lpdoc-usage-header">Usage:</span><span class="lpdoc-usage-decl"><tt>multifile Pred</tt> </span><p>Dynamically declare predicate <span class="lpdoc-var">Pred</span> as multifile. This is useful at the top-level shell to be able to call multifile predicates of loaded files.</p><ul class="lpdoc-itemize-minus"><li><em>The following properties should hold at call time:</em><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="63" href="basic_props.html#predname/1"><tt>basic_props:predname/1</tt></a>)</span><span><span class="lpdoc-var">Pred</span> is a predicate name. </span> </ul></div></div><p> </div><div id="Documentation on internals"><h2>Documentation on internals</h2><div><div class="lpdoc-defname"><span class="lpdoc-predtag">PROPERTY</span><a class="lpdoc-idx-anchor" id="sourcenames/1" href="ciaosearch.html#sourcenames/1">sourcenames/1</a></div><div class="lpdoc-deftext">Is defined as follows:<pre class="lpdoc-codeblock">sourcenames(File) :- sourcename(File). sourcenames(Files) :- list(sourcename,Files). </pre> See <a class="lpdoc-idx-anchor" id="64" href="stream_basic.html#sourcename/1"><tt>sourcename/1</tt></a> in <a href="stream_basic.html">Basic file/stream handling</a><p><span class="lpdoc-usage-header">Usage:</span><span class="lpdoc-usage-decl"><tt>sourcenames(Files)</tt> </span><p><span class="lpdoc-var">Files</span> is a source name or a list of source names.</p><ul class="lpdoc-itemize-minus"></ul></div></div><p> </div><div id="Documentation on imports"><h2>Documentation on imports</h2>This module has the following direct dependencies:<ul class="lpdoc-itemize-minus"><li><em>System library modules:</em><br/><a class="lpdoc-idx-anchor" id="65" href=""><tt>toplevel</tt></a>, <a class="lpdoc-idx-anchor" id="66" href="libpaths.html"><tt>libpaths</tt></a>, <a class="lpdoc-idx-anchor" id="67" href="compiler.html"><tt>compiler</tt></a>, <a class="lpdoc-idx-anchor" id="68" href="ciaosearch.html#exemaker"><tt>exemaker</tt></a>, <a class="lpdoc-idx-anchor" id="69" href="ciaosearch.html#c_itf"><tt>c_itf</tt></a>, <a class="lpdoc-idx-anchor" id="70" href="debugger_doc.html"><tt>debugger</tt></a>. <li><em>Packages:</em><br/><a class="lpdoc-idx-anchor" id="71" href="ciaosearch.html#prelude"><tt>prelude</tt></a>, <a class="lpdoc-idx-anchor" id="72" href="ciaosearch.html#initial"><tt>initial</tt></a>, <a class="lpdoc-idx-anchor" id="73" href="condcomp_doc.html"><tt>condcomp</tt></a>, <a class="lpdoc-idx-anchor" id="74" href="assertions_doc.html"><tt>assertions</tt></a>, <a class="lpdoc-idx-anchor" id="75" href="ciaosearch.html#assertions/assertions_basic"><tt>assertions/assertions_basic</tt></a>. </ul></div></div><div class="lpdoc-footer">Generated with LPdoc using Ciao</div></div><div class="lpdoc-clearer"></div></div></body></html>