UNPKG

@ciao-lang/ts-ciao-interface

Version:

Simple Ciao interface for node.

139 lines 26.8 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>Comparing terms &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="BasicLang.html">&#x2191;</a><a class="lpdoc-navbutton" href="term_basic.html">&#x2190;</a><a class="lpdoc-navbutton" href="atomic_basic.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="BasicLang.html">PART II - The Ciao basic language</a> &raquo;<br/> </li><li><a href=""><strong>Comparing terms</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>Comparing terms</h1><a class="lpdoc-idx-anchor" href="ciaosearch.html#term_compare"></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="Manuel Hermenegildo" href="ciaosearch.html#Manuel Hermenegildo">Manuel Hermenegildo</a>.<p> These built-in predicates are extra-logical. They treat uninstantiated variables as objects with values which may be compared, and they never instantiate those variables. They should <em>not</em> be used when what you really want is arithmetic comparison or unification.<p>The predicates make reference to a <a class="lpdoc-idx-anchor" id="0" href="ciaosearch.html#standard total ordering"><em>standard total ordering</em></a> of terms, which is as follows:<p><ul> <p><li>Variables, by age (roughly, oldest first -- the order is <em>not</em> related to the names of variables).<p><li>Floats, in numeric order (e.g. -1.0 is put before 1.0).<p><li>Integers, in numeric order (e.g. -1 is put before 1).<p><li>Atoms, in alphabetical (i.e. character code) order.<p><li>Compound terms, ordered first by arity, then by the name of the principal functor, then by the arguments in left-to-right order. Recall that lists are equivalent to compound terms with principal functor <tt>&apos;.&apos;/2</tt>.<p></ul> <p>For example, here is a list of terms in standard order:<p><pre class="lpdoc-codeblock">[ X, -1.0, -9, 1, bar, foo, [1], X = Y, foo(0,2), bar(1,1,1) ] </pre> <br/><div id="Usage and interface"><h2>Usage and interface</h2><div class="lpdoc-cartouche"><ul><li><strong>Library usage:</strong><br/>This module is imported by default (unless the <a class="lpdoc-idx-anchor" id="1" href="noprelude_doc.html"><tt>noprelude</tt></a> or <a class="lpdoc-idx-anchor" id="2" href="pure_doc.html"><tt>pure</tt></a> packages are used). <li><strong>Exports:</strong><br/><ul class="lpdoc-itemize-minus"><li><em>Predicates:</em><br/><a class="lpdoc-idx-anchor" id="3" href="#\==/2"><tt>\==/2</tt></a>, <a class="lpdoc-idx-anchor" id="4" href="#@&lt;/2"><tt>@&lt;/2</tt></a>, <a class="lpdoc-idx-anchor" id="5" href="#@=&lt;/2"><tt>@=&lt;/2</tt></a>, <a class="lpdoc-idx-anchor" id="6" href="#@&gt;/2"><tt>@&gt;/2</tt></a>, <a class="lpdoc-idx-anchor" id="7" href="#@&gt;=/2"><tt>@&gt;=/2</tt></a>, <a class="lpdoc-idx-anchor" id="8" href="#compare/3"><tt>compare/3</tt></a>. <li><em>Properties:</em><br/><a class="lpdoc-idx-anchor" id="9" href="#==/2"><tt>==/2</tt></a>. <li><em>Regular Types:</em><br/><a class="lpdoc-idx-anchor" id="10" href="#comparator/1"><tt>comparator/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">PROPERTY</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>Term1==Term2</tt> </span><p>The terms <span class="lpdoc-var">Term1</span> and <span class="lpdoc-var">Term2</span> are strictly identical.</p><ul class="lpdoc-itemize-minus"></ul> <strong>Other properties:</strong> <br/><span class="lpdoc-usage-decl"><tt>Term1==Term2</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="11" href="basic_props.html#not_further_inst/2"><tt>basic_props:not_further_inst/2</tt></a>)</span><span><span class="lpdoc-var">Term1</span> is not further instantiated. </span><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="12" href="basic_props.html#not_further_inst/2"><tt>basic_props:not_further_inst/2</tt></a>)</span><span><span class="lpdoc-var">Term2</span> is not further instantiated. </span><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="13" href="basic_props.html#sideff/2"><tt>basic_props:sideff/2</tt></a>)</span><span><span class="lpdoc-var">Term1==Term2</span> is side-effect <span class="lpdoc-var">free</span>. </span><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="14" href="basic_props.html#native/1"><tt>basic_props:native/1</tt></a>)</span><span>This predicate is understood natively by CiaoPP. </span> </ul><span class="lpdoc-usage-decl"><tt>Term1==Term2</tt> </span><p></p><ul class="lpdoc-itemize-minus"><li><em>If the following properties hold at call time:</em><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="15" href="term_typing.html#ground/1"><tt>term_typing:ground/1</tt></a>)</span><span><span class="lpdoc-var">Term1</span> is currently ground (it contains no variables). </span><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="16" href="term_typing.html#ground/1"><tt>term_typing:ground/1</tt></a>)</span><span><span class="lpdoc-var">Term2</span> is currently ground (it contains no variables). </span> <br/><em>then the following properties hold globally:</em> <br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="17" href="basic_props.html#eval/1"><tt>basic_props:eval/1</tt></a>)</span><span><span class="lpdoc-var">Term1==Term2</span> is evaluable at compile-time. </span> </ul><span class="lpdoc-usage-decl"><tt>Term1==Term2</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="18" 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">Term1==Term2</span> are deterministic. </span><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="19" href="ciaosearch.html#test_type/2"><tt>native_props:test_type/2</tt></a>)</span><span>Indicates the type of test that a predicate performs. Required by the nonfailure analyisis. </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>Term1\==Term2</tt> </span><p>The terms <span class="lpdoc-var">Term1</span> and <span class="lpdoc-var">Term2</span> are not strictly identical.</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="20" href="basic_props.html#not_further_inst/2"><tt>basic_props:not_further_inst/2</tt></a>)</span><span><span class="lpdoc-var">Term1</span> is not further instantiated. </span><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">Term2</span> is not further instantiated. </span><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="22" href="basic_props.html#sideff/2"><tt>basic_props:sideff/2</tt></a>)</span><span><span class="lpdoc-var">Term1\==Term2</span> is side-effect <span class="lpdoc-var">free</span>. </span><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="23" href="basic_props.html#native/1"><tt>basic_props:native/1</tt></a>)</span><span>This predicate is understood natively by CiaoPP. </span> </ul> <strong>Other properties:</strong> <br/><span class="lpdoc-usage-decl"><tt>Term1\==Term2</tt> </span><p></p><ul class="lpdoc-itemize-minus"><li><em>If the following properties hold at call time:</em><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="24" href="term_typing.html#ground/1"><tt>term_typing:ground/1</tt></a>)</span><span><span class="lpdoc-var">Term1</span> is currently ground (it contains no variables). </span><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="25" href="term_typing.html#ground/1"><tt>term_typing:ground/1</tt></a>)</span><span><span class="lpdoc-var">Term2</span> is currently ground (it contains no variables). </span> <br/><em>then the following properties hold globally:</em> <br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="26" href="basic_props.html#eval/1"><tt>basic_props:eval/1</tt></a>)</span><span><span class="lpdoc-var">Term1\==Term2</span> is evaluable at compile-time. </span> </ul><span class="lpdoc-usage-decl"><tt>Term1\==Term2</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="27" 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">Term1\==Term2</span> are deterministic. </span><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="28" href="ciaosearch.html#test_type/2"><tt>native_props:test_type/2</tt></a>)</span><span>Indicates the type of test that a predicate performs. Required by the nonfailure analyisis. </span> </ul></div></div><p> <div><div class="lpdoc-defname"><span class="lpdoc-predtag">PREDICATE</span><a class="lpdoc-idx-anchor" id="@&lt;/2" href="ciaosearch.html#@</2">@&lt;/2</a></div><div class="lpdoc-deftext"><p><span class="lpdoc-usage-header">Usage:</span><span class="lpdoc-usage-decl"><tt>Term1@&lt;Term2</tt> </span><p>The term <span class="lpdoc-var">Term1</span> precedes the term <span class="lpdoc-var">Term2</span> in the standard order.</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="29" href="basic_props.html#not_further_inst/2"><tt>basic_props:not_further_inst/2</tt></a>)</span><span><span class="lpdoc-var">Term1</span> is not further instantiated. </span><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="30" href="basic_props.html#not_further_inst/2"><tt>basic_props:not_further_inst/2</tt></a>)</span><span><span class="lpdoc-var">Term2</span> is not further instantiated. </span><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="31" href="basic_props.html#sideff/2"><tt>basic_props:sideff/2</tt></a>)</span><span><span class="lpdoc-var">Term1@&lt;Term2</span> is side-effect <span class="lpdoc-var">free</span>. </span><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="32" href="basic_props.html#native/1"><tt>basic_props:native/1</tt></a>)</span><span>This predicate is understood natively by CiaoPP. </span> </ul> <strong>Other properties:</strong> <br/><span class="lpdoc-usage-decl"><tt>Term1@&lt;Term2</tt> </span><p></p><ul class="lpdoc-itemize-minus"><li><em>If the following properties hold at call time:</em><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="33" href="term_typing.html#ground/1"><tt>term_typing:ground/1</tt></a>)</span><span><span class="lpdoc-var">Term1</span> is currently ground (it contains no variables). </span><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="34" href="term_typing.html#ground/1"><tt>term_typing:ground/1</tt></a>)</span><span><span class="lpdoc-var">Term2</span> is currently ground (it contains no variables). </span> <br/><em>then the following properties hold globally:</em> <br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="35" href="basic_props.html#eval/1"><tt>basic_props:eval/1</tt></a>)</span><span><span class="lpdoc-var">Term1@&lt;Term2</span> is evaluable at compile-time. </span> </ul></div></div><p> <div><div class="lpdoc-defname"><span class="lpdoc-predtag">PREDICATE</span><a class="lpdoc-idx-anchor" id="@=&lt;/2" href="ciaosearch.html#@=</2">@=&lt;/2</a></div><div class="lpdoc-deftext"><p><span class="lpdoc-usage-header">Usage:</span><span class="lpdoc-usage-decl"><tt>Term1@=&lt;Term2</tt> </span><p>The term <span class="lpdoc-var">Term1</span> precedes or is identical to the term <span class="lpdoc-var">Term2</span> in the standard order.</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="36" href="basic_props.html#not_further_inst/2"><tt>basic_props:not_further_inst/2</tt></a>)</span><span><span class="lpdoc-var">Term1</span> is not further instantiated. </span><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="37" href="basic_props.html#not_further_inst/2"><tt>basic_props:not_further_inst/2</tt></a>)</span><span><span class="lpdoc-var">Term2</span> is not further instantiated. </span><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="38" href="basic_props.html#sideff/2"><tt>basic_props:sideff/2</tt></a>)</span><span><span class="lpdoc-var">Term1@=&lt;Term2</span> is side-effect <span class="lpdoc-var">free</span>. </span><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="39" href="basic_props.html#native/1"><tt>basic_props:native/1</tt></a>)</span><span>This predicate is understood natively by CiaoPP. </span> </ul> <strong>Other properties:</strong> <br/><span class="lpdoc-usage-decl"><tt>Term1@=&lt;Term2</tt> </span><p></p><ul class="lpdoc-itemize-minus"><li><em>If the following properties hold at call time:</em><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="40" href="term_typing.html#ground/1"><tt>term_typing:ground/1</tt></a>)</span><span><span class="lpdoc-var">Term1</span> is currently ground (it contains no variables). </span><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">Term2</span> is currently ground (it contains no variables). </span> <br/><em>then the following properties hold globally:</em> <br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="42" href="basic_props.html#eval/1"><tt>basic_props:eval/1</tt></a>)</span><span><span class="lpdoc-var">Term1@=&lt;Term2</span> is evaluable at compile-time. </span> </ul></div></div><p> <div><div class="lpdoc-defname"><span class="lpdoc-predtag">PREDICATE</span><a class="lpdoc-idx-anchor" id="@&gt;/2" href="ciaosearch.html#@>/2">@&gt;/2</a></div><div class="lpdoc-deftext"><p><span class="lpdoc-usage-header">Usage:</span><span class="lpdoc-usage-decl"><tt>Term1@&gt;Term2</tt> </span><p>The term <span class="lpdoc-var">Term1</span> follows the term <span class="lpdoc-var">Term2</span> in the standard order.</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="43" href="basic_props.html#not_further_inst/2"><tt>basic_props:not_further_inst/2</tt></a>)</span><span><span class="lpdoc-var">Term1</span> is not further instantiated. </span><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="44" href="basic_props.html#not_further_inst/2"><tt>basic_props:not_further_inst/2</tt></a>)</span><span><span class="lpdoc-var">Term2</span> is not further instantiated. </span><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="45" href="basic_props.html#sideff/2"><tt>basic_props:sideff/2</tt></a>)</span><span><span class="lpdoc-var">Term1@&gt;Term2</span> is side-effect <span class="lpdoc-var">free</span>. </span><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="46" href="basic_props.html#native/1"><tt>basic_props:native/1</tt></a>)</span><span>This predicate is understood natively by CiaoPP. </span> </ul> <strong>Other properties:</strong> <br/><span class="lpdoc-usage-decl"><tt>Term1@&gt;Term2</tt> </span><p></p><ul class="lpdoc-itemize-minus"><li><em>If the following properties hold at call time:</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">Term1</span> is currently ground (it contains no variables). </span><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="48" href="term_typing.html#ground/1"><tt>term_typing:ground/1</tt></a>)</span><span><span class="lpdoc-var">Term2</span> is currently ground (it contains no variables). </span> <br/><em>then the following properties hold globally:</em> <br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="49" href="basic_props.html#eval/1"><tt>basic_props:eval/1</tt></a>)</span><span><span class="lpdoc-var">Term1@&gt;Term2</span> is evaluable at compile-time. </span> </ul></div></div><p> <div><div class="lpdoc-defname"><span class="lpdoc-predtag">PREDICATE</span><a class="lpdoc-idx-anchor" id="@&gt;=/2" href="ciaosearch.html#@>=/2">@&gt;=/2</a></div><div class="lpdoc-deftext"><p><span class="lpdoc-usage-header">Usage:</span><span class="lpdoc-usage-decl"><tt>Term1@&gt;=Term2</tt> </span><p>The term <span class="lpdoc-var">Term1</span> follows or is identical to the term <span class="lpdoc-var">Term2</span> in the standard order.</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="50" href="basic_props.html#not_further_inst/2"><tt>basic_props:not_further_inst/2</tt></a>)</span><span><span class="lpdoc-var">Term1</span> is not further instantiated. </span><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="51" href="basic_props.html#not_further_inst/2"><tt>basic_props:not_further_inst/2</tt></a>)</span><span><span class="lpdoc-var">Term2</span> is not further instantiated. </span><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="52" href="basic_props.html#sideff/2"><tt>basic_props:sideff/2</tt></a>)</span><span><span class="lpdoc-var">Term1@&gt;=Term2</span> is side-effect <span class="lpdoc-var">free</span>. </span><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> <strong>Other properties:</strong> <br/><span class="lpdoc-usage-decl"><tt>Term1@&gt;=Term2</tt> </span><p></p><ul class="lpdoc-itemize-minus"><li><em>If the following properties hold at call time:</em><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="54" href="term_typing.html#ground/1"><tt>term_typing:ground/1</tt></a>)</span><span><span class="lpdoc-var">Term1</span> is currently ground (it contains no variables). </span><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="55" href="term_typing.html#ground/1"><tt>term_typing:ground/1</tt></a>)</span><span><span class="lpdoc-var">Term2</span> is currently ground (it contains no variables). </span> <br/><em>then the following properties hold globally:</em> <br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="56" href="basic_props.html#eval/1"><tt>basic_props:eval/1</tt></a>)</span><span><span class="lpdoc-var">Term1@&gt;=Term2</span> is evaluable at compile-time. </span> </ul></div></div><p> <div><div class="lpdoc-defname"><span class="lpdoc-predtag">PREDICATE</span><a class="lpdoc-idx-anchor" id="compare/3" href="ciaosearch.html#compare/3">compare/3</a></div><div class="lpdoc-deftext"><span class="lpdoc-usage-decl"><tt>compare(Op,Term1,Term2)</tt> </span><p><span class="lpdoc-var">Op</span> is the result of comparing the terms <span class="lpdoc-var">Term1</span> and <span class="lpdoc-var">Term2</span>.<p><span class="lpdoc-usage-header">Usage:</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="57" href="basic_props.html#atm/1"><tt>basic_props:atm/1</tt></a>)</span><span><span class="lpdoc-var">Op</span> is an atom. </span> <li><em>The following properties should hold at call time:</em><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="58" href="basic_props.html#term/1"><tt>basic_props:term/1</tt></a>)</span><span><span class="lpdoc-var">Term1</span> is any term. </span><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="59" href="basic_props.html#term/1"><tt>basic_props:term/1</tt></a>)</span><span><span class="lpdoc-var">Term2</span> is any term. </span> <li><em>The following properties hold upon exit:</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">Op</span> is an atom. </span><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="61" href="basic_props.html#term/1"><tt>basic_props:term/1</tt></a>)</span><span><span class="lpdoc-var">Term1</span> is any term. </span><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="62" href="basic_props.html#term/1"><tt>basic_props:term/1</tt></a>)</span><span><span class="lpdoc-var">Term2</span> is any term. </span><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="64" href="#comparator/1"><tt>term_compare:comparator/1</tt></a>)</span><span><a class="lpdoc-idx-anchor" id="63" href="ciaosearch.html#comparator(Op)"><tt>term_compare:comparator(Op)</tt></a> </span><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="65" href="basic_props.html#term/1"><tt>basic_props:term/1</tt></a>)</span><span><span class="lpdoc-var">Term1</span> is any term. </span><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="66" href="basic_props.html#term/1"><tt>basic_props:term/1</tt></a>)</span><span><span class="lpdoc-var">Term2</span> is any term. </span> <li><em>The following properties hold globally:</em><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="67" href="basic_props.html#not_further_inst/2"><tt>basic_props:not_further_inst/2</tt></a>)</span><span><span class="lpdoc-var">Term1</span> is not further instantiated. </span><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="68" href="basic_props.html#not_further_inst/2"><tt>basic_props:not_further_inst/2</tt></a>)</span><span><span class="lpdoc-var">Term2</span> is not further instantiated. </span><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="69" href="basic_props.html#sideff/2"><tt>basic_props:sideff/2</tt></a>)</span><span><span class="lpdoc-var">compare(Op,Term1,Term2)</span> is side-effect <span class="lpdoc-var">free</span>. </span><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="70" href="basic_props.html#native/1"><tt>basic_props:native/1</tt></a>)</span><span>This predicate is understood natively by CiaoPP. </span> </ul> <strong>Other properties:</strong> <br/><span class="lpdoc-usage-decl"><tt>compare(Op,Term1,Term2)</tt> </span><p></p><ul class="lpdoc-itemize-minus"><li><em>If the following properties hold at call time:</em><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="71" href="term_typing.html#ground/1"><tt>term_typing:ground/1</tt></a>)</span><span><span class="lpdoc-var">Term1</span> is currently ground (it contains no variables). </span><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="72" href="term_typing.html#ground/1"><tt>term_typing:ground/1</tt></a>)</span><span><span class="lpdoc-var">Term2</span> is currently ground (it contains no variables). </span> <br/><em>then the following properties hold globally:</em> <br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="73" href="basic_props.html#eval/1"><tt>basic_props:eval/1</tt></a>)</span><span><span class="lpdoc-var">compare(Op,Term1,Term2)</span> is evaluable at compile-time. </span> </ul></div></div><p> <div><div class="lpdoc-defname"><span class="lpdoc-predtag">REGTYPE</span><a class="lpdoc-idx-anchor" id="comparator/1" href="ciaosearch.html#comparator/1">comparator/1</a></div><div class="lpdoc-deftext">A regular type, defined as follows:<pre class="lpdoc-codeblock">comparator(=). comparator(&gt;). comparator(&lt;). </pre> </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="74" href="ciaosearch.html#native_props"><tt>native_props</tt></a>. <li><em>Packages:</em><br/><a class="lpdoc-idx-anchor" id="75" href="ciaosearch.html#prelude"><tt>prelude</tt></a>, <a class="lpdoc-idx-anchor" id="76" href="ciaosearch.html#initial"><tt>initial</tt></a>, <a class="lpdoc-idx-anchor" id="77" href="condcomp_doc.html"><tt>condcomp</tt></a>, <a class="lpdoc-idx-anchor" id="78" href="assertions_doc.html"><tt>assertions</tt></a>, <a class="lpdoc-idx-anchor" id="79" href="ciaosearch.html#assertions/assertions_basic"><tt>assertions/assertions_basic</tt></a>, <a class="lpdoc-idx-anchor" id="80" href="ciaosearch.html#nortchecks"><tt>nortchecks</tt></a>, <a class="lpdoc-idx-anchor" id="81" href="ciaosearch.html#nativeprops"><tt>nativeprops</tt></a>, <a class="lpdoc-idx-anchor" id="82" href="isomodes_doc.html"><tt>isomodes</tt></a>. </ul></div></div><div class="lpdoc-footer">Generated with LPdoc using Ciao</div></div><div class="lpdoc-clearer"></div></div></body></html>