@ciao-lang/ts-ciao-interface
Version:
Simple Ciao interface for node.
39 lines • 9.14 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>Term manipulation utilities — 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="ExtraLibs.html">↑</a><a class="lpdoc-navbutton" href="errhandle.html">←</a><a class="lpdoc-navbutton" href="terms_check.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="ExtraLibs.html">PART VIII - Additional libraries</a> »<br/> </li><li><a href=""><strong>Term manipulation utilities</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>Term manipulation utilities</h1><a class="lpdoc-idx-anchor" href="ciaosearch.html#terms"></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 some utils to do term manipulation.<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(terms)).</tt><li><strong>Exports:</strong><br/><ul class="lpdoc-itemize-minus"><li><em>Predicates:</em><br/><a class="lpdoc-idx-anchor" id="0" href="#term_size/2"><tt>term_size/2</tt></a>, <a class="lpdoc-idx-anchor" id="1" href="#copy_args/3"><tt>copy_args/3</tt></a>, <a class="lpdoc-idx-anchor" id="2" href="#arg/2"><tt>arg/2</tt></a>, <a class="lpdoc-idx-anchor" id="3" href="#atom_concat/2"><tt>atom_concat/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="term_size/2" href="ciaosearch.html#term_size/2">term_size/2</a></div><div class="lpdoc-deftext"><p><span class="lpdoc-usage-header">Usage:</span><span class="lpdoc-usage-decl"><tt>term_size(Term,N)</tt>
</span><p>Determines the size of a term.</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="4" href="basic_props.html#nnegint/1"><tt>basic_props:nnegint/1</tt></a>)</span><span><span class="lpdoc-var">N</span> is a non-negative integer.
</span>
</ul></div></div><p>
<div><div class="lpdoc-defname"><span class="lpdoc-predtag">PREDICATE</span><a class="lpdoc-idx-anchor" id="copy_args/3" href="ciaosearch.html#copy_args/3">copy_args/3</a></div><div class="lpdoc-deftext"><p><span class="lpdoc-usage-header">Usage:</span><span class="lpdoc-usage-decl"><tt>copy_args(N,Term,Copy)</tt>
</span><p><span class="lpdoc-var">Term</span> and <span class="lpdoc-var">Copy</span> have the same first <span class="lpdoc-var">N</span> arguments.</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="5" href="basic_props.html#nnegint/1"><tt>basic_props:nnegint/1</tt></a>)</span><span><span class="lpdoc-var">N</span> is a non-negative integer.
</span>
</ul>
<strong>Other properties:</strong> <br/><span class="lpdoc-usage-decl"><tt>copy_args(N,Term,Copy)</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="6" href="term_typing.html#ground/1"><tt>term_typing:ground/1</tt></a>)</span><span><span class="lpdoc-var">N</span> is currently ground (it contains no variables).
</span><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="7" href="term_typing.html#nonvar/1"><tt>term_typing:nonvar/1</tt></a>)</span><span><span class="lpdoc-var">Term</span> is currently a term which is not a free variable.
</span>
<br/><em>then the following properties hold globally:</em>
<br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="8" href="basic_props.html#eval/1"><tt>basic_props:eval/1</tt></a>)</span><span><span class="lpdoc-var">copy_args(N,Term,Copy)</span> is evaluable at compile-time.
</span>
</ul><span class="lpdoc-usage-decl"><tt>copy_args(N,Term,Copy)</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="9" href="basic_props.html#sideff/2"><tt>basic_props:sideff/2</tt></a>)</span><span><span class="lpdoc-var">copy_args(N,Term,Copy)</span> is side-effect <span class="lpdoc-var">free</span>.
</span>
</ul></div></div><p>
<div><div class="lpdoc-defname"><span class="lpdoc-predtag">PREDICATE</span><a class="lpdoc-idx-anchor" id="arg/2" href="ciaosearch.html#arg/2">arg/2</a></div><div class="lpdoc-deftext"><p><span class="lpdoc-usage-header">Usage:</span><span class="lpdoc-usage-decl"><tt>arg(Term,Arg)</tt>
</span><p><span class="lpdoc-var">Arg</span> is an argument of <span class="lpdoc-var">Term</span>. Gives each of the arguments on backtracking.</p><ul class="lpdoc-itemize-minus"></ul></div></div><p>
<div><div class="lpdoc-defname"><span class="lpdoc-predtag">PREDICATE</span><a class="lpdoc-idx-anchor" id="atom_concat/2" href="ciaosearch.html#atom_concat/2">atom_concat/2</a></div><div class="lpdoc-deftext"><span class="lpdoc-usage-decl"><tt>atom_concat(Atms,Atm)</tt>
</span><p><span class="lpdoc-var">Atm</span> is the atom resulting from concatenating all atoms in the list <span class="lpdoc-var">Atms</span> in the order in which they appear. If <span class="lpdoc-var">Atm</span> is an atom at call then <span class="lpdoc-var">Atms</span> can contain free variables.<p><span class="lpdoc-usage-header">Usage 1:</span><span class="lpdoc-usage-decl"><tt>atom_concat(Atms,Atm)</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="10" href="basic_props.html#list/2"><tt>basic_props:list/2</tt></a>)</span><span><span class="lpdoc-var">Atms</span> is a list of <span class="lpdoc-var">atm</span>s.
</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#atm/1"><tt>basic_props:atm/1</tt></a>)</span><span><span class="lpdoc-var">Atm</span> is an atom.
</span>
</ul><p><span class="lpdoc-usage-header">Usage 2:</span><span class="lpdoc-usage-decl"><tt>atom_concat(Atms,Atm)</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="12" href="basic_props.html#atm/1"><tt>basic_props:atm/1</tt></a>)</span><span><span class="lpdoc-var">Atm</span> is an atom.
</span>
<li><em>The following properties should hold upon exit:</em><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="13" href="basic_props.html#list/2"><tt>basic_props:list/2</tt></a>)</span><span><span class="lpdoc-var">Atms</span> is a list of <span class="lpdoc-var">atm</span>s.
</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="14" href="ciaosearch.html#native_props"><tt>native_props</tt></a>.
<li><em>Packages:</em><br/><a class="lpdoc-idx-anchor" id="15" href="ciaosearch.html#prelude"><tt>prelude</tt></a>, <a class="lpdoc-idx-anchor" id="16" href="ciaosearch.html#initial"><tt>initial</tt></a>, <a class="lpdoc-idx-anchor" id="17" href="condcomp_doc.html"><tt>condcomp</tt></a>, <a class="lpdoc-idx-anchor" id="18" href="assertions_doc.html"><tt>assertions</tt></a>, <a class="lpdoc-idx-anchor" id="19" href="ciaosearch.html#assertions/assertions_basic"><tt>assertions/assertions_basic</tt></a>, <a class="lpdoc-idx-anchor" id="20" href="ciaosearch.html#nativeprops"><tt>nativeprops</tt></a>.
</ul></div></div><div class="lpdoc-footer">Generated with LPdoc using Ciao</div></div><div class="lpdoc-clearer"></div></div></body></html>