UNPKG

@ciao-lang/ts-ciao-interface

Version:

Simple Ciao interface for node.

76 lines (61 loc) 6.37 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>The CiaoPP command-line interface &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_usage.html">&#x2191;</a><a class="lpdoc-navbutton" href="ciaopp.html">&#x2190;</a><a class="lpdoc-navbutton" href="part_domains.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_usage.html">PART I - Using CiaoPP</a> &raquo;<br/> </li><li><a href=""><strong>The CiaoPP command-line interface</strong></a></li></ul><hr></hr><em>ON THIS PAGE</em><ul><li><a href="#Command-line options">Command-line options</a></li><li><a href="#Description of the execution examples">Description of the execution examples</a></li></ul></div><div class="lpdoc-main"><div id=""><h1>The CiaoPP command-line interface</h1> <strong>Author(s):</strong> <a class="lpdoc-idx-anchor" id="The Ciao Development Team" href="ciaopp_ref_mansearch.html#The Ciao Development Team">The Ciao Development Team</a>.<p> This is the top-level and command-line interface to CiaoPP. Please look at <a class="lpdoc-idx-anchor" id="0" href="ciaopp.html"><tt>ciaopp</tt></a> documentation for top-level usage information. The command-line interface allows the use of the system in batch mode, using arguments for setting preprocessor flags and performing actions.<p><div id="Command-line options"><h2>Command-line options</h2> <p>This interface can be used by means of the following command-line options:<p><pre class="lpdoc-codeblock">Usage 1: (batch mode) ciaopp [OPTIONS] Action Filename [FlagsValues] Where: -o &lt;OutFile&gt; after processing Filename, the resulting source code is written to OutFile. If this option is omitted, the output is written to a file automatically named depending on the actions performed. -op &lt;Suffix&gt; Use Suffix as the optional input code suffix --cwd Dir Switch to the selected directory --timeout Timeout Execute with a timeout limit (ms). Default is 0 (no timeout). Action must be one of the following: -Q runs the interactive (text-based) menu for preprocessing Filename. -A analyzes Filename with the default options except the flag values set with -f at the command line. -O optimizes Filename with the default options except the flag values set with -f at the command line. -V verifies the assertions of Filename with the default options except the flag values set with -f at the command line. -U &lt;Config&gt; processes Filename with the options set in the configuration Config. FlagsValues is a list of options -fFlagName=FlagValue separated by blank spaces, where FlagName is a valid CiaoPP flag name. This list is optional, and does not need to include all flags applicable to the action to be performed: the flags not included in this list will be assumed to take their default value. Examples: -flocal_control=on where local_control is expected to be a CiaoPP flag; -f local_control=on same as above, with additional blank spaces Internal flags can also be changed using -pIntFlagName=Value. Usage 2: (top-level mode) ciaopp -T &lt;toplevel-opts&gt; -T starts a CiaoPP top-level shell (using &lt;toplevel-opts&gt; as options for the toplevel). Any of the predicates described in the Section &apos;CiaoPP User Menu Interface&apos; of the CiaoPP Reference Manual can be used in this top-level. Usage 3: cache libraries ciaopp --gen-lib-cache Preloads libraries for faster load in CiaoPP toplevel Execution Examples: ciaopp -Q myfile.pl ciaopp -o myfile_checked.pl -V myfile.pl ciaopp -O myfile.pl ciaopp -A myfile.pl -ftypes=terms -f modes=pd ciaopp -T </pre> <p></div><div id="Description of the execution examples"><h2>Description of the execution examples</h2> <p><ul> <p><li>The following command will prompt the user with the options needed to preprocess <tt>myfile.pl</tt>:<p><tt>ciaopp -Q myfile.pl</tt> <p><li>If we want to verify the assertions of <tt>myfile.pl</tt>, and generate the resulting source code that will the new status of the assertions (either <tt>checked</tt>, if CiaoPP has proved that the assertion holds, or <tt>false</tt> if it has falsified the assertion), the command line is as follows:<p><tt>ciaopp -o myfile_checked.pl -V myfile.pl</tt> <p><li>To optimize <tt>myfile.pl</tt>, and write the optimize code in a file named automatically (e.g., <tt>myfile_pd_codegen_af_co.pl</tt>), the following command line must be used:<p><tt>ciaopp -O myfile.pl</tt> <p><li>If the default flag values need to be changed, the <tt>-f</tt> option can be used. For example, in order to analyze <tt>myfile.pl</tt> to change the types analysis domain to <tt>terms</tt> instead of the default one, and the mode-aliasing domain to <tt>pd</tt>, the command line to use should be:<p><tt>ciaopp -A myfile.pl -ftypes=terms -f modes=pd</tt> <p><li>Finally, the following command line can be used to start a top-level CiaoPP shell (this is the default behavior):<p><tt>ciaopp -T</tt> <p></ul> </div><br/></div><div class="lpdoc-footer">Generated with LPdoc using Ciao</div></div><div class="lpdoc-clearer"></div></div></body></html>