@ciao-lang/ts-ciao-interface
Version:
Simple Ciao interface for node.
109 lines (107 loc) • 24.3 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>Classical Prolog modes — 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="AssrtLang.html">↑</a><a class="lpdoc-navbutton" href="native_props_cost_doc.html">←</a><a class="lpdoc-navbutton" href="isomodes_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="AssrtLang.html">PART III - Assertions and auto-documentation</a> »<br/> </li><li><a href=""><strong>Classical Prolog modes</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 new modes">Documentation on new modes</a></li></ul></div><div class="lpdoc-main"><div id=""><h1>Classical Prolog modes</h1><a class="lpdoc-idx-anchor" href="ciaosearch.html#modes"></a>
<strong>Author(s):</strong> <a class="lpdoc-idx-anchor" id="Manuel Hermenegildo" href="ciaosearch.html#Manuel Hermenegildo">Manuel Hermenegildo</a>.<p>
This package defines a number of <a class="lpdoc-idx-anchor" id="0" href="ciaosearch.html#modes">modes</a> which are frequently useful in programs when describing predicates, e.g., via <a class="lpdoc-idx-anchor" id="1" href="ciaosearch.html#pred"><tt>pred</tt></a> assertions. They correspond to the modes used in many classical Prolog texts and code as documentation, with some additions. However, these modes are actually syntactic sugar for assertions, that can be checked either statically or dynamically. Note that some of these modes use the same symbol as one of the <a class="lpdoc-idx-anchor" id="2" href="basicmodes_doc.html"><tt>basicmodes</tt></a> and <a class="lpdoc-idx-anchor" id="3" href="isomodes_doc.html"><tt>isomodes</tt></a> packages (see <a href="basicmodes_doc.html">Some basic Prolog modes</a> and <a href="isomodes_doc.html">ISO-Prolog modes</a>) but have in some cases subtly different meaning.<p>As an example, the following declaration:<p><pre class="lpdoc-codeblock">:- pred is(-,+).
</pre> <p>Expresses that <a class="lpdoc-idx-anchor" id="4" href="arithmetic.html#is/2"><tt>is/2</tt></a> should be called with the second argument bound and it will bind the first argument. Also:<p><pre class="lpdoc-codeblock">:- pred is(-num,+arithexpression).
</pre> <p>(more precise than the above), expresses that <a class="lpdoc-idx-anchor" id="5" href="arithmetic.html#is/2"><tt>is/2</tt></a> should be called with the second argument instantiated to an arithmetic expression and that on success it will bind the first argument to a number. The argument of a mode as above can be any property, including, e.g., regular types.<p>The first declaration is equivalent to (it is in fact translated to) the assertion:<p><pre class="lpdoc-codeblock">:- pred is(X,Y) : nonvar(Y) => nonvar(X).
</pre> <p>and the second one to:<p><pre class="lpdoc-codeblock">:- pred is(X,Y) : arithexpression(Y) => num(X).
</pre> <p>Modes can also be included inside comments in markdown format (see the <a class="lpdoc-idx-anchor" id="6" href="doccomments_doc.html"><tt>doccomments</tt></a> and <a class="lpdoc-idx-anchor" id="7" href="ciaosearch.html#markdown"><tt>markdown</tt></a> libraries). For example:<p><pre class="lpdoc-codeblock">%! pred is(-,+):
% Evaluates the expression in the second argument
% and binds the first argument with the result.
</pre> <p>and they are also translated to the corresponding assertions.<br/><div id="Usage and interface"><h2>Usage and interface</h2><div class="lpdoc-cartouche"><ul><li><strong>Library usage:</strong><br/><tt>:- use_package(modes).</tt>
or
<tt>:- module(...,...,[modes]).</tt><li><strong>New operators defined:</strong><br/><a class="lpdoc-idx-anchor" id="8" href="#?/1"><tt>?/1</tt></a> [500,fx], <a class="lpdoc-idx-anchor" id="9" href="#@/1"><tt>@/1</tt></a> [500,fx].
<li><strong>New modes defined:</strong><br/><a class="lpdoc-idx-anchor" id="10" href="#+/1"><tt>+/1</tt></a>, <a class="lpdoc-idx-anchor" id="11" href="#-/1"><tt>-/1</tt></a>, <a class="lpdoc-idx-anchor" id="12" href="#--/1"><tt>--/1</tt></a>, <a class="lpdoc-idx-anchor" id="13" href="#?/1"><tt>?/1</tt></a>, <a class="lpdoc-idx-anchor" id="14" href="#@/1"><tt>@/1</tt></a>, <a class="lpdoc-idx-anchor" id="15" href="#in/1"><tt>in/1</tt></a>, <a class="lpdoc-idx-anchor" id="16" href="#++/1"><tt>++/1</tt></a>, <a class="lpdoc-idx-anchor" id="17" href="#out/1"><tt>out/1</tt></a>, <a class="lpdoc-idx-anchor" id="18" href="#go/1"><tt>go/1</tt></a>, <a class="lpdoc-idx-anchor" id="19" href="#+/2"><tt>+/2</tt></a>, <a class="lpdoc-idx-anchor" id="20" href="#-/2"><tt>-/2</tt></a>, <a class="lpdoc-idx-anchor" id="21" href="#--/2"><tt>--/2</tt></a>, <a class="lpdoc-idx-anchor" id="22" href="#?/2"><tt>?/2</tt></a>, <a class="lpdoc-idx-anchor" id="23" href="#@/2"><tt>@/2</tt></a>, <a class="lpdoc-idx-anchor" id="24" href="#in/2"><tt>in/2</tt></a>, <a class="lpdoc-idx-anchor" id="25" href="#++/2"><tt>++/2</tt></a>, <a class="lpdoc-idx-anchor" id="26" href="#out/2"><tt>out/2</tt></a>, <a class="lpdoc-idx-anchor" id="27" href="#go/2"><tt>go/2</tt></a>.
<li><strong>Implicit imports:</strong><br/><ul class="lpdoc-itemize-minus"><li><em>System library modules:</em><br/><a class="lpdoc-idx-anchor" id="28" href="ciaosearch.html#meta_props"><tt>meta_props</tt></a>.
<li><em>Packages:</em><br/><a class="lpdoc-idx-anchor" id="29" href="ciaosearch.html#prelude"><tt>prelude</tt></a>, <a class="lpdoc-idx-anchor" id="30" href="ciaosearch.html#initial"><tt>initial</tt></a>, <a class="lpdoc-idx-anchor" id="31" href="condcomp_doc.html"><tt>condcomp</tt></a>, <a class="lpdoc-idx-anchor" id="32" href="assertions_doc.html"><tt>assertions</tt></a>, <a class="lpdoc-idx-anchor" id="33" href="ciaosearch.html#assertions/assertions_basic"><tt>assertions/assertions_basic</tt></a>, <a class="lpdoc-idx-anchor" id="34" href="ciaosearch.html#metaprops"><tt>metaprops</tt></a>, <a class="lpdoc-idx-anchor" id="35" href="ciaosearch.html#hiord"><tt>hiord</tt></a>.
</ul></ul></div></div><div id="Documentation on new modes"><h2>Documentation on new modes</h2><div><div class="lpdoc-defname"><span class="lpdoc-predtag">MODE</span><a class="lpdoc-idx-anchor" id="+/1" href="ciaosearch.html#+/1">+/1</a></div><div class="lpdoc-deftext">Argument should be bound (nonvar) when the predicate is called. For example:<p><pre class="lpdoc-codeblock">:- pred + > +.
</pre> <p>expresses that both arguments of <a class="lpdoc-idx-anchor" id="36" href="arithmetic.html#>/2"><tt>>/2</tt></a> should be bound when the predicate is called.<p><span class="lpdoc-usage-header">Usage:</span><span class="lpdoc-usage-decl"><tt>+A</tt>
</span><p></p><ul class="lpdoc-itemize-minus"><li><em>The following properties are added at call time:</em><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="37" href="term_typing.html#nonvar/1"><tt>term_typing:nonvar/1</tt></a>)</span><span><span class="lpdoc-var">A</span> is currently a term which is not a free variable.
</span>
</ul></div></div><p>
<div><div class="lpdoc-defname"><span class="lpdoc-predtag">MODE</span><a class="lpdoc-idx-anchor" id="-/1" href="ciaosearch.html#-/1">-/1</a></div><div class="lpdoc-deftext">The argument is an output argument. It may be bound or not at call time. It will be bound (nonvar) if the predicate succeeds.<p><span class="lpdoc-usage-header">Usage:</span><span class="lpdoc-usage-decl"><tt>-A</tt>
</span><p></p><ul class="lpdoc-itemize-minus"><li><em>The following properties are added upon exit:</em><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="38" href="term_typing.html#nonvar/1"><tt>term_typing:nonvar/1</tt></a>)</span><span><span class="lpdoc-var">A</span> is currently a term which is not a free variable.
</span>
</ul></div></div><p>
<div><div class="lpdoc-defname"><span class="lpdoc-predtag">MODE</span><a class="lpdoc-idx-anchor" id="--/1" href="ciaosearch.html#--/1">--/1</a></div><div class="lpdoc-deftext">The argument should be a free variable (i.e., unbound) when the predicate is called.<p><span class="lpdoc-usage-header">Usage:</span><span class="lpdoc-usage-decl"><tt>--A</tt>
</span><p></p><ul class="lpdoc-itemize-minus"><li><em>The following properties are added at call time:</em><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="39" href="term_typing.html#var/1"><tt>term_typing:var/1</tt></a>)</span><span><span class="lpdoc-var">A</span> is a free variable.
</span>
</ul></div></div><p>
<div><div class="lpdoc-defname"><span class="lpdoc-predtag">MODE</span><a class="lpdoc-idx-anchor" id="?/1" href="ciaosearch.html#?/1">?/1</a></div><div class="lpdoc-deftext">No information is given on this argument.</div></div><p>
<div><div class="lpdoc-defname"><span class="lpdoc-predtag">MODE</span><a class="lpdoc-idx-anchor" id="@/1" href="ciaosearch.html#@/1">@/1</a></div><div class="lpdoc-deftext">The argument will not be further instantiated, i.e., will not be more instantiated than when the predicate is called.<p><span class="lpdoc-usage-header">Usage:</span><span class="lpdoc-usage-decl"><tt>@(A)</tt>
</span><p></p><ul class="lpdoc-itemize-minus"><li><em>The following properties are added 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">A</span> is not further instantiated.
</span>
</ul></div></div><p>
<div><div class="lpdoc-defname"><span class="lpdoc-predtag">MODE</span><a class="lpdoc-idx-anchor" id="in/1" href="ciaosearch.html#in/1">in/1</a></div><div class="lpdoc-deftext">The argument is ground at call time.<p><span class="lpdoc-usage-header">Usage:</span><span class="lpdoc-usage-decl"><tt>in(A)</tt>
</span><p></p><ul class="lpdoc-itemize-minus"><li><em>The following properties are added at call time:</em><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="41" href="term_typing.html#ground/1"><tt>term_typing:ground/1</tt></a>)</span><span><span class="lpdoc-var">A</span> is currently ground (it contains no variables).
</span>
<li><em>The following properties are added upon exit:</em><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="42" href="term_typing.html#ground/1"><tt>term_typing:ground/1</tt></a>)</span><span><span class="lpdoc-var">A</span> is currently ground (it contains no variables).
</span>
</ul></div></div><p>
<div><div class="lpdoc-defname"><span class="lpdoc-predtag">MODE</span><a class="lpdoc-idx-anchor" id="++/1" href="ciaosearch.html#++/1">++/1</a></div><div class="lpdoc-deftext">Same as <tt>in</tt>: the argument is ground at call time.<p><span class="lpdoc-usage-header">Usage:</span><span class="lpdoc-usage-decl"><tt>++A</tt>
</span><p></p><ul class="lpdoc-itemize-minus"><li><em>The following properties are added at call time:</em><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="43" href="term_typing.html#ground/1"><tt>term_typing:ground/1</tt></a>)</span><span><span class="lpdoc-var">A</span> is currently ground (it contains no variables).
</span>
<li><em>The following properties are added upon exit:</em><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="44" href="term_typing.html#ground/1"><tt>term_typing:ground/1</tt></a>)</span><span><span class="lpdoc-var">A</span> is currently ground (it contains no variables).
</span>
</ul></div></div><p>
<div><div class="lpdoc-defname"><span class="lpdoc-predtag">MODE</span><a class="lpdoc-idx-anchor" id="out/1" href="ciaosearch.html#out/1">out/1</a></div><div class="lpdoc-deftext">The argument is a variable when the predicate is called and will be ground if the predicate succeeds.<p><span class="lpdoc-usage-header">Usage:</span><span class="lpdoc-usage-decl"><tt>out(A)</tt>
</span><p></p><ul class="lpdoc-itemize-minus"><li><em>The following properties are added at call time:</em><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="45" href="term_typing.html#var/1"><tt>term_typing:var/1</tt></a>)</span><span><span class="lpdoc-var">A</span> is a free variable.
</span>
<li><em>The following properties are added upon exit:</em><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="46" href="term_typing.html#ground/1"><tt>term_typing:ground/1</tt></a>)</span><span><span class="lpdoc-var">A</span> is currently ground (it contains no variables).
</span>
</ul></div></div><p>
<div><div class="lpdoc-defname"><span class="lpdoc-predtag">MODE</span><a class="lpdoc-idx-anchor" id="go/1" href="ciaosearch.html#go/1">go/1</a></div><div class="lpdoc-deftext">The argument is ground by the predicate, if it succeeds.<p><span class="lpdoc-usage-header">Usage:</span><span class="lpdoc-usage-decl"><tt>go(A)</tt>
</span><p></p><ul class="lpdoc-itemize-minus"><li><em>The following properties are added upon exit:</em><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="47" href="term_typing.html#ground/1"><tt>term_typing:ground/1</tt></a>)</span><span><span class="lpdoc-var">A</span> is currently ground (it contains no variables).
</span>
</ul></div></div><p>
<div><div class="lpdoc-defname"><span class="lpdoc-predtag">MODE</span><a class="lpdoc-idx-anchor" id="+/2" href="ciaosearch.html#+/2">+/2</a></div><div class="lpdoc-deftext">Argument should be instantiated when the predicate is called to a term that has the indicated type or property. For example:<p><pre class="lpdoc-codeblock">:- pred + > +.
</pre> <p>expresses that both arguments of <a class="lpdoc-idx-anchor" id="48" href="arithmetic.html#>/2"><tt>>/2</tt></a> should be bound to arithmetic expressions (have the <a class="lpdoc-idx-anchor" id="49" href="ciaosearch.html#arithexpression"><tt>arithexpression</tt></a> property) when the predicate is called. <p><span class="lpdoc-usage-header">Usage:</span><span class="lpdoc-usage-decl"><tt>A+P</tt>
</span><p></p><ul class="lpdoc-itemize-minus"><li><em>The following properties are added at call time:</em><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="50" href="hiord_rt.html#call/2"><tt>meta_props:call/2</tt></a>)</span><span><span class="lpdoc-var">A</span> has property <span class="lpdoc-var">P</span>.
</span>
</ul></div></div><p>
<div><div class="lpdoc-defname"><span class="lpdoc-predtag">MODE</span><a class="lpdoc-idx-anchor" id="-/2" href="ciaosearch.html#-/2">-/2</a></div><div class="lpdoc-deftext">The argument is an output argument. It may be bound or not at call time. It will be instantiated to a term that has the indicated type or property if the predicate succeeds. For example, this assertion:<p><pre class="lpdoc-codeblock"> :- pred length(-list,-int). </pre> <p>expresses that <a class="lpdoc-idx-anchor" id="51" href="lists.html#length/2"><tt>length/2</tt></a> can be called in any mode, but on output the second argument will be instantiated to a number and the first one will be instantiated to a lit. Note that this does not mean that the list will be ground, but rather that it will be a complete list but whose elements can be any term, including variables.<p><span class="lpdoc-usage-header">Usage:</span><span class="lpdoc-usage-decl"><tt>A-P</tt>
</span><p></p><ul class="lpdoc-itemize-minus"><li><em>The following properties are added upon exit:</em><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="52" href="hiord_rt.html#call/2"><tt>meta_props:call/2</tt></a>)</span><span><span class="lpdoc-var">A</span> has property <span class="lpdoc-var">P</span>.
</span>
</ul></div></div><p>
<div><div class="lpdoc-defname"><span class="lpdoc-predtag">MODE</span><a class="lpdoc-idx-anchor" id="--/2" href="ciaosearch.html#--/2">--/2</a></div><div class="lpdoc-deftext">The argument should be a free variable (i.e., unbound) when the predicate is called and will be bound to a term that has the indicated type or property if the predicate succeeds.<p><span class="lpdoc-usage-header">Usage:</span><span class="lpdoc-usage-decl"><tt>--(A,P)</tt>
</span><p></p><ul class="lpdoc-itemize-minus"><li><em>The following properties are added at call time:</em><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="53" href="term_typing.html#var/1"><tt>term_typing:var/1</tt></a>)</span><span><span class="lpdoc-var">A</span> is a free variable.
</span>
<li><em>The following properties are added upon exit:</em><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="54" href="hiord_rt.html#call/2"><tt>meta_props:call/2</tt></a>)</span><span><span class="lpdoc-var">A</span> has property <span class="lpdoc-var">P</span>.
</span>
</ul></div></div><p>
<div><div class="lpdoc-defname"><span class="lpdoc-predtag">MODE</span><a class="lpdoc-idx-anchor" id="?/2" href="ciaosearch.html#?/2">?/2</a></div><div class="lpdoc-deftext">The argument can be a variable or, if it is intantiated, it is to a term that is compatible with the indicated type or property.<p><span class="lpdoc-usage-header">Usage:</span><span class="lpdoc-usage-decl"><tt>?(A,P)</tt>
</span><p></p><ul class="lpdoc-itemize-minus"><li><em>Call and exit are compatible with:</em><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="55" href="hiord_rt.html#call/2"><tt>meta_props:call/2</tt></a>)</span><span><span class="lpdoc-var">A</span> has property <span class="lpdoc-var">P</span>.
</span>
</ul></div></div><p>
<div><div class="lpdoc-defname"><span class="lpdoc-predtag">MODE</span><a class="lpdoc-idx-anchor" id="@/2" href="ciaosearch.html#@/2">@/2</a></div><div class="lpdoc-deftext">The argument will not be further instantiated, i.e., will not be more instantiated than when the predicate is called, and the term is compatible with the indicated type or property.<p><span class="lpdoc-usage-header">Usage:</span><span class="lpdoc-usage-decl"><tt>@(A,P)</tt>
</span><p></p><ul class="lpdoc-itemize-minus"><li><em>Call and exit are compatible with:</em><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="56" href="hiord_rt.html#call/2"><tt>meta_props:call/2</tt></a>)</span><span><span class="lpdoc-var">A</span> has property <span class="lpdoc-var">P</span>.
</span>
<li><em>The following properties are added globally:</em><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="57" href="basic_props.html#not_further_inst/2"><tt>basic_props:not_further_inst/2</tt></a>)</span><span><span class="lpdoc-var">A</span> is not further instantiated.
</span>
</ul></div></div><p>
<div><div class="lpdoc-defname"><span class="lpdoc-predtag">MODE</span><a class="lpdoc-idx-anchor" id="in/2" href="ciaosearch.html#in/2">in/2</a></div><div class="lpdoc-deftext">The argument is ground at call time and is compatible with the indicated type or property.<p><span class="lpdoc-usage-header">Usage:</span><span class="lpdoc-usage-decl"><tt>in(A,P)</tt>
</span><p></p><ul class="lpdoc-itemize-minus"><li><em>The following properties are added at call time:</em><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="58" href="term_typing.html#ground/1"><tt>term_typing:ground/1</tt></a>)</span><span><span class="lpdoc-var">A</span> is currently ground (it contains no variables).
</span><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="59" href="hiord_rt.html#call/2"><tt>meta_props:call/2</tt></a>)</span><span><span class="lpdoc-var">A</span> has property <span class="lpdoc-var">P</span>.
</span>
<li><em>The following properties are added upon exit:</em><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="60" href="term_typing.html#ground/1"><tt>term_typing:ground/1</tt></a>)</span><span><span class="lpdoc-var">A</span> is currently ground (it contains no variables).
</span>
</ul></div></div><p>
<div><div class="lpdoc-defname"><span class="lpdoc-predtag">MODE</span><a class="lpdoc-idx-anchor" id="++/2" href="ciaosearch.html#++/2">++/2</a></div><div class="lpdoc-deftext">Same as <tt>in</tt>: the argument is ground at call time and is compatible with the indicated type or property.<p><span class="lpdoc-usage-header">Usage:</span><span class="lpdoc-usage-decl"><tt>++(A,P)</tt>
</span><p></p><ul class="lpdoc-itemize-minus"><li><em>The following properties are added at call time:</em><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="61" href="term_typing.html#ground/1"><tt>term_typing:ground/1</tt></a>)</span><span><span class="lpdoc-var">A</span> is currently ground (it contains no variables).
</span><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="62" href="hiord_rt.html#call/2"><tt>meta_props:call/2</tt></a>)</span><span><span class="lpdoc-var">A</span> has property <span class="lpdoc-var">P</span>.
</span>
<li><em>The following properties are added upon exit:</em><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="63" href="term_typing.html#ground/1"><tt>term_typing:ground/1</tt></a>)</span><span><span class="lpdoc-var">A</span> is currently ground (it contains no variables).
</span>
</ul></div></div><p>
<div><div class="lpdoc-defname"><span class="lpdoc-predtag">MODE</span><a class="lpdoc-idx-anchor" id="out/2" href="ciaosearch.html#out/2">out/2</a></div><div class="lpdoc-deftext">The argument is a variable when the predicate is called and will be be bound to a ground term that is compatible with the indicated type or property, if the predicate succeeds.<p><span class="lpdoc-usage-header">Usage:</span><span class="lpdoc-usage-decl"><tt>out(A,P)</tt>
</span><p></p><ul class="lpdoc-itemize-minus"><li><em>The following properties are added at call time:</em><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="64" href="term_typing.html#var/1"><tt>term_typing:var/1</tt></a>)</span><span><span class="lpdoc-var">A</span> is a free variable.
</span>
<li><em>The following properties are added upon exit:</em><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="65" href="term_typing.html#ground/1"><tt>term_typing:ground/1</tt></a>)</span><span><span class="lpdoc-var">A</span> is currently ground (it contains no variables).
</span><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="66" href="hiord_rt.html#call/2"><tt>meta_props:call/2</tt></a>)</span><span><span class="lpdoc-var">A</span> has property <span class="lpdoc-var">P</span>.
</span>
</ul></div></div><p>
<div><div class="lpdoc-defname"><span class="lpdoc-predtag">MODE</span><a class="lpdoc-idx-anchor" id="go/2" href="ciaosearch.html#go/2">go/2</a></div><div class="lpdoc-deftext">The argument is ground by the predicate to a ground term that is compatible with the indicated type or property, if the predicate succeeds.<p><span class="lpdoc-usage-header">Usage:</span><span class="lpdoc-usage-decl"><tt>go(A,P)</tt>
</span><p></p><ul class="lpdoc-itemize-minus"><li><em>The following properties are added upon exit:</em><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="67" href="term_typing.html#ground/1"><tt>term_typing:ground/1</tt></a>)</span><span><span class="lpdoc-var">A</span> is currently ground (it contains no variables).
</span><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="68" href="hiord_rt.html#call/2"><tt>meta_props:call/2</tt></a>)</span><span><span class="lpdoc-var">A</span> has property <span class="lpdoc-var">P</span>.
</span>
</ul></div></div><p>
</div></div><div class="lpdoc-footer">Generated with LPdoc using Ciao</div></div><div class="lpdoc-clearer"></div></div></body></html>