UNPKG

@ciao-lang/ts-ciao-interface

Version:

Simple Ciao interface for node.

148 lines 41.9 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>Assertion processing library &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="StdLibs.html">&#x2191;</a><a class="lpdoc-navbutton" href="system_info.html">&#x2190;</a><a class="lpdoc-navbutton" href="compiler.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="StdLibs.html">PART VII - Standard libraries</a> &raquo;<br/> </li><li><a href=""><strong>Assertion processing library</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>Assertion processing library</h1><a class="lpdoc-idx-anchor" href="ciaosearch.html#assrt_lib"></a> <strong>Author(s):</strong> <a class="lpdoc-idx-anchor" id="Manuel Hermenegildo" href="ciaosearch.html#Manuel Hermenegildo">Manuel Hermenegildo</a>.<p> <p>This module defines some predicates which are useful for writing programs which process assertions (as defined in the <a class="lpdoc-idx-anchor" id="0" href="assertions_doc.html"><tt>assertions</tt></a> library). The exported predicates allow reading assertions in all acceptable syntactic forms and converting them to a normalized format.<p>If you want to have access to some of the declarations read by the predicates exported by this file it is also necessary to include the library <a class="lpdoc-idx-anchor" id="1" href="ciaosearch.html#compiler/c_itf"><tt>compiler/c_itf</tt></a>.<p><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(assertions/assrt_lib)).</tt><li><strong>Exports:</strong><br/><ul class="lpdoc-itemize-minus"><li><em>Predicates:</em><br/><a class="lpdoc-idx-anchor" id="2" href="#get_code_and_related_assertions/5"><tt>get_code_and_related_assertions/5</tt></a>, <a class="lpdoc-idx-anchor" id="3" href="#get_code_and_related_assertions_opts/6"><tt>get_code_and_related_assertions_opts/6</tt></a>, <a class="lpdoc-idx-anchor" id="4" href="#cleanup_code_and_related_assertions/0"><tt>cleanup_code_and_related_assertions/0</tt></a>, <a class="lpdoc-idx-anchor" id="5" href="#check_code_and_assrt_syntax/1"><tt>check_code_and_assrt_syntax/1</tt></a>, <a class="lpdoc-idx-anchor" id="6" href="#use_pkg/2"><tt>use_pkg/2</tt></a>, <a class="lpdoc-idx-anchor" id="7" href="#clause_read/7"><tt>clause_read/7</tt></a>, <a class="lpdoc-idx-anchor" id="8" href="#assertion_read/9"><tt>assertion_read/9</tt></a>, <a class="lpdoc-idx-anchor" id="9" href="#assertion_body/7"><tt>assertion_body/7</tt></a>, <a class="lpdoc-idx-anchor" id="10" href="#generate_asr_file/2"><tt>generate_asr_file/2</tt></a>, <a class="lpdoc-idx-anchor" id="11" href="#read_asr_file/2"><tt>read_asr_file/2</tt></a>, <a class="lpdoc-idx-anchor" id="12" href="#rel_data/1"><tt>rel_data/1</tt></a>, <a class="lpdoc-idx-anchor" id="13" href="#print_assertions/1"><tt>print_assertions/1</tt></a>, <a class="lpdoc-idx-anchor" id="14" href="#print_unformatted_assertions/1"><tt>print_unformatted_assertions/1</tt></a>, <a class="lpdoc-idx-anchor" id="15" href="#comps_to_goal/3"><tt>comps_to_goal/3</tt></a>, <a class="lpdoc-idx-anchor" id="16" href="#comps_to_goal/4"><tt>comps_to_goal/4</tt></a>, <a class="lpdoc-idx-anchor" id="17" href="#normalize_assertion/9"><tt>normalize_assertion/9</tt></a>, <a class="lpdoc-idx-anchor" id="18" href="#norm_goal_prop/3"><tt>norm_goal_prop/3</tt></a>, <a class="lpdoc-idx-anchor" id="19" href="#denorm_goal_prop/3"><tt>denorm_goal_prop/3</tt></a>, <a class="lpdoc-idx-anchor" id="20" href="#prop_apply/3"><tt>prop_apply/3</tt></a>, <a class="lpdoc-idx-anchor" id="21" href="#prop_unapply/3"><tt>prop_unapply/3</tt></a>, <a class="lpdoc-idx-anchor" id="22" href="#prop_argvar/2"><tt>prop_argvar/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="get_code_and_related_assertions/5" href="ciaosearch.html#get_code_and_related_assertions/5">get_code_and_related_assertions/5</a></div><div class="lpdoc-deftext"><p><span class="lpdoc-usage-header">Usage:</span><span class="lpdoc-usage-decl"><tt>get_code_and_related_assertions(I,M,Base,Suffix,Dir)</tt> </span><p>This is the main entry point to the <a class="lpdoc-idx-anchor" id="23" href="ciaosearch.html#assertion reader/normalizer">assertion reader/normalizer</a>. Reads all declarations and code in <span class="lpdoc-var">I</span> and leaves it asserted in the database, in the format defined in <a class="lpdoc-idx-anchor" id="24" href="ciaosearch.html#&apos;compiler/c_itf&apos;"><tt>&apos;compiler/c_itf&apos;</tt></a>. Clauses are stored in <a class="lpdoc-idx-anchor" id="25" href="#clause_read/7"><tt>clause_read/7</tt></a>. Used packages are stored in <a class="lpdoc-idx-anchor" id="26" href="#use_pkg/2"><tt>use_pkg/2</tt></a>.<p>Also, it reads and normalizes <em>all</em> assertions in this file and all related files, leaving them asserted in <a class="lpdoc-idx-anchor" id="27" href="#assertion_read/9"><tt>assertion_read/9</tt></a> facts. If up to date <tt>.asr</tt> files exist for this or any of the related files, the assertion information is read directly from such <tt>.asr</tt> files. <a class="lpdoc-idx-anchor" id="28" href="ciaosearch.html#.asr files"></a> Otherwise, the <tt>.pl</tt> file is read and an up to date <tt>.asr</tt> file is generated containing all assertions in the <tt>.pl</tt> file, normalized and stored as <a class="lpdoc-idx-anchor" id="29" href="#assertion_read/9"><tt>assertion_read/9</tt></a> facts.<p><span class="lpdoc-var">M</span> is the name of the module defined by the file. <span class="lpdoc-var">Base</span> is the absolute name of the file <span class="lpdoc-var">I</span> but with no suffix. <span class="lpdoc-var">Suffix</span> is the file suffix (e.g., &apos;<tt>.pl</tt>&apos;). <span class="lpdoc-var">Dir</span> is the directory part of the filename (with no <tt>/</tt> at the end).<p>Since this predicate is intended for gathering file information for purposes which can be other than compilation to executable code (e.g., generating documentation or in the preprocessor) this predicate catches errors and proceeds in cases where file processing (e.g., during actual compilation) might normally abort.</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="30" href="ciaosearch.html#filename/1"><tt>c_itf_props:filename/1</tt></a>)</span><span><span class="lpdoc-var">I</span> is an atom describing the name of a file. </span><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="31" href="ciaosearch.html#moddesc/1"><tt>c_itf_props:moddesc/1</tt></a>)</span><span><span class="lpdoc-var">M</span> is a module descriptor. </span><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="32" href="basic_props.html#atm/1"><tt>basic_props:atm/1</tt></a>)</span><span><span class="lpdoc-var">Base</span> is an atom. </span><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="33" href="basic_props.html#atm/1"><tt>basic_props:atm/1</tt></a>)</span><span><span class="lpdoc-var">Suffix</span> is an atom. </span><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="34" href="basic_props.html#atm/1"><tt>basic_props:atm/1</tt></a>)</span><span><span class="lpdoc-var">Dir</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="35" href="term_typing.html#ground/1"><tt>term_typing:ground/1</tt></a>)</span><span><span class="lpdoc-var">I</span> is currently ground (it contains no variables). </span> <li><em>The following properties should hold upon exit:</em><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="36" href="term_typing.html#ground/1"><tt>term_typing:ground/1</tt></a>)</span><span><span class="lpdoc-var">I</span> is currently ground (it contains no variables). </span><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="37" href="term_typing.html#ground/1"><tt>term_typing:ground/1</tt></a>)</span><span><span class="lpdoc-var">M</span> is currently ground (it contains no variables). </span><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="38" href="term_typing.html#ground/1"><tt>term_typing:ground/1</tt></a>)</span><span><span class="lpdoc-var">Base</span> is currently ground (it contains no variables). </span><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="39" href="term_typing.html#ground/1"><tt>term_typing:ground/1</tt></a>)</span><span><span class="lpdoc-var">Suffix</span> is currently ground (it contains no variables). </span><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">Dir</span> is currently ground (it contains no variables). </span> </ul></div></div><p> <div><div class="lpdoc-defname"><span class="lpdoc-predtag">PREDICATE</span><a class="lpdoc-idx-anchor" id="get_code_and_related_assertions_opts/6" href="ciaosearch.html#get_code_and_related_assertions_opts/6">get_code_and_related_assertions_opts/6</a></div><div class="lpdoc-deftext"><p><span class="lpdoc-usage-header">Usage:</span><span class="lpdoc-usage-decl"><tt>get_code_and_related_assertions_opts(I,Opts,M,Base,Suffix,Dir)</tt> </span><p>Version which accepts some options in <span class="lpdoc-var">Opts</span>. In particular, <tt>&apos;-v&apos;</tt> produces verbose output for debugging. Also passes on the options in <span class="lpdoc-var">Opts</span> to pass two of the assertion normalizer. </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="41" href="ciaosearch.html#filename/1"><tt>c_itf_props:filename/1</tt></a>)</span><span><span class="lpdoc-var">I</span> is an atom describing the name of a file. </span><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="42" href="basic_props.html#list/2"><tt>basic_props:list/2</tt></a>)</span><span><span class="lpdoc-var">Opts</span> is a list of <span class="lpdoc-var">atm</span>s. </span><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="43" href="ciaosearch.html#moddesc/1"><tt>c_itf_props:moddesc/1</tt></a>)</span><span><span class="lpdoc-var">M</span> is a module descriptor. </span><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="44" href="basic_props.html#atm/1"><tt>basic_props:atm/1</tt></a>)</span><span><span class="lpdoc-var">Base</span> is an atom. </span><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="45" href="basic_props.html#atm/1"><tt>basic_props:atm/1</tt></a>)</span><span><span class="lpdoc-var">Suffix</span> is an atom. </span><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="46" href="basic_props.html#atm/1"><tt>basic_props:atm/1</tt></a>)</span><span><span class="lpdoc-var">Dir</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="47" href="term_typing.html#ground/1"><tt>term_typing:ground/1</tt></a>)</span><span><span class="lpdoc-var">I</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">Opts</span> is currently ground (it contains no variables). </span> <li><em>The following properties should hold upon exit:</em><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="49" href="term_typing.html#ground/1"><tt>term_typing:ground/1</tt></a>)</span><span><span class="lpdoc-var">I</span> is currently ground (it contains no variables). </span><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="50" href="term_typing.html#ground/1"><tt>term_typing:ground/1</tt></a>)</span><span><span class="lpdoc-var">Opts</span> is currently ground (it contains no variables). </span><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="51" href="term_typing.html#ground/1"><tt>term_typing:ground/1</tt></a>)</span><span><span class="lpdoc-var">M</span> is currently ground (it contains no variables). </span><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="52" href="term_typing.html#ground/1"><tt>term_typing:ground/1</tt></a>)</span><span><span class="lpdoc-var">Base</span> is currently ground (it contains no variables). </span><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="53" href="term_typing.html#ground/1"><tt>term_typing:ground/1</tt></a>)</span><span><span class="lpdoc-var">Suffix</span> is currently ground (it contains no variables). </span><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">Dir</span> is currently ground (it contains no variables). </span> </ul></div></div><p> <div><div class="lpdoc-defname"><span class="lpdoc-predtag">PREDICATE</span><a class="lpdoc-idx-anchor" id="cleanup_code_and_related_assertions/0" href="ciaosearch.html#cleanup_code_and_related_assertions/0">cleanup_code_and_related_assertions/0</a></div><div class="lpdoc-deftext"><p><span class="lpdoc-usage-header">Usage:</span><p>Cleans up data asserted by assertion/code reader/normalizer.</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="check_code_and_assrt_syntax/1" href="ciaosearch.html#check_code_and_assrt_syntax/1">check_code_and_assrt_syntax/1</a></div><div class="lpdoc-deftext"><p><span class="lpdoc-usage-header">Usage:</span><span class="lpdoc-usage-decl"><tt>check_code_and_assrt_syntax(I)</tt> </span><p>This predicate is useful for checking the syntax of the code and assertions in a file, as well as imports and exports. Full (semantic) assertion checking must be done with the preprocessor.</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="55" href="ciaosearch.html#filename/1"><tt>c_itf_props:filename/1</tt></a>)</span><span><span class="lpdoc-var">I</span> is an atom describing the name of a file. </span> <li><em>The following properties should hold at call time:</em><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="56" href="term_typing.html#ground/1"><tt>term_typing:ground/1</tt></a>)</span><span><span class="lpdoc-var">I</span> is currently ground (it contains no variables). </span> <li><em>The following properties should hold upon exit:</em><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="57" href="term_typing.html#ground/1"><tt>term_typing:ground/1</tt></a>)</span><span><span class="lpdoc-var">I</span> is currently ground (it contains no variables). </span> </ul></div></div><p> <div><div class="lpdoc-defname"><span class="lpdoc-predtag">PREDICATE</span><a class="lpdoc-idx-anchor" id="use_pkg/2" href="ciaosearch.html#use_pkg/2">use_pkg/2</a></div><div class="lpdoc-deftext"><p><span class="lpdoc-usage-header">Usage:</span><span class="lpdoc-usage-decl"><tt>use_pkg(Base,Pkg)</tt> </span><p>After calling <a class="lpdoc-idx-anchor" id="58" href="ciaosearch.html#get_assertions_and_code/5"><tt>get_assertions_and_code/5</tt></a> this predicate contains the packages used in the file. The format is the same as that of <a class="lpdoc-idx-anchor" id="59" href="ciaosearch.html#package/2"><tt>package/2</tt></a> in <a class="lpdoc-idx-anchor" id="60" href="ciaosearch.html#c_itf"><tt>c_itf</tt></a></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="61" href="basic_props.html#atm/1"><tt>basic_props:atm/1</tt></a>)</span><span><span class="lpdoc-var">Base</span> is an atom. </span><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="62" href="ciaosearch.html#filename/1"><tt>c_itf_props:filename/1</tt></a>)</span><span><span class="lpdoc-var">Pkg</span> is an atom describing the name of a file. </span> </ul> The predicate is of type <em>data</em>.<br/></div></div><p> <div><div class="lpdoc-defname"><span class="lpdoc-predtag">PREDICATE</span><a class="lpdoc-idx-anchor" id="clause_read/7" href="ciaosearch.html#clause_read/7">clause_read/7</a></div><div class="lpdoc-deftext"><p><span class="lpdoc-usage-header">Usage:</span><span class="lpdoc-usage-decl"><tt>clause_read(Base,Head,Body,VarNames,Source,Line0,Line1)</tt> </span><p>After calling <a class="lpdoc-idx-anchor" id="63" href="ciaosearch.html#get_assertions_and_code/5"><tt>get_assertions_and_code/5</tt></a> this predicate contains the clauses in the file. The format is the same as that of <a class="lpdoc-idx-anchor" id="64" href="ciaosearch.html#clause_of/7"><tt>clause_of/7</tt></a> in <a class="lpdoc-idx-anchor" id="65" href="ciaosearch.html#c_itf"><tt>c_itf</tt></a></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="66" href="basic_props.html#atm/1"><tt>basic_props:atm/1</tt></a>)</span><span><span class="lpdoc-var">Base</span> is an atom. </span><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="67" href="basic_props.html#cgoal/1"><tt>basic_props:cgoal/1</tt></a>)</span><span><span class="lpdoc-var">Head</span> is a term which represents a goal, i.e., an atom or a structure. </span><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="68" href="ciaosearch.html#filename/1"><tt>c_itf_props:filename/1</tt></a>)</span><span><span class="lpdoc-var">Source</span> is an atom describing the name of a file. </span><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="69" href="basic_props.html#int/1"><tt>basic_props:int/1</tt></a>)</span><span><span class="lpdoc-var">Line0</span> is an integer. </span><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="70" href="basic_props.html#int/1"><tt>basic_props:int/1</tt></a>)</span><span><span class="lpdoc-var">Line1</span> is an integer. </span> </ul> The predicate is of type <em>data</em>.<br/></div></div><p> <div><div class="lpdoc-defname"><span class="lpdoc-predtag">PREDICATE</span><a class="lpdoc-idx-anchor" id="assertion_read/9" href="ciaosearch.html#assertion_read/9">assertion_read/9</a></div><div class="lpdoc-deftext"><p><span class="lpdoc-usage-header">Usage:</span><span class="lpdoc-usage-decl"><tt>assertion_read(Goal,M,Status,Type,Body,Dict,Source,LB,LE)</tt> </span><p>Each fact represents that an assertion for <span class="lpdoc-var">Goal</span> has been read in module <span class="lpdoc-var">M</span>, which has status <span class="lpdoc-var">Status</span> and is of type <span class="lpdoc-var">Type</span>. <span class="lpdoc-var">Body</span> is the actual body of the assertion. <span class="lpdoc-var">Dict</span> contains the names of the variables which appear in the assertion. <span class="lpdoc-var">Source</span> is the file in which the assertion appears (treats included files correctly). <span class="lpdoc-var">LB</span> and <span class="lpdoc-var">LE</span> are the first and last line numbers in this source file in which the assertion appears (if the source is not available or has not been read <span class="lpdoc-var">LB</span>=<span class="lpdoc-var">LE</span>=0). <span class="lpdoc-var">Goal</span> may be normalized or not, i.e., it may contain modes or properties, but it is always a term of the same functor and arity as the predicate it represents (i.e., it is not in Functor/Arity format). <span class="lpdoc-var">Body</span> is always normalized (but the properties or property conjunctions inside may not -- see <a class="lpdoc-idx-anchor" id="71" href="ciaosearch.html#normalize_assertions_pass_one/1"><tt>normalize_assertions_pass_one/1</tt></a> and <a class="lpdoc-idx-anchor" id="72" href="ciaosearch.html#normalize_assertions_pass_two/1"><tt>normalize_assertions_pass_two/1</tt></a>.</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="73" href="ciaosearch.html#moddesc/1"><tt>c_itf_props:moddesc/1</tt></a>)</span><span><span class="lpdoc-var">M</span> is a module descriptor. </span><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="74" href="assertions_props.html#assrt_status/1"><tt>assertions_props:assrt_status/1</tt></a>)</span><span><span class="lpdoc-var">Status</span> is an acceptable status for an assertion. </span><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="75" href="assertions_props.html#assrt_type/1"><tt>assertions_props:assrt_type/1</tt></a>)</span><span><span class="lpdoc-var">Type</span> is an admissible kind of assertion. </span><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="76" href="assertions_props.html#assrt_body/1"><tt>assertions_props:assrt_body/1</tt></a>)</span><span><span class="lpdoc-var">Body</span> is an assertion body. </span><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="77" href="assertions_props.html#dictionary/1"><tt>dict:dictionary/1</tt></a>)</span><span><span class="lpdoc-var">Dict</span> is a dictionary. </span><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="78" href="basic_props.html#int/1"><tt>basic_props:int/1</tt></a>)</span><span><span class="lpdoc-var">LB</span> is an integer. </span><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="79" href="ciaosearch.html#filename/1"><tt>c_itf_props:filename/1</tt></a>)</span><span><span class="lpdoc-var">Source</span> is an atom describing the name of a file. </span><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="80" href="basic_props.html#int/1"><tt>basic_props:int/1</tt></a>)</span><span><span class="lpdoc-var">LE</span> is an integer. </span> </ul> The predicate is of type <em>data</em>.<br/></div></div><p> <div><div class="lpdoc-defname"><span class="lpdoc-predtag">PREDICATE</span><a class="lpdoc-idx-anchor" id="assertion_body/7" href="ciaosearch.html#assertion_body/7">assertion_body/7</a></div><div class="lpdoc-deftext"><span class="lpdoc-usage-decl"><tt>assertion_body(Pred,Compat,Call,Succ,Comp,Comm,Asst)</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="81" href="term_typing.html#ground/1"><tt>term_typing:ground/1</tt></a>)</span><span><span class="lpdoc-var">Pred</span> is currently ground (it contains no variables). </span><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="82" href="term_typing.html#ground/1"><tt>term_typing:ground/1</tt></a>)</span><span><span class="lpdoc-var">Compat</span> is currently ground (it contains no variables). </span><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="83" href="term_typing.html#ground/1"><tt>term_typing:ground/1</tt></a>)</span><span><span class="lpdoc-var">Call</span> is currently ground (it contains no variables). </span><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="84" href="term_typing.html#ground/1"><tt>term_typing:ground/1</tt></a>)</span><span><span class="lpdoc-var">Succ</span> is currently ground (it contains no variables). </span><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="85" href="term_typing.html#ground/1"><tt>term_typing:ground/1</tt></a>)</span><span><span class="lpdoc-var">Comp</span> is currently ground (it contains no variables). </span><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="86" href="term_typing.html#ground/1"><tt>term_typing:ground/1</tt></a>)</span><span><span class="lpdoc-var">Comm</span> is currently ground (it contains no variables). </span> <br/><em>then the following properties should hold upon exit:</em> <br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="87" href="term_typing.html#ground/1"><tt>term_typing:ground/1</tt></a>)</span><span><span class="lpdoc-var">Asst</span> is currently ground (it contains no variables). </span> </ul><span class="lpdoc-usage-decl"><tt>assertion_body(Pred,Compat,Call,Succ,Comp,Comm,Asst)</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="88" href="term_typing.html#ground/1"><tt>term_typing:ground/1</tt></a>)</span><span><span class="lpdoc-var">Asst</span> is currently ground (it contains no variables). </span> <br/><em>then the following properties should hold upon exit:</em> <br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="89" href="term_typing.html#ground/1"><tt>term_typing:ground/1</tt></a>)</span><span><span class="lpdoc-var">Pred</span> is currently ground (it contains no variables). </span><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="90" href="term_typing.html#ground/1"><tt>term_typing:ground/1</tt></a>)</span><span><span class="lpdoc-var">Compat</span> is currently ground (it contains no variables). </span><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="91" href="term_typing.html#ground/1"><tt>term_typing:ground/1</tt></a>)</span><span><span class="lpdoc-var">Call</span> is currently ground (it contains no variables). </span><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="92" href="term_typing.html#ground/1"><tt>term_typing:ground/1</tt></a>)</span><span><span class="lpdoc-var">Succ</span> is currently ground (it contains no variables). </span><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="93" href="term_typing.html#ground/1"><tt>term_typing:ground/1</tt></a>)</span><span><span class="lpdoc-var">Comp</span> is currently ground (it contains no variables). </span><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="94" href="term_typing.html#ground/1"><tt>term_typing:ground/1</tt></a>)</span><span><span class="lpdoc-var">Comm</span> is currently ground (it contains no variables). </span> </ul></div></div><p> <div><div class="lpdoc-defname"><span class="lpdoc-predtag">PREDICATE</span><a class="lpdoc-idx-anchor" id="generate_asr_file/2" href="ciaosearch.html#generate_asr_file/2">generate_asr_file/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_asr_file/2" href="ciaosearch.html#read_asr_file/2">read_asr_file/2</a></div><div class="lpdoc-deftext"><p><span class="lpdoc-usage-header">Usage:</span><p>Reads the data in the .asr file. Fails if version is different from current version (so that .asr will be regenerated).</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="rel_data/1" href="ciaosearch.html#rel_data/1">rel_data/1</a></div><div class="lpdoc-deftext">No further documentation available for this predicate. The predicate is of type <em>data</em>.<br/></div></div><p> <div><div class="lpdoc-defname"><span class="lpdoc-predtag">PREDICATE</span><a class="lpdoc-idx-anchor" id="print_assertions/1" href="ciaosearch.html#print_assertions/1">print_assertions/1</a></div><div class="lpdoc-deftext"><p><span class="lpdoc-usage-header">Usage:</span><span class="lpdoc-usage-decl"><tt>print_assertions(M)</tt> </span><p>Prints the assertions stored in the database as <a class="lpdoc-idx-anchor" id="95" href="#assertion_read/9"><tt>assertion_read/9</tt></a> facts, performing some pretty-printing and simplification (e.g., eliminating empty fields). If <span class="lpdoc-var">M</span> is instantiated, only information on module <span class="lpdoc-var">M</span> is printed. Otherwise information for all modules is printed.</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="96" href="ciaosearch.html#moddesc/1"><tt>c_itf_props:moddesc/1</tt></a>)</span><span><span class="lpdoc-var">M</span> is a module descriptor. </span> </ul></div></div><p> <div><div class="lpdoc-defname"><span class="lpdoc-predtag">PREDICATE</span><a class="lpdoc-idx-anchor" id="print_unformatted_assertions/1" href="ciaosearch.html#print_unformatted_assertions/1">print_unformatted_assertions/1</a></div><div class="lpdoc-deftext"><p><span class="lpdoc-usage-header">Usage:</span><span class="lpdoc-usage-decl"><tt>print_unformatted_assertions(M)</tt> </span><p>Prints the assertions stored in the database as <a class="lpdoc-idx-anchor" id="97" href="#assertion_read/9"><tt>assertion_read/9</tt></a> facts, in a raw format (no attempt is made to simplify the assertions). If <span class="lpdoc-var">M</span> is instantiated, only information on module <span class="lpdoc-var">M</span> is printed. Otherwise information for all modules is printed.</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="98" href="ciaosearch.html#moddesc/1"><tt>c_itf_props:moddesc/1</tt></a>)</span><span><span class="lpdoc-var">M</span> is a module descriptor. </span> </ul></div></div><p> <div><div class="lpdoc-defname"><span class="lpdoc-predtag">PREDICATE</span><a class="lpdoc-idx-anchor" id="comps_to_goal/3" href="ciaosearch.html#comps_to_goal/3">comps_to_goal/3</a></div><div class="lpdoc-deftext"><p><span class="lpdoc-usage-header">Usage 1:</span><p>This predicate allows to compound a list of global properties in to sucessive meta-calls</p><ul class="lpdoc-itemize-minus"></ul><p><span class="lpdoc-usage-header">Usage 2:</span><p>This predicate allows to compound a list of global properties in to successive meta-calls, but in the third argument you can use your own selector.</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="comps_to_goal/4" href="ciaosearch.html#comps_to_goal/4">comps_to_goal/4</a></div><div class="lpdoc-deftext">No further documentation available for this predicate. <em>Meta-predicate</em> with arguments: <tt>comps_to_goal(?,pred(3),?,?)</tt>.<br/></div></div><p> <div><div class="lpdoc-defname"><span class="lpdoc-predtag">PREDICATE</span><a class="lpdoc-idx-anchor" id="normalize_assertion/9" href="ciaosearch.html#normalize_assertion/9">normalize_assertion/9</a></div><div class="lpdoc-deftext"><p><span class="lpdoc-usage-header">Usage:</span><span class="lpdoc-usage-decl"><tt>normalize_assertion(M,Assrt,PD,AStatus,AType,NABody,S,LB,LE)</tt> </span><p>Normalizes one assertion (see <a class="lpdoc-idx-anchor" id="99" href="ciaosearch.html#normalize_assertions/3"><tt>normalize_assertions/3</tt></a>).</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="100" href="ciaosearch.html#moddesc/1"><tt>c_itf_props:moddesc/1</tt></a>)</span><span><span class="lpdoc-var">M</span> is a module descriptor. </span><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="101" href="basic_props.html#term/1"><tt>basic_props:term/1</tt></a>)</span><span><span class="lpdoc-var">Assrt</span> is any term. </span><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="102" href="basic_props.html#term/1"><tt>basic_props:term/1</tt></a>)</span><span><span class="lpdoc-var">PD</span> is any term. </span><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="103" href="assertions_props.html#assrt_status/1"><tt>assertions_props:assrt_status/1</tt></a>)</span><span><span class="lpdoc-var">AStatus</span> is an acceptable status for an assertion. </span><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="104" href="assertions_props.html#assrt_type/1"><tt>assertions_props:assrt_type/1</tt></a>)</span><span><span class="lpdoc-var">AType</span> is an admissible kind of assertion. </span><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="105" href="assertions_props.html#assrt_body/1"><tt>assertions_props:assrt_body/1</tt></a>)</span><span><span class="lpdoc-var">NABody</span> is an assertion body. </span><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="106" href="basic_props.html#atm/1"><tt>basic_props:atm/1</tt></a>)</span><span><span class="lpdoc-var">S</span> is an atom. </span><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="107" href="basic_props.html#int/1"><tt>basic_props:int/1</tt></a>)</span><span><span class="lpdoc-var">LB</span> is an integer. </span><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="108" href="basic_props.html#int/1"><tt>basic_props:int/1</tt></a>)</span><span><span class="lpdoc-var">LE</span> is an integer. </span> </ul></div></div><p> <div><div class="lpdoc-defname"><span class="lpdoc-predtag">PREDICATE</span><a class="lpdoc-idx-anchor" id="norm_goal_prop/3" href="ciaosearch.html#norm_goal_prop/3">norm_goal_prop/3</a></div><div class="lpdoc-deftext"><span class="lpdoc-usage-decl"><tt>norm_goal_prop(Prop,NProp,NPr)</tt> </span><p><span class="lpdoc-var">Prop</span> is a term describing a global property in an assertion. <span class="lpdoc-var">NProp</span> is its normalized version, where <span class="lpdoc-var">NPr</span> is the extra argument. E.g., <tt>norm_goal_prop(regtype,regtype(p(X)),p(X))</tt>.<p><span class="lpdoc-usage-header">Usage 1:</span><span class="lpdoc-usage-decl"><tt>norm_goal_prop(Prop,NProp,NPr)</tt> </span><p>Normalizes a global property.</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="109" href="term_typing.html#nonvar/1"><tt>term_typing:nonvar/1</tt></a>)</span><span><span class="lpdoc-var">Prop</span> is currently a term which is not a free variable. </span><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="110" href="term_typing.html#var/1"><tt>term_typing:var/1</tt></a>)</span><span><span class="lpdoc-var">NProp</span> is a free variable. </span><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="111" href="term_typing.html#nonvar/1"><tt>term_typing:nonvar/1</tt></a>)</span><span><span class="lpdoc-var">NPr</span> is currently a term which is not a free variable. </span> </ul><p><span class="lpdoc-usage-header">Usage 2:</span><span class="lpdoc-usage-decl"><tt>norm_goal_prop(Prop,NProp,NPr)</tt> </span><p>Denormalizes a global property.</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="112" href="term_typing.html#var/1"><tt>term_typing:var/1</tt></a>)</span><span><span class="lpdoc-var">Prop</span> is a free variable. </span><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="113" href="term_typing.html#nonvar/1"><tt>term_typing:nonvar/1</tt></a>)</span><span><span class="lpdoc-var">NProp</span> is currently a term which is not a free variable. </span><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="114" href="term_typing.html#var/1"><tt>term_typing:var/1</tt></a>)</span><span><span class="lpdoc-var">NPr</span> is a free variable. </span> </ul></div></div><p> <div><div class="lpdoc-defname"><span class="lpdoc-predtag">PREDICATE</span><a class="lpdoc-idx-anchor" id="denorm_goal_prop/3" href="ciaosearch.html#denorm_goal_prop/3">denorm_goal_prop/3</a></div><div class="lpdoc-deftext"><p><span class="lpdoc-usage-header">Usage:</span><span class="lpdoc-usage-decl"><tt>denorm_goal_prop(NProp,Prop,NPr)</tt> </span><p>Denormalizes a global property.</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="115" href="term_typing.html#nonvar/1"><tt>term_typing:nonvar/1</tt></a>)</span><span><span class="lpdoc-var">NProp</span> is currently a term which is not a free variable. </span><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="116" href="term_typing.html#var/1"><tt>term_typing:var/1</tt></a>)</span><span><span class="lpdoc-var">Prop</span> is a free variable. </span><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="117" href="term_typing.html#var/1"><tt>term_typing:var/1</tt></a>)</span><span><span class="lpdoc-var">NPr</span> is a free variable. </span> </ul></div></div><p> <div><div class="lpdoc-defname"><span class="lpdoc-predtag">PREDICATE</span><a class="lpdoc-idx-anchor" id="prop_apply/3" href="ciaosearch.html#prop_apply/3">prop_apply/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="prop_unapply/3" href="ciaosearch.html#prop_unapply/3">prop_unapply/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="prop_argvar/2" href="ciaosearch.html#prop_argvar/2">prop_argvar/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="118" href="datafacts_rt.html"><tt>datafacts_rt</tt></a>, <a class="lpdoc-idx-anchor" id="119" href="aggregates.html"><tt>aggregates</tt></a>, <a class="lpdoc-idx-anchor" id="120" href="read.html"><tt>read</tt></a>, <a class="lpdoc-idx-anchor" id="121" href="terms_io.html"><tt>terms_io</tt></a>, <a class="lpdoc-idx-anchor" id="122" href="fastrw.html"><tt>fastrw</tt></a>, <a class="lpdoc-idx-anchor" id="123" href="assrt_write.html"><tt>assrt_write</tt></a>, <a class="lpdoc-idx-anchor" id="124" href="ciaosearch.html#c_itf"><tt>c_itf</tt></a>, <a class="lpdoc-idx-anchor" id="125" href="ciaosearch.html#file_buffer"><tt>file_buffer</tt></a>, <a class="lpdoc-idx-anchor" id="126" href="ctrlcclean.html"><tt>ctrlcclean</tt></a>, <a class="lpdoc-idx-anchor" id="127" href="errhandle.html"><tt>errhandle</tt></a>, <a class="lpdoc-idx-anchor" id="128" href="lists.html"><tt>lists</tt></a>, <a class="lpdoc-idx-anchor" id="129" href="system.html"><tt>system</tt></a>, <a class="lpdoc-idx-anchor" id="130" href="ciaosearch.html#translation"><tt>translation</tt></a>, <a class="lpdoc-idx-anchor" id="131" href="assertions_props.html"><tt>assertions_props</tt></a>, <a class="lpdoc-idx-anchor" id="132" href="ciaosearch.html#c_itf_props"><tt>c_itf_props</tt></a>, <a class="lpdoc-idx-anchor" id="133" href="messages.html"><tt>messages</tt></a>, <a class="lpdoc-idx-anchor" id="134" href="terms_vars.html"><tt>terms_vars</tt></a>. <li><em>Packages:</em><br/><a class="lpdoc-idx-anchor" id="135" href="ciaosearch.html#prelude"><tt>prelude</tt></a>, <a class="lpdoc-idx-anchor" id="136" href="ciaosearch.html#initial"><tt>initial</tt></a>, <a class="lpdoc-idx-anchor" id="137" href="condcomp_doc.html"><tt>condcomp</tt></a>, <a class="lpdoc-idx-anchor" id="138" href="assertions_doc.html"><tt>assertions</tt></a>, <a class="lpdoc-idx-anchor" id="139" href="ciaosearch.html#assertions/assertions_basic"><tt>assertions/assertions_basic</tt></a>, <a class="lpdoc-idx-anchor" id="140" href="ciaosearch.html#nortchecks"><tt>nortchecks</tt></a>, <a class="lpdoc-idx-anchor" id="141" href="basicmodes_doc.html"><tt>basicmodes</tt></a>, <a class="lpdoc-idx-anchor" id="142" href="regtypes_doc.html"><tt>regtypes</tt></a>, <a class="lpdoc-idx-anchor" id="143" href="dcg_doc.html"><tt>dcg</tt></a>, <a class="lpdoc-idx-anchor" id="144" href="ciaosearch.html#hiord"><tt>hiord</tt></a>, <a class="lpdoc-idx-anchor" id="145" 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>