UNPKG

@ciao-lang/ts-ciao-interface

Version:

Simple Ciao interface for node.

19 lines 9.22 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>Attributed variables 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="attr_doc.html">&#x2191;</a><a class="lpdoc-navbutton" href="attr_doc.html">&#x2190;</a><a class="lpdoc-navbutton" href="attributes.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="attr_doc.html">Attributed variables</a> &raquo;<br/> </li><li><a href=""><strong>Attributed variables 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 imports">Documentation on imports</a></li></ul></div><div class="lpdoc-main"><div id=""><h1>Attributed variables runtime</h1><a class="lpdoc-idx-anchor" href="ciaosearch.html#attr_rt"></a> <strong>Author(s):</strong> <a class="lpdoc-idx-anchor" id="Remy Haemmerle" href="ciaosearch.html#Remy Haemmerle">R&eacute;my Haemmerl&eacute;</a>, <a class="lpdoc-idx-anchor" id="Christian Holzbaur" href="ciaosearch.html#Christian Holzbaur">Christian Holzbaur</a>, <a class="lpdoc-idx-anchor" id="Daniel Cabeza" href="ciaosearch.html#Daniel Cabeza">Daniel Cabeza</a>, <a class="lpdoc-idx-anchor" id="Manuel Carro" href="ciaosearch.html#Manuel Carro">Manuel Carro</a>.<p> This module provides a means to handle attributed variables. Note that attributes are private to the module from which the predicates implemented by <a class="lpdoc-idx-anchor" id="0" href=""><tt>attr_rt</tt></a> module are called. See package <a class="lpdoc-idx-anchor" id="1" href="attr_doc.html"><tt>attr</tt></a> for more details about attributed variables.<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(attr/attr_rt)).</tt><li><strong>Exports:</strong><br/><ul class="lpdoc-itemize-minus"><li><em>Predicates:</em><br/><a class="lpdoc-idx-anchor" id="2" href="#attvar/1"><tt>attvar/1</tt></a>, <a class="lpdoc-idx-anchor" id="3" href="#put_attr_local/2"><tt>put_attr_local/2</tt></a>, <a class="lpdoc-idx-anchor" id="4" href="#put_attr/3"><tt>put_attr/3</tt></a>, <a class="lpdoc-idx-anchor" id="5" href="#get_attr_local/2"><tt>get_attr_local/2</tt></a>, <a class="lpdoc-idx-anchor" id="6" href="#get_attr/3"><tt>get_attr/3</tt></a>, <a class="lpdoc-idx-anchor" id="7" href="#del_attr_local/1"><tt>del_attr_local/1</tt></a>, <a class="lpdoc-idx-anchor" id="8" href="#del_attr/2"><tt>del_attr/2</tt></a>, <a class="lpdoc-idx-anchor" id="9" href="#copy_term/3"><tt>copy_term/3</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="attvar/1" href="ciaosearch.html#attvar/1">attvar/1</a></div><div class="lpdoc-deftext"><p><span class="lpdoc-usage-header">Usage:</span><span class="lpdoc-usage-decl"><tt>attvar(Var)</tt> </span><p>Succeeds if Term is an attributed variable</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="put_attr_local/2" href="ciaosearch.html#put_attr_local/2">put_attr_local/2</a></div><div class="lpdoc-deftext"><p><span class="lpdoc-usage-header">Usage:</span><span class="lpdoc-usage-decl"><tt>put_attr_local(Var,Value)</tt> </span><p>If <span class="lpdoc-var">Var</span> is a variable or attributed variable, set its attribute to <span class="lpdoc-var">Value</span>. If an attribute is already associated with <span class="lpdoc-var">Var</span>, the old value is replaced. Backtracking will restore the old value (i.e., an attribute is a mutable term. See also library <a class="lpdoc-idx-anchor" id="10" href="mutables.html"><tt>mutables</tt></a>). This predicate raises a representation error if <span class="lpdoc-var">Var</span> is not a variable and a type error if <span class="lpdoc-var">Module</span> is not an atom.</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="put_attr/3" href="ciaosearch.html#put_attr/3">put_attr/3</a></div><div class="lpdoc-deftext">No further documentation available for this predicate.</div></div><p> <div><div class="lpdoc-defname"><span class="lpdoc-predtag">PREDICATE</span><a class="lpdoc-idx-anchor" id="get_attr_local/2" href="ciaosearch.html#get_attr_local/2">get_attr_local/2</a></div><div class="lpdoc-deftext"><p><span class="lpdoc-usage-header">Usage:</span><span class="lpdoc-usage-decl"><tt>get_attr_local(Var,Value)</tt> </span><p>Request the current value for the attribute associted to <span class="lpdoc-var">Var</span>. If <span class="lpdoc-var">Var</span> is not an attributed variable or the named attribute is not associated to <span class="lpdoc-var">Var</span> this predicate fails silently.</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="get_attr/3" href="ciaosearch.html#get_attr/3">get_attr/3</a></div><div class="lpdoc-deftext">No further documentation available for this predicate.</div></div><p> <div><div class="lpdoc-defname"><span class="lpdoc-predtag">PREDICATE</span><a class="lpdoc-idx-anchor" id="del_attr_local/1" href="ciaosearch.html#del_attr_local/1">del_attr_local/1</a></div><div class="lpdoc-deftext"><p><span class="lpdoc-usage-header">Usage:</span><span class="lpdoc-usage-decl"><tt>del_attr_local(Var)</tt> </span><p>If <span class="lpdoc-var">Var</span> has an attribute, deletes it, otherwise succeeds without side-effect.</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="del_attr/2" href="ciaosearch.html#del_attr/2">del_attr/2</a></div><div class="lpdoc-deftext">No further documentation available for this predicate.</div></div><p> <div><div class="lpdoc-defname"><span class="lpdoc-predtag">PREDICATE</span><a class="lpdoc-idx-anchor" id="copy_term/3" href="ciaosearch.html#copy_term/3">copy_term/3</a></div><div class="lpdoc-deftext"><p><span class="lpdoc-usage-header">Usage:</span><span class="lpdoc-usage-decl"><tt>copy_term(Term,Copy,Gs)</tt> </span><p>Creates a regular term <span class="lpdoc-var">Copy</span> as a copy of <span class="lpdoc-var">Term</span> (without any attributes), and a list <span class="lpdoc-var">Gs</span> of goals that when executed reinstate all attributes onto Copy. The nonterminal <tt>attribute_goal/1</tt>, as defined in the modules the attributes stem from, is used to convert attributes to lists of goals.</p><ul class="lpdoc-itemize-minus"></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="11" href="datafacts_rt.html"><tt>datafacts_rt</tt></a>, <a class="lpdoc-idx-anchor" id="12" href="format.html"><tt>format</tt></a>, <a class="lpdoc-idx-anchor" id="13" href="sets.html"><tt>sets</tt></a>. <li><em>Packages:</em><br/><a class="lpdoc-idx-anchor" id="14" href="ciaosearch.html#prelude"><tt>prelude</tt></a>, <a class="lpdoc-idx-anchor" id="15" href="ciaosearch.html#initial"><tt>initial</tt></a>, <a class="lpdoc-idx-anchor" id="16" href="condcomp_doc.html"><tt>condcomp</tt></a>, <a class="lpdoc-idx-anchor" id="17" href="assertions_doc.html"><tt>assertions</tt></a>, <a class="lpdoc-idx-anchor" id="18" href="ciaosearch.html#assertions/assertions_basic"><tt>assertions/assertions_basic</tt></a>, <a class="lpdoc-idx-anchor" id="19" href="modes_doc.html"><tt>modes</tt></a>, <a class="lpdoc-idx-anchor" id="20" href="fsyntax_doc.html"><tt>fsyntax</tt></a>, <a class="lpdoc-idx-anchor" id="21" href="dcg_doc.html"><tt>dcg</tt></a>, <a class="lpdoc-idx-anchor" id="22" 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>