@ciao-lang/ts-ciao-interface
Version:
Simple Ciao interface for node.
51 lines • 17.1 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>Intermodular analysis scheduler — The CiaoPP Program Processor v1.5</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="intermod.html">↑</a><a class="lpdoc-navbutton" href="intermod_db.html">←</a><a class="lpdoc-navbutton" href="intermod_punit.html">→</a><a class="lpdoc-navbutton" href="ciaopp_ref_mansearch.html">🔍</a></span><span><a href="ciaopp_ref_manfulltoc.html">TOC</a></span></div><hr></hr><ul class="lpdoc-itemize-sectpath"><li><a href="ciaopp_ref_man.html">The CiaoPP Program Processor</a> »<br/> </li><li><a href="part_internals.html">PART IV - CiaoPP Internals</a> »<br/> </li><li><a href="intermod.html">Modular driver</a> »<br/> </li><li><a href=""><strong>Intermodular analysis scheduler</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>Intermodular analysis scheduler</h1><a class="lpdoc-idx-anchor" href="ciaopp_ref_mansearch.html#intermod_schedule"></a>
This module implements different intermodular scheduling policies. This affects the order in which modular iteration is performed.<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(ciaopp(plai/intermod_schedule)).</tt><li><strong>Exports:</strong><br/><ul class="lpdoc-itemize-minus"><li><em>Predicates:</em><br/><a class="lpdoc-idx-anchor" id="0" href="#modules_analyzed/1"><tt>modules_analyzed/1</tt></a>, <a class="lpdoc-idx-anchor" id="1" href="#reset_queue/0"><tt>reset_queue/0</tt></a>, <a class="lpdoc-idx-anchor" id="2" href="#push/2"><tt>push/2</tt></a>, <a class="lpdoc-idx-anchor" id="3" href="#pop/2"><tt>pop/2</tt></a>, <a class="lpdoc-idx-anchor" id="4" href="#naive_pending_modules/1"><tt>naive_pending_modules/1</tt></a>, <a class="lpdoc-idx-anchor" id="5" href="#force_analysis/1"><tt>force_analysis/1</tt></a>, <a class="lpdoc-idx-anchor" id="6" href="#cleanup_intermod_scheduling/0"><tt>cleanup_intermod_scheduling/0</tt></a>, <a class="lpdoc-idx-anchor" id="7" href="#naive_module_order/1"><tt>naive_module_order/1</tt></a>, <a class="lpdoc-idx-anchor" id="8" href="#iterations/1"><tt>iterations/1</tt></a>, <a class="lpdoc-idx-anchor" id="9" href="#module_processed/2"><tt>module_processed/2</tt></a>, <a class="lpdoc-idx-anchor" id="10" href="#setup_scheduling/4"><tt>setup_scheduling/4</tt></a>, <a class="lpdoc-idx-anchor" id="11" href="#is_naive_scheduling/1"><tt>is_naive_scheduling/1</tt></a>, <a class="lpdoc-idx-anchor" id="12" href="#add_naive_pending_modules/1"><tt>add_naive_pending_modules/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="modules_analyzed/1" href="ciaopp_ref_mansearch.html#modules_analyzed/1">modules_analyzed/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="reset_queue/0" href="ciaopp_ref_mansearch.html#reset_queue/0">reset_queue/0</a></div><div class="lpdoc-deftext"><p><span class="lpdoc-usage-header">Usage:</span><p>Empties the queue.</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="push/2" href="ciaopp_ref_mansearch.html#push/2">push/2</a></div><div class="lpdoc-deftext"><p><span class="lpdoc-usage-header">Usage 1:</span><span class="lpdoc-usage-decl"><tt>push(Element,Priority)</tt>
</span><p>Pushes a new element <span class="lpdoc-var">Element</span> with priority <span class="lpdoc-var">Priority</span> into the priority queue. If <span class="lpdoc-var">Element</span> is already in the queue, it is not duplicated, but its priority is changed to the maximum prioriy of the already existing element and the priority of the new element.</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="ciaopp_ref_mansearch.html#nonvar/1"><tt>nonvar/1</tt></a>)</span><span><span class="lpdoc-var">Element</span> is currently a term which is not a free variable.
</span><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="14" href="ciaopp_ref_mansearch.html#nonvar/1"><tt>nonvar/1</tt></a>)</span><span><span class="lpdoc-var">Priority</span> is currently a term which is not a free variable.
</span><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="15" href="basic_props.html#atm/1"><tt>atm/1</tt></a>)</span><span><span class="lpdoc-var">Element</span> is an atom.
</span><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="16" href="basic_props.html#int/1"><tt>int/1</tt></a>)</span><span><span class="lpdoc-var">Priority</span> is an integer.
</span>
</ul><p><span class="lpdoc-usage-header">Usage 2:</span><span class="lpdoc-usage-decl"><tt>push(ElementList,Priority)</tt>
</span><p>Pushes a set of new elements <span class="lpdoc-var">ElementList</span> with priority <span class="lpdoc-var">Priority</span> into the priority queue. If any element of <span class="lpdoc-var">ElementList</span> is already in the queue, it is not duplicated, but its priority is changed to the maximum prioriy of the already existing element and the priority of the new element.</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="17" href="ciaopp_ref_mansearch.html#nonvar/1"><tt>nonvar/1</tt></a>)</span><span><span class="lpdoc-var">ElementList</span> is currently a term which is not a free variable.
</span><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="18" href="ciaopp_ref_mansearch.html#nonvar/1"><tt>nonvar/1</tt></a>)</span><span><span class="lpdoc-var">Priority</span> is currently a term which is not a free variable.
</span><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="19" href="basic_props.html#list/2"><tt>list/2</tt></a>)</span><span><span class="lpdoc-var">ElementList</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="20" href="ciaopp_ref_mansearch.html#integer/1"><tt>integer/1</tt></a>)</span><span><span class="lpdoc-var">Priority</span> is currently instantiated to an integer.
</span>
</ul></div></div><p>
<div><div class="lpdoc-defname"><span class="lpdoc-predtag">PREDICATE</span><a class="lpdoc-idx-anchor" id="pop/2" href="ciaopp_ref_mansearch.html#pop/2">pop/2</a></div><div class="lpdoc-deftext"><p><span class="lpdoc-usage-header">Usage:</span><span class="lpdoc-usage-decl"><tt>pop(Element,Priority)</tt>
</span><p>Pops the element <span class="lpdoc-var">Element</span> with highest priority from the priority queue.</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="21" href="ciaopp_ref_mansearch.html#var/1"><tt>var/1</tt></a>)</span><span><span class="lpdoc-var">Element</span> is a free variable.
</span><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="22" href="ciaopp_ref_mansearch.html#var/1"><tt>var/1</tt></a>)</span><span><span class="lpdoc-var">Priority</span> is a free variable.
</span>
<li><em>The following properties should hold upon exit:</em><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="23" href="basic_props.html#atm/1"><tt>atm/1</tt></a>)</span><span><span class="lpdoc-var">Element</span> is an atom.
</span><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="24" href="basic_props.html#int/1"><tt>int/1</tt></a>)</span><span><span class="lpdoc-var">Priority</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="naive_pending_modules/1" href="ciaopp_ref_mansearch.html#naive_pending_modules/1">naive_pending_modules/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="force_analysis/1" href="ciaopp_ref_mansearch.html#force_analysis/1">force_analysis/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="cleanup_intermod_scheduling/0" href="ciaopp_ref_mansearch.html#cleanup_intermod_scheduling/0">cleanup_intermod_scheduling/0</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="naive_module_order/1" href="ciaopp_ref_mansearch.html#naive_module_order/1">naive_module_order/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="iterations/1" href="ciaopp_ref_mansearch.html#iterations/1">iterations/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="module_processed/2" href="ciaopp_ref_mansearch.html#module_processed/2">module_processed/2</a></div><div class="lpdoc-deftext"><p><span class="lpdoc-usage-header">Usage:</span><span class="lpdoc-usage-decl"><tt>module_processed(Module,AlreadyProcessed)</tt>
</span><p>Lists the modules in the program unit and whether they are already processed or not.</p><ul class="lpdoc-itemize-minus"></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="setup_scheduling/4" href="ciaopp_ref_mansearch.html#setup_scheduling/4">setup_scheduling/4</a></div><div class="lpdoc-deftext"><p><span class="lpdoc-usage-header">Usage:</span><span class="lpdoc-usage-decl"><tt>setup_scheduling(SchedPolicy,Domains,TopLevel,ModList)</tt>
</span><p>This predicate sets up some stuff in specific global scheduling policies. Implemented policies are as follows:<p><ul> <p><li><tt>abs_depth_first</tt> Starting from the modules which require analysis (those in <span class="lpdoc-var">ModList</span>, it uses the depth in the intermodule dependency graph as priority, and analyzes the modules with higher priority first.<p><li><tt>naive_top_down</tt> Traverses the list of modules in the intermodule graph in top-down order, and analyzes the modules which have pending patterns. Initially, the modules with pending patterns are the ones in <span class="lpdoc-var">ModList</span>. It stops when in a module traversal there is no module with pending patterns.<p><li><tt>naive_bottom_up</tt> The same as <tt>naive_top_down</tt>, but the list of modules is in reverse top-down order.<p><li><tt>top_down_preanalysis</tt> The same as <tt>naive_top_down</tt>, but initially all modules are scheduled for analysis. This scheduling policy is intended for using an entry policy different of <tt>main_module</tt> (for example, <tt>all</tt>).<p><li><tt>bottom_up_preanalysis</tt> The same as <tt>top_down_preanalysis</tt>, but a bottom-up traversal of the intermodule graph is made. </ul> </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="is_naive_scheduling/1" href="ciaopp_ref_mansearch.html#is_naive_scheduling/1">is_naive_scheduling/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="add_naive_pending_modules/1" href="ciaopp_ref_mansearch.html#add_naive_pending_modules/1">add_naive_pending_modules/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="25" href="basic_props.html#list/1"><tt>list/1</tt></a>)</span><span><span class="lpdoc-var">Arg1</span> is a list.
</span>
<li><em>The following properties should hold globally:</em><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="26" href="native_props_nfdet_doc.html#not_fails/1"><tt>not_fails/1</tt></a>)</span><span>All the calls of the form <span class="lpdoc-var">add_naive_pending_modules(Arg1)</span> do not fail.
</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>Application modules:</em><br/><a class="lpdoc-idx-anchor" id="27" href="intermod_db.html"><tt>intermod_db</tt></a>, <a class="lpdoc-idx-anchor" id="28" href="intermod_punit.html"><tt>intermod_punit</tt></a>.
<li><em>System library modules:</em><br/><a class="lpdoc-idx-anchor" id="29" href="ciaopp_ref_mansearch.html#native_props"><tt>native_props</tt></a>, <a class="lpdoc-idx-anchor" id="30" href="ciaopp_ref_mansearch.html#datafacts_rt"><tt>datafacts_rt</tt></a>, <a class="lpdoc-idx-anchor" id="31" href="ciaopp_ref_mansearch.html#lists"><tt>lists</tt></a>, <a class="lpdoc-idx-anchor" id="32" href="ciaopp_ref_mansearch.html#sets"><tt>sets</tt></a>.
<li><em>Internal (engine) modules:</em><br/><a class="lpdoc-idx-anchor" id="33" href="ciaopp_ref_mansearch.html#term_basic"><tt>term_basic</tt></a>, <a class="lpdoc-idx-anchor" id="34" href="ciaopp_ref_mansearch.html#arithmetic"><tt>arithmetic</tt></a>, <a class="lpdoc-idx-anchor" id="35" href="ciaopp_ref_mansearch.html#atomic_basic"><tt>atomic_basic</tt></a>, <a class="lpdoc-idx-anchor" id="36" href="ciaopp_ref_mansearch.html#basiccontrol"><tt>basiccontrol</tt></a>, <a class="lpdoc-idx-anchor" id="37" href="ciaopp_ref_mansearch.html#exceptions"><tt>exceptions</tt></a>, <a class="lpdoc-idx-anchor" id="38" href="ciaopp_ref_mansearch.html#term_compare"><tt>term_compare</tt></a>, <a class="lpdoc-idx-anchor" id="39" href="ciaopp_ref_mansearch.html#term_typing"><tt>term_typing</tt></a>, <a class="lpdoc-idx-anchor" id="40" href="ciaopp_ref_mansearch.html#debugger_support"><tt>debugger_support</tt></a>, <a class="lpdoc-idx-anchor" id="41" href="basic_props.html"><tt>basic_props</tt></a>, <a class="lpdoc-idx-anchor" id="42" href="ciaopp_ref_mansearch.html#hiord_rt"><tt>hiord_rt</tt></a>.
<li><em>Packages:</em><br/><a class="lpdoc-idx-anchor" id="43" href="ciaopp_ref_mansearch.html#prelude"><tt>prelude</tt></a>, <a class="lpdoc-idx-anchor" id="44" href="ciaopp_ref_mansearch.html#initial"><tt>initial</tt></a>, <a class="lpdoc-idx-anchor" id="45" href="ciaopp_ref_mansearch.html#condcomp"><tt>condcomp</tt></a>, <a class="lpdoc-idx-anchor" id="46" href="assertions_doc.html"><tt>assertions</tt></a>, <a class="lpdoc-idx-anchor" id="47" href="ciaopp_ref_mansearch.html#assertions/assertions_basic"><tt>assertions/assertions_basic</tt></a>, <a class="lpdoc-idx-anchor" id="48" href="ciaopp_ref_mansearch.html#isomodes"><tt>isomodes</tt></a>, <a class="lpdoc-idx-anchor" id="49" href="ciaopp_ref_mansearch.html#nativeprops"><tt>nativeprops</tt></a>, <a class="lpdoc-idx-anchor" id="50" href="ciaopp_ref_mansearch.html#datafacts"><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>