Sophie

Sophie

distrib > * > cooker > x86_64 > by-pkgid > 6821ecc3db154939da2f564d5e6d1885 > files > 1122

ppl-docs-0.11.2-1.x86_64.rpm

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>PPL Prolog Language Interface: Prolog Language Interface</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<!-- Generated by Doxygen 1.6.3 -->
<div class="navigation" id="top">
  <div class="tabs">
    <ul>
      <li class="current"><a href="main.html"><span>Main&nbsp;Page</span></a></li>
      <li><a href="pages.html"><span>Related&nbsp;Pages</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
    </ul>
  </div>
</div>
<div class="contents">
<h1>Prolog Language Interface </h1><h3 class="version">0.11.2 </h3><p>The Parma Polyhedra Library comes equipped with a Prolog interface. Despite the lack of standardization of Prolog's foreign language interfaces, the PPL Prolog interface supports several Prolog systems and, to the extent this is possible, provides a uniform view of the library from each such system.</p>
<p>The system-independent features of the library are described in Section <a class="el" href="main.html#PI_SI_Features">System-Independent Features</a>. Section <a class="el" href="main.html#PI_Compilation">Compilation and Installation</a> explains how the Prolog interface is compiled and installed. Section <a class="el" href="main.html#PI_SD_Features">System-Dependent Features</a> illustrates the system-dependent features of the interface for all the supported systems.</p>
<p>The structure of this section is as follows:</p>
<ul>
<li><a class="el" href="main.html#PI_SI_Features">System-Independent Features</a><ul>
<li><a class="el" href="main.html#Prolog_Interface_Overview">Overview</a></li>
<li><a class="el" href="main.html#Predicate_Specifications">Predicate Specifications</a></li>
<li><a class="el" href="main.html#predicate_descriptions">Predicate Descriptions</a><ul>
<li><a class="el" href="main.html#di_predicates">Domain Independent Predicates</a></li>
<li><a class="el" href="main.html#mip_predicates">MIP Predicates</a></li>
<li><a class="el" href="main.html#pip_predicates">PIP Predicates</a></li>
<li><a class="el" href="main.html#Polyhedron_predicates">Predicates for C Polyhedra</a></li>
<li><a class="el" href="main.html#other_domains">Ad hoc Predicates for Other Domains</a></li>
</ul>
</li>
</ul>
</li>
<li><a class="el" href="main.html#PI_Compilation">Compilation and Installation</a></li>
<li><a class="el" href="main.html#PI_SD_Features">System-Dependent Features</a><ul>
<li><a class="el" href="main.html#GNU_Prolog">GNU Prolog</a></li>
<li><a class="el" href="main.html#CIAO_Prolog">CIAO Prolog</a></li>
<li><a class="el" href="main.html#SICStus_Prolog">SICStus Prolog</a></li>
<li><a class="el" href="main.html#SWI_Prolog">SWI Prolog</a></li>
<li><a class="el" href="main.html#XSB_Prolog">XSB</a></li>
<li><a class="el" href="main.html#YAP_Prolog">YAP</a></li>
</ul>
</li>
</ul>
<p>In the sequel, <code>prefix</code> is the prefix under which you have installed the library (typically <code>/usr</code> or <code>/usr/local</code>).</p>
<p><a class="anchor" id="PI_SI_Features"></a> </p>
<h1>System-Independent Features</h1>
<p>The Prolog interface provides access to the numerical abstractions (convex polyhedra, BD shapes, octagonal shapes, etc.) implemented by the PPL library. A general introduction to the numerical abstractions, their representation in the PPL and the operations provided by the PPL is given in the main <a class="elRef" doxygen="ppl-user-0.11.2-html.tag:../ppl-user-0.11.2-html/" href="../ppl-user-0.11.2-html/main.html#preamble">PPL user manual</a>. Here we just describe those aspects that are specific to the Prolog interface.</p>
<p><a class="anchor" id="Prolog_Interface_Overview"></a> </p>
<h2>Overview</h2>
<p>First, here is a list of notes with general information and advice on the use of the interface.</p>
<ul>
<li>The numerical abstract domains available to the Prolog user consist of the <em>simple</em> domains, <em>powersets</em> of a simple domain and <em>products</em> of simple domains.<ul>
<li>The simple domains are:<ul>
<li>convex polyhedra, which consist of C_Polyhedron and NNC_Polyhedron;<br/>
</li>
<li>weakly relational, which consist of BD_Shape_N and Octagonal_Shape_N where N is one of the numeric types int8, int16, int32, int64, mpz_class, mpq_class, float, double, long_double;<br/>
</li>
<li>boxes which consist of Int8_Box, Int16_Box, Int32_Box, Int64_Box, Uint8_Box, Uint16_Box, Uint32_Box, Uint64_Box, Double_Box, Long_Double_Box, Z_Box, Rational_Box, Float_Box; and<br/>
</li>
<li>the Grid domain.</li>
</ul>
</li>
<li>The powerset domains are Pointset_Powerset_S where S is a simple domain.</li>
<li>The product domains consist of Direct_Product_S_T, Smash_Product_S_T, Constraints_Product_S_T and Shape_Preserving_Product_S_T where S and T are simple domains.</li>
</ul>
</li>
<li>In the following, any of the above numerical abstract domains is called a PPL <em>domain</em> and any element of a PPL domain is called a <em>PPL object</em>.</li>
<li>The Prolog interface to the PPL is initialized and finalized by the predicates <code>ppl_initialize/0</code> and <code>ppl_finalize/0</code>. Thus the only interface predicates callable after <code>ppl_finalize/0</code> are <code>ppl_finalize/0</code> itself (this further call has no effect) and <code>ppl_initialize/0</code>, after which the interface's services are usable again. Some Prolog systems allow the specification of initialization and deinitialization functions in their foreign language interfaces. The corresponding incarnations of the Prolog interface have been written so that <code>ppl_initialize/0</code> and/or <code>ppl_finalize/0</code> are called automatically. Section <a class="el" href="main.html#PI_SD_Features">System-Dependent Features</a> will detail in which cases initialization and finalization is automatically performed or is left to the Prolog programmer's responsibility. However, for portable applications, it is best to invoke <code>ppl_initialize/0</code> and <code>ppl_finalize/0</code> explicitly: since they can be called multiple times without problems, this will result in enhanced portability at a cost that is, by all means, negligible.</li>
<li>A PPL object such as a polyhedron can only be accessed by means of a Prolog term called a <em>handle</em>. Note, however, that the data structure of a handle, is implementation-dependent, system-dependent and version-dependent, and, for this reason, deliberately left unspecified. What we do guarantee is that the handle requires very little memory.</li>
<li>A Prolog term can be bound to a valid handle for a PPL object by using predicates such as <div class="fragment"><pre class="fragment">  ppl_new_C_Polyhedron_from_space_dimension/3,
  ppl_new_C_Polyhedron_from_C_Polyhedron/2,
  ppl_new_C_Polyhedron_from_constraints/2,
  ppl_new_C_Polyhedron_from_generators/2,
</pre></div> These predicates will create or copy a PPL polyhedron and construct a valid handle for referencing it. The last argument is a Prolog term that is unified with a new valid handle for accessing this polyhedron.</li>
</ul>
<ul>
<li>As soon as a PPL object is no longer required, the memory occupied by it should be released using the PPL predicate such as <code>ppl_delete_Polyhedron/1</code>. To understand why this is important, consider a Prolog program and a variable that is bound to a Herbrand term. When the variable dies (goes out of scope) or is uninstantiated (on backtracking), the term it is bound to is amenable to garbage collection. But this only applies for the standard domain of the language: Herbrand terms. In Prolog+PPL, when, for example, a variable bound to a handle for a Polyhedron dies or is uninstantiated, the handle can be garbage-collected, but the polyhedron to which the handle refers will not be released. Once a handle has been used as an argument in <code>ppl_delete_Polyhedron/1</code>, it becomes invalid.</li>
<li>For a PPL object with space dimension <code>k</code>, the identifiers used for the PPL variables must lie between 0 and <img class="formulaInl" alt="$k-1$" src="form_0.png"/> and correspond to the indices of the associated Cartesian axes. For example, when using the predicates that combine PPL polyhedra or add constraints or generators to a representation of a PPL polyhedron, the polyhedra referenced and any constraints or generators in the call should follow all the (space) dimension-compatibility rules stated in Section <a class="elRef" doxygen="ppl-user-0.11.2-html.tag:../ppl-user-0.11.2-html/" href="../ppl-user-0.11.2-html/main.html#representation">Representations of Convex Polyhedra</a> of the main <a class="elRef" doxygen="ppl-user-0.11.2-html.tag:../ppl-user-0.11.2-html/" href="../ppl-user-0.11.2-html/main.html#preamble">PPL user manual</a>.</li>
<li>As explained above, a polyhedron has a fixed topology C or NNC, that is determined at the time of its initialization. All subsequent operations on the polyhedron must respect all the topological compatibility rules stated in Section <a class="elRef" doxygen="ppl-user-0.11.2-html.tag:../ppl-user-0.11.2-html/" href="../ppl-user-0.11.2-html/main.html#representation">Representations of Convex Polyhedra</a> of the main <a class="elRef" doxygen="ppl-user-0.11.2-html.tag:../ppl-user-0.11.2-html/" href="../ppl-user-0.11.2-html/main.html#preamble">PPL user manual</a>.</li>
<li>Any application using the PPL should make sure that only the intended version(s) of the library are ever used. Predicates <div class="fragment"><pre class="fragment">  ppl_version_major/1,
  ppl_version_minor/1,
  ppl_version_revision/1,
  ppl_version_beta/1,
  ppl_version/1,
  ppl_banner.
</pre></div> allow run-time checking of information about the version being used.</li>
</ul>
<p><a class="anchor" id="Predicate_Specifications"></a> </p>
<h2>Predicate Specifications</h2>
<p>The PPL predicates provided by the Prolog interface are specified below. The specification uses the following grammar rules: </p>
<div class="fragment"><pre class="fragment"> Number      --&gt; <span class="keywordtype">unsigned</span> integer       ranging from 0 to an upper bound
                                        depending on the actual Prolog system.

 C_int       --&gt; Number | - Number      C integer

 C_unsigned  --&gt; Number                 C <span class="keywordtype">unsigned</span> integer

 Coeff       --&gt; Number                 used in linear expressions;
                                        the upper bound will depend on how
                                        the PPL has been configured

 Dimension_Type
             --&gt; Number                 used <span class="keywordflow">for</span> the number of affine and
                                        space dimensions and the names of
                                        the dimensions;
                                        the upper bound will depend on
                                        the maximum number of dimensions
                                        allowed by the PPL
                                        (see ppl_max_space_dimensions/1)

 Boolean     --&gt; true | false

 Handle      --&gt; Prolog term            used to identify a Polyhedron

 Topology    --&gt; c | nnc                Polyhedral kind;
                                        c is closed and nnc is NNC

 VarId       --&gt; Dimension_Type         variable identifier

 PPL_Var     --&gt; &#39;$VAR&#39;(VarId)          PPL variable

 Lin_Expr    --&gt; PPL_Var                PPL variable
            | Coeff
            | Lin_Expr                  unary plus
            | - Lin_Expr                unary minus
            | Lin_Expr + Lin_Expr       addition
            | Lin_Expr - Lin_Expr       subtraction
            | Coeff * Lin_Expr          multiplication
            | Lin_Expr * Coeff          multiplication

 <a class="codeRef" doxygen="ppl-user-0.11.2-html.tag:../ppl-user-0.11.2-html/" href="../ppl-user-0.11.2-html/group__PPL__CXX__interface.html#ga1c2a279a3ffa1d1e9947f2667be312ae">Relation_Symbol</a> --&gt; =                  equals
            | =&lt;                        less than or equal
            | &gt;=                        greater than or equal
            | &lt;                         strictly less than
            | &gt;                         strictly greater than

 Constraint  --&gt; Lin_Expr <a class="codeRef" doxygen="ppl-user-0.11.2-html.tag:../ppl-user-0.11.2-html/" href="../ppl-user-0.11.2-html/group__PPL__CXX__interface.html#ga1c2a279a3ffa1d1e9947f2667be312ae">Relation_Symbol</a> Lin_Expr
                                        constraint

 Constraint_System                      list of constraints
             --&gt; []
            | [Constraint | Constraint_System]

 Modulus     --&gt; Coeff | - Coeff

 Congruence  --&gt; Lin_Expr =:= Lin_Expr  congruence with modulo 1
            | (Lin_Expr =:= Lin_Expr) / Modulus
                                        congruence with modulo Modulus

 Congruence_System                      list of congruences
             --&gt; []
            | [Congruence | Congruence_System]

 Generator_Denominator --&gt; Coeff        must be non-zero
            | - Coeff

 Generator   --&gt; point(Lin_Expr)        point
            | point(Lin_Expr, Generator_Denominator)
                                        point
            | closure_point(Lin_Expr)   closure point
            | closure_point(Lin_Expr, Generator_Denominator)
                                        closure point
            | ray(Lin_Expr)             ray
            | line(Lin_Expr)            line

 Generator_System                       list of generators
             --&gt; []
            | [Generator | Generator_System]

 Grid_Generator
             --&gt; grid_point(Lin_Expr)   grid point
            | grid_point(Lin_Expr, Generator_Denominator)
                                        grid point
            | parameter(Lin_Expr)       parameter
            | parameter(Lin_Expr, Generator_Denominator)
                                        parameter
            | grid_line(Lin_Expr)       grid line

 Grid_Generator_System                  list of grid generators
             --&gt; []
            | [Grid_Generator | Grid_Generator_System]

 Artificial_Parameter  --&gt; Lin_Expr / Coeff

 Artificial_Parameter_List --&gt; []
            | [Artificial_Parameter | Artificial_Parameter_List]

 Atom        --&gt; Prolog atom

 Universe_or_Empty                      PPL <span class="keywordtype">object</span>
             --&gt; universe | empty

 Poly_Relation --&gt; is_disjoint          with a constraint or congruence
            | strictly_intersects       with a constraint or congruence
            | is_included               with a constraint or congruence
            | saturates                 with a constraint or congruence
            | subsumes                  with a (grid) generator

 Relation_List --&gt; []
            | [Poly_Relation | Relation_List]

 Complexity  --&gt; polynomial | simplex | any

 Vars_Pair   --&gt; PPLVar - PPLVar        map relation

 P_Func      --&gt; []                     list of map relations
            | [Vars_Pair | P_Func].

 Width  --&gt; bits_8 | bits_16 | bits_32 | bits_64 | bits_128

 Representation  --&gt; <span class="keywordtype">unsigned</span> | signed_2_complement

 Overflow  --&gt; overflow_wraps | overflow_undefined | overflow_impossible

 <a class="codeRef" doxygen="ppl-user-0.11.2-html.tag:../ppl-user-0.11.2-html/" href="../ppl-user-0.11.2-html/group__PPL__CXX__interface.html#gaac82e7e0179442ef589f2fc61302d654">Optimization_Mode</a> --&gt; max | min

 Problem_Status --&gt; unfeasible
            | unbounded
            | optimized

 Control_Parameter_Name --&gt; pricing            for MIP problems
                        | control_strategy     for PIP problems
                        | pivot_row_strategy   for PIP problems

 Control_Parameter_Value
             --&gt; pricing_steepest_edge_float
            | pricing_steepest_edge_exact
            | pricing_textbook
            | control_strategy_first
            | control_strategy_deepest
            | control_strategy_all
            | pivot_row_strategy_first
            | pivot_row_strategy_max_column

 Vars_List   --&gt; []                     list of PPL variables
            | [PPL_Var | Vars_List].
</pre></div><p><a class="anchor" id="predicate_descriptions"></a> </p>
<h2>Predicate Descriptions </h2>
<p>Below is a short description of many of the interface predicates. For full definitions of terminology used here, see the main <a class="elRef" doxygen="ppl-user-0.11.2-html.tag:../ppl-user-0.11.2-html/" href="../ppl-user-0.11.2-html/main.html#preamble">PPL user manual</a>.</p>
<p><a class="anchor" id="di_predicates"></a> </p>
<h3>Domain Independent Predicates </h3>
<p>First we describe the domain independent predicates that are included with all instantiations of the Prolog interfaces.</p>
<p><code> ppl_version_major(?C_int) </code><br/>
 <em>Unifies <code>C_int</code> with the major number of the PPL version.</em></p>
<p><code> ppl_version_minor(?C_int) </code><br/>
 <em>Unifies <code>C_int</code> with the minor number of the PPL version.</em></p>
<p><code> ppl_version_revision(?C_int) </code><br/>
 <em>Unifies <code>C_int</code> with the revision number of the PPL version.</em></p>
<p><code> ppl_version_beta(?C_int) </code><br/>
 <em>Unifies <code>C_int</code> with the beta number of the PPL version.</em></p>
<p><code> ppl_version(?Atom) </code><br/>
 <em>Unifies <code>Atom</code> with the PPL version.</em></p>
<p><code> ppl_banner(?Atom) </code><br/>
 <em>Unifies <code>Atom</code> with information about the PPL version, the licensing, the lack of any warranty whatsoever, the C++ compiler used to build the library, where to report bugs and where to look for further information.</em></p>
<p><code> ppl_Coefficient_bits(?Bits) </code><br/>
</p>
<p><em>Unifies <code>Bits</code> with the number of bits used to encode a Coefficient in the C++ interface; 0 if unbounded.</em></p>
<p><code> ppl_Coefficient_is_bounded </code><br/>
</p>
<p><em>Succeeds if and only if the Coefficients in the C++ interface are bounded.</em></p>
<p><code> ppl_Coefficient_max(Max) </code><br/>
</p>
<p><em>If the Coefficients in the C++ interface are bounded, then the maximum coefficient the C++ interface can handle is unified with <code>Max</code>. If the Prolog system cannot handle this coefficient, then an exception is thrown. It fails if the Coefficients in the C++ interface are unbounded.</em></p>
<p><code> ppl_Coefficient_min(Min) </code><br/>
</p>
<p><em>If the Coefficients in the C++ interface are bounded, then the minimum coefficient the C++ interface can handle is unified with <code>Min</code>. If the Prolog system cannot handle this coefficient, then an exception is thrown. It fails if the Coefficients in the C++ interface are unbounded.</em></p>
<p><code> ppl_max_space_dimension(?Dimension_Type) </code><br/>
</p>
<p><em>Unifies <code>Dimension_Type</code> with the maximum space dimension this library can handle.</em></p>
<p><code> ppl_initialize </code><br/>
</p>
<p><em>Initializes the PPL interface. Multiple calls to <code>ppl_initialize</code> does no harm.</em></p>
<p><code> ppl_finalize </code><br/>
</p>
<p><em>Finalizes the PPL interface. Once this is executed, the next call to an interface predicate must either be to <code>ppl_initialize</code> or to <code>ppl_finalize</code>. Multiple calls to <code>ppl_finalize</code> does no harm.</em></p>
<p><code> ppl_set_timeout_exception_atom(+Atom) </code><br/>
</p>
<p><em>Sets the atom to be thrown by timeout exceptions to <code>Atom</code>. The default value is <code>time_out</code>.</em></p>
<p><code> ppl_timeout_exception_atom(?Atom) </code><br/>
</p>
<p><em>The atom to be thrown by timeout exceptions is unified with <code>Atom</code>.</em></p>
<p><code> ppl_set_timeout(+Hsecs) </code><br/>
</p>
<p><em>Computations taking exponential time will be interrupted some time after <code>Hsecs</code> hundreths of seconds after that call. If the computation is interrupted that way, the current timeout exception atom will be thrown. <code>Hsecs</code> must be strictly greater than zero.</em></p>
<p><code> ppl_reset_timeout </code><br/>
</p>
<p><em>Resets the timeout time so that the computation is not interrupted.</em></p>
<p><code> ppl_set_deterministic_timeout(+Weight) </code><br/>
</p>
<p><em>Computations taking exponential time will be interrupted some time after reaching the <code>Weight</code> complexity threshold. If the computation is interrupted that way, the current timeout exception atom will be thrown. <code>Weight</code> must be strictly greater than zero.</em> </p>
<p><em>NOTE:</em> This "timeout" checking functionality is said to be <em>deterministic</em> because it is not based on actual elapsed time. Its behavior will only depend on (some of the) computations performed in the PPL library and it will be otherwise independent from the computation environment (CPU, operating system, compiler, etc.). The weight mechanism is under alpha testing: client applications should be ready to reconsider the tuning of these weight thresholds when upgrading to newer version of the PPL.</p>
<p><code> ppl_reset_deterministic_timeout </code><br/>
</p>
<p><em>Resets the deterministic timeout so that the computation is not interrupted.</em></p>
<p><code> ppl_set_rounding_for_PPL </code><br/>
</p>
<p><em>Sets the FPU rounding mode so that the PPL abstractions based on floating point numbers work correctly. This is performed automatically at initialization-time. Calling this function is needed only if restore_pre_PPL_rounding() has previously been called.</em></p>
<p><code> ppl_restore_pre_PPL_rounding </code><br/>
</p>
<p><em>Sets the FPU rounding mode as it was before initialization of the PPL. After calling this function it is absolutely necessary to call set_rounding_for_PPL() before using any PPL abstractions based on floating point numbers. This is performed automatically at finalization-time.</em></p>
<p><code> ppl_irrational_precision(?Precision) </code><br/>
</p>
<p><em>Unifies <code>Precision</code> with the precision parameter for irrational calculations.</em></p>
<p><code> ppl_set_irrational_precision(+Precision) </code><br/>
</p>
<p><em>Sets the precision parameter for irrational calculations to <code>Precision</code>. In the following irrational calculations returning an unbounded rational (e.g., when computing a square root), the lesser between numerator and denominator will be limited to <code>2**Precision</code>.</em></p>
<p><a class="anchor" id="mip_predicates"></a> </p>
<h3>MIP Predicates </h3>
<p>Here we describe the predicates available for PPL objects defining mixed integer (linear) programming problems.</p>
<p><code> ppl_new_MIP_Problem_from_space_dimension(+Dimension_Type, -Handle) </code><br/>
</p>
<p><em>Creates an MIP Problem <img class="formulaInl" alt="$\mathrm{MIP}$" src="form_1.png"/> with the feasible region the vector space of dimension <code>Dimension_Type</code>, objective function <img class="formulaInl" alt="$0$" src="form_2.png"/> and optimization mode <code>max</code>. <code>Handle</code> is unified with the handle for <img class="formulaInl" alt="$\mathrm{MIP}$" src="form_1.png"/>.</em></p>
<p><code> ppl_new_MIP_Problem(+Constraint_System, +Lin_Expr, +Optimization_Mode, -Handle) </code><br/>
</p>
<p><em>Creates an MIP Problem <img class="formulaInl" alt="$\mathrm{MIP}$" src="form_1.png"/> with the feasible region represented by <code>Constraint_System</code>, objective function <code>Lin_Expr</code> and optimization mode <code>Optimization_Mode</code>. <code>Handle</code> is unified with the handle for <img class="formulaInl" alt="$\mathrm{MIP}$" src="form_1.png"/>.</em></p>
<p><code> ppl_new_MIP_Problem_from_MIP_Problem(+Handle_1, -Handle_2) </code><br/>
</p>
<p><em>Creates an MIP Problem <img class="formulaInl" alt="$\mathrm{MIP}$" src="form_1.png"/> from the MIP Problem referenced by <code>Handle_1</code>. <code>Handle_2</code> is unified with the handle for <img class="formulaInl" alt="$\mathrm{MIP}$" src="form_1.png"/>.</em></p>
<p><code> ppl_MIP_Problem_swap(+Handle_1, +Handle_2) </code><br/>
</p>
<p><em>Swaps the MIP Problem referenced by <code>Handle_1</code> with the one referenced by <code>Handle_2</code>.</em></p>
<p><code> ppl_delete_MIP_Problem(+Handle) </code><br/>
</p>
<p><em>Deletes the MIP Problem referenced by <code>Handle</code>. After execution, <code>Handle</code> is no longer a valid handle for a PPL MIP Problem.</em></p>
<p><code> ppl_MIP_Problem_space_dimension(+Handle, ?Dimension_Type) </code><br/>
</p>
<p><em>Unifies the dimension of the vector space in which the MIP Problem referenced by <code>Handle</code> is embedded with <code>Dimension_Type</code>.</em></p>
<p><code> ppl_MIP_Problem_integer_space_dimensions(+Handle, ?Vars_List) </code><br/>
</p>
<p><em>Unifies <code>Vars_List</code> with a list of variables representing the integer space dimensions of the MIP Problem referenced by <code>Handle</code>.</em></p>
<p><code> ppl_MIP_Problem_constraints(+Handle, -Constraint_System) </code><br/>
</p>
<p><em>Unifies <code>Constraint_System</code> with a list of the constraints in the constraints system representing the feasible region for the MIP Problem referenced by <code>Handle</code>.</em></p>
<p><code> ppl_MIP_Problem_objective_function(+Handle, ?Lin_Expr) </code><br/>
</p>
<p><em>Unifies <code>Lin_Expr</code> with the objective function for the MIP Problem referenced by <code>Handle</code>.</em></p>
<p><code> ppl_MIP_Problem_optimization_mode(+Handle, ?Optimization_Mode) </code><br/>
</p>
<p><em>Unifies <code>Optimization_Mode</code> with the optimization mode for the MIP Problem referenced by <code>Handle</code>.</em></p>
<p><code> ppl_MIP_Problem_clear(+Handle) </code><br/>
</p>
<p><em>Resets the MIP problem referenced by <code>Handle</code> to be the trivial problem with the feasible region the <img class="formulaInl" alt="$0$" src="form_2.png"/>-dimensional universe, objective function <img class="formulaInl" alt="$0$" src="form_2.png"/> and optimization mode <code>max</code>.</em></p>
<p><code> ppl_MIP_Problem_add_space_dimensions_and_embed( +Handle, +Dimension_Type) </code><br/>
</p>
<p><em>Embeds the MIP problem referenced by <code>Handle</code> in a space that is enlarged by <code>Dimension_Type</code> dimensions.</em></p>
<p><code> ppl_MIP_Problem_add_to_integer_space_dimensions(+Handle, +Vars_List) </code><br/>
</p>
<p><em>Updates the MIP Problem referenced by <code>Handle</code> so that the variables in <code>Vars_List</code> are added to the set of integer space dimensions.</em></p>
<p><code> ppl_MIP_Problem_add_constraint(+Handle, +Constraint) </code><br/>
</p>
<p><em>Updates the MIP Problem referenced by <code>Handle</code> so that the feasible region is represented by the original constraint system together with the constraint <code>Constraint</code>.</em></p>
<p><code> ppl_MIP_Problem_add_constraints(+Handle, +Constraint_System) </code><br/>
</p>
<p><em>Updates the MIP Problem referenced by <code>Handle</code> so that the feasible region is represented by the original constraint system together with all the constraints in <code>Constraint_System</code>.</em></p>
<p><code> ppl_MIP_Problem_set_objective_function(+Handle, +Lin_Expr) </code><br/>
</p>
<p><em>Updates the MIP Problem referenced by <code>Handle</code> so that the objective function is changed to <code>Lin_Expr</code>.</em></p>
<p><code> ppl_MIP_Problem_set_control_parameter(+Handle, +Control_Parameter_Value) </code><br/>
</p>
<p><em>Updates the MIP Problem referenced by <code>Handle</code> so that the value for the relevant control parameter name is changed to <code>Control_Parameter_Value</code>.</em></p>
<p><code> ppl_MIP_Problem_get_control_parameter(+Handle, +Control_Parameter_Name, ?Control_Parameter_Value) </code><br/>
</p>
<p><em>Unifies <code>Control_Parameter_Value</code> with the value of the control parameter <code>Control_Parameter_Name</code>.</em></p>
<p><code> ppl_MIP_Problem_set_optimization_mode(+Handle, +Optimization_Mode) </code><br/>
</p>
<p><em>Updates the MIP Problem referenced by <code>Handle</code> so that the optimization mode is changed to <code>Optimization_Mode</code>.</em></p>
<p><code> ppl_MIP_Problem_is_satisfiable(+Handle) </code><br/>
</p>
<p><em>Succeeds if and only if the MIP Problem referenced by <code>Handle</code> is satisfiable.</em></p>
<p><code> ppl_MIP_Problem_solve(+Handle, ?MIP_Problem_Status) </code><br/>
</p>
<p><em>Solves the MIP problem referenced by <code>Handle</code> and unifies <code>MIP_Problem_Status</code> with: <code>unfeasible</code>, if the MIP problem is not satisfiable; <code>unbounded</code>, if the MIP problem is satisfiable but there is no finite bound to the value of the objective function; <code>optimized</code>, if the MIP problem admits an optimal solution.</em></p>
<p><code> ppl_MIP_Problem_feasible_point(+Handle, ?Generator) </code><br/>
</p>
<p><em>Unifies <code>Generator</code> with a feasible point for the MIP problem referenced by <code>Handle</code>.</em></p>
<p><code> ppl_MIP_Problem_optimizing_point(+Handle, ?Generator) </code><br/>
</p>
<p><em>Unifies <code>Generator</code> with an optimizing point for the MIP problem referenced by <code>Handle</code>.</em></p>
<p><code> ppl_MIP_Problem_optimal_value(+Handle, ?Coeff_1, ?Coeff_2) </code><br/>
</p>
<p><em>Unifies <code>Coeff_1</code> and <code>Coeff_2</code> with the numerator and denominator, respectively, for the optimal value for the MIP problem referenced by <code>Handle</code>.</em></p>
<p><code> ppl_MIP_Problem_evaluate_objective_function(+Handle, +Generator, ?Coeff_1, ?Coeff_2) </code><br/>
 <em>Evaluates the objective function of the MIP problem referenced by <code>Handle</code> at point <code>Generator</code>. <code>Coefficient_1</code> is unified with the numerator and <code>Coefficient_2</code> is unified with the denominator of the objective function value at <code>Generator</code>.</em></p>
<p><code> ppl_MIP_Problem_OK(+Handle) </code><br/>
</p>
<p><em>Succeeds only if the MIP Problem referenced by <code>Handle</code> is well formed, i.e., if it satisfies all its implementation invariants. Useful for debugging purposes.</em></p>
<p><br/>
</p>
<p><a class="anchor" id="pip_predicates"></a> </p>
<h3>PIP Predicates </h3>
<p>Here we describe some functions available for PPL objects defining parametric integer programming problems.</p>
<p><code> ppl_new_PIP_Problem_from_space_dimension(+Dimension_Type, -Handle) </code><br/>
</p>
<p><em>Creates a PIP Problem <img class="formulaInl" alt="$\mathrm{PIP}$" src="form_3.png"/> with the feasible region the vector space of dimension <code>dimension</code>, empty constraint_system and empty set of parametric variables. <code>Handle</code> is unified with the handle for <img class="formulaInl" alt="$\mathrm{PIP}$" src="form_3.png"/>.</em></p>
<p><code> ppl_new_PIP_Problem(+Constraint_System, +Lin_Expr, +Vars_List, -Handle) </code><br/>
</p>
<p><em>Creates a PIP Problem <img class="formulaInl" alt="$\mathrm{PIP}$" src="form_3.png"/> having space dimension <code>dimension</code>, a feasible region represented by <code>constraint_system</code> and parametric variables represented by <code>Vars_List</code>. <code>Handle</code> is unified with the handle for <img class="formulaInl" alt="$\mathrm{PIP}$" src="form_3.png"/>.</em></p>
<p><code> ppl_new_PIP_Problem_from_PIP_Problem(+Handle_1, -Handle_2) </code><br/>
 <em>Creates a PIP Problem <img class="formulaInl" alt="$\mathrm{PIP}$" src="form_3.png"/> from the PIP Problem referenced by <code>Handle_1</code>. <code>Handle_2</code> is unified with the handle for <img class="formulaInl" alt="$\mathrm{PIP}$" src="form_3.png"/>.</em></p>
<p><code> ppl_PIP_Problem_swap(+Handle_1, +Handle_2) </code><br/>
 <em>Swaps the PIP Problem referenced by <code>Handle_1</code> with the one referenced by <code>Handle_2</code>.</em></p>
<p><code> ppl_delete_PIP_Problem(+Handle) </code><br/>
 <em>Deletes the PIP Problem referenced by <code>Handle</code>. After execution, <code>Handle</code> is no longer a valid handle for a PPL PIP Problem.</em></p>
<p><code> ppl_PIP_Problem_space_dimension(+Handle, ?Dimension_Type) </code><br/>
 <em>Unifies the dimension of the vector space in which the PIP Problem referenced by <code>Handle</code> is embedded with <code>Dimension_Type</code>.</em></p>
<p><code> ppl_PIP_Problem_parameter_space_dimensions(+Handle, ?Vars_List) </code><br/>
 <em>Unifies <code>Vars_List</code> with a list of variables representing the parameter space dimensions of the PIP Problem referenced by <code>Handle</code>.</em></p>
<p><code> ppl_PIP_Problem_constraints(+Handle, ?Constraint_System) </code><br/>
 <em>Unifies <code>Constraint_System</code> with a list of the constraints in the constraints system representing the feasible region for the PIP Problem referenced by <code>Handle</code>.</em></p>
<p><code> ppl_PIP_Problem_clear(+Handle) </code><br/>
 <em>Resets the PIP problem referenced by <code>Handle</code> to be the trivial problem with the feasible region the <img class="formulaInl" alt="$0$" src="form_2.png"/>-dimensional universe.</em></p>
<p><code> ppl_PIP_Problem_add_space_dimensions_and_embed( +Handle, +Dimension_Type1, +Dimension_Type2) </code><br/>
 <em>Embeds the PIP problem referenced by <code>handle</code> in a space that is enlarged by <code>dimension1</code> non-parameter dimensions and <code>dimension2</code> parameter dimensions.</em></p>
<p><code> ppl_PIP_Problem_add_to_parameter_space_dimensions(+Handle, +Vars_List) </code><br/>
 <em>Updates the PIP Problem referenced by <code>Handle</code> so that the variables in <code>Vars_List</code> are added to the set of parameter space dimensions.</em></p>
<p><code> ppl_PIP_Problem_add_constraint(+Handle, +Constraint) </code><br/>
 <em>Updates the PIP Problem referenced by <code>Handle</code> so that the feasible region is represented by the original constraint system together with the constraint <code>Constraint</code>.</em></p>
<p><code> ppl_PIP_Problem_add_constraints(+Handle, +Constraint_System) </code><br/>
 <em>Updates the PIP Problem referenced by <code>Handle</code> so that the feasible region is represented by the original constraint system together with all the constraints in <code>Constraint_System</code>.</em></p>
<p><code> ppl_PIP_Problem_set_big_parameter_dimension(+Handle, +Dimension_Type) </code><br/>
</p>
<p><em>Updates the PIP Problem referenced by <code>Handle</code> so that the dimension for the big parameter is <code>Dimension_Type</code>.</em></p>
<p><code> ppl_PIP_Problem_has_big_parameter_dimension(+Handle, +Dimension_Type) </code><br/>
 <em>Succeeds if and only if the PIP Problem referenced by <code>Handle</code> has a dimension <code>dim</code> for the big parameter and <code>Dimension_Type</code> unifies with <code>dim</code>.</em></p>
<p><code> ppl_PIP_Problem_is_satisfiable(+Handle) </code><br/>
 <em>Succeeds if and only if the PIP Problem referenced by <code>Handle</code> is satisfiable.</em></p>
<p><code> ppl_PIP_Problem_solve(+Handle, ?PIP_Problem_Status) </code><br/>
 <em>Solves the PIP problem referenced by <code>Handle</code> and unifies <code>PIP_Problem_Status</code> with: <code>unfeasible</code>, if the PIP problem is not satisfiable; <code>optimized</code>, if the PIP problem admits an optimal solution.</em></p>
<p><code> ppl_PIP_Problem_solution(+Handle1, ?Handle2) </code><br/>
 <em>Solves the PIP problem referenced by <code>Handle1</code> and creates a PIP tree node <img class="formulaInl" alt="$\mathrm{Node}$" src="form_4.png"/> representing this a solution if it exists and bottom otherwise <code>Handle_2</code> is unified with the handle for <img class="formulaInl" alt="$\mathrm{Sol}$" src="form_5.png"/>.</em></p>
<p><code> ppl_PIP_Problem_optimizing_solution(+Handle, ?PIP_Tree_Node) </code><br/>
 <em>Solves the PIP problem referenced by <code>Handle1</code> and creates a PIP tree node <img class="formulaInl" alt="$\mathrm{Node}$" src="form_4.png"/> representing this an optimizing solution if a solution exists and bottom otherwise <code>Handle_2</code> is unified with the handle for <img class="formulaInl" alt="$\mathrm{Sol}$" src="form_5.png"/>.</em></p>
<p><code>ppl_PIP_Problem_ascii_dump(+Handle)</code><br/>
 <em>Dumps an ascii representation of the PPL internal state for the PIP problem referenced by <code>Handle</code> on the standard output.</em></p>
<p><code> ppl_PIP_Problem_OK(+Handle) </code><br/>
 <em>Succeeds only if the PIP Problem referenced by <code>Handle</code> is well formed, i.e., if it satisfies all its implementation invariants. Useful for debugging purposes.</em></p>
<p><code> ppl_PIP_Tree_Node_swap(+Handle_1, +Handle_2) </code><br/>
 <em>Swaps the PIP tree node referenced by <code>Handle_1</code> with the one referenced by <code>Handle_2</code>.</em></p>
<p><code>ppl_PIP_Tree_Node_ascii_dump(+Handle)</code><br/>
 <em>Dumps an ascii representation of the PPL internal state for the PIP tree node referenced by <code>Handle</code> on the standard output.</em></p>
<p><code> ppl_PIP_Tree_Node_OK(+Handle) </code><br/>
 <em>Succeeds only if the PIP tree node referenced by <code>Handle</code> is well formed, i.e., if it satisfies all its implementation invariants. Useful for debugging purposes.</em></p>
<p><code> ppl_PIP_Tree_Node_constraints(+Handle, ?Constraint_System) </code><br/>
 <em>Unifies <code>Constraint_System</code> with a list of the parameter constraints in the PIP tree node referenced by <code>Handle</code>.</em></p>
<p><code> ppl_PIP_Tree_Node_artificials(+Handle, ?Artificial_Parameter_List) </code><br/>
 <em>Unifies <code>Artificial_Parameter_List</code> with a list of the artificial parameters in the PIP tree node referenced by <code>Handle</code>.</em></p>
<p><code> ppl_PIP_Tree_Node_is_bottom(+Handle) </code><br/>
 <em>Succeeds if and only if <code>handle</code> represents bottom.</em></p>
<p><code> ppl_PIP_Tree_Node_is_decision(+Handle) </code><br/>
 <em>Succeeds if and only if <code>handle</code> represents a decision node.</em></p>
<p><code> ppl_PIP_Tree_Node_is_solution(+Handle) </code><br/>
 <em>Succeeds if and only if <code>handle</code> represents a solution node.</em></p>
<p><code> ppl_PIP_Tree_Node_parametric_values(+Handle, +Var, ?Lin_Expr) </code><br/>
 <em>Unifies <code>Lin_Expr</code> with a linear expression representing the values of problem variable <code>Var</code> in the solution node represented by <code>Handle</code>. The linear expression may involve problem parameters as well as artificial parameters.</em></p>
<p><code> ppl_PIP_Tree_Node_true_child(+Handle1, ?Handle2) </code><br/>
 <em>If the PIP_Tree_Node represented by <code>Handle1</code> is a decision node unifies the PIP tree node referenced by <code>Handle2</code> with the child on the true branch of the PIP tree node represented by <code>Handle1</code>. An exception is thrown if this is not a decision node.</em></p>
<p><code> ppl_PIP_Tree_Node_false_child(+Handle1, ?Handle2) </code><br/>
 <em>If the PIP_Tree_Node represented by <code>Handle1</code> is a decision node unifies the PIP tree node referenced by <code>Handle2</code> with the child on the false branch of the PIP tree node represented by <code>Handle1</code>. An exception is thrown if this is not a decision node.</em></p>
<p><br/>
</p>
<p><a class="anchor" id="Polyhedron_predicates"></a> </p>
<h1>Predicates for the C Polyhedron Domain</h1>
<p>Here we provide a short description for each of the predicates available for the domain of C polyhedra. Note that predicates for other domains will follow a similar pattern.</p>
<h2>Constructor, copy, conversion and destructor predicates</h2>
<h3>Constructor predicates for C polyhedra</h3>
<p>The constructor predicates build a C polyhedron from a specification and binds the given variable to a handle for future referencing. The specification can be:</p>
<ul>
<li>the number of space dimensions and an atom indicating if it is to be the universe or empty element.</li>
<li>a representation for the particular class of semantic geometric descriptors to which the element being built belongs. For example, a C Polyhedron can be built from a list of non-strict inequality or equality constraints or a list of equality congruences or a list of generators that contains no closure points.</li>
</ul>
<p><code>ppl_new_C_Polyhedron_from_space_dimension(+Dimension_Type, +Universe_or_Empty, -Handle)</code><br/>
 <em>Builds a new C polyhedron <img class="formulaInl" alt="$\cP$" src="form_6.png"/> with <code>Dimension_Type</code> dimensions; it is empty or the universe depending on whether <code>Atom</code> is <code>empty</code> or <code>universe</code>, respectively. <code>Handle</code> is unified with the handle for <img class="formulaInl" alt="$\cP$" src="form_6.png"/>. Thus the query </p>
<div class="fragment"><pre class="fragment">   ?- ppl_new_C_Polyhedron_from_space_dimension(3, universe, X).
</pre></div><p> creates the C polyhedron defining the 3-dimensional vector space <img class="formulaInl" alt="$\Rset^3$" src="form_7.png"/> with <code>X</code> bound to a valid handle for accessing it.</em></p>
<p><code>ppl_new_C_Polyhedron_from_constraints(+Constraint_System, -Handle)</code><br/>
 <em>Builds a new C polyhedron <code>P</code> from <code>Constraint_System</code>. <code>Handle</code> is unified with the handle for <code>P</code>.</em></p>
<p><code>ppl_new_C_Polyhedron_from_congruences(+Congruence_System, -Handle)</code><br/>
 <em>Builds a new C polyhedron <code>P</code> from <code>Congruence_System</code>. <code>Handle</code> is unified with the handle for <code>P</code>.</em></p>
<p><code>ppl_new_C_Polyhedron_from_generators(+Generator_System, -Handle)</code><br/>
 <em>Builds a new C polyhedron <code>P</code> from <code>Generator_System</code>. <code>Handle</code> is unified with the handle for <code>P</code>.</em></p>
<h3>Predicates that build new C polyhedra by copying or converting from other semantic geometric descriptions</h3>
<p>Besides the constructors listed above, the library also provides:</p>
<ul>
<li>copy constructors that will copy an element belonging to the same class of semantic geometric descriptions</li>
<li>conversion operators that build a new semantic geometric description starting from a <b>friend</b>; that is, a semantic geometric description in different class (e.g., ppl_new_Grid_from_C_Polyhedron, ppl_new_C_Polyhedron_from_BD_Shape_mpq_class, etc.).<br/>
</li>
</ul>
<p>The copy and conversion predicates have two versions, one with arity 2 for the source and target handles and one with an extra argument denoting the maximum complexity to be used in the conversion; this complexity argument is ignored when the the friend and the element being built are in the same class.</p>
<p><code>ppl_new_C_Polyhedron_from_C_Polyhedron(+Handle_1, -Handle_2)</code><br/>
 <em>Builds a new C polyhedron <code>P_1</code> from the c polyhedron referenced by handle <code>Handle_1</code>. <code>Handle_2</code> is unified with the handle for <code>P_1</code>.</em></p>
<p><code>ppl_new_C_Polyhedron_from_NNC_Polyhedron(+Handle_1, -Handle_2)</code><br/>
 <em>Builds a new C polyhedron <code>P_1</code> from the nnc polyhedron referenced by handle <code>Handle_1</code>. <code>Handle_2</code> is unified with the handle for <code>P_1</code>.</em></p>
<p><code>ppl_new_C_Polyhedron_from_C_Polyhedron_with_complexity(+Handle, +Complexity, -Handle)</code><br/>
 <em>Builds a new C polyhedron <code>P_1</code> from the c polyhedron referenced by handle <code>Handle_1</code> using an algorithm whose complexity does not exceed <code>Complexity</code>; <code>Handle_2</code> is unified with the handle for <code>P_1</code>.</em></p>
<p><code>ppl_new_C_Polyhedron_from_NNC_Polyhedron_with_complexity(+Handle, +Complexity, -Handle)</code><br/>
 <em>Builds a new C polyhedron <code>P_1</code> from the nnc polyhedron referenced by handle <code>Handle_1</code> using an algorithm whose complexity does not exceed <code>Complexity</code>; <code>Handle_2</code> is unified with the handle for <code>P_1</code>.</em></p>
<h3>Destructor predicate</h3>
<p>Below is the destructor predicate for the Polyhedron domain.</p>
<p><code>ppl_delete_Polyhedron(+Handle)</code><br/>
 <em>Invalidates the handle referenced by <code>Handle:</code> this makes sure the corresponding resources will eventually be released.</em></p>
<h2>Predicates that do not change the polyhedron</h2>
<h3>Test Predicates</h3>
<p>These predicates test the polyhedron for different properties and succeed or fail depending on the outcome.</p>
<p><code>ppl_Polyhedron_is_empty(+Handle)</code><br/>
 <em>Succeeds if and only if the polyhedron referenced by <code>Handle</code> is empty.</em></p>
<p><code>ppl_Polyhedron_is_universe(+Handle)</code><br/>
 <em>Succeeds if and only if the polyhedron referenced by <code>Handle</code> is the universe.</em></p>
<p><code>ppl_Polyhedron_is_bounded(+Handle)</code><br/>
 <em>Succeeds if and only if the polyhedron referenced by <code>Handle</code> is bounded.</em></p>
<p><code>ppl_Polyhedron_contains_integer_point(+Handle)</code><br/>
 <em>Succeeds if and only if the polyhedron referenced by <code>Handle</code> contains an integer point.</em></p>
<p><code>ppl_Polyhedron_is_topologically_closed(+Handle)</code><br/>
 <em>Succeeds if and only if the polyhedron referenced by <code>Handle</code> is topologically closed.</em></p>
<p><code>ppl_Polyhedron_is_discrete(+Handle)</code><br/>
 <em>Succeeds if and only if the polyhedron referenced by <code>Handle</code> is discrete.</em></p>
<p><code>ppl_Polyhedron_bounds_from_above(+Handle, +Lin_Expr)</code><br/>
 <em>Succeeds if and only if <code>Lin_Expr</code> is bounded from above in the polyhedron referenced by <code>Handle</code>.</em></p>
<p><code>ppl_Polyhedron_bounds_from_below(+Handle, +Lin_Expr)</code><br/>
 <em>Succeeds if and only if <code>Lin_Expr</code> is bounded from below in the polyhedron referenced by <code>Handle</code>.</em></p>
<p><code>ppl_Polyhedron_contains_Polyhedron(+Handle_1, +Handle_2)</code><br/>
 <em>Succeeds if and only if the polyhedron referenced by <code>Handle_2</code> is included in or equal to the polyhedron referenced by <code>Handle_1</code>.</em></p>
<p><code>ppl_Polyhedron_strictly_contains_Polyhedron(+Handle_1, +Handle_2)</code><br/>
 <em>Succeeds if and only if the polyhedron referenced by <code>Handle_2</code> is included in but not equal to the polyhedron referenced by <code>Handle_1</code>.</em></p>
<p><code>ppl_Polyhedron_is_disjoint_from_Polyhedron(+Handle_1, +Handle_2)</code><br/>
 <em>Succeeds if and only if the polyhedron referenced by <code>Handle_2</code> is disjoint from the polyhedron referenced by <code>Handle_1</code>.</em></p>
<p><code>ppl_Polyhedron_equals_Polyhedron(+Handle_1, +Handle_2)</code><br/>
 <em>Succeeds if and only if the polyhedron referenced by <code>Handle_1</code> is equal to the polyhedron referenced by <code>Handle_2</code>.</em></p>
<p><code>ppl_Polyhedron_OK(+Handle)</code><br/>
 <em>Succeeds only if the polyhedron referenced by <code>Handle</code> is well formed, i.e., if it satisfies all its implementation invariants. Useful for debugging purposes.</em></p>
<p><code>ppl_Polyhedron_constrains(+Handle, +PPL_Var)</code><br/>
 <em>Succeeds if and only if the polyhedron referenced by <code>Handle</code> constrains the dimension <code>PPL_Var</code>.</em></p>
<h3>Predicates that return information about the polyhedron</h3>
<p>These predicates will obtain more detailed information about the polyhedron unifying some of their arguments with the results.</p>
<p><code>ppl_Polyhedron_space_dimension(+Handle, ?Dimension_Type)</code><br/>
 <em>Unifies <code>Dimension_Type</code> with the dimension of the vector space enclosing the polyhedron referenced by <code>Handle</code>.</em></p>
<p><code>ppl_Polyhedron_affine_dimension(+Handle, ?Dimension_Type)</code><br/>
 <em>Unifies <code>Dimension_Type</code> with the affine dimension of the polyhedron referenced by <code>Handle</code>.</em></p>
<p><code>ppl_Polyhedron_relation_with_constraint(+Handle, +Constraint, ?Relation_List)</code><br/>
 <em>Unifies <code>Relation_List</code> with the list of relations the polyhedron referenced by <code>Handle</code> has with <code>Constraint</code>. The possible relations are listed in the grammar rules above.</em></p>
<p><code>ppl_Polyhedron_relation_with_generator(+Handle, +Generator, ?Relation_List)</code><br/>
 <em>Unifies <code>Relation_List</code> with the list of relations the polyhedron referenced by <code>Handle</code> has with <code>Generator</code>. The possible relations are listed in the grammar rules above.</em></p>
<p><code>ppl_Polyhedron_relation_with_congruence(+Handle, +Congruence, ?Relation_List)</code><br/>
 <em>Unifies <code>Relation_List</code> with the list of relations the polyhedron referenced by <code>Handle</code> has with <code>Congruence</code>. The possible relations are listed in the grammar rules above.</em></p>
<p><code>ppl_Polyhedron_get_constraints(+Handle, ?Constraint_System)</code><br/>
 <em>Unifies <code>Constraint_System</code> with the constraints (in the form of a list) in the constraint system satisfied by the polyhedron referenced by <code>Handle</code>.</em></p>
<p><code>ppl_Polyhedron_get_congruences(+Handle, ?Congruence_System)</code><br/>
 <em>Unifies <code>Congruence_System</code> with the congruences (in the form of a list) in the congruence system satisfied by the polyhedron referenced by <code>Handle</code>.</em></p>
<p><code>ppl_Polyhedron_get_generators(+Handle, ?Generator_System)</code><br/>
 <em>Unifies <code>Generator_System</code> with the generators (in the form of a list) in the generator system for the polyhedron referenced by <code>Handle</code>.</em></p>
<p><code>ppl_Polyhedron_get_minimized_constraints(+Handle, ?Constraint_System)</code><br/>
 <em>Unifies <code>Constraint_System</code> with the constraints (in the form of a list) in the minimized constraint system satisfied by the polyhedron referenced by <code>Handle</code>.</em></p>
<p><code>ppl_Polyhedron_get_minimized_congruences(+Handle, ?Congruence_System)</code><br/>
 <em>Unifies <code>Congruence_System</code> with the congruences (in the form of a list) in the minimized congruence system for the polyhedron referenced by <code>Handle</code>.</em></p>
<p><code>ppl_Polyhedron_get_minimized_generators(+Handle, ?Generator_System)</code><br/>
 <em>Unifies <code>Generator_System</code> with the generators (in the form of a list) in the minimized generator system satisfied by the polyhedron referenced by <code>Handle</code>.</em></p>
<p><code>ppl_Polyhedron_maximize(+Handle, +Lin_Expr, ?Coeff_1, ?Coeff_2, ?Boolean)</code><br/>
 <em>Succeeds if and only if polyhedron <code>P</code> referenced by <code>Handle</code> is not empty and <code>Lin_Expr</code> is bounded from above in <code>P</code>.</em></p>
<p><em> <code>Coeff_1</code> is unified with the numerator of the supremum value and <code>Coeff_2</code> with the denominator of the supremum value. If the supremum is also the maximum, <code>Boolean</code> is unified with the atom <code>true</code> and, otherwise, unified with the atom <code>false</code>.</em></p>
<p><code>ppl_Polyhedron_minimize(+Handle, +Lin_Expr, ?Coeff_1, ?Coeff_2, ?Boolean)</code><br/>
 <em>Succeeds if and only if polyhedron <code>P</code> referenced by <code>Handle</code> is not empty and <code>Lin_Expr</code> is bounded from below in <code>P</code>.</em></p>
<p><em> <code>Coeff_1</code> is unified with the numerator of the infinum value and <code>Coeff_2</code> with the denominator of the infinum value. If the infinum is also the minimum, <code>Boolean</code> is unified with the atom <code>true</code> and, otherwise, unified with the atom <code>false</code>.</em></p>
<p><code>ppl_Polyhedron_maximize_with_point(+Handle, +Lin_Expr, ?Coeff_1, ?Coeff_2, ?Boolean, ?Point)</code><br/>
 <em>Succeeds if and only if polyhedron <code>P</code> referenced by <code>Handle</code> is not empty and <code>Lin_Expr</code> is bounded from above in <code>P</code>.</em></p>
<p><em> <code>Coeff_1</code> is unified with the numerator of the supremum value and <code>Coeff_2</code> with the denominator of the supremum value and <code>Point</code> with a point or closure point where <code>Lin_Expr</code> reaches this value. If the supremum is also the maximum, <code>Boolean</code> is unified with the atom <code>true</code> and, otherwise, unified with the atom <code>false</code>.</em></p>
<p><code>ppl_Polyhedron_minimize_with_point(+Handle, +Lin_Expr, ?Coeff_1, ?Coeff_2, ?Boolean, ?Point)</code><br/>
 <em>Succeeds if and only if polyhedron <code>P</code> referenced by <code>Handle</code> is not empty and <code>Lin_Expr</code> is bounded from below in <code>P</code>.</em></p>
<p><em> <code>Coeff_1</code> is unified with the numerator of the infinum value and <code>Coeff_2</code> with the denominator of the infinum value and <code>Point</code> with a point or closure point where <code>Lin_Expr</code> reaches this value. If the infinum is also the minimum, <code>Boolean</code> is unified with the atom <code>true</code> and, otherwise, unified with the atom <code>false</code>.</em></p>
<p><code>ppl_Polyhedron_external_memory_in_bytes(+Handle, ?Number)</code><br/>
 <em>Unifies <code>Number</code> with the size of the total memory in bytes occupied by the polyhedron referenced by <code>Handle</code>.</em></p>
<p><code>ppl_Polyhedron_total_memory_in_bytes(+Handle, ?Number)</code><br/>
 <em>Unifies <code>Number</code> with the size of the external memory in bytes occupied by the polyhedron referenced by <code>Handle</code>.</em></p>
<h3>Ascii dump predicate</h3>
<p>This output predicate is useful for debugging.</p>
<p><code>ppl_Polyhedron_ascii_dump(+Handle)</code><br/>
 <em>Dumps an ascii representation of the PPL internal state for the polyhedron referenced by <code>Handle</code> on the standard output.</em></p>
<h2>Space-dimension preserving predicates that may change the polyhedron</h2>
<p>These predicates may modify the polyhedron referred to by the handle in first argument; the (dimension of the) vector space in which it is embedded is unchanged. </p>
<h3>Predicates that may change the polyhedron by adding to its constraint or generator descriptions</h3>
<p>Note that there are two forms of these predicates differentiated in the names by the words "add" or "refine with"; see Section <a class="elRef" doxygen="ppl-user-0.11.2-html.tag:../ppl-user-0.11.2-html/" href="../ppl-user-0.11.2-html/main.html#Generic_Operations_on_Semantic_Geometric_Descriptors">Generic Operations on Semantic Geometric Descriptors</a> in the main <a class="elRef" doxygen="ppl-user-0.11.2-html.tag:../ppl-user-0.11.2-html/" href="../ppl-user-0.11.2-html/main.html#preamble">PPL User Manual</a> for the differences in the semantics and therefore, the expected behavior, between these forms.</p>
<p><code>ppl_Polyhedron_add_constraint(+Handle, +Constraint)</code><br/>
 <em>Updates the polyhedron referenced by <code>Handle</code> to one obtained by adding <code>Constraint</code> to its constraint system. For a C polyhedron, <code>Constraint</code> must be an equality or a non-strict inequality.</em></p>
<p><code>ppl_Polyhedron_add_congruence(+Handle, +Congruence)</code><br/>
 <em>Updates the polyhedron referenced by <code>Handle</code> to one obtained by adding <code>Congruence</code> to its congruence system. For a C polyhedron, <code>Congruence</code> must be an equality.</em></p>
<p><code>ppl_Polyhedron_add_generator(+Handle, +Generator)</code><br/>
 <em>Updates the polyhedron referenced by <code>Handle</code> to one obtained by adding <code>Generator</code> to its generator system. For a C polyhedron, <code>Generator</code> must be a line, ray or point.</em></p>
<p><code>ppl_Polyhedron_add_constraints( +Handle, +Constraint_System)</code><br/>
 <em>Updates the polyhedron referenced by <code>Handle</code> to one obtained by adding to its constraint system the constraints in <code>Constraint_System</code>. For a C polyhedron, <code>Constraints</code> must be a list of equalities and non-strict inequalities.</em></p>
<p><code>ppl_Polyhedron_add_congruences( +Handle, +Congruence_System)</code><br/>
 <em>Updates the polyhedron referenced by <code>Handle</code> to one obtained by adding to its congruence system the congruences in <code>Congruence_System</code>. For a C polyhedron, <code>Congruences</code> must be a list of equalities.</em></p>
<p><code>ppl_Polyhedron_add_generators( +Handle, +Generator_System)</code><br/>
 <em>Updates the polyhedron referenced by <code>Handle</code> to one obtained by adding to its generator system the generators in <code>Generator_System</code>. For a C polyhedron, <code>Generators</code> must be a list of lines, rays and points.</em></p>
<p><code>ppl_Polyhedron_refine_with_constraint( +Handle, +Constraint)</code><br/>
 <em>Updates the polyhedron referenced by <code>Handle</code> to one obtained by refining its constraint system with <code>Constraint</code>.</em></p>
<p><code>ppl_Polyhedron_refine_with_congruence( +Handle, +Congruence)</code><br/>
 <em>Updates the polyhedron referenced by <code>Handle</code> to one obtained by refining its congruence system with <code>Congruence</code>.</em></p>
<p><code>ppl_Polyhedron_refine_with_constraints( +Handle, +Constraint_System)</code><br/>
 <em>Updates the polyhedron referenced by <code>Handle</code> to one obtained by refining its constraint system with the constraints in <code>Constraint_System</code>.</em></p>
<p><code>ppl_Polyhedron_refine_with_congruences( +Handle, +Congruence_System)</code><br/>
 <em>Updates the polyhedron referenced by <code>Handle</code> to one obtained by refining its congruence system with the congruences in <code>Congruence_System</code>.</em></p>
<h3>Predicates that transform the polyhedron</h3>
<p>These predicates enable transformations such as taking the topological closure (which for the domain of C polyhedron is the identity transformation), unconstraining a specified dimension as explained in the main <a class="elRef" doxygen="ppl-user-0.11.2-html.tag:../ppl-user-0.11.2-html/" href="../ppl-user-0.11.2-html/main.html#preamble">PPL User Manual</a> in Section <a class="elRef" doxygen="ppl-user-0.11.2-html.tag:../ppl-user-0.11.2-html/" href="../ppl-user-0.11.2-html/main.html#Cylindrification">Cylindrification Operator</a> and several different image and preimage affine transfer relations; for details of the latter see Sections <a class="elRef" doxygen="ppl-user-0.11.2-html.tag:../ppl-user-0.11.2-html/" href="../ppl-user-0.11.2-html/main.html#Images_and_Preimages_of_Affine_Transfer_Relations">Images and Preimages of Affine Transfer Relations</a> and <a class="elRef" doxygen="ppl-user-0.11.2-html.tag:../ppl-user-0.11.2-html/" href="../ppl-user-0.11.2-html/main.html#Generalized_Affine_Relations">Generalized Affine Relations</a> </p>
<p><code>ppl_Polyhedron_topological_closure_assign(+Handle)</code><br/>
 <em>Assigns to the polyhedron referenced by <code>Handle</code> its topological closure.</em></p>
<p><code>ppl_Polyhedron_unconstrain_space_dimension(+Handle, +PPL_Var)</code><br/>
 <em>Modifies the polyhedron <code>P</code> referenced by <code>Handle</code> by unconstraining the space dimension <code>PPL_Var</code>.</em></p>
<p><code>ppl_Polyhedron_unconstrain_space_dimensions(+Handle, +List_of_PPL_Var)</code><br/>
 <em>Modifies the polyhedron <code>P</code> referenced by <code>Handle</code> by unconstraining the space dimensions that are specified in <code>List_of_PPL_Var</code>. The presence of duplicates in <code>List_of_PPL_Var</code> is a waste but an innocuous one.</em></p>
<p><code>ppl_Polyhedron_affine_image(+Handle, +PPL_Var, +Lin_Expr, +Coeff)</code><br/>
 <em>Transforms the polyhedron referenced by <code>Handle</code> assigning the affine expression for <code>Lin_Expr/<code>Coeff</code> to</code> <code>PPL_Var</code>.</em></p>
<p><code>ppl_Polyhedron_affine_preimage(+Handle, +PPL_Var, +Lin_Expr, +Coeff)</code><br/>
 <em>Transforms the polyhedron referenced by <code>Handle</code> substituting the affine expression for <code>Lin_Expr/<code>Coeff</code> to</code> <code>PPL_Var</code>.</em></p>
<p><code>ppl_Polyhedron_bounded_affine_image(+Handle, +PPL_Var, +Lin_Expr_1, +Lin_Expr_2, +Coeff)</code><br/>
 <em>Assigns to polyhedron <code>P</code> referenced by <code>Handle</code> the generalized image with respect to the generalized affine transfer relation <code>Lin_Expr_1/Coeff</code> <img class="formulaInl" alt="$\leq$" src="form_8.png"/> <code>PPL_Var</code> <img class="formulaInl" alt="$\leq$" src="form_8.png"/> <code>Lin_Expr_2/Coeff</code>.</em></p>
<p><code>ppl_Polyhedron_bounded_affine_preimage(+Handle, +PPL_Var, +Lin_Expr_1, +Lin_Expr_2, +Coeff)</code><br/>
 <em>Assigns to polyhedron <code>P</code> referenced by <code>Handle</code> the generalized preimage with respect to the generalized affine transfer relation <code>Lin_Expr_1/Coeff</code> <img class="formulaInl" alt="$\leq$" src="form_8.png"/> <code>PPL_Var</code> <img class="formulaInl" alt="$\leq$" src="form_8.png"/> <code>Lin_Expr_2/Coeff</code>.</em></p>
<p><code>ppl_Polyhedron_generalized_affine_image(+Handle, +PPL_Var, +Relation_Symbol, +Lin_Expr, +Coeff)</code><br/>
 <em>Assigns to polyhedron <code>P</code> referenced by <code>Handle</code> the generalized image with respect to the generalized affine transfer relation <code>PPL_Var</code> <img class="formulaInl" alt="$\bowtie$" src="form_9.png"/> <code>Lin_Expr/<code>Coeff</code>,</code> where <img class="formulaInl" alt="$\bowtie$" src="form_9.png"/> is the symbol represented by <code>Relation_Symbol</code>.</em></p>
<p><code>ppl_Polyhedron_generalized_affine_preimage(+Handle, +PPL_Var, +Relation_Symbol, +Lin_Expr, +Coeff)</code><br/>
 <em>Assigns to polyhedron <code>P</code> referenced by <code>Handle</code> the generalized preimage with respect to the generalized affine transfer relation <code>PPL_Var</code> <img class="formulaInl" alt="$\bowtie$" src="form_9.png"/> <code>Lin_Expr/<code>Coeff</code>,</code> where <img class="formulaInl" alt="$\bowtie$" src="form_9.png"/> is the symbol represented by <code>Relation_Symbol</code>.</em></p>
<p><code>ppl_Polyhedron_generalized_affine_image_lhs_rhs(+Handle, +Lin_Expr_1, +Relation_Symbol, +Lin_Expr_2)</code><br/>
 <em>Assigns to polyhedron <code>P</code> referenced by <code>Handle</code> the generalized image with respect to the generalized affine transfer relation <code>Lin_Expr_1</code> <img class="formulaInl" alt="$\bowtie$" src="form_9.png"/> <code>Lin_Expr_2</code>, where <img class="formulaInl" alt="$\bowtie$" src="form_9.png"/> is the symbol represented by <code>Relation_Symbol</code>.</em></p>
<p><code>ppl_Polyhedron_generalized_affine_preimage_lhs_rhs(+Handle, +Lin_Expr_1, +Relation_Symbol, +Lin_Expr_2)</code><br/>
 <em>Assigns to polyhedron <code>P</code> referenced by <code>Handle</code> the generalized preimage with respect to the generalized affine transfer relation <code>Lin_Expr_1</code> <img class="formulaInl" alt="$\bowtie$" src="form_9.png"/> <code>Lin_Expr_2</code>, where <img class="formulaInl" alt="$\bowtie$" src="form_9.png"/> is the symbol represented by <code>Relation_Symbol</code>.</em></p>
<h3>Predicates whose results depend on more than one polyhedron</h3>
<p>These predicates include the binary operators which will assign to the polyhedron referred to by the first argument its combination with the polyhedron referred to by the second argument as described in the main <a class="elRef" doxygen="ppl-user-0.11.2-html.tag:../ppl-user-0.11.2-html/" href="../ppl-user-0.11.2-html/main.html#preamble">PPL User Manual</a> in Sections <a class="elRef" doxygen="ppl-user-0.11.2-html.tag:../ppl-user-0.11.2-html/" href="../ppl-user-0.11.2-html/main.html#Intersection_and_Convex_Polyhedral_Hull">Intersection and Convex Polyhedral Hull</a> and <a class="elRef" doxygen="ppl-user-0.11.2-html.tag:../ppl-user-0.11.2-html/" href="../ppl-user-0.11.2-html/main.html#Convex_Polyhedral_Difference">Convex Polyhedral Difference</a>; and a linear partitioning operator described below.</p>
<p><code>ppl_Polyhedron_intersection_assign(+Handle_1, +Handle_2)</code><br/>
 <em>Assigns to the polyhedron <code>P</code> referenced by <code>Handle_1</code> the intersection of <code>P</code> and the polyhedron referenced by <code>Handle_2</code>.</em></p>
<p><code>ppl_Polyhedron_upper_bound_assign(+Handle_1, +Handle_2)</code><br/>
 <em>Assigns to the polyhedron <code>P</code> referenced by <code>Handle_1</code> the upper bound of <code>P</code> and the polyhedron referenced by <code>Handle_2</code>.</em></p>
<p><code>ppl_Polyhedron_difference_assign(+Handle_1, +Handle_2)</code><br/>
 <em>Assigns to the polyhedron <code>P</code> referenced by <code>Handle_1</code> the difference of <code>P</code> and the polyhedron referenced by <code>Handle_2</code>.</em></p>
<p><code>ppl_Polyhedron_time_elapse_assign(+Handle_1, +Handle_2)</code><br/>
 <em>Assigns to the polyhedron <code>P</code> referenced by <code>Handle_1</code> the time elapse of <code>P</code> and the polyhedron referenced by <code>Handle_2</code>.</em></p>
<p><code>ppl_Polyhedron_poly_hull(+Handle_1, +Handle_2)</code><br/>
 <em>Assigns to the polyhedron <code>P</code> referenced by <code>Handle_1</code> the poly-hull of <code>P</code> and the polyhedron referenced by <code>Handle_2</code>.</em></p>
<p><code>ppl_Polyhedron_poly_difference(+Handle_1, +Handle_2)</code><br/>
 <em>Assigns to the polyhedron <code>P</code> referenced by <code>Handle_1</code> the poly-difference of <code>P</code> and the polyhedron referenced by <code>Handle_2</code>.</em></p>
<p><code>ppl_Polyhedron_upper_bound_assign_if_exact(+Handle_1, +Handle_2)</code><br/>
 <em>Succeeds if the least upper bound of the polyhedron <code>P_1</code> referenced by <code>Handle_1</code> with the polyhedron referenced by <code>Handle_2</code> is exact; in which case the least upper bound is assigned to <code>P_1</code>; fails otherwise.</em></p>
<p><code>ppl_Polyhedron_poly_hull_assign_if_exact(+Handle_1, +Handle_2)</code><br/>
 <em>Succeeds if the least upper bound of the polyhedron <code>P_1</code> referenced by <code>Handle_1</code> with the polyhedron referenced by <code>Handle_2</code> is exact; in which case the least upper bound is assigned to <code>P_1</code>; fails otherwise.</em></p>
<p><code>ppl_Polyhedron_simplify_using_context_assign(+Handle_1, +Handle_2, ?Boolean)</code><br/>
 <em>Succeeds if and only if the intersection of polyhedron <code>P_1</code> referenced by <code>Handle_1</code> and the polyhedron <code>P_2</code> referenced by <code>Handle_2</code> is non-empty. Assigns to <code>P_1</code> its meet-preserving simplification with respect to <code>P_2</code>.</em></p>
<p><code>ppl_Polyhedron_linear_partition(+Handle_1, +Handle_2, -Handle_3, -Handle_4)</code><br/>
 <em><code>Handle_1</code> and <code>Handle_2</code> are handles for elements <code>P_1</code> and <code>P_2</code> in the Polyhedron domain. The predicate unifies handle <code>Handle_3</code> to a reference to the intersection of <code>P_1</code> and <code>P_2</code> and <code>Handle_4</code> to a reference to a pointset powerset of nnc polyhedra <code>P_4</code>; where <code>P_4</code> is the linear partition of <code>P_1</code> with respect to <code>P_2</code>. This predicate is only provided if the class <code>Pointset_Powerset_NNC_Polyhedron</code> has been enabled when configuring the library.</em></p>
<h3>Predicates for widening and extrapolation</h3>
<p>In addition to the above binary operators, there are also a number of widening, extrapolation and narrowing operators as described in the main <a class="elRef" doxygen="ppl-user-0.11.2-html.tag:../ppl-user-0.11.2-html/" href="../ppl-user-0.11.2-html/main.html#preamble">PPL User Manual</a> in Sections <a class="elRef" doxygen="ppl-user-0.11.2-html.tag:../ppl-user-0.11.2-html/" href="../ppl-user-0.11.2-html/main.html#Widening_Operators">Widening Operators</a>, <a class="elRef" doxygen="ppl-user-0.11.2-html.tag:../ppl-user-0.11.2-html/" href="../ppl-user-0.11.2-html/main.html#Widening_with_Tokens">Widening with Tokens</a> and <a class="elRef" doxygen="ppl-user-0.11.2-html.tag:../ppl-user-0.11.2-html/" href="../ppl-user-0.11.2-html/main.html#Extrapolation_Operators">Extrapolation Operators</a>. Note that for all these widening and extrapolation predicates to behave as specified the polyhedron referred to by the second argument has to be contained in (or equal to) the polyhedron referred to by the first argument.</p>
<p><code>ppl_Polyhedron_BHRZ03_widening_assign_with_tokens(+Handle_1, +Handle_2, +C_unsigned_1, ?C_unsigned_2)</code><br/>
 <em>Assigns to the polyhedron <code>P_1</code> referenced by <code>Handle_1</code> the BHRZ03-widening of <code>P_1</code> with the polyhedron referenced by <code>Handle_2</code>. The widening with tokens delay technique is applied with <code>C_unsigned_1</code> tokens; <code>C_unsigned_2</code> is unified with the number of tokens remaining at the end of the operation.</em></p>
<p><code>ppl_Polyhedron_H79_widening_assign_with_tokens(+Handle_1, +Handle_2, +C_unsigned_1, ?C_unsigned_2)</code><br/>
 <em>Assigns to the polyhedron <code>P_1</code> referenced by <code>Handle_1</code> the H79-widening of <code>P_1</code> with the polyhedron referenced by <code>Handle_2</code>. The widening with tokens delay technique is applied with <code>C_unsigned_1</code> tokens; <code>C_unsigned_2</code> is unified with the number of tokens remaining at the end of the operation.</em></p>
<p><code>ppl_Polyhedron_BHRZ03_widening_assign(+Handle_1, +Handle_2)</code><br/>
 <em>Assigns to the polyhedron <code>P_1</code> referenced by <code>Handle_1</code> the BHRZ03-widening of <code>P_1</code> with the polyhedron referenced by <code>Handle_2</code>.</em></p>
<p><code>ppl_Polyhedron_H79_widening_assign(+Handle_1, +Handle_2)</code><br/>
 <em>Assigns to the polyhedron <code>P_1</code> referenced by <code>Handle_1</code> the H79-widening of <code>P_1</code> with the polyhedron referenced by <code>Handle_2</code>.</em></p>
<p><code>ppl_Polyhedron_widening_assign_with_tokens(+Handle_1, +Handle_2, +C_unsigned_1, ?C_unsigned_2)</code><br/>
 <em>Same as predicate <code>ppl_Polyhedron_H79_widening_assign_with_tokens</code>/4</em></p>
<p><code>ppl_Polyhedron_widening_assign(+Handle_1, +Handle_2)</code><br/>
 <em>Same as predicate <code>ppl_Polyhedron_H79_widening_assign</code>/2</em></p>
<p><code>ppl_Polyhedron_limited_BHRZ03_extrapolation_assign_with_tokens(+Handle_1, +Handle_2, +Constraint_System, +C_unsigned_1, ?C_unsigned_2)</code><br/>
 <em>Assigns to the polyhedron <code>P_1</code> referenced by <code>Handle_1</code> the BHRZ03-widening of <code>P_1</code> with the polyhedron referenced by <code>Handle_2</code> intersected with the constraints in <code>Constraint_System</code> that are satisfied by all the points of <code>P_1</code>. The widening with tokens delay technique is applied with <code>C_unsigned_1</code> tokens; <code>C_unsigned_2</code> is unified with the number of tokens remaining at the end of the operation.</em></p>
<p><code>ppl_Polyhedron_bounded_BHRZ03_extrapolation_assign_with_tokens(+Handle_1, +Handle_2, +Constraint_System, +C_unsigned_1, ?C_unsigned_2)</code><br/>
 <em>Assigns to the polyhedron <code>P_1</code> referenced by <code>Handle_1</code> the BHRZ03-widening of <code>P_1</code> with the polyhedron referenced by <code>Handle_2</code> intersected with the constraints in <code>Constraint_System</code> that are satisfied by all the points of <code>P_1</code>, further intersected with the smallest box containing <code>P_1</code>. The widening with tokens delay technique is applied with <code>C_unsigned_1</code> tokens; <code>C_unsigned_2</code> is unified with the number of tokens remaining at the end of the operation.</em></p>
<p><code>ppl_Polyhedron_limited_H79_extrapolation_assign_with_tokens(+Handle_1, +Handle_2, +Constraint_System, +C_unsigned_1, ?C_unsigned_2)</code><br/>
 <em>Assigns to the polyhedron <code>P_1</code> referenced by <code>Handle_1</code> the H79-widening of <code>P_1</code> with the polyhedron referenced by <code>Handle_2</code> intersected with the constraints in <code>Constraint_System</code> that are satisfied by all the points of <code>P_1</code>. The widening with tokens delay technique is applied with <code>C_unsigned_1</code> tokens; <code>C_unsigned_2</code> is unified with the number of tokens remaining at the end of the operation.</em></p>
<p><code>ppl_Polyhedron_bounded_H79_extrapolation_assign_with_tokens(+Handle_1, +Handle_2, +Constraint_System, +C_unsigned_1, ?C_unsigned_2)</code><br/>
 <em>Assigns to the polyhedron <code>P_1</code> referenced by <code>Handle_1</code> the H79-widening of <code>P_1</code> with the polyhedron referenced by <code>Handle_2</code> intersected with the constraints in <code>Constraint_System</code> that are satisfied by all the points of <code>P_1</code>, further intersected with the smallest box containing <code>P_1</code>. The widening with tokens delay technique is applied with <code>C_unsigned_1</code> tokens; <code>C_unsigned_2</code> is unified with the number of tokens remaining at the end of the operation.</em></p>
<p><code>ppl_Polyhedron_limited_BHRZ03_extrapolation_assign(+Handle_1, +Handle_2, +Constraint_System)</code><br/>
 <em>Assigns to the polyhedron <code>P_1</code> referenced by <code>Handle_1</code> the BHRZ03-widening of <code>P_1</code> with the polyhedron referenced by <code>Handle_2</code> intersected with the constraints in <code>Constraint_System</code> that are satisfied by all the points of <code>P_1</code>.</em></p>
<p><code>ppl_Polyhedron_bounded_BHRZ03_extrapolation_assign(+Handle_1, +Handle_2, +Constraint_System)</code><br/>
 <em>Assigns to the polyhedron <code>P_1</code> referenced by <code>Handle_1</code> the BHRZ03-widening of <code>P_1</code> with the polyhedron referenced by <code>Handle_2</code> intersected with the constraints in <code>Constraint_System</code> that are satisfied by all the points of <code>P_1</code>, further intersected with the smallest box containing <code>P_1</code>.</em></p>
<p><code>ppl_Polyhedron_limited_H79_extrapolation_assign(+Handle_1, +Handle_2, +Constraint_System)</code><br/>
 <em>Assigns to the polyhedron <code>P_1</code> referenced by <code>Handle_1</code> the H79-widening of <code>P_1</code> with the polyhedron referenced by <code>Handle_2</code> intersected with the constraints in <code>Constraint_System</code> that are satisfied by all the points of <code>P_1</code>.</em></p>
<p><code>ppl_Polyhedron_bounded_H79_extrapolation_assign(+Handle_1, +Handle_2, +Constraint_System)</code><br/>
 <em>Assigns to the polyhedron <code>P_1</code> referenced by <code>Handle_1</code> the H79-widening of <code>P_1</code> with the polyhedron referenced by <code>Handle_2</code> intersected with the constraints in <code>Constraint_System</code> that are satisfied by all the points of <code>P_1</code>, further intersected with the smallest box containing <code>P_1</code>.</em></p>
<h2>Predicates that may modify the vector space</h2>
<p>These predicates enable the modification of the vector space of the polyhedron referred to in the first argument. </p>
<h3>Predicate for concatenation</h3>
<p>For more information on this operation, see Section <a class="elRef" doxygen="ppl-user-0.11.2-html.tag:../ppl-user-0.11.2-html/" href="../ppl-user-0.11.2-html/main.html#Concatenating_Polyhedra">Concatenating Polyhedra</a>, of the main <a class="elRef" doxygen="ppl-user-0.11.2-html.tag:../ppl-user-0.11.2-html/" href="../ppl-user-0.11.2-html/main.html#preamble">PPL User Manual</a>.</p>
<p><code>ppl_Polyhedron_concatenate_assign(+Handle_1, +Handle_2)</code><br/>
 <em>Assigns to the polyhedron <code>P</code> referenced by <code>Handle_1</code> the concatenation of <code>P</code> and the polyhedron referenced by <code>Handle_2</code>.</em></p>
<h3>Predicates for mapping dimensions or changing the vector space</h3>
<p>These predicates enable the modification of the vector space of the polyhedron referred to in the first argument. These predicates enable the modification of the vector space of the polyhedron referred to in the first argument. Detailed descriptions of these can be found in the main <a class="elRef" doxygen="ppl-user-0.11.2-html.tag:../ppl-user-0.11.2-html/" href="../ppl-user-0.11.2-html/main.html#preamble">PPL User Manual</a> in Sections <a class="elRef" doxygen="ppl-user-0.11.2-html.tag:../ppl-user-0.11.2-html/" href="../ppl-user-0.11.2-html/main.html#Adding_New_Dimensions_to_the_Vector_Space">Adding New Dimensions to the Vector Space</a>, <a class="elRef" doxygen="ppl-user-0.11.2-html.tag:../ppl-user-0.11.2-html/" href="../ppl-user-0.11.2-html/main.html#Removing_Dimensions_from_the_Vector_Space">Removing Dimensions from the Vector Space</a>, <a class="elRef" doxygen="ppl-user-0.11.2-html.tag:../ppl-user-0.11.2-html/" href="../ppl-user-0.11.2-html/main.html#Mapping_the_Dimensions_of_the_Vector_Space">Mapping the Dimensions of the Vector Space</a>, <a class="elRef" doxygen="ppl-user-0.11.2-html.tag:../ppl-user-0.11.2-html/" href="../ppl-user-0.11.2-html/main.html#expand_space_dimension">Expanding One Dimension of the Vector Space to Multiple Dimensions</a> and <a class="elRef" doxygen="ppl-user-0.11.2-html.tag:../ppl-user-0.11.2-html/" href="../ppl-user-0.11.2-html/main.html#Folding_Multiple_Dimensions_of_the_Vector_Space_into_One_Dimension">Folding Multiple Dimensions of the Vector Space into One Dimension</a>.</p>
<p><code>ppl_Polyhedron_add_space_dimensions_and_embed(+Handle, +Dimension_Type)</code><br/>
 <em>Adds <code>Dimension_Type</code> new dimensions to the space enclosing the polyhedron <code>P</code> referenced by <code>Handle</code> and and_embeds <code>P</code> in this space.</em></p>
<p><code>ppl_Polyhedron_add_space_dimensions_and_project(+Handle, +Dimension_Type)</code><br/>
 <em>Adds <code>Dimension_Type</code> new dimensions to the space enclosing the polyhedron <code>P</code> referenced by <code>Handle</code> and and_projects <code>P</code> in this space.</em></p>
<p><code>ppl_Polyhedron_remove_space_dimensions(+Handle, +List_of_PPL_Vars)</code><br/>
 <em>Removes from the vector space enclosing the polyhedron <code>P</code> referenced by <code>Handle</code> the space dimensions that are specified in <code>List_of_PPL_Var</code>. The presence of duplicates in <code>List_of_PPL_Var</code> is a waste but an innocuous one.</em></p>
<p><code>ppl_Polyhedron_remove_higher_space_dimensions(+Handle, +Dimension_Type)</code><br/>
 <em>Removes the higher dimensions from the vector space enclosing the polyhedron <code>P</code> referenced by <code>Handle</code> so that, upon successful return, the new space dimension is <code>Dimension_Type</code>.</em></p>
<p><code>ppl_Polyhedron_expand_space_dimension(+Handle, +PPL_Var, +Dimension_Type)</code><br/>
 <em>Expands the <code>PPL_Var-th</code> dimension of the vector space enclosing the polyhedron referenced by <code>Handle</code> to <code>Dimension_Type</code> new space dimensions.</em></p>
<p><code>ppl_Polyhedron_fold_space_dimensions(+Handle, +List_of_PPL_Vars, +PPL_Var)</code><br/>
 <em>Modifies the polyhedron referenced by <code>Handle</code> by folding the space dimensions contained in <code>List_of_PPL_Vars</code> into dimension <code>PPL_Var</code>. The presence of duplicates in <code>List_of_PPL_Vars</code> is a waste but an innocuous one.</em></p>
<p><code>ppl_Polyhedron_map_space_dimensions(+Handle, +P_Func)</code><br/>
 <em>Remaps the dimensions of the vector space according to a partial function. This function is specified by means of the <code>P_Func</code>, which has <code>n</code> entries. The result is undefined if <code>P_Func</code> does not encode a partial function.</em></p>
<p><a class="anchor" id="other_domains"></a> </p>
<h1>Ad hoc Predicates for Other Domains</h1>
<h2>Extra Predicates Specifically for the Pointset Powerset Domains</h2>
<p>The powerset domains can be instantiated by taking as a base domain any fixed semantic geometric description (C and NNC polyhedra, BD and octagonal shapes, boxes and grids). An element of the powerset domain represents a disjunctive collection of base objects (its disjuncts), all having the same space dimension. For more information on this construct, see Section <a class="elRef" doxygen="ppl-user-0.11.2-html.tag:../ppl-user-0.11.2-html/" href="../ppl-user-0.11.2-html/main.html#The_Powerset_Domain">The Powerset Domain</a> in the main <a class="elRef" doxygen="ppl-user-0.11.2-html.tag:../ppl-user-0.11.2-html/" href="../ppl-user-0.11.2-html/main.html#preamble">PPL User Manual</a>.</p>
<p>Besides the predicates that are available in all semantic geometric descriptions (whose documentation is not repeated here), the powerset domain also provides several ad hoc predicates. These are specified below, instantiated for the PPL domain Pointset_Powerset_C_Polyhedron. Note that predicates for other pointset powerset domains will follow similar patterns.</p>
<h3>Predicates for pointset powerset iterators and disjuncts.</h3>
<p>Iterators allow the user to examine and change individual elements (called here disjuncts) of a pointset powerset. Detailed descriptions for adding and removing disjuncts can be found in the main <a class="elRef" doxygen="ppl-user-0.11.2-html.tag:../ppl-user-0.11.2-html/" href="../ppl-user-0.11.2-html/main.html#preamble">PPL User Manual</a> in Section <a class="elRef" doxygen="ppl-user-0.11.2-html.tag:../ppl-user-0.11.2-html/" href="../ppl-user-0.11.2-html/main.html#Adding_a_Disjunct">Adding a Disjunct</a>. The following predicates support useful operations on these iterators and disjuncts via the usual handles.</p>
<p><code>ppl_new_Pointset_Powerset_C_Polyhedron_iterator_from_iterator(+Iterator_1, -Iterator_2)</code><br/>
 <em>Builds a new iterator <code>it</code> from the iterator referenced by <code>Iterator_1</code>. <code>Iterator_2</code> is unified with the handle for <code>it</code>.</em></p>
<p><code>ppl_Pointset_Powerset_C_Polyhedron_begin_iterator(+Handle, -Iterator)</code><br/>
 <em>Unifies <code>Iterator</code> with a handle to an iterator "pointing" to the beginning of the sequence of disjuncts of the powerset referred to by <code>Handle</code>.</em></p>
<p><code>ppl_Pointset_Powerset_C_Polyhedron_end_iterator(+Handle, -Iterator)</code><br/>
 <em>Unifies <code>Iterator</code> with a handle to an iterator "pointing" to the end of the sequence of disjuncts of the powerset referred to by <code>Handle</code>.</em></p>
<p><code>ppl_Pointset_Powerset_C_Polyhedron_iterator_equals_iterator(+Iterator_1, +Iterator_2)</code><br/>
 <em>Succeeds if and only if the iterator referenced by <code>Iterator_1</code> is equal to the iterator referenced by <code>Iterator_2</code>.</em></p>
<p><code>ppl_Pointset_Powerset_C_Polyhedron_iterator_increment(+Iterator)</code><br/>
 <em>Increments the iterator referenced by <code>Iterator</code> so that it "points" to the next disjunct.</em></p>
<p><code>ppl_Pointset_Powerset_C_Polyhedron_iterator_decrement(+Iterator)</code><br/>
 <em>Decrements the iterator referenced by <code>Iterator</code> so that it "points" to the previous disjunct.</em></p>
<p><code>ppl_Pointset_Powerset_C_Polyhedron_iterator_get_disjunct(+Iterator, -Handle)</code><br/>
 <em>Unifies with <code>Handle</code> a reference to the disjunct referred to by <code>Iterator_1</code>.</em></p>
<p><code>ppl_delete_Pointset_Powerset_C_Polyhedron_iterator(+Iterator)</code><br/>
 <em>Invalidates the handle referenced by <code>Iterator</code>: this makes sure the corresponding resources will eventually be released.</em></p>
<p><code>ppl_Pointset_Powerset_C_Polyhedron_add_disjunct(+Handle_1, +Handle_2)</code><br/>
 <em>Adds to the pointset powerset referenced by <code>Handle_1</code> a disjunct referred to by <code>Handle_2</code>.</em></p>
<p><code>ppl_Pointset_Powerset_C_Polyhedron_drop_disjunct(+Handle, +Iterator)</code><br/>
 <em>If <code>it</code> is the iterator referred to by <code>Iterator</code>, drops from the pointset powerset referenced by <code>Handle</code> the disjunct pointed to by <code>it</code> and assigns to <code>it</code> an iterator to the next disjunct.</em></p>
<p><code>ppl_Pointset_Powerset_C_Polyhedron_drop_disjuncts(+Handle, +Iterator_1, +Iterator_2)</code><br/>
 <em>If <code>it_1</code> and <code>it_2</code> are the iterators referred to by <code>Iterator_1</code> and <code>Iterator_2</code>, respectively, drops from the pointset powerset referenced by <code>Handle</code> all the disjuncts from <code>it_1</code> to <code>it_2</code> (excluded).</em></p>
<h3>Other Ad Hoc Predicates for the pointset powerset domains.</h3>
<p>Collected here are some other predicates that are specific to pointset powersets of C polyhedra; these provide operations for simplifying the powerset, geometric comparisons and widening and extrapolation. Detailed descriptions of these can be found in the main <a class="elRef" doxygen="ppl-user-0.11.2-html.tag:../ppl-user-0.11.2-html/" href="../ppl-user-0.11.2-html/main.html#preamble">PPL User Manual</a> in Sections <a class="elRef" doxygen="ppl-user-0.11.2-html.tag:../ppl-user-0.11.2-html/" href="../ppl-user-0.11.2-html/main.html#Geometric_Comparisons">Geometric Comparisons</a>, <a class="elRef" doxygen="ppl-user-0.11.2-html.tag:../ppl-user-0.11.2-html/" href="../ppl-user-0.11.2-html/main.html#Certificate_Based_Widenings">Certificate-Based Widenings</a>, <a class="elRef" doxygen="ppl-user-0.11.2-html.tag:../ppl-user-0.11.2-html/" href="../ppl-user-0.11.2-html/main.html#Powerset_Extrapolation_Operators">Powerset Extrapolation Operators</a>.</p>
<p><code>ppl_Pointset_Powerset_C_Polyhedron_pairwise_reduce(+Handle)</code><br/>
 <em>Assigns the result of pairwise reduction on the pointset powerset referenced by <code>Handle</code>.</em></p>
<p><code>ppl_Pointset_Powerset_C_Polyhedron_omega_reduce(+Handle)</code><br/>
 <em>Assigns the result of omega reduction on the pointset powerset referenced by <code>Handle</code>.</em></p>
<p><code>ppl_Pointset_Powerset_C_Polyhedron_geometrically_covers_Pointset_Powerset_C_Polyhedron(+Handle_1, +Handle_2)</code><br/>
 <em>Succeeds if and only if the pointset powerset referenced by <code>Handle_2</code> geometrically covers the pointset powerset referenced by <code>Handle_1</code>; see Section <a class="elRef" doxygen="ppl-user-0.11.2-html.tag:../ppl-user-0.11.2-html/" href="../ppl-user-0.11.2-html/main.html#Geometric_Comparisons">Geometric Comparisons</a> in the main <a class="elRef" doxygen="ppl-user-0.11.2-html.tag:../ppl-user-0.11.2-html/" href="../ppl-user-0.11.2-html/main.html#preamble">PPL User Manual</a>.</em></p>
<p><code>ppl_Pointset_Powerset_C_Polyhedron_geometrically_equals_Pointset_Powerset_C_Polyhedron(+Handle_1, +Handle_2)</code><br/>
 <em>Succeeds if and only if the pointset powerset referenced by <code>Handle_2</code> geometrically equals the pointset powerset referenced by <code>Handle_1</code>; see Section <a class="elRef" doxygen="ppl-user-0.11.2-html.tag:../ppl-user-0.11.2-html/" href="../ppl-user-0.11.2-html/main.html#Geometric_Comparisons">Geometric Comparisons</a> in the main <a class="elRef" doxygen="ppl-user-0.11.2-html.tag:../ppl-user-0.11.2-html/" href="../ppl-user-0.11.2-html/main.html#preamble">PPL User Manual</a>.</em></p>
<p><code>ppl_Pointset_Powerset_C_Polyhedron_BHZ03_BHRZ03_BHRZ03_widening_assign(+Handle_1, +Handle_2)</code><br/>
 <em>Assigns to the pointset powerset <code>P_1</code> referenced by <code>Handle_1</code> the <a class="elRef" doxygen="ppl-user-0.11.2-html.tag:../ppl-user-0.11.2-html/" href="../ppl-user-0.11.2-html/main.html#pps_certificate_widening">BHZ03-widening</a> between <code>P_1</code> and the pointset powerset referenced by <code>Handle_2</code>, using the BHRZ03-widening certified by the convergence certificate for BHRZ03.</em></p>
<p><code>ppl_Pointset_Powerset_C_Polyhedron_BHZ03_H79_H79_widening_assign(+Handle_1, +Handle_2)</code><br/>
 <em>Assigns to the pointset powerset <code>P_1</code> referenced by <code>Handle_1</code> the <a class="elRef" doxygen="ppl-user-0.11.2-html.tag:../ppl-user-0.11.2-html/" href="../ppl-user-0.11.2-html/main.html#pps_certificate_widening">BHZ03-widening</a> between <code>P_1</code> and the pointset powerset referenced by <code>Handle_2</code>, using the H79-widening certified by the convergence certificate for H79.</em></p>
<p><code>ppl_Pointset_Powerset_C_Polyhedron_BGP99_BHRZ03_extrapolation_assign(+Handle_1, +Handle_2, C_unsigned)</code><br/>
 <em>Assigns to the pointset powerset <code>P_1</code> referenced by <code>Handle_1</code> the result of applying the <a class="elRef" doxygen="ppl-user-0.11.2-html.tag:../ppl-user-0.11.2-html/" href="../ppl-user-0.11.2-html/main.html#pps_bgp99_extrapolation">BGP99 extrapolation operator</a> between <code>P_1</code> and the pointset powerset referenced by <code>Handle_2</code>, using the BHRZ03-widening and the cardinality threshold <code>C_unsigned</code>.</em></p>
<p><code>ppl_Pointset_Powerset_C_Polyhedron_BGP99_H79_extrapolation_assign(+Handle_1, +Handle_2, C_unsigned)</code><br/>
 <em>Assigns to the pointset powerset <code>P_1</code> referenced by <code>Handle_1</code> the result of applying the <a class="elRef" doxygen="ppl-user-0.11.2-html.tag:../ppl-user-0.11.2-html/" href="../ppl-user-0.11.2-html/main.html#pps_bgp99_extrapolation">BGP99 extrapolation operator</a> between <code>P_1</code> and the pointset powerset referenced by <code>Handle_2</code>, using the H79-widening and the cardinality threshold <code>C_unsigned</code>.</em></p>
<p><a class="anchor" id="PI_Compilation"></a> </p>
<h1>Compilation and Installation</h1>
<p>When the Parma Polyhedra Library is configured, it tests for the existence of each supported Prolog system. If a supported Prolog system is correctly installed in a standard location, things are arranged so that the corresponding interface is built and installed.</p>
<p>The Prolog interface files are all installed in the directory <code>prefix/lib/ppl</code>. Since this includes shared and dynamically loaded libraries, you must make your dynamic linker/loader aware of this fact. If you use a GNU/Linux system, try the commands <code>man ld.so</code> and <code>man ldconfig</code> for more information.</p>
<p>As an option, the Prolog interface can track the creation and disposal of polyhedra. In fact, differently from native Prolog data, PPL polyhedra must be explicitly disposed and forgetting to do so is a very common mistake. To enable this option, configure the library adding <code>-DPROLOG_TRACK_ALLOCATION</code> to the options passed to the C++ compiler. Your configure command would then look like </p>
<div class="fragment"><pre class="fragment">  path/to/configure --with-cxxflags=<span class="stringliteral">&quot;-DPROLOG_TRACK_ALLOCATION&quot;</span> ...
</pre></div><p><a class="anchor" id="PI_SD_Features"></a> </p>
<h1>System-Dependent Features</h1>
<p><a class="anchor" id="CIAO_Prolog"></a> </p>
<h2>CIAO Prolog</h2>
<p>The Ciao Prolog interface to the PPL is available both as `PPL enhanced' Ciao Prolog interpreter and as a library that can be linked to Ciao Prolog programs. Only Ciao Prolog versions 1.10 #5 and later are supported.</p>
<p>So that it can be used with the Ciao Prolog PPL interface, the Ciao Prolog installation must be configured with the <code>--disable-regs</code> option.</p>
<h3>The <code>ppl_ciao</code> Executable</h3>
<p>If an appropriate version of Ciao Prolog is installed on the machine on which you compiled the library, the command <code>make install</code> will install the executable <code>ppl_ciao</code> in the directory <code>prefix/bin</code>. The <code>ppl_ciao</code> executable is simply the Ciao Prolog interpreter with the Parma Polyhedra Library linked in. The only thing you should do to use the library is to call <code>ppl_initialize/0</code> before any other PPL predicate and to call <code>ppl_finalize/0</code> when you are done with the library.</p>
<h3>Linking the Library To Ciao Prolog Programs</h3>
<p>In order to allow linking Ciao Prolog programs to the PPL, the following files are installed in the directory <code>prefix/lib/ppl</code>: <code>ppl_ciao.pl</code> contains the required foreign declarations; <code>libppl_ciao.*</code> contain the executable code for the Ciao Prolog interface in various formats (static library, shared library, libtool library). If your Ciao Prolog program is constituted by, say, <code>source1.pl</code> and <code>source2.pl</code> and you want to create the executable <code>myprog</code>, your compilation command may look like </p>
<div class="fragment"><pre class="fragment">ciaoc -o myprog prefix/lib/ppl/ppl_ciao.pl ciao_pl_check.pl \
  -L <span class="stringliteral">&#39;-Lprefix/lib/ppl -lppl_ciao -Lprefix/lib -lppl -lgmpxx -lgmp -lstdc++&#39;</span>
</pre></div><p><a class="anchor" id="GNU_Prolog"></a> </p>
<h2>GNU Prolog</h2>
<p>The GNU Prolog interface to the PPL is available both as a `PPL enhanced' GNU Prolog interpreter and as a library that can be linked to GNU Prolog programs. The only GNU Prolog version that is known to work is a patched version of the `unstable version' tagged <a href="ftp://ftp.inria.fr/INRIA/Projects/contraintes/gprolog/unstable/gprolog-20040608.tgz">20040608</a> (which unpacks to a directory called <code>gprolog-1.2.18</code>). The patch is contained in the <code>interfaces/Prolog/GNU/README</code> file of the PPL's distribution.</p>
<p>So that it can be used with the GNU Prolog PPL interface (and, for that matter, with any foreign code), the GNU Prolog installation must be configured with the <code>--disable-regs</code> option.</p>
<h3>The <code>ppl_gprolog</code> Executable</h3>
<p>If an appropriate version of GNU Prolog is installed on the machine on which you compiled the library, the command <code>make install</code> will install the executable <code>ppl_gprolog</code> in the directory <code>prefix/bin</code>. The <code>ppl_gprolog</code> executable is simply the GNU Prolog interpreter with the Parma Polyhedra Library linked in. The only thing you should do to use the library is to call <code>ppl_initialize/0</code> before any other PPL predicate and to call <code>ppl_finalize/0</code> when you are done with the library.</p>
<h3>Linking the Library To GNU Prolog Programs</h3>
<p>In order to allow linking GNU Prolog programs to the PPL, the following files are installed in the directory <code>prefix/lib/ppl</code>: <code>ppl_gprolog.pl</code> contains the required foreign declarations; <code>libppl_gprolog.*</code> contain the executable code for the GNU Prolog interface in various formats (static library, shared library, libtool library). If your GNU Prolog program is constituted by, say, <code>source1.pl</code> and <code>source2.pl</code> and you want to create the executable <code>myprog</code>, your compilation command may look like </p>
<div class="fragment"><pre class="fragment">gplc -o myprog prefix/lib/ppl/ppl_gprolog.pl source1.pl source2.pl \
  -L <span class="stringliteral">&#39;-Lprefix/lib/ppl -lppl_gprolog -Lprefix/lib -lppl -lgmpxx -lgmp -lstdc++&#39;</span>
</pre></div><p>GNU Prolog uses several stacks to execute a Prolog program each with a pre-defined default size. If the size of a stack is too small for the application an overflow will occur. To change the default size of a stack, the user has to set the value of the relevant environment variable; in particular, to execute some of the tests, we found it necessary to increase the size of GLOBALSZ. Thus, for the above example, the compilation command would be </p>
<div class="fragment"><pre class="fragment">GLOBALSZ=32768 gplc -o myprog prefix/lib/ppl/ppl_gprolog.pl source1.pl source2.pl \
  -L <span class="stringliteral">&#39;-Lprefix/lib/ppl -lppl_gprolog -Lprefix/lib -lppl -lgmpxx -lgmp -lstdc++&#39;</span>
</pre></div><p> More information on adjusting the size of the stacks can be found in Section 3.3 in the <a href="http://www.gprolog.org/manual/gprolog.html">GNU Prolog Manual</a></p>
<p><a class="anchor" id="SICStus_Prolog"></a> </p>
<h2>SICStus Prolog</h2>
<p>The SICStus Prolog interface to the PPL is available both as a statically linked module or as a dynamically linked one. Only SICStus Prolog versions 3.9.1 and later are supported.</p>
<h3>The Statically Linked <code>ppl_sicstus</code> Executable</h3>
<p>If an appropriate version of SICStus Prolog is installed on the machine on which you compiled the library, the command <code>make install</code> will install the executable <code>ppl_sicstus</code> in the directory <code>prefix/bin</code>. The <code>ppl_sicstus</code> executable is simply the SICStus Prolog system with the Parma Polyhedra Library statically linked. The only thing you should do to use the library is to load <code>prefix/lib/ppl/ppl_sicstus.pl</code>.</p>
<h3>Loading the SICStus Interface Dynamically</h3>
<p>In order to dynamically load the library from SICStus Prolog you should simply load <code>prefix/lib/ppl/ppl_sicstus.pl</code>. Notice that, for dynamic linking to work, you should have configured the library with the <code>--enable-shared</code> option.</p>
<p><a class="anchor" id="SWI_Prolog"></a> </p>
<h2>SWI-Prolog</h2>
<p>The SWI-Prolog interface to the PPL is available both as a statically linked module or as a dynamically linked one. Only SWI-Prolog version 5.6.0 and later versions are supported.</p>
<h3>The <code>ppl_pl</code> Executable</h3>
<p>If an appropriate version of SWI-Prolog is installed on the machine on which you compiled the library, the command <code>make install</code> will install the executable <code>ppl_pl</code> in the directory <code>prefix/bin</code>. The <code>ppl_pl</code> executable is simply the SWI-Prolog shell with the Parma Polyhedra Library statically linked: from within <code>ppl_pl</code> all the services of the library are available without further action.</p>
<h3>Loading the SWI-Prolog Interface Dynamically</h3>
<p>In order to dynamically load the library from SWI-Prolog you should simply load <code>prefix/lib/ppl/ppl_swiprolog.pl</code>. This will invoke <code>ppl_initialize/0</code> and <code>ppl_finalize/0</code> automatically. Alternatively, you can load the library directly with </p>
<div class="fragment"><pre class="fragment">:- load_foreign_library(<span class="stringliteral">&#39;prefix/lib/ppl/libppl_swiprolog&#39;</span>).
</pre></div><p> This will call <code>ppl_initialize/0</code> automatically. Analogously, </p>
<div class="fragment"><pre class="fragment">:- unload_foreign_library(<span class="stringliteral">&#39;prefix/lib/ppl/libppl_swiprolog&#39;</span>).
</pre></div><p> will, as part of the unload process, invoke <code>ppl_finalize/0</code>.</p>
<p>Notice that, for dynamic linking to work, you should have configured the library with the <code>--enable-shared</code> option.</p>
<p><a class="anchor" id="XSB_Prolog"></a> </p>
<h2>XSB</h2>
<p>The XSB Prolog interface to the PPL is available as a dynamically linked module. Only some CVS versions of XSB starting from 2 July 2005 are known to work. CVS versions starting from 11 November 2005 are known not to work.</p>
<p>In order to dynamically load the library from XSB you should load the <code>ppl_xsb</code> module and import the predicates you need. For things to work, you may have to copy the files <code>prefix/lib/ppl/ppl_xsb.xwam</code> and <code>prefix/lib/ppl/ppl_xsb.so</code> in your current directory or in one of the XSB library directories.</p>
<p><a class="anchor" id="YAP_Prolog"></a> </p>
<h2>YAP</h2>
<p>The YAP Prolog interface to the PPL is available as a dynamically linked module. Only YAP versions following 5.1.0 and CVS HEAD versions starting from 4 January 2006 are supported. Notice that support for unbounded integers in YAP is young and may have errors that could affect programs using the PPL (see, e.g., <a href="http://www.cs.unipr.it/pipermail/ppl-devel/2006-January/007780.html">http://www.cs.unipr.it/pipermail/ppl-devel/2006-January/007780.html</a>).</p>
<p>In order to dynamically load the library from YAP you should simply load <code>prefix/lib/ppl/ppl_yap.pl</code>. This will invoke <code>ppl_initialize/0</code> automatically; it is the programmer's responsibility to call <code>ppl_finalize/0</code> when the PPL library is no longer needed. Notice that, for dynamic linking to work, you should have configured the library with the <code>--enable-shared</code> option. </p>
</div>
<hr class="footer"/><address style="text-align: right;"><small>Generated on Sun Feb 27 10:12:21 2011 for PPL Prolog Language Interface by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.3 </small></address>
</body>
</html>