UNPKG

@ciao-lang/ts-ciao-interface

Version:

Simple Ciao interface for node.

25 lines (24 loc) 11.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>Batch analysis client &mdash; 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">&#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="part_internals.html">&#x2191;</a><a class="lpdoc-navbutton" href="view_fixp.html">&#x2190;</a><a class="lpdoc-navbutton" href="ciaopp_master.html">&#x2192;</a><a class="lpdoc-navbutton" href="ciaopp_ref_mansearch.html">&#x1F50D;</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> &raquo;<br/> </li><li><a href="part_internals.html">PART IV - CiaoPP Internals</a> &raquo;<br/> </li><li><a href=""><strong>Batch analysis client</strong></a> &#9662;<ul><li><a href="ciaopp_master.html">ciaopp_master (application)</a></li><li><a href="ciaopp_worker.html">Worker for CiaoPP batch processing</a></li><li><a href="ciaopp_batch_aux.html">Auxiliary predicates</a></li><li><a href="db_analysis.html">Database for ciaopp_batch process</a></li><li><a href="tasks_db.html">tasks_db (library)</a></li></ul></li></ul><hr></hr><em>ON THIS PAGE</em><ul><li><a href="#Analysis options">Analysis options</a></li><li><a href="#Description of the implementation">Description of the implementation</a></li><ul><li><a href="#Prolog files:">Prolog files:</a></li><li><a href="#Other directories:">Other directories:</a></li></ul><li><a href="#Data files">Data files</a></li><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 internals">Documentation on internals</a></li><li><a href="#Documentation on imports">Documentation on imports</a></li></ul></div><div class="lpdoc-main"><div id=""><h1>Batch analysis client</h1><a class="lpdoc-idx-anchor" href="ciaopp_ref_mansearch.html#ciaopp_batch"></a> <strong>Author(s):</strong> <a class="lpdoc-idx-anchor" id="Isabel Garcia-Contreras" href="ciaopp_ref_mansearch.html#Isabel Garcia-Contreras">Isabel Garcia-Contreras</a>.<p> <div class="lpdoc-alert"><strong>Stability: [</strong><strong>devel</strong><strong>] </strong>Currently the subject of active development and/or research. Functionality may be limited and API and/or functionality may change without warning or deprecation period. Not recommended yet for use in production.</div><p><br/> This module contains predicates for managing the batch analysis of sets of modules.<p><strong>Note</strong>: this code is not performing multi-modular analysis. Some of its components can be generalized for other processes (compilation, program transformation) and be integrated into the build system, compiler, analyzer, etc.<p><div id="Analysis options"><h2>Analysis options</h2> <ul> <li><strong>no_incremental</strong> : By default, analysis is made only for modules in Paths which were not analyzed before. With this option, analysis will be runned from scratch. <li><strong>timeout(<span class="lpdoc-var">T</span>)</strong> : <span class="lpdoc-var">T</span> is the time limit for the analysis of each module independently. <li><strong>analysis(<span class="lpdoc-var">ListAbsInt</span>)</strong> : <span class="lpdoc-var">ListAbsInt</span> is a list of abstract domains available in ciaopp. <li><strong>workers(<span class="lpdoc-var">N</span>)</strong> : <span class="lpdoc-var">N</span> is the number of threads use to perform the analysis of independent modules. Currently only 1 worker is supported. </ul> Example: <pre class="lpdoc-codeblock">? - use_module(ciaopp_batch(ciaopp_batch)). ? - analysis_start([&apos;~/ciao-devel/core/lib/&apos;], [timeout(40), analysis([eterms, gr])]). </pre> <p><div class="lpdoc-alert"> <p>Fast load through caching of assertions from libraries is available in <tt>ciaopp_worker</tt>.<p>To <strong>create</strong> and <strong>manually update</strong> this cache run command: <tt>update_lib_cache</tt> </div> <p><div class="lpdoc-note"> Configuring ciaopp flags is not available yet. </div> <p></div><div id="Description of the implementation"><h2>Description of the implementation</h2> <p><div id="Prolog files:"><h3>Prolog files:</h3> <ul> <li>`ciaopp_batch.pl`: driver for the per-module CiaoPP analysis <li>`ciaopp_master.pl`: performs control of ciaopp_workers, i.e., launchs them and kills them. <li>`ciaopp_worker.pl`: does the actual analysis. <li>`ciaopp_batch_aux.pl`: file for auxiliary predicates. <li>`statistics_collecter.pl`: collects statistics of the analyzed files (time and memory). </ul> <p></div><div id="Other directories:"><h3>Other directories:</h3> <ul> <li>`Attic/`: placeholder for not used files that may be useful at some point </ul> <p></div></div><div id="Data files"><h2>Data files</h2> <p>The status of the analysis is stored in the `data/` directory: <ul> <li>`data/task_status.pl`: status of the modules (analyzed, errors, etc) <li>`last_analyzed_file.pl`: last analyzed predicate <li>`analysis.log`: date and time when each module started being analyzed </ul> </div><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_batch(ciaopp_batch)).</tt><li><strong>Exports:</strong><br/><ul class="lpdoc-itemize-minus"><li><em>Predicates:</em><br/><a class="lpdoc-idx-anchor" id="0" href="#analysis_start/2"><tt>analysis_start/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="analysis_start/2" href="ciaopp_ref_mansearch.html#analysis_start/2">analysis_start/2</a></div><div class="lpdoc-deftext"><p><span class="lpdoc-usage-header">Usage:</span><span class="lpdoc-usage-decl"><tt>analysis_start(Paths,Opts)</tt> </span><p>Analyzes modules in some <span class="lpdoc-var">Paths</span> and dumps their analysis information to disk, given some <span class="lpdoc-var">Opts</span>.</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="1" href="basic_props.html#list/1"><tt>list/1</tt></a>)</span><span><span class="lpdoc-var">Paths</span> is a list. </span><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="2" href="basic_props.html#list/1"><tt>list/1</tt></a>)</span><span><span class="lpdoc-var">Opts</span> is a list. </span> </ul></div></div><p> <div><div class="lpdoc-defname"><span class="lpdoc-predtag">(UNDOC_REEXPORT)</span><a class="lpdoc-idx-anchor" id="update_tasks_analysis_status/0" href="ciaopp_ref_mansearch.html#update_tasks_analysis_status/0">update_tasks_analysis_status/0</a></div><div class="lpdoc-deftext"> Imported from <a class="lpdoc-idx-anchor" id="3" href="db_analysis.html"><tt>db_analysis</tt></a> (see the corresponding documentation for details).<br/></div></div><p> <div><div class="lpdoc-defname"><span class="lpdoc-predtag">(UNDOC_REEXPORT)</span><a class="lpdoc-idx-anchor" id="update_tasks_analysis_status/0" href="ciaopp_ref_mansearch.html#update_tasks_analysis_status/0">update_tasks_analysis_status/0</a></div><div class="lpdoc-deftext"> Imported from <a class="lpdoc-idx-anchor" id="4" href="db_analysis.html"><tt>db_analysis</tt></a> (see the corresponding documentation for details).<br/></div></div><p> </div><div id="Documentation on internals"><h2>Documentation on internals</h2><div><div class="lpdoc-defname"><span class="lpdoc-predtag">PROPERTY</span><a class="lpdoc-idx-anchor" id="analysis_opt/1" href="ciaopp_ref_mansearch.html#analysis_opt/1">analysis_opt/1</a></div><div class="lpdoc-deftext"><p><span class="lpdoc-usage-header">Usage:</span><span class="lpdoc-usage-decl"><tt>analysis_opt(Opt)</tt> </span><p>Option of ciaopp batch (not ciaopp flags)</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>Application modules:</em><br/><a class="lpdoc-idx-anchor" id="5" href="db_analysis.html"><tt>db_analysis</tt></a>. <li><em>System library modules:</em><br/><a class="lpdoc-idx-anchor" id="6" href="ciaopp_ref_mansearch.html#datafacts_rt"><tt>datafacts_rt</tt></a>, <a class="lpdoc-idx-anchor" id="7" href="ciaopp_ref_mansearch.html#process"><tt>process</tt></a>, <a class="lpdoc-idx-anchor" id="8" href="ciaopp_ref_mansearch.html#lists"><tt>lists</tt></a>, <a class="lpdoc-idx-anchor" id="9" href="ciaopp_ref_mansearch.html#system"><tt>system</tt></a>, <a class="lpdoc-idx-anchor" id="10" href="ciaopp_ref_mansearch.html#config_common"><tt>config_common</tt></a>. <li><em>Internal (engine) modules:</em><br/><a class="lpdoc-idx-anchor" id="11" href="ciaopp_ref_mansearch.html#term_basic"><tt>term_basic</tt></a>, <a class="lpdoc-idx-anchor" id="12" href="ciaopp_ref_mansearch.html#arithmetic"><tt>arithmetic</tt></a>, <a class="lpdoc-idx-anchor" id="13" href="ciaopp_ref_mansearch.html#atomic_basic"><tt>atomic_basic</tt></a>, <a class="lpdoc-idx-anchor" id="14" href="ciaopp_ref_mansearch.html#basiccontrol"><tt>basiccontrol</tt></a>, <a class="lpdoc-idx-anchor" id="15" href="ciaopp_ref_mansearch.html#exceptions"><tt>exceptions</tt></a>, <a class="lpdoc-idx-anchor" id="16" href="ciaopp_ref_mansearch.html#term_compare"><tt>term_compare</tt></a>, <a class="lpdoc-idx-anchor" id="17" href="ciaopp_ref_mansearch.html#term_typing"><tt>term_typing</tt></a>, <a class="lpdoc-idx-anchor" id="18" href="ciaopp_ref_mansearch.html#debugger_support"><tt>debugger_support</tt></a>, <a class="lpdoc-idx-anchor" id="19" href="basic_props.html"><tt>basic_props</tt></a>, <a class="lpdoc-idx-anchor" id="20" href="ciaopp_ref_mansearch.html#hiord_rt"><tt>hiord_rt</tt></a>, <a class="lpdoc-idx-anchor" id="21" href="ciaopp_ref_mansearch.html#io_basic"><tt>io_basic</tt></a>, <a class="lpdoc-idx-anchor" id="22" href="ciaopp_ref_mansearch.html#stream_basic"><tt>stream_basic</tt></a>. <li><em>Packages:</em><br/><a class="lpdoc-idx-anchor" id="23" href="ciaopp_ref_mansearch.html#prelude"><tt>prelude</tt></a>, <a class="lpdoc-idx-anchor" id="24" href="ciaopp_ref_mansearch.html#initial"><tt>initial</tt></a>, <a class="lpdoc-idx-anchor" id="25" href="ciaopp_ref_mansearch.html#condcomp"><tt>condcomp</tt></a>, <a class="lpdoc-idx-anchor" id="26" href="assertions_doc.html"><tt>assertions</tt></a>, <a class="lpdoc-idx-anchor" id="27" href="ciaopp_ref_mansearch.html#assertions/assertions_basic"><tt>assertions/assertions_basic</tt></a>, <a class="lpdoc-idx-anchor" id="28" href="ciaopp_ref_mansearch.html#isomodes"><tt>isomodes</tt></a>, <a class="lpdoc-idx-anchor" id="29" href="regtypes_doc.html"><tt>regtypes</tt></a>, <a class="lpdoc-idx-anchor" id="30" 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>