UNPKG

@ciao-lang/ts-ciao-interface

Version:

Simple Ciao interface for node.

2 lines 15.8 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>Available abstract domains &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="ciaoppcl.html">&#x2190;</a><a class="lpdoc-navbutton" href="aeq.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>Available abstract domains</strong></a> &#9662;<ul><li><a href="aeq.html">aeq (library)</a></li><li><a href="def.html">def (library)</a></li><li><a href="deftypes.html">deftypes: defined types (based on termsd) (abstract domain)</a></li><li><a href="depthk.html">depthk (library)</a></li><li><a href="eterms.html">eterms: types with lnewiden_el/4 (abstract domain)</a></li><li><a href="etermsvar.html">etermsvar: eterms with variables (abstract domain)</a></li><li><a href="frdef.html">frdef (library)</a></li><li><a href="fr_top.html">fr_top (library)</a></li><li><a href="gr.html">Simple groundness abstract domain</a></li><li><a href="lsign.html">lsign domain</a></li><li><a href="lsigndiff.html">lsigndiff domain</a></li><li><a href="detplai.html">detplai (library)</a></li><li><a href="nfplai.html">nfplai (library)</a></li><li><a href="nonrel_intervals.html">Interval Domain</a></li><li><a href="pd.html">PD domain</a></li><li><a href="pdb.html">PD domain with bottom</a></li><li><a href="polyhedra.html">polyhedra (library)</a></li><li><a href="ptypes.html">ptypes: types with topological class widening (abstract domain)</a></li><li><a href="sharefree.html">sharing+freeness (abstract domain)</a></li><li><a href="sharefree_amgu.html">amgu-based sharing+freeness domain</a></li><li><a href="sharefree_clique.html">CLIQUE-Sharing+Freeness domain</a></li><li><a href="sharefree_clique_def.html">CLIQUE-Sharing+Freeness+Def domain</a></li><li><a href="sharefree_non_var.html">sharing+freeness+nonvar (abstract domain)</a></li><li><a href="shareson.html">shareson (library)</a></li><li><a href="sharing.html">sharing (abstract domain)</a></li><li><a href="sharing_amgu.html">amgu-based sharing domain</a></li><li><a href="sharing_clique.html">CLIQUE-Sharing domain</a></li><li><a href="sharing_clique_1.html">1-CLIQUE-Sharing domain</a></li><li><a href="sharing_clique_def.html">CLIQUE-Sharing+Def domain</a></li><li><a href="shfret.html">shfret (library)</a></li><li><a href="shfrlin_amgu.html">amgu-based sharing+freeness+linearity domain</a></li><li><a href="shfrson.html">shfrson (library)</a></li><li><a href="sondergaard.html">sondergaard (library)</a></li><li><a href="svterms.html">svterms: eterms + same value (abstract domain)</a></li><li><a href="termsd.html">termsd: types with shortening (abstract domain)</a></li><li><a href="top_path_sharing.html">top_path_sharing (library)</a></li></ul></li></ul><hr></hr><em>ON THIS PAGE</em><ul><li><a href="#Groundness and sharing">Groundness and sharing</a></li><li><a href="#Term structure">Term structure</a></li><li><a href="#Types">Types</a></li><li><a href="#Partial evaluation">Partial evaluation</a></li><li><a href="#Constraint domains">Constraint domains</a></li><li><a href="#Properties of the computation">Properties of the computation</a></li><li><a href="#Size of terms">Size of terms</a></li><li><a href="#Number of resolution steps of the computation">Number of resolution steps of the computation</a></li><li><a href="#Execution time of the computation">Execution time of the computation</a></li></ul></div><div class="lpdoc-main"><div id=""><h1>Available abstract domains</h1> <p><div id="Groundness and sharing"><h3>Groundness and sharing</h3> <p><ul> <li><tt>gr</tt> tracks groundness in a very simple way (see <a href="gr.html">Simple groundness abstract domain</a>). <li><tt>def</tt> tracks groundness dependencies, which improves the accuracy in inferring groundness. <li><tt>share</tt> tracks sharing among (sets of) variables [<a class="lpdoc-idx-anchor" id="0" href="ciaopp_ref_manrefs.html#ai-jlp">MH92</a>], which gives a very accurate groundness inference, plus information on dependencies caused by unification. <li><tt>son</tt> tracks sharing among pairs of variables, plus variables which are linear (see [<a class="lpdoc-idx-anchor" id="1" href="ciaopp_ref_manrefs.html#sonder86">Son86</a>]). <li><tt>shareson</tt> is a combination of the above two [<a class="lpdoc-idx-anchor" id="2" href="ciaopp_ref_manrefs.html#comdom">CMB93</a>], which may improve on the accuracy of any of them alone. <li><tt>shfr</tt> tracks sharing and variables which are free (see [<a class="lpdoc-idx-anchor" id="3" href="ciaopp_ref_manrefs.html#freeness-iclp91">MH91</a>]). <li><tt>shfrson</tt> is a combination of <tt>shfr</tt> and <tt>son</tt>. <li><tt>shfrnv</tt> augments <tt>shfr</tt> with knowledge on variables which are not free nor ground. </ul> <p></div><div id="Term structure"><h3>Term structure</h3> <ul> <li><tt>depth</tt> tracks the structure of the terms bound to the program variables during execution, up to a certain depth; the depth is fixed with the <tt>depth</tt> flag. <li><tt>path</tt> tracks sharing among variables which occur within the terms bound to the program variables during execution; the occurrence of run-time variables within terms is tracked up to a certain depth, fixed with the <tt>depth</tt> flag. <li><tt>aeq</tt> tracks the structure of the terms bound to the program variables during execution plus the sharing among the run-time variables occurring in such terms, plus freeness and linearity. The depth of terms being tracked is set with the <tt>depth</tt> flag. Sharing can be selected between set-sharing or pair-sharing. </ul> <p></div><div id="Types"><h3>Types</h3> <p>Type analysis supports different degrees of precision. For example, with the flag <tt>type_precision</tt> with value <tt>defined</tt>, the analysis restricts the types to the finite domain of predefined types, i.e., the types defined by the user or in libraries, without generating new types. Another alternative is to use the normal analysis, i.e., creating new type definitions, but having only predefined types in the output. This is handled through the <tt>type_output</tt> flag.<p><ul> <li><tt>eterms</tt> performs structural widening (see [<a class="lpdoc-idx-anchor" id="4" href="ciaopp_ref_manrefs.html#eterms-sas02">VB02</a>]).<p>Greater precision can be obtained evaluating builtins like <tt>is/2</tt> abstractly: <tt>eterms</tt> includes a variant which allows evaluation of the types, which is governed by the <tt>type_eval</tt> flag.<p><li><tt>ptypes</tt> uses the topological clash widening operator (see [<a class="lpdoc-idx-anchor" id="5" href="ciaopp_ref_manrefs.html#VanHentenryckCortesiLeCharlier95">VHCL95</a>]). <li><tt>svterms</tt> implements the rigid types domain of [<a class="lpdoc-idx-anchor" id="6" href="ciaopp_ref_manrefs.html#janss92">JB92</a>]. <li><tt>terms</tt> uses shortening as the widening operator (see [<a class="lpdoc-idx-anchor" id="7" href="ciaopp_ref_manrefs.html#gallagher-types-iclp94">GdW94</a>]), in several fashions, which are selected via the <tt>depth</tt> flag; depth 0 meaning the use of restricted shortening [<a class="lpdoc-idx-anchor" id="8" href="ciaopp_ref_manrefs.html#Saglam-Gallagher-94">SG94</a>]. </ul> <p></div><div id="Partial evaluation"><h3>Partial evaluation</h3> <p>Partial evaluation is performed during analysis when the <tt>local_control</tt> flag is set to other than <tt>off</tt>. Flag <tt>fixpoint</tt> must be set to <tt>di</tt>. Unfolding will take place while analyzing the program, therefore creating new patterns to analyze. The unfolding rule is governed by flag <tt>local_control</tt> (see <tt>transformation(codegen)</tt>).<p>For partial evaluation to take place, an analysis domain capable of tracking term structure should be used (e.g., <tt>eterms</tt>, <tt>pd</tt>, etc.). In particular:<p><ul> <li><tt>pd</tt> allows to perform traditional partial evaluation but using instead abstract interpretation with specialized definitions [<a class="lpdoc-idx-anchor" id="9" href="ciaopp_ref_manrefs.html#ai-spec-defs-tr">PAH04</a>]. <li><tt>pdb</tt> improves the precision of <tt>pd</tt> by detecting calls which cannot succeed, i.e., either loop or fail. </ul> <p>Note that these two analyses will not infer useful information on the program. They are intended only to enable (classical) partial evaluation.<p></div><div id="Constraint domains"><h3>Constraint domains</h3> <ul> <li><tt>fr</tt> [<a class="lpdoc-idx-anchor" id="10" href="ciaopp_ref_manrefs.html#v.phd">Dum94</a>] determines variables which are not constraint to particular values in the constraint store in which they occur, and also keeps track of possible dependencies between program variables. <li><tt>frdef</tt> is a combination of <tt>fr</tt> and <tt>def</tt>, determining at the same time variables which are not constraint to particular values and variables which are constraint to a definite value. <li><tt>lsign</tt> [<a class="lpdoc-idx-anchor" id="11" href="ciaopp_ref_manrefs.html#Lsign">MS94</a>] infers the signs of variables involved in linear constraints (and the possible number and form of such constraints). <li><tt>difflsign</tt> is a simplified variant of <tt>lsign</tt>. </ul> <p></div><div id="Properties of the computation"><h3>Properties of the computation</h3> <p><ul> <p><li><tt>det</tt> detects procedures and goals that are deterministic (i.e. that produce at most one solution), or predicates whose clause tests are mutually exclusive (which implies that at most one of their clauses will succeed) even if they are not deterministic (because they call other predicates that can produce more than one solution).<p><li><tt>nfg</tt> detects procedures that can be guaranteed not to fail (i.e., to produce at least one solution or not to terminate). It is a mono-variant non-failure analysis, in the sense that it infers non-failure information for only a call pattern per predicate [<a class="lpdoc-idx-anchor" id="12" href="ciaopp_ref_manrefs.html#non-failure-iclp97">DLGH97</a>].<p><li><tt>nf</tt> detects procedures <em>and goals</em> that can be guaranteed not to fail and is able to infer separate non-failure information for different call patterns [<a class="lpdoc-idx-anchor" id="13" href="ciaopp_ref_manrefs.html#nfplai-flops04">BLGH04</a>].<p><li><tt>seff</tt> marks predicates as having side-effects or not.<p></ul> <p></div><div id="Size of terms"><h3>Size of terms</h3> <p>Size analysis yields functions which give bounds on the size of output data of procedures as a function of the size of the input data. The size can be expressed in various measures, e.g., term-size, term-depth, list-length, integer-value, etc.<p><ul> <li><tt>size_ub</tt> infers upper bounds on the size of terms. <li><tt>size_lb</tt> infers lower bounds on the size of terms. <li><tt>size_ualb</tt> infers both upper and lower bounds on the size of terms. <li><tt>size_o</tt> gives (worst case) complexity orders for term size functions (i.e. big O). </ul> <p></div><div id="Number of resolution steps of the computation"><h3>Number of resolution steps of the computation</h3> <p>Cost (steps) analysis yields functions which give bounds on the cost (expressed in the number of resolution steps) of procedures as a function of the size of their input data.<p><ul> <li><tt>steps_ub</tt> infers upper bounds on the number of resolution steps. Incorporates a modified version of the CASLOG [<a class="lpdoc-idx-anchor" id="14" href="ciaopp_ref_manrefs.html#caslog">DL93</a>] system, so that CiaoPP analyzers are used to supply automatically the information about modes, types, and size measures needed by the CASLOG system. <li><tt>steps_lb</tt> infers lower bounds on the number of resolution steps. Implements the analysis described in [<a class="lpdoc-idx-anchor" id="15" href="ciaopp_ref_manrefs.html#low-bounds-ilps97">DLGHL97</a>]. <li><tt>steps_ualb</tt> infers both upper and lower bounds on the number of resolution steps. <li><tt>steps_o</tt> gives (worst case) complexity orders for cost functions (i.e. big O). </ul> <p></div><div id="Execution time of the computation"><h3>Execution time of the computation</h3> <ul> <li><tt>time_ap</tt> yields functions which give approximations on the execution time (expressed in milliseconds) of procedures as a function of the size of their input data. </ul> </div><br/><h2>Subparts</h2><ul><li><a href="aeq.html">aeq (library)</a></li><li><a href="def.html">def (library)</a></li><li><a href="deftypes.html">deftypes: defined types (based on termsd) (abstract domain)</a></li><li><a href="depthk.html">depthk (library)</a></li><li><a href="eterms.html">eterms: types with lnewiden_el/4 (abstract domain)</a></li><li><a href="etermsvar.html">etermsvar: eterms with variables (abstract domain)</a></li><li><a href="frdef.html">frdef (library)</a></li><li><a href="fr_top.html">fr_top (library)</a></li><li><a href="gr.html">Simple groundness abstract domain</a></li><li><a href="lsign.html">lsign domain</a></li><li><a href="lsigndiff.html">lsigndiff domain</a></li><li><a href="detplai.html">detplai (library)</a></li><li><a href="nfplai.html">nfplai (library)</a></li><li><a href="nonrel_intervals.html">Interval Domain</a></li><li><a href="pd.html">PD domain</a></li><li><a href="pdb.html">PD domain with bottom</a></li><li><a href="polyhedra.html">polyhedra (library)</a></li><li><a href="ptypes.html">ptypes: types with topological class widening (abstract domain)</a></li><li><a href="sharefree.html">sharing+freeness (abstract domain)</a></li><li><a href="sharefree_amgu.html">amgu-based sharing+freeness domain</a></li><li><a href="sharefree_clique.html">CLIQUE-Sharing+Freeness domain</a></li><li><a href="sharefree_clique_def.html">CLIQUE-Sharing+Freeness+Def domain</a></li><li><a href="sharefree_non_var.html">sharing+freeness+nonvar (abstract domain)</a></li><li><a href="shareson.html">shareson (library)</a></li><li><a href="sharing.html">sharing (abstract domain)</a></li><li><a href="sharing_amgu.html">amgu-based sharing domain</a></li><li><a href="sharing_clique.html">CLIQUE-Sharing domain</a></li><li><a href="sharing_clique_1.html">1-CLIQUE-Sharing domain</a></li><li><a href="sharing_clique_def.html">CLIQUE-Sharing+Def domain</a></li><li><a href="shfret.html">shfret (library)</a></li><li><a href="shfrlin_amgu.html">amgu-based sharing+freeness+linearity domain</a></li><li><a href="shfrson.html">shfrson (library)</a></li><li><a href="sondergaard.html">sondergaard (library)</a></li><li><a href="svterms.html">svterms: eterms + same value (abstract domain)</a></li><li><a href="termsd.html">termsd: types with shortening (abstract domain)</a></li><li><a href="top_path_sharing.html">top_path_sharing (library)</a></li></ul></div><div class="lpdoc-footer">Generated with LPdoc using Ciao</div></div><div class="lpdoc-clearer"></div></div></body></html>