@ciao-lang/ts-ciao-interface
Version:
Simple Ciao interface for node.
123 lines (120 loc) • 24.6 kB
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>Aggregates: gathering predicate solutions — 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">☰</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="ExtendLang.html">↑</a><a class="lpdoc-navbutton" href="odd.html">←</a><a class="lpdoc-navbutton" href="datafacts_doc.html">→</a><a class="lpdoc-navbutton" href="ciaosearch.html">🔍</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> »<br/> </li><li><a href="ExtendLang.html">PART IV - Language extensions</a> »<br/> </li><li><a href=""><strong>Aggregates: gathering predicate solutions</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 imports">Documentation on imports</a></li></ul></div><div class="lpdoc-main"><div id=""><h1>Aggregates: gathering predicate solutions</h1><a class="lpdoc-idx-anchor" href="ciaosearch.html#aggregates"></a>
<strong>Author(s):</strong> <a class="lpdoc-idx-anchor" id="Richard A. O'Keefe" href="ciaosearch.html#Richard A. O'Keefe">Richard A. O'Keefe (first version)</a>, <a class="lpdoc-idx-anchor" id="David H.D. Warren" href="ciaosearch.html#David H.D. Warren">David H.D. Warren (first version)</a>, <a class="lpdoc-idx-anchor" id="Mats Carlsson" href="ciaosearch.html#Mats Carlsson">Mats Carlsson (changes)</a>, <a class="lpdoc-idx-anchor" id="Daniel Cabeza" href="ciaosearch.html#Daniel Cabeza">Daniel Cabeza</a>, <a class="lpdoc-idx-anchor" id="Manuel Hermenegildo" href="ciaosearch.html#Manuel Hermenegildo">Manuel Hermenegildo</a>.<p>
This module implements the standard solution aggregation predicates.<p>When there are many solutions to a problem, and when all those solutions are required to be collected together, this can be achieved by repeatedly backtracking and gradually building up a list of the solutions. The following built-in predicates are provided to automate this process.<p><br/><div id="Usage and interface"><h2>Usage and interface</h2><div class="lpdoc-cartouche"><ul><li><strong>Library usage:</strong><br/><tt>:- use_module(library(aggregates)).</tt><li><strong>Exports:</strong><br/><ul class="lpdoc-itemize-minus"><li><em>Predicates:</em><br/><a class="lpdoc-idx-anchor" id="0" href="#setof/3"><tt>setof/3</tt></a>, <a class="lpdoc-idx-anchor" id="1" href="#bagof/3"><tt>bagof/3</tt></a>, <a class="lpdoc-idx-anchor" id="2" href="#findall/3"><tt>findall/3</tt></a>, <a class="lpdoc-idx-anchor" id="3" href="#findall/4"><tt>findall/4</tt></a>, <a class="lpdoc-idx-anchor" id="4" href="#findnsols/4"><tt>findnsols/4</tt></a>, <a class="lpdoc-idx-anchor" id="5" href="#findnsols/5"><tt>findnsols/5</tt></a>, <a class="lpdoc-idx-anchor" id="6" href="#^/2"><tt>^/2</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="setof/3" href="ciaosearch.html#setof/3">setof/3</a></div><div class="lpdoc-deftext"><span class="lpdoc-usage-decl"><tt>setof(Template,Generator,Set)</tt>
</span><p>Finds the <span class="lpdoc-var">Set</span> of instances of the <span class="lpdoc-var">Template</span> satisfying <span class="lpdoc-var">Generator</span>. The set is in ascending order (see <a href="term_compare.html">Comparing terms</a> for a definition of this order) without duplicates, and is non-empty. If there are no solutions, <tt>setof</tt> fails. <tt>setof</tt> may succeed in more than one way, binding free variables in <span class="lpdoc-var">Generator</span> to different values. This can be avoided by using existential quantifiers on the free variables in front of <span class="lpdoc-var">Generator</span>, using <a class="lpdoc-idx-anchor" id="7" href="#^/2"><tt>^/2</tt></a>. For example, given the clauses: <pre class="lpdoc-codeblock">father(bill, tom).
father(bill, ann).
father(bill, john).
father(harry, july).
father(harry, daniel).
</pre> <p>The following query produces two alternative solutions via backtracking: <pre class="lpdoc-codeblock">?- setof(X,father(F,X),Sons).
F = bill,
Sons = [ann,john,tom] ? ;
F = harry,
Sons = [daniel,july] ? ;
no
?-
</pre><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></span>
</span><p></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="8" href="basic_props.html#list/1"><tt>basic_props:list/1</tt></a>)</span><span><span class="lpdoc-var">Set</span> is a list.
</span>
<li><em>The following properties should hold at call time:</em><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="9" href="basic_props.html#term/1"><tt>basic_props:term/1</tt></a>)</span><span><span class="lpdoc-var">Template</span> is any term.
</span><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="10" href="basic_props.html#cgoal/1"><tt>basic_props:cgoal/1</tt></a>)</span><span><span class="lpdoc-var">Generator</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="11" href="basic_props.html#term/1"><tt>basic_props:term/1</tt></a>)</span><span><span class="lpdoc-var">Template</span> is any term.
</span><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="12" href="basic_props.html#list/1"><tt>basic_props:list/1</tt></a>)</span><span><span class="lpdoc-var">Set</span> is a list.
</span>
<li><em>The following properties should hold globally:</em><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="13" href="basic_props.html#not_further_inst/2"><tt>basic_props:not_further_inst/2</tt></a>)</span><span><span class="lpdoc-var">Template</span> is not further instantiated.
</span>
</ul>
<em>Meta-predicate</em> with arguments: <tt>setof(?,goal,?)</tt>.<br/>
<strong>Other properties:</strong> <br/><span class="lpdoc-usage-decl"><tt>setof(X,Y,Z)</tt>
</span><p></p><ul class="lpdoc-itemize-minus"><li><em>The following properties hold globally:</em><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="14" href="basic_props.html#native/2"><tt>basic_props:native/2</tt></a>)</span><span>This predicate is understood natively by CiaoPP as <span class="lpdoc-var">findall(X,Y,Z)</span>.
</span>
</ul></div></div><p>
<div><div class="lpdoc-defname"><span class="lpdoc-predtag">PREDICATE</span><a class="lpdoc-idx-anchor" id="bagof/3" href="ciaosearch.html#bagof/3">bagof/3</a></div><div class="lpdoc-deftext"><span class="lpdoc-usage-decl"><tt>bagof(Template,Generator,Bag)</tt>
</span><p>Finds all the instances of the <span class="lpdoc-var">Template</span> produced by the <span class="lpdoc-var">Generator</span>, and returns them in the <span class="lpdoc-var">Bag</span> in the order in which they were found. If the <span class="lpdoc-var">Generator</span> contains free variables which are not bound in the <span class="lpdoc-var">Template</span>, it assumes that this is like any other Prolog question and that you want bindings for those variables. This can be avoided by using existential quantifiers on the free variables in front of the <span class="lpdoc-var">Generator</span>, using <a class="lpdoc-idx-anchor" id="15" href="#^/2"><tt>^/2</tt></a>.<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></span>
</span><p></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="16" href="basic_props.html#list/1"><tt>basic_props:list/1</tt></a>)</span><span><span class="lpdoc-var">Bag</span> is a list.
</span>
<li><em>The following properties should hold at call time:</em><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="17" href="basic_props.html#term/1"><tt>basic_props:term/1</tt></a>)</span><span><span class="lpdoc-var">Template</span> is any term.
</span><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="18" href="basic_props.html#cgoal/1"><tt>basic_props:cgoal/1</tt></a>)</span><span><span class="lpdoc-var">Generator</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="19" href="basic_props.html#term/1"><tt>basic_props:term/1</tt></a>)</span><span><span class="lpdoc-var">Template</span> is any term.
</span><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="20" href="basic_props.html#list/1"><tt>basic_props:list/1</tt></a>)</span><span><span class="lpdoc-var">Bag</span> is a list.
</span>
<li><em>The following properties should hold globally:</em><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="21" href="basic_props.html#not_further_inst/2"><tt>basic_props:not_further_inst/2</tt></a>)</span><span><span class="lpdoc-var">Template</span> is not further instantiated.
</span>
</ul>
<em>Meta-predicate</em> with arguments: <tt>bagof(?,goal,?)</tt>.<br/>
<strong>Other properties:</strong> <br/><span class="lpdoc-usage-decl"><tt>bagof(X,Y,Z)</tt>
</span><p></p><ul class="lpdoc-itemize-minus"><li><em>The following properties hold globally:</em><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="22" href="basic_props.html#native/2"><tt>basic_props:native/2</tt></a>)</span><span>This predicate is understood natively by CiaoPP as <span class="lpdoc-var">findall(X,Y,Z)</span>.
</span>
</ul></div></div><p>
<div><div class="lpdoc-defname"><span class="lpdoc-predtag">PREDICATE</span><a class="lpdoc-idx-anchor" id="findall/3" href="ciaosearch.html#findall/3">findall/3</a></div><div class="lpdoc-deftext"><span class="lpdoc-usage-decl"><tt>findall(Template,Generator,List)</tt>
</span><p>A special case of bagof, where all free variables in the <span class="lpdoc-var">Generator</span> are taken to be existentially quantified. Faster than the other aggregation predicates.<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></span>
</span><p></p><ul class="lpdoc-itemize-minus"><li><em>Calls should, and exit will be compatible with:</em><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="23" href="basic_props.html#list/1"><tt>basic_props:list/1</tt></a>)</span><span><span class="lpdoc-var">List</span> is a list.
</span>
<li><em>The following properties should hold at call time:</em><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="24" href="basic_props.html#term/1"><tt>basic_props:term/1</tt></a>)</span><span><span class="lpdoc-var">Template</span> is any term.
</span><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="25" href="basic_props.html#cgoal/1"><tt>basic_props:cgoal/1</tt></a>)</span><span><span class="lpdoc-var">Generator</span> is a term which represents a goal, i.e., an atom or a structure.
</span>
<li><em>The following properties hold upon exit:</em><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="26" href="basic_props.html#term/1"><tt>basic_props:term/1</tt></a>)</span><span><span class="lpdoc-var">Template</span> is any term.
</span><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="27" href="basic_props.html#list/1"><tt>basic_props:list/1</tt></a>)</span><span><span class="lpdoc-var">List</span> is a list.
</span>
<li><em>The following properties hold globally:</em><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="28" href="basic_props.html#not_further_inst/2"><tt>basic_props:not_further_inst/2</tt></a>)</span><span><span class="lpdoc-var">Template</span> is not further instantiated.
</span><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><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="30" href="native_props_nfdet_doc.html#not_fails/1"><tt>native_props:not_fails/1</tt></a>)</span><span>All the calls of the form <span class="lpdoc-var">findall(Template,Generator,List)</span> do not fail.
</span><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="31" href="native_props_nfdet_doc.html#is_det/1"><tt>native_props:is_det/1</tt></a>)</span><span>All calls of the form <span class="lpdoc-var">findall(Template,Generator,List)</span> are deterministic.
</span>
</ul>
<em>Meta-predicate</em> with arguments: <tt>findall(?,goal,?)</tt>.<br/></div></div><p>
<div><div class="lpdoc-defname"><span class="lpdoc-predtag">PREDICATE</span><a class="lpdoc-idx-anchor" id="findall/4" href="ciaosearch.html#findall/4">findall/4</a></div><div class="lpdoc-deftext"><p><span class="lpdoc-usage-header">Usage:</span><p>As <a class="lpdoc-idx-anchor" id="32" href="#findall/3"><tt>findall/3</tt></a>, but returning in <span class="lpdoc-var">Tail</span> the tail of <span class="lpdoc-var">List</span> (findall(<span class="lpdoc-var">Template</span>, <span class="lpdoc-var">Generator</span>, <span class="lpdoc-var">List</span>, <span class="lpdoc-var">Tail</span>)).</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="33" href="basic_props.html#term/1"><tt>basic_props:term/1</tt></a>)</span><span><span class="lpdoc-var">Arg3</span> is any term.
</span><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="34" href="basic_props.html#term/1"><tt>basic_props:term/1</tt></a>)</span><span><span class="lpdoc-var">Arg4</span> is any term.
</span>
<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="basic_props.html#term/1"><tt>basic_props:term/1</tt></a>)</span><span><span class="lpdoc-var">Arg1</span> is any term.
</span><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="36" href="basic_props.html#cgoal/1"><tt>basic_props:cgoal/1</tt></a>)</span><span><span class="lpdoc-var">Arg2</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="37" href="basic_props.html#term/1"><tt>basic_props:term/1</tt></a>)</span><span><span class="lpdoc-var">Arg1</span> is any term.
</span><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="38" href="basic_props.html#term/1"><tt>basic_props:term/1</tt></a>)</span><span><span class="lpdoc-var">Arg3</span> is any term.
</span><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="39" href="basic_props.html#term/1"><tt>basic_props:term/1</tt></a>)</span><span><span class="lpdoc-var">Arg4</span> is any term.
</span>
<li><em>The following properties should hold globally:</em><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="40" href="basic_props.html#not_further_inst/2"><tt>basic_props:not_further_inst/2</tt></a>)</span><span><span class="lpdoc-var">Arg1</span> is not further instantiated.
</span>
</ul>
<em>Meta-predicate</em> with arguments: <tt>findall(?,goal,?,?)</tt>.<br/></div></div><p>
<div><div class="lpdoc-defname"><span class="lpdoc-predtag">PREDICATE</span><a class="lpdoc-idx-anchor" id="findnsols/4" href="ciaosearch.html#findnsols/4">findnsols/4</a></div><div class="lpdoc-deftext"><span class="lpdoc-usage-decl"><tt>findnsols(N,Template,Generator,List)</tt>
</span><p>As <a class="lpdoc-idx-anchor" id="41" href="#findall/3"><tt>findall/3</tt></a>, but generating at most <span class="lpdoc-var">N</span> solutions of <span class="lpdoc-var">Generator</span>. Thus, the length of <span class="lpdoc-var">List</span> will not be greater than <span class="lpdoc-var">N</span>. If <span class="lpdoc-var">N</span>=<0, returns directly an empty list. This predicate is especially useful if <span class="lpdoc-var">Generator</span> may have an infinite number of solutions.<p><span class="lpdoc-usage-header">Usage:</span><p></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="42" href="basic_props.html#list/1"><tt>basic_props:list/1</tt></a>)</span><span><span class="lpdoc-var">List</span> is a list.
</span>
<li><em>The following properties should hold at call time:</em><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="43" href="basic_props.html#int/1"><tt>basic_props:int/1</tt></a>)</span><span><span class="lpdoc-var">N</span> is an integer.
</span><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="44" href="basic_props.html#term/1"><tt>basic_props:term/1</tt></a>)</span><span><span class="lpdoc-var">Template</span> is any term.
</span><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="45" href="basic_props.html#cgoal/1"><tt>basic_props:cgoal/1</tt></a>)</span><span><span class="lpdoc-var">Generator</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="46" href="basic_props.html#term/1"><tt>basic_props:term/1</tt></a>)</span><span><span class="lpdoc-var">Template</span> is any term.
</span><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="47" href="basic_props.html#list/1"><tt>basic_props:list/1</tt></a>)</span><span><span class="lpdoc-var">List</span> is a list.
</span>
<li><em>The following properties should hold globally:</em><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="48" href="basic_props.html#not_further_inst/2"><tt>basic_props:not_further_inst/2</tt></a>)</span><span><span class="lpdoc-var">Template</span> is not further instantiated.
</span>
</ul>
<em>Meta-predicate</em> with arguments: <tt>findnsols(?,?,goal,?)</tt>.<br/></div></div><p>
<div><div class="lpdoc-defname"><span class="lpdoc-predtag">PREDICATE</span><a class="lpdoc-idx-anchor" id="findnsols/5" href="ciaosearch.html#findnsols/5">findnsols/5</a></div><div class="lpdoc-deftext"><span class="lpdoc-usage-decl"><tt>findnsols(N,Template,Generator,List,Tail)</tt>
</span><p>As <a class="lpdoc-idx-anchor" id="49" href="#findnsols/4"><tt>findnsols/4</tt></a>, but returning in <span class="lpdoc-var">Tail</span> the tail of <span class="lpdoc-var">List</span>.<p><span class="lpdoc-usage-header">Usage:</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="50" href="basic_props.html#int/1"><tt>basic_props:int/1</tt></a>)</span><span><span class="lpdoc-var">N</span> is an integer.
</span><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="51" href="basic_props.html#term/1"><tt>basic_props:term/1</tt></a>)</span><span><span class="lpdoc-var">Template</span> is any term.
</span><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="52" href="basic_props.html#cgoal/1"><tt>basic_props:cgoal/1</tt></a>)</span><span><span class="lpdoc-var">Generator</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="53" href="basic_props.html#term/1"><tt>basic_props:term/1</tt></a>)</span><span><span class="lpdoc-var">Template</span> is any term.
</span>
<li><em>The following properties should hold globally:</em><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="54" href="basic_props.html#not_further_inst/2"><tt>basic_props:not_further_inst/2</tt></a>)</span><span><span class="lpdoc-var">Template</span> is not further instantiated.
</span>
</ul>
<em>Meta-predicate</em> with arguments: <tt>findnsols(?,?,goal,?,?)</tt>.<br/></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>X^P</tt>
</span><p>Existential quantification: <span class="lpdoc-var">X</span> is existentially quantified in <span class="lpdoc-var">P</span>. E.g., in <tt>A^p(A,B)</tt>, <tt>A</tt> is existentially quantified. Used only within <a class="lpdoc-idx-anchor" id="55" href="ciaosearch.html#aggregation predicates">aggregation predicates</a>. In all other contexts, simply, execute the procedure call <span class="lpdoc-var">P</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="56" href="term_typing.html#var/1"><tt>term_typing:var/1</tt></a>)</span><span><span class="lpdoc-var">X</span> is a free variable.
</span><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="57" href="basic_props.html#cgoal/1"><tt>basic_props:cgoal/1</tt></a>)</span><span><span class="lpdoc-var">P</span> is a term which represents a goal, i.e., an atom or a structure.
</span>
</ul>
<em>Meta-predicate</em> with arguments: <tt>? ^goal</tt>.<br/>
<strong>Other properties:</strong> <br/><span class="lpdoc-usage-decl"><tt>_X^Y</tt>
</span><p></p><ul class="lpdoc-itemize-minus"><li><em>The following properties hold globally:</em><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="58" href="basic_props.html#native/2"><tt>basic_props:native/2</tt></a>)</span><span>This predicate is understood natively by CiaoPP as <span class="lpdoc-var">call(Y)</span>.
</span>
</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="59" href="ciaosearch.html#native_props"><tt>native_props</tt></a>, <a class="lpdoc-idx-anchor" id="60" href="datafacts_rt.html"><tt>datafacts_rt</tt></a>, <a class="lpdoc-idx-anchor" id="61" href="sort.html"><tt>sort</tt></a>, <a class="lpdoc-idx-anchor" id="62" href="lists.html"><tt>lists</tt></a>.
<li><em>Packages:</em><br/><a class="lpdoc-idx-anchor" id="63" href="ciaosearch.html#prelude"><tt>prelude</tt></a>, <a class="lpdoc-idx-anchor" id="64" href="ciaosearch.html#initial"><tt>initial</tt></a>, <a class="lpdoc-idx-anchor" id="65" href="condcomp_doc.html"><tt>condcomp</tt></a>, <a class="lpdoc-idx-anchor" id="66" href="assertions_doc.html"><tt>assertions</tt></a>, <a class="lpdoc-idx-anchor" id="67" href="ciaosearch.html#assertions/assertions_basic"><tt>assertions/assertions_basic</tt></a>, <a class="lpdoc-idx-anchor" id="68" href="ciaosearch.html#nortchecks"><tt>nortchecks</tt></a>, <a class="lpdoc-idx-anchor" id="69" href="isomodes_doc.html"><tt>isomodes</tt></a>, <a class="lpdoc-idx-anchor" id="70" href="ciaosearch.html#nativeprops"><tt>nativeprops</tt></a>, <a class="lpdoc-idx-anchor" id="71" href="ciaosearch.html#hiord"><tt>hiord</tt></a>, <a class="lpdoc-idx-anchor" id="72" 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>