UNPKG

@ciao-lang/ts-ciao-interface

Version:

Simple Ciao interface for node.

140 lines 31.5 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>Dynamic predicates (not source preserving) (runtime) &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="dynamic_doc.html">&#x2191;</a><a class="lpdoc-navbutton" href="dynamic_doc.html">&#x2190;</a><a class="lpdoc-navbutton" href="dynamic_clauses_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="ExtendLang.html">PART IV - Language extensions</a> &raquo;<br/> </li><li><a href="dynamic_doc.html">Dynamic predicates (not source preserving)</a> &raquo;<br/> </li><li><a href=""><strong>Dynamic predicates (not source preserving) (runtime)</strong></a></li></ul><hr></hr><em>ON THIS PAGE</em><ul><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 multifiles">Documentation on multifiles</a></li><li><a href="#Documentation on imports">Documentation on imports</a></li></ul></div><div class="lpdoc-main"><div id=""><h1>Dynamic predicates (not source preserving) (runtime)</h1><a class="lpdoc-idx-anchor" href="ciaosearch.html#dynamic_rt"></a> <strong>Author(s):</strong> <a class="lpdoc-idx-anchor" id="The Ciao Development Team" href="ciaosearch.html#The Ciao Development Team">The Ciao Development Team</a>.<p> This module implements the assert/retract family of predicates to manipulate dynamic predicates. This module does not preserve the original source definition of dynamic predicates.<br/><div id="Usage and interface"><h2>Usage and interface</h2><div class="lpdoc-cartouche"><ul><li><strong>Library usage:</strong><br/>Do not use this module directly (use the <a class="lpdoc-idx-anchor" id="0" href="dynamic_doc.html"><tt>dynamic</tt></a> package instead).<li><strong>Exports:</strong><br/><ul class="lpdoc-itemize-minus"><li><em>Predicates:</em><br/><a class="lpdoc-idx-anchor" id="1" href="#asserta/1"><tt>asserta/1</tt></a>, <a class="lpdoc-idx-anchor" id="2" href="#asserta/2"><tt>asserta/2</tt></a>, <a class="lpdoc-idx-anchor" id="3" href="#assertz/1"><tt>assertz/1</tt></a>, <a class="lpdoc-idx-anchor" id="4" href="#assertz/2"><tt>assertz/2</tt></a>, <a class="lpdoc-idx-anchor" id="5" href="#assert/1"><tt>assert/1</tt></a>, <a class="lpdoc-idx-anchor" id="6" href="#assert/2"><tt>assert/2</tt></a>, <a class="lpdoc-idx-anchor" id="7" href="#retract/1"><tt>retract/1</tt></a>, <a class="lpdoc-idx-anchor" id="8" href="#retractall/1"><tt>retractall/1</tt></a>, <a class="lpdoc-idx-anchor" id="9" href="#abolish/1"><tt>abolish/1</tt></a>, <a class="lpdoc-idx-anchor" id="10" href="#clause/2"><tt>clause/2</tt></a>, <a class="lpdoc-idx-anchor" id="11" href="#clause/3"><tt>clause/3</tt></a>, <a class="lpdoc-idx-anchor" id="12" href="#wellformed_body/3"><tt>wellformed_body/3</tt></a>, <a class="lpdoc-idx-anchor" id="13" href="#current_predicate/1"><tt>current_predicate/1</tt></a>, <a class="lpdoc-idx-anchor" id="14" href="#current_predicate/2"><tt>current_predicate/2</tt></a>, <a class="lpdoc-idx-anchor" id="15" href="#dynamic/1"><tt>dynamic/1</tt></a>, <a class="lpdoc-idx-anchor" id="16" href="datafacts_rt.html#data/1"><tt>data/1</tt></a>. <li><em>Multifiles:</em><br/><a class="lpdoc-idx-anchor" id="17" href="#do_on_abolish/1"><tt>do_on_abolish/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="asserta/1" href="ciaosearch.html#asserta/1">asserta/1</a></div><div class="lpdoc-deftext"><p><span class="lpdoc-usage-header">Usage:</span><span class="lpdoc-usage-decl"><span class="lpdoc-on-right"><span class="lpdoc-iso">ISO</span></span><span><tt>asserta(Clause)</tt></span> </span><p>The current instance of <span class="lpdoc-var">Clause</span> is interpreted as a clause and is added to the current program. The predicate concerned must be dynamic. The new clause becomes the <em>first</em> clause for the predicate concerned. Any uninstantiated variables in <span class="lpdoc-var">Clause</span> will be replaced by new private variables.</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="19" href="ciaosearch.html#cl/1"><tt>dynamic_rt:cl/1</tt></a>)</span><span><a class="lpdoc-idx-anchor" id="18" href="ciaosearch.html#cl(Clause)"><tt>dynamic_rt:cl(Clause)</tt></a> </span> <li><em>The following properties should hold globally:</em><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="20" href="basic_props.html#native/1"><tt>basic_props:native/1</tt></a>)</span><span>This predicate is understood natively by CiaoPP. </span> </ul> <em>Meta-predicate</em> with arguments: <tt>asserta(clause)</tt>.<br/></div></div><p> <div><div class="lpdoc-defname"><span class="lpdoc-predtag">PREDICATE</span><a class="lpdoc-idx-anchor" id="asserta/2" href="ciaosearch.html#asserta/2">asserta/2</a></div><div class="lpdoc-deftext"><p><span class="lpdoc-usage-header">Usage:</span><span class="lpdoc-usage-decl"><tt>asserta(Clause,Ref)</tt> </span><p>Like <tt>asserta/1</tt>. <span class="lpdoc-var">Ref</span> is a unique identifier of the asserted clause.</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="21" href="term_typing.html#nonvar/1"><tt>term_typing:nonvar/1</tt></a>)</span><span><span class="lpdoc-var">Clause</span> is currently a term which is not a free variable. </span><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="22" href="term_typing.html#var/1"><tt>term_typing:var/1</tt></a>)</span><span><span class="lpdoc-var">Ref</span> is a free variable. </span><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="24" href="ciaosearch.html#cl/1"><tt>dynamic_rt:cl/1</tt></a>)</span><span><a class="lpdoc-idx-anchor" id="23" href="ciaosearch.html#cl(Clause)"><tt>dynamic_rt:cl(Clause)</tt></a> </span> <li><em>The following properties should hold globally:</em><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="25" href="basic_props.html#native/1"><tt>basic_props:native/1</tt></a>)</span><span>This predicate is understood natively by CiaoPP. </span> </ul> <em>Meta-predicate</em> with arguments: <tt>asserta(clause,?)</tt>.<br/></div></div><p> <div><div class="lpdoc-defname"><span class="lpdoc-predtag">PREDICATE</span><a class="lpdoc-idx-anchor" id="assertz/1" href="ciaosearch.html#assertz/1">assertz/1</a></div><div class="lpdoc-deftext"><p><span class="lpdoc-usage-header">Usage:</span><span class="lpdoc-usage-decl"><span class="lpdoc-on-right"><span class="lpdoc-iso">ISO</span></span><span><tt>assertz(Clause)</tt></span> </span><p>Like <tt>asserta/1</tt>, except that the new clause becomes the <em>last</em> clause for the predicate concerned.</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="26" href="term_typing.html#nonvar/1"><tt>term_typing:nonvar/1</tt></a>)</span><span><span class="lpdoc-var">Clause</span> is currently a term which is not a free variable. </span><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="28" href="ciaosearch.html#cl/1"><tt>dynamic_rt:cl/1</tt></a>)</span><span><a class="lpdoc-idx-anchor" id="27" href="ciaosearch.html#cl(Clause)"><tt>dynamic_rt:cl(Clause)</tt></a> </span> <li><em>The following properties should hold globally:</em><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="29" href="basic_props.html#native/1"><tt>basic_props:native/1</tt></a>)</span><span>This predicate is understood natively by CiaoPP. </span> </ul> <em>Meta-predicate</em> with arguments: <tt>assertz(clause)</tt>.<br/></div></div><p> <div><div class="lpdoc-defname"><span class="lpdoc-predtag">PREDICATE</span><a class="lpdoc-idx-anchor" id="assertz/2" href="ciaosearch.html#assertz/2">assertz/2</a></div><div class="lpdoc-deftext"><p><span class="lpdoc-usage-header">Usage:</span><span class="lpdoc-usage-decl"><tt>assertz(Clause,Ref)</tt> </span><p>Like <tt>assertz/1</tt>. <span class="lpdoc-var">Ref</span> is a unique identifier of the asserted clause.</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="30" href="term_typing.html#nonvar/1"><tt>term_typing:nonvar/1</tt></a>)</span><span><span class="lpdoc-var">Clause</span> is currently a term which is not a free variable. </span><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="31" href="term_typing.html#var/1"><tt>term_typing:var/1</tt></a>)</span><span><span class="lpdoc-var">Ref</span> is a free variable. </span><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="33" href="ciaosearch.html#cl/1"><tt>dynamic_rt:cl/1</tt></a>)</span><span><a class="lpdoc-idx-anchor" id="32" href="ciaosearch.html#cl(Clause)"><tt>dynamic_rt:cl(Clause)</tt></a> </span> <li><em>The following properties should hold globally:</em><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="34" href="basic_props.html#native/1"><tt>basic_props:native/1</tt></a>)</span><span>This predicate is understood natively by CiaoPP. </span> </ul> <em>Meta-predicate</em> with arguments: <tt>assertz(clause,?)</tt>.<br/></div></div><p> <div><div class="lpdoc-defname"><span class="lpdoc-predtag">PREDICATE</span><a class="lpdoc-idx-anchor" id="assert/1" href="ciaosearch.html#assert/1">assert/1</a></div><div class="lpdoc-deftext"><p><span class="lpdoc-usage-header">Usage:</span><span class="lpdoc-usage-decl"><tt>assert(Clause)</tt> </span><p>Identical to <tt>assertz/1</tt>. Included for compatibility.</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="35" href="term_typing.html#nonvar/1"><tt>term_typing:nonvar/1</tt></a>)</span><span><span class="lpdoc-var">Clause</span> is currently a term which is not a free variable. </span><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="37" href="ciaosearch.html#cl/1"><tt>dynamic_rt:cl/1</tt></a>)</span><span><a class="lpdoc-idx-anchor" id="36" href="ciaosearch.html#cl(Clause)"><tt>dynamic_rt:cl(Clause)</tt></a> </span> <li><em>The following properties should hold globally:</em><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="38" href="basic_props.html#native/1"><tt>basic_props:native/1</tt></a>)</span><span>This predicate is understood natively by CiaoPP. </span> </ul> <em>Meta-predicate</em> with arguments: <tt>assert(clause)</tt>.<br/></div></div><p> <div><div class="lpdoc-defname"><span class="lpdoc-predtag">PREDICATE</span><a class="lpdoc-idx-anchor" id="assert/2" href="ciaosearch.html#assert/2">assert/2</a></div><div class="lpdoc-deftext"><p><span class="lpdoc-usage-header">Usage:</span><span class="lpdoc-usage-decl"><tt>assert(Clause,Ref)</tt> </span><p>Identical to <tt>assertz/2</tt>. Included for compatibility.</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="term_typing.html#nonvar/1"><tt>term_typing:nonvar/1</tt></a>)</span><span><span class="lpdoc-var">Clause</span> is currently a term which is not a free variable. </span><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="40" href="term_typing.html#var/1"><tt>term_typing:var/1</tt></a>)</span><span><span class="lpdoc-var">Ref</span> is a free variable. </span><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="42" href="ciaosearch.html#cl/1"><tt>dynamic_rt:cl/1</tt></a>)</span><span><a class="lpdoc-idx-anchor" id="41" href="ciaosearch.html#cl(Clause)"><tt>dynamic_rt:cl(Clause)</tt></a> </span> <li><em>The following properties should hold globally:</em><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="43" href="basic_props.html#native/1"><tt>basic_props:native/1</tt></a>)</span><span>This predicate is understood natively by CiaoPP. </span> </ul> <em>Meta-predicate</em> with arguments: <tt>assert(clause,?)</tt>.<br/></div></div><p> <div><div class="lpdoc-defname"><span class="lpdoc-predtag">PREDICATE</span><a class="lpdoc-idx-anchor" id="retract/1" href="ciaosearch.html#retract/1">retract/1</a></div><div class="lpdoc-deftext"><p><span class="lpdoc-usage-header">Usage:</span><span class="lpdoc-usage-decl"><span class="lpdoc-on-right"><span class="lpdoc-iso">ISO</span></span><span><tt>retract(Clause)</tt></span> </span><p>The first clause in the program that matches <span class="lpdoc-var">Clause</span> is erased. The predicate concerned must be dynamic.<p>The predicate <tt>retract/1</tt> may be used in a non-determinate fashion, i.e., it will successively retract clauses matching the argument through backtracking. If reactivated by backtracking, invocations of the predicate whose clauses are being retracted will proceed unaffected by the retracts. This is also true for invocations of <tt>clause</tt> for the same predicate. The space occupied by a retracted clause will be recovered when instances of the clause are no longer in use.</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="term_typing.html#nonvar/1"><tt>term_typing:nonvar/1</tt></a>)</span><span><span class="lpdoc-var">Clause</span> is currently a term which is not a free variable. </span><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="46" href="ciaosearch.html#cl/1"><tt>dynamic_rt:cl/1</tt></a>)</span><span><a class="lpdoc-idx-anchor" id="45" href="ciaosearch.html#cl(Clause)"><tt>dynamic_rt:cl(Clause)</tt></a> </span> <li><em>The following properties should hold globally:</em><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="47" href="basic_props.html#native/1"><tt>basic_props:native/1</tt></a>)</span><span>This predicate is understood natively by CiaoPP. </span> </ul> <em>Meta-predicate</em> with arguments: <tt>retract(clause)</tt>.<br/></div></div><p> <div><div class="lpdoc-defname"><span class="lpdoc-predtag">PREDICATE</span><a class="lpdoc-idx-anchor" id="retractall/1" href="ciaosearch.html#retractall/1">retractall/1</a></div><div class="lpdoc-deftext"><p><span class="lpdoc-usage-header">Usage:</span><span class="lpdoc-usage-decl"><tt>retractall(Head)</tt> </span><p>Erase all clauses whose head matches <span class="lpdoc-var">Head</span>, where <span class="lpdoc-var">Head</span> must be instantiated to an atom or a compound term. The predicate concerned must be dynamic. The predicate definition is retained.</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="48" href="term_typing.html#nonvar/1"><tt>term_typing:nonvar/1</tt></a>)</span><span><span class="lpdoc-var">Head</span> is currently a term which is not a free variable. </span><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="49" href="basic_props.html#cgoal/1"><tt>basic_props:cgoal/1</tt></a>)</span><span><span class="lpdoc-var">Head</span> is a term which represents a goal, i.e., an atom or a structure. </span> <li><em>The following properties should hold globally:</em><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="50" href="basic_props.html#native/1"><tt>basic_props:native/1</tt></a>)</span><span>This predicate is understood natively by CiaoPP. </span> </ul> <em>Meta-predicate</em> with arguments: <tt>retractall(fact)</tt>.<br/></div></div><p> <div><div class="lpdoc-defname"><span class="lpdoc-predtag">PREDICATE</span><a class="lpdoc-idx-anchor" id="abolish/1" href="ciaosearch.html#abolish/1">abolish/1</a></div><div class="lpdoc-deftext"><p><span class="lpdoc-usage-header">Usage:</span><span class="lpdoc-usage-decl"><span class="lpdoc-on-right"><span class="lpdoc-iso">ISO</span></span><span><tt>abolish(Spec)</tt></span> </span><p>Erase all clauses of the predicate specified by the predicate spec <span class="lpdoc-var">Spec</span>. The predicate definition itself is also erased (the predicate is deemed undefined after execution of the abolish). The predicates concerned must all be user defined.</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="term_typing.html#nonvar/1"><tt>term_typing:nonvar/1</tt></a>)</span><span><span class="lpdoc-var">Spec</span> is currently a term which is not a free variable. </span><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="52" href="basic_props.html#predname/1"><tt>basic_props:predname/1</tt></a>)</span><span><span class="lpdoc-var">Spec</span> is a predicate name. </span> <li><em>The following properties should hold globally:</em><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="53" href="basic_props.html#native/1"><tt>basic_props:native/1</tt></a>)</span><span>This predicate is understood natively by CiaoPP. </span> </ul> <em>Meta-predicate</em> with arguments: <tt>abolish(spec)</tt>.<br/></div></div><p> <div><div class="lpdoc-defname"><span class="lpdoc-predtag">PREDICATE</span><a class="lpdoc-idx-anchor" id="clause/2" href="ciaosearch.html#clause/2">clause/2</a></div><div class="lpdoc-deftext"><p><span class="lpdoc-usage-header">Usage:</span><span class="lpdoc-usage-decl"><span class="lpdoc-on-right"><span class="lpdoc-iso">ISO</span></span><span><tt>clause(Head,Body)</tt></span> </span><p>The clause &apos;<span class="lpdoc-var">Head</span> <tt>:-</tt> <span class="lpdoc-var">Body</span>&apos; exists in the current program. The predicate concerned must be dynamic.</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="term_typing.html#nonvar/1"><tt>term_typing:nonvar/1</tt></a>)</span><span><span class="lpdoc-var">Head</span> is currently a term which is not a free variable. </span><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="55" href="basic_props.html#cgoal/1"><tt>basic_props:cgoal/1</tt></a>)</span><span><span class="lpdoc-var">Head</span> is a term which represents a goal, i.e., an atom or a structure. </span> <li><em>The following properties should hold upon exit:</em><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="57" href="pretty_print.html#body/1"><tt>dynamic_rt:body/1</tt></a>)</span><span><a class="lpdoc-idx-anchor" id="56" href="ciaosearch.html#body(Body)"><tt>dynamic_rt:body(Body)</tt></a> </span> <li><em>The following properties should hold globally:</em><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="58" href="basic_props.html#native/1"><tt>basic_props:native/1</tt></a>)</span><span>This predicate is understood natively by CiaoPP. </span> </ul> <em>Meta-predicate</em> with arguments: <tt>clause(fact,?)</tt>.<br/></div></div><p> <div><div class="lpdoc-defname"><span class="lpdoc-predtag">PREDICATE</span><a class="lpdoc-idx-anchor" id="clause/3" href="ciaosearch.html#clause/3">clause/3</a></div><div class="lpdoc-deftext"><span class="lpdoc-usage-decl"><tt>clause(Head,Body,Ref)</tt> </span><p>Like <tt>clause(Head,Body)</tt>, plus the clause is uniquely identified by <span class="lpdoc-var">Ref</span>.<p><span class="lpdoc-usage-header">Usage 1:</span><span class="lpdoc-usage-decl"><tt>clause(Head,Body,Ref)</tt> </span><p><span class="lpdoc-var">Head</span> must be instantiated to an atom or a compound term.</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="59" href="term_typing.html#nonvar/1"><tt>term_typing:nonvar/1</tt></a>)</span><span><span class="lpdoc-var">Head</span> is currently a term which is not a free variable. </span><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="60" href="basic_props.html#cgoal/1"><tt>basic_props:cgoal/1</tt></a>)</span><span><span class="lpdoc-var">Head</span> is a term which represents a goal, i.e., an atom or a structure. </span> <li><em>The following properties should hold upon exit:</em><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="62" href="pretty_print.html#body/1"><tt>dynamic_rt:body/1</tt></a>)</span><span><a class="lpdoc-idx-anchor" id="61" href="ciaosearch.html#body(Body)"><tt>dynamic_rt:body(Body)</tt></a> </span><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="63" href="term_typing.html#nonvar/1"><tt>term_typing:nonvar/1</tt></a>)</span><span><span class="lpdoc-var">Ref</span> is currently a term which is not a free variable. </span> </ul><p><span class="lpdoc-usage-header">Usage 2:</span><span class="lpdoc-usage-decl"><tt>clause(Head,Body,Ref)</tt> </span><p><span class="lpdoc-var">Ref</span> must be instantiated to a valid identifier.</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="64" href="term_typing.html#nonvar/1"><tt>term_typing:nonvar/1</tt></a>)</span><span><span class="lpdoc-var">Ref</span> is currently a term which is not a free variable. </span> <li><em>The following properties should hold upon exit:</em><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="65" href="basic_props.html#cgoal/1"><tt>basic_props:cgoal/1</tt></a>)</span><span><span class="lpdoc-var">Head</span> is a term which represents a goal, i.e., an atom or a structure. </span><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="67" href="pretty_print.html#body/1"><tt>dynamic_rt:body/1</tt></a>)</span><span><a class="lpdoc-idx-anchor" id="66" href="ciaosearch.html#body(Body)"><tt>dynamic_rt:body(Body)</tt></a> </span> </ul> <em>Meta-predicate</em> with arguments: <tt>clause(fact,?,?)</tt>.<br/></div></div><p> <div><div class="lpdoc-defname"><span class="lpdoc-predtag">PREDICATE</span><a class="lpdoc-idx-anchor" id="wellformed_body/3" href="ciaosearch.html#wellformed_body/3">wellformed_body/3</a></div><div class="lpdoc-deftext"><span class="lpdoc-usage-decl"><tt>wellformed_body(BodyIn,Env,BodyOut)</tt> </span><p><span class="lpdoc-var">BodyIn</span> is a well-formed clause body. <span class="lpdoc-var">BodyOut</span> is its counterpart with no single-variable meta-goals (i.e., with <tt>call(X)</tt> for <tt>X</tt>). <tt>Env</tt> denotes if global cuts are admissible in <tt>BodyIn</tt> (<tt>+</tt> if they are, <tt>-</tt> if they are not).</div></div><p> <div><div class="lpdoc-defname"><span class="lpdoc-predtag">PREDICATE</span><a class="lpdoc-idx-anchor" id="current_predicate/1" href="ciaosearch.html#current_predicate/1">current_predicate/1</a></div><div class="lpdoc-deftext"><p><span class="lpdoc-usage-header">Usage:</span><span class="lpdoc-usage-decl"><span class="lpdoc-on-right"><span class="lpdoc-iso">ISO</span></span><span><tt>current_predicate(Spec)</tt></span> </span><p>A predicate in the current module is named <span class="lpdoc-var">Spec</span>.</p><ul class="lpdoc-itemize-minus"><li><em>The following properties should hold upon exit:</em><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="68" href="basic_props.html#predname/1"><tt>basic_props:predname/1</tt></a>)</span><span><span class="lpdoc-var">Spec</span> is a predicate name. </span> <li><em>The following properties should hold globally:</em><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="69" href="basic_props.html#native/1"><tt>basic_props:native/1</tt></a>)</span><span>This predicate is understood natively by CiaoPP. </span> </ul></div></div><p> <div><div class="lpdoc-defname"><span class="lpdoc-predtag">PREDICATE</span><a class="lpdoc-idx-anchor" id="current_predicate/2" href="ciaosearch.html#current_predicate/2">current_predicate/2</a></div><div class="lpdoc-deftext"><p><span class="lpdoc-usage-header">Usage:</span><span class="lpdoc-usage-decl"><tt>current_predicate(Spec,Module)</tt> </span><p>A predicate in <span class="lpdoc-var">Module</span> is named <span class="lpdoc-var">Spec</span>. <span class="lpdoc-var">Module</span> never is an engine module.</p><ul class="lpdoc-itemize-minus"><li><em>The following properties should hold upon exit:</em><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="70" href="basic_props.html#predname/1"><tt>basic_props:predname/1</tt></a>)</span><span><span class="lpdoc-var">Spec</span> is a predicate name. </span><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="71" href="basic_props.html#internal_module_id/1"><tt>basic_props:internal_module_id/1</tt></a>)</span><span><span class="lpdoc-var">Module</span> is an internal module identifier </span> <li><em>The following properties should hold globally:</em><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="72" href="basic_props.html#native/1"><tt>basic_props:native/1</tt></a>)</span><span>This predicate is understood natively by CiaoPP. </span> </ul></div></div><p> <div><div class="lpdoc-defname"><span class="lpdoc-predtag">PREDICATE</span><a class="lpdoc-idx-anchor" id="dynamic/1" href="ciaosearch.html#dynamic/1">dynamic/1</a></div><div class="lpdoc-deftext"><span class="lpdoc-usage-decl"><tt>dynamic(Spec)</tt> </span><p><span class="lpdoc-var">Spec</span> is of the form <span class="lpdoc-var">F</span>/<span class="lpdoc-var">A</span>. The predicate named <span class="lpdoc-var">F</span> with arity <span class="lpdoc-var">A</span> is made <a class="lpdoc-idx-anchor" id="73" href="ciaosearch.html#dynamic">dynamic</a> in the current module at runtime (useful for predicate names generated on-the-fly). If the predicate functor name <span class="lpdoc-var">F</span> is uninstatiated, a new, unique, predicate name is generated at runtime.<p><span class="lpdoc-usage-header">Usage:</span><span class="lpdoc-usage-decl"><tt>dynamic(Spec)</tt> </span><p></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="74" href="term_typing.html#nonvar/1"><tt>term_typing:nonvar/1</tt></a>)</span><span><span class="lpdoc-var">Spec</span> is currently a term which is not a free variable. </span><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="75" href="basic_props.html#predname/1"><tt>basic_props:predname/1</tt></a>)</span><span><span class="lpdoc-var">Spec</span> is a predicate name. </span> </ul></div></div><p> <div><div class="lpdoc-defname"><span class="lpdoc-predtag">PREDICATE</span><a class="lpdoc-idx-anchor" id="data/1" href="ciaosearch.html#data/1">data/1</a></div><div class="lpdoc-deftext"><span class="lpdoc-usage-decl"><tt>data(Spec)</tt> </span><p><span class="lpdoc-var">Spec</span> is of the form <span class="lpdoc-var">F</span>/<span class="lpdoc-var">A</span>. The predicate named <span class="lpdoc-var">F</span> with arity <span class="lpdoc-var">A</span> is made <a class="lpdoc-idx-anchor" id="76" href="ciaosearch.html#data">data</a> in the current module at runtime (useful for predicate names generated on-the-fly). If the predicate functor name <span class="lpdoc-var">F</span> is uninstatiated, a new, unique, predicate name is generated at runtime. <p><span class="lpdoc-usage-header">Usage:</span><span class="lpdoc-usage-decl"><tt>data(Spec)</tt> </span><p></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="77" href="term_typing.html#nonvar/1"><tt>term_typing:nonvar/1</tt></a>)</span><span><span class="lpdoc-var">Spec</span> is currently a term which is not a free variable. </span><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="78" href="basic_props.html#predname/1"><tt>basic_props:predname/1</tt></a>)</span><span><span class="lpdoc-var">Spec</span> is a predicate name. </span> </ul></div></div><p> </div><div id="Documentation on multifiles"><h2>Documentation on multifiles</h2><div><div class="lpdoc-defname"><span class="lpdoc-predtag">PREDICATE</span><a class="lpdoc-idx-anchor" id="do_on_abolish/1" href="ciaosearch.html#do_on_abolish/1">do_on_abolish/1</a></div><div class="lpdoc-deftext"><span class="lpdoc-usage-decl"><tt>do_on_abolish(Head)</tt> </span><p>A hook predicate which will be called when the definition of the predicate of <span class="lpdoc-var">Head</span> is abolished.<p><span class="lpdoc-usage-header">Usage:</span><span class="lpdoc-usage-decl"><tt>do_on_abolish(G)</tt> </span><p></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="79" href="basic_props.html#cgoal/1"><tt>basic_props:cgoal/1</tt></a>)</span><span><span class="lpdoc-var">G</span> is a term which represents a goal, i.e., an atom or a structure. </span> </ul> The predicate is <em>multifile</em>.<br/></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="80" href="datafacts_rt.html"><tt>datafacts_rt</tt></a>. <li><em>Packages:</em><br/><a class="lpdoc-idx-anchor" id="81" href="noprelude_doc.html"><tt>noprelude</tt></a>, <a class="lpdoc-idx-anchor" id="82" href="ciaosearch.html#initial"><tt>initial</tt></a>, <a class="lpdoc-idx-anchor" id="83" href="condcomp_doc.html"><tt>condcomp</tt></a>, <a class="lpdoc-idx-anchor" id="84" href="assertions_doc.html"><tt>assertions</tt></a>, <a class="lpdoc-idx-anchor" id="85" href="ciaosearch.html#assertions/assertions_basic"><tt>assertions/assertions_basic</tt></a>, <a class="lpdoc-idx-anchor" id="86" href="isomodes_doc.html"><tt>isomodes</tt></a>, <a class="lpdoc-idx-anchor" id="87" href="regtypes_doc.html"><tt>regtypes</tt></a>, <a class="lpdoc-idx-anchor" id="88" href="datafacts_doc.html"><tt>datafacts</tt></a>. </ul></div></div><div class="lpdoc-footer">Generated with LPdoc using Ciao</div></div><div class="lpdoc-clearer"></div></div></body></html>