UNPKG

@ciao-lang/ts-ciao-interface

Version:

Simple Ciao interface for node.

98 lines 19.7 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>ISO Prolog compatibility layer &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="CompatProlog.html">&#x2191;</a><a class="lpdoc-navbutton" href="iso_misc.html">&#x2190;</a><a class="lpdoc-navbutton" href="dec10_io.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="CompatProlog.html">PART V - Compatibility</a> &raquo;<br/> </li><li><a href=""><strong>ISO Prolog compatibility layer</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>ISO Prolog compatibility layer</h1><a class="lpdoc-idx-anchor" href="ciaosearch.html#iso_incomplete"></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 provides some additional ISO Prolog predicates whose implementation is not yet complete.<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(iso_incomplete)).</tt><li><strong>Exports:</strong><br/><ul class="lpdoc-itemize-minus"><li><em>Predicates:</em><br/><a class="lpdoc-idx-anchor" id="0" href="#open/4"><tt>open/4</tt></a>, <a class="lpdoc-idx-anchor" id="1" href="#close/1"><tt>close/1</tt></a>, <a class="lpdoc-idx-anchor" id="2" href="#close/2"><tt>close/2</tt></a>, <a class="lpdoc-idx-anchor" id="3" href="#stream_property/2"><tt>stream_property/2</tt></a>. <li><em>Regular Types:</em><br/><a class="lpdoc-idx-anchor" id="4" href="#close_options/1"><tt>close_options/1</tt></a>, <a class="lpdoc-idx-anchor" id="5" href="#close_option/1"><tt>close_option/1</tt></a>, <a class="lpdoc-idx-anchor" id="6" href="#stream_prop/1"><tt>stream_prop/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">PREDICATE</span><a class="lpdoc-idx-anchor" id="absolute_file_name/2" href="ciaosearch.html#absolute_file_name/2">absolute_file_name/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="open/4" href="ciaosearch.html#open/4">open/4</a></div><div class="lpdoc-deftext"><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="7" href="stream_basic.html#stream/1"><tt>stream_basic:stream/1</tt></a>)</span><span><span class="lpdoc-var">Arg3</span> is an open stream. </span> <li><em>The following properties should hold at call time:</em><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="8" href="stream_basic.html#sourcename/1"><tt>stream_basic:sourcename/1</tt></a>)</span><span><span class="lpdoc-var">Arg1</span> is a source name. </span><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="9" href="stream_basic.html#io_mode/1"><tt>stream_basic:io_mode/1</tt></a>)</span><span><span class="lpdoc-var">Arg2</span> is an opening mode (&apos;read&apos;, &apos;write&apos; or &apos;append&apos;). </span><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="11" href="stream_basic.html#open_option_list/1"><tt>stream_basic:open_option_list/1</tt></a>)</span><span><span class="lpdoc-var">Arg4</span> is a list of options for <a class="lpdoc-idx-anchor" id="10" href="#open/4"><tt>open/4</tt></a>. </span> <li><em>The following properties should hold upon exit:</em><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="12" href="stream_basic.html#stream/1"><tt>stream_basic:stream/1</tt></a>)</span><span><span class="lpdoc-var">Arg3</span> is an open stream. </span> </ul></div></div><p> <div><div class="lpdoc-defname"><span class="lpdoc-predtag">PREDICATE</span><a class="lpdoc-idx-anchor" id="close/1" href="ciaosearch.html#close/1">close/1</a></div><div class="lpdoc-deftext"><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="13" href="stream_basic.html#stream/1"><tt>stream_basic:stream/1</tt></a>)</span><span><span class="lpdoc-var">Arg1</span> is an open stream. </span> <li><em>The following properties should hold upon exit:</em><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="14" href="stream_basic.html#stream/1"><tt>stream_basic:stream/1</tt></a>)</span><span><span class="lpdoc-var">Arg1</span> is an open stream. </span> <li><em>The following properties should hold globally:</em><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="15" 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></div></div><p> <div><div class="lpdoc-defname"><span class="lpdoc-predtag">PREDICATE</span><a class="lpdoc-idx-anchor" id="close/2" href="ciaosearch.html#close/2">close/2</a></div><div class="lpdoc-deftext"><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="16" href="stream_basic.html#stream/1"><tt>stream_basic:stream/1</tt></a>)</span><span><span class="lpdoc-var">Arg1</span> is an open stream. </span><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="18" href="#close_options/1"><tt>iso_incomplete:close_options/1</tt></a>)</span><span><span class="lpdoc-var">Arg2</span> is a list of <a class="lpdoc-idx-anchor" id="17" href="#close_option/1"><tt>close_option/1</tt></a>. </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="stream_basic.html#stream/1"><tt>stream_basic:stream/1</tt></a>)</span><span><span class="lpdoc-var">Arg1</span> is an open stream. </span><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="21" href="#close_options/1"><tt>iso_incomplete:close_options/1</tt></a>)</span><span><span class="lpdoc-var">Arg2</span> is a list of <a class="lpdoc-idx-anchor" id="20" href="#close_option/1"><tt>close_option/1</tt></a>. </span> <li><em>The following properties should hold globally:</em><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="22" 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><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="23" href="basic_props.html#not_further_inst/2"><tt>basic_props:not_further_inst/2</tt></a>)</span><span><span class="lpdoc-var">Arg2</span> is not further instantiated. </span> </ul></div></div><p> <div><div class="lpdoc-defname"><span class="lpdoc-predtag">REGTYPE</span><a class="lpdoc-idx-anchor" id="close_options/1" href="ciaosearch.html#close_options/1">close_options/1</a></div><div class="lpdoc-deftext"><p><span class="lpdoc-usage-header">Usage:</span><span class="lpdoc-usage-decl"><tt>close_options(L)</tt> </span><p><span class="lpdoc-var">L</span> is a list of <a class="lpdoc-idx-anchor" id="24" href="#close_option/1"><tt>close_option/1</tt></a>.</p><ul class="lpdoc-itemize-minus"></ul></div></div><p> <div><div class="lpdoc-defname"><span class="lpdoc-predtag">REGTYPE</span><a class="lpdoc-idx-anchor" id="close_option/1" href="ciaosearch.html#close_option/1">close_option/1</a></div><div class="lpdoc-deftext"><p><span class="lpdoc-usage-header">Usage:</span><span class="lpdoc-usage-decl"><tt>close_option(O)</tt> </span><p><span class="lpdoc-var">O</span> is an option for close/2: <pre class="lpdoc-codeblock">close_option(force(true)). close_option(force(false)). </pre>.</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="stream_property/2" href="ciaosearch.html#stream_property/2">stream_property/2</a></div><div class="lpdoc-deftext"><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="25" href="stream_basic.html#stream/1"><tt>stream_basic:stream/1</tt></a>)</span><span><span class="lpdoc-var">Arg1</span> is an open stream. </span><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="26" href="#stream_prop/1"><tt>iso_incomplete:stream_prop/1</tt></a>)</span><span><span class="lpdoc-var">Arg2</span> is a valid stream property: <pre class="lpdoc-codeblock">stream_prop(input). stream_prop(output). stream_prop(file_name(File)) :- atm(File). stream_prop(mode(Mode)) :- atm(Mode). stream_prop(alias(Alias)) :- atm(Alias). </pre> </span> <li><em>The following properties should hold upon exit:</em><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="27" href="stream_basic.html#stream/1"><tt>stream_basic:stream/1</tt></a>)</span><span><span class="lpdoc-var">Arg1</span> is an open stream. </span><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="28" href="#stream_prop/1"><tt>iso_incomplete:stream_prop/1</tt></a>)</span><span><span class="lpdoc-var">Arg2</span> is a valid stream property: <pre class="lpdoc-codeblock">stream_prop(input). stream_prop(output). stream_prop(file_name(File)) :- atm(File). stream_prop(mode(Mode)) :- atm(Mode). stream_prop(alias(Alias)) :- atm(Alias). </pre> </span> </ul></div></div><p> <div><div class="lpdoc-defname"><span class="lpdoc-predtag">REGTYPE</span><a class="lpdoc-idx-anchor" id="stream_prop/1" href="ciaosearch.html#stream_prop/1">stream_prop/1</a></div><div class="lpdoc-deftext"><p><span class="lpdoc-usage-header">Usage:</span><span class="lpdoc-usage-decl"><tt>stream_prop(P)</tt> </span><p><span class="lpdoc-var">P</span> is a valid stream property: <pre class="lpdoc-codeblock">stream_prop(input). stream_prop(output). stream_prop(file_name(File)) :- atm(File). stream_prop(mode(Mode)) :- atm(Mode). stream_prop(alias(Alias)) :- atm(Alias). </pre></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="set_input/1" href="ciaosearch.html#set_input/1">set_input/1</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="set_output/1" href="ciaosearch.html#set_output/1">set_output/1</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="at_end_of_stream/1" href="ciaosearch.html#at_end_of_stream/1">at_end_of_stream/1</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_code/2" href="ciaosearch.html#get_code/2">get_code/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="peek_code/2" href="ciaosearch.html#peek_code/2">peek_code/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="put_code/2" href="ciaosearch.html#put_code/2">put_code/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="nl/1" href="ciaosearch.html#nl/1">nl/1</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="tab/2" href="ciaosearch.html#tab/2">tab/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="get_byte/2" href="ciaosearch.html#get_byte/2">get_byte/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="peek_byte/2" href="ciaosearch.html#peek_byte/2">peek_byte/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="put_byte/2" href="ciaosearch.html#put_byte/2">put_byte/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="display/2" href="ciaosearch.html#display/2">display/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="displayq/2" href="ciaosearch.html#displayq/2">displayq/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="get_char/2" href="ciaosearch.html#get_char/2">get_char/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="peek_char/2" href="ciaosearch.html#peek_char/2">peek_char/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="put_char/2" href="ciaosearch.html#put_char/2">put_char/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="read/2" href="ciaosearch.html#read/2">read/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="read_term/3" href="ciaosearch.html#read_term/3">read_term/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="write_term/3" href="ciaosearch.html#write_term/3">write_term/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="write/2" href="ciaosearch.html#write/2">write/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="writeq/2" href="ciaosearch.html#writeq/2">writeq/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="write_canonical/2" href="ciaosearch.html#write_canonical/2">write_canonical/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="print/2" href="ciaosearch.html#print/2">print/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="printq/2" href="ciaosearch.html#printq/2">printq/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="portray_clause/2" href="ciaosearch.html#portray_clause/2">portray_clause/2</a></div><div class="lpdoc-deftext">No further documentation available for this predicate.</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="29" href="datafacts_rt.html"><tt>datafacts_rt</tt></a>, <a class="lpdoc-idx-anchor" id="30" href="iso_char.html"><tt>iso_char</tt></a>, <a class="lpdoc-idx-anchor" id="31" href="read.html"><tt>read</tt></a>, <a class="lpdoc-idx-anchor" id="32" href="write.html"><tt>write</tt></a>. <li><em>Packages:</em><br/><a class="lpdoc-idx-anchor" id="33" href="ciaosearch.html#prelude"><tt>prelude</tt></a>, <a class="lpdoc-idx-anchor" id="34" href="ciaosearch.html#initial"><tt>initial</tt></a>, <a class="lpdoc-idx-anchor" id="35" href="condcomp_doc.html"><tt>condcomp</tt></a>, <a class="lpdoc-idx-anchor" id="36" href="assertions_doc.html"><tt>assertions</tt></a>, <a class="lpdoc-idx-anchor" id="37" href="ciaosearch.html#assertions/assertions_basic"><tt>assertions/assertions_basic</tt></a>, <a class="lpdoc-idx-anchor" id="38" href="isomodes_doc.html"><tt>isomodes</tt></a>, <a class="lpdoc-idx-anchor" id="39" 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>