PPL OCaml Language Interface 0.12
OCaml Language Interface

The Parma Polyhedra Library comes equipped with an interface for the OCaml language.

The main features of the library are described in Section OCaml Interface Features. Section OCamldoc Documentation lists all the functions available to the default generated domains in the OCaml interface. Section Compilation and Installation explains how the OCaml interface is compiled and installed.

In the sequel, prefix is the prefix under which you have installed the library (typically /usr or /usr/local).

OCaml Interface Features

The OCaml 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 PPL user manual. Here we just describe those aspects that are specific to the OCaml interface.

Overview

First, here is a list of notes with general information and advice on the use of the OCaml interface.

  • The numerical abstract domains available to the OCaml user consist of the simple domains, powersets of a simple domain and products of simple domains.
    • The simple domains are:
      • convex polyhedra, which consist of C_Polyhedron and NNC_Polyhedron;
      • weakly relational, which consist of BD_Shape_N and Octagonal_Shape_N where N is one of the numeric types short, signed_char, int, long, long_long, mpz_class, mpq_class;
      • 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
      • the Grid domain.
    • The powerset domains are Pointset_Powerset_S where S is a simple domain.
    • The product domains consist of Direct_Product_S_T, Smash_Product_S_T and Constraints_Product_S_T where S and T are simple domains.
  • In the following, any of the above numerical abstract domains is called a PPL domain and any element of a PPL domain is called a PPL object.
  • The OCaml interface files are all installed in the directory prefix/lib/ppl. 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 man ld.so and man ldconfig for more information.
  • A PPL object such as a polyhedron can only be accessed by means of a OCaml term called a handle. 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.
  • An OCaml program can obtain a valid handle for a PPL object by using functions such as
      ppl_new_C_Polyhedron_from_space_dimension,
      ppl_new_C_Polyhedron_from_C_Polyhedron,
      ppl_new_C_Polyhedron_from_constraints,
      ppl_new_C_Polyhedron_from_generators.
    
    These functions will return a new handle for referencing a PPL polyhedron.
  • For a PPL object with space dimension k, the identifiers used for the PPL variables must lie between 0 and $k-1$ and correspond to the indices of the associated Cartesian axes. For example, when using the functions 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 Representations of Convex Polyhedra of the main PPL user manual.
  • 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 Representations of Convex Polyhedra of the main PPL user manual.
  • Any application using the PPL should make sure that only the intended version(s) of the library are ever used. Functions
      ppl_version_major,
      ppl_version_minor,
      ppl_version_revision,
      ppl_version_beta,
      ppl_version,
      ppl_banner.
    
    allow run-time checking of information about the version being used.

Function Descriptions

Below is a short description of many of the interface functions. For full definitions of terminology used here, see the main PPL user manual.

Domain Independent Functions

First we describe some domain independent functions included with all instantiations of the OCaml interfaces.

ppl_version_major

Returns the major number of the PPL version.

ppl_version_minor

Returns the minor number of the PPL version.

ppl_version_revision

Returns the revision number of the PPL version.

ppl_version_beta

Returns the beta number of the PPL version.

ppl_version

Returns the PPL version.

ppl_banner

Returns 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.

ppl_max_space_dimension

Returns the maximum space dimension the C++ interface can handle.

ppl_Coefficient_bits

Returns the number of bits used in the C++ interface for PPL coefficients; 0 if unbounded.

ppl_Coefficient_is_bounded

Returns true if and only if the coefficients in the C++ interface are bounded.

ppl_Coefficient_max

If the coefficients are bounded, returns the maximum coefficient the C++ interface can handle.

ppl_Coefficient_min

If the coefficients are bounded, returns the minimum coefficient the C++ interface can handle.

ppl_io_wrap_string source_string indent_depth preferred_first_line_length preferred_line_length

Utility function for the wrapping of lines of text. The function wraps the lines of text stored in its first string argument according to the next three integer arguments, which are interpreted as the indentation depth, the preferred length for the first line and the preferred length for all the other lines, respecively; it returns a string containing the wrapped text.

ppl_set_timeout csecs

Computations taking exponential time will be interrupted some time after csecs centiseconds after that call. If the computation is interrupted that way, a timeout exception will be thrown. An exception is immediately thrown if csecs is not strictly greater than zero, or if the PPL Watchdog library is not enabled.

ppl_reset_timeout

Resets the timeout time so that the computation is not interrupted. An exception is thrown if the PPL Watchdog library is not enabled.

ppl_set_deterministic_timeout weight

Computations taking exponential time will be interrupted some time after reaching the weight complexity threshold. If the computation is interrupted that way, a timeout exception will be thrown. An exception is immediately thrown if weight is not strictly greater than zero, or if the PPL Watchdog library is not enabled. NOTE: This "timeout" checking functionality is said to be deterministic 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.

ppl_reset_deterministic_timeout

Resets the timeout time so that the computation is not interrupted. An exception is thrown if the PPL Watchdog library is not enabled.

ppl_set_rounding_for_PPL

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.

ppl_restore_pre_PPL_rounding

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.

ppl_irrational_precision

Returns the precision parameter for irrational calculations.

ppl_set_irrational_precision

Sets the precision parameter p for irrational calculations. 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 2**p.


MIP Functions

Here we describe some functions available for PPL objects defining mixed integer (linear) programming problems.

ppl_new_MIP_Problem_from_space_dimension dimension

Return a handle to an MIP Problem $\mathrm{MIP}$ with the feasible region the vector space of dimension dimension, objective function $0$ and optimization mode max.

ppl_new_MIP_Problem dimension constraint_system lin_expr optimization_mode

Return a handle to an MIP Problem $\mathrm{MIP}$ having space dimension dimension, a feasible region represented by constraint_system, objective function lin_expr and optimization mode optimization_mode.

ppl_MIP_Problem_get_control_parameter handle param_name

Returns the value of the control parameter named param_name.

ppl_MIP_Problem_set_control_parameter handle param_value

Sets control parameter value param_value.

ppl_MIP_Problem_swap handle_1 handle_2

Swaps the MIP Problem referenced by handle_1 with the one referenced by handle_2.

ppl_MIP_Problem_space_dimension handle

Returns the dimension of the vector space in which the MIP Problem referenced by handle is embedded.

ppl_MIP_Problem_integer_space_dimensions handle

Returns a list of variables representing representing the integer space dimensions of the MIP Problem referenced by handle.

ppl_MIP_Problem_constraints handle

Returns a list of the constraints in the constraints system representing the feasible region for the MIP Problem referenced by handle.

ppl_MIP_Problem_objective_function handle

Returns the objective function for the MIP Problem referenced by handle.

ppl_MIP_Problem_optimization_mode handle

Returns the optimization mode for the MIP Problem referenced by handle.

ppl_MIP_Problem_clear handle

Resets the MIP problem referenced by handle to be the trivial problem with the feasible region the $0$-dimensional universe, objective function $0$ and optimization mode Maximization.

ppl_MIP_Problem_add_space_dimensions_and_embed handle dimension

Embeds the MIP problem referenced by handle in a space that is enlarged by dimension dimensions,

ppl_MIP_Problem_add_to_integer_space_dimensions handle vars_list

Updates the MIP Problem referenced by handle so that the variables in vars_list are added to the set of integer space dimensions.

ppl_MIP_Problem_add_constraint handle constraint

Updates the MIP Problem referenced by handle so that the feasible region is represented by the original constraint system together with the constraint constraint.

ppl_MIP_Problem_add_constraints handle constraint_system

Updates the MIP Problem referenced by handle so that the feasible region is represented by the original constraint system together with all the constraints in constraint_system.

ppl_MIP_Problem_set_objective_function handle lin_expr

Updates the MIP Problem referenced by handle so that the objective function is changed to lin_expr.

ppl_MIP_Problem_set_optimization_mode handle optimization_mode

Updates the MIP Problem referenced by handle so that the optimization mode is changed to optimization_mode.

ppl_MIP_Problem_is_satisfiable handle

Returns true if the MIP Problem referenced by handle is satisfiable and false otherwise.

ppl_MIP_Problem_solve handle

Solves the MIP problem referenced by handle and returns 0, if the MIP problem is not satisfiable; 1, if the MIP problem is satisfiable but there is no finite bound to the value of the objective function; 2, if the MIP problem admits an optimal solution.

ppl_MIP_Problem_feasible_point handle

Returns a feasible point for the MIP problem referenced by handle.

ppl_MIP_Problem_optimizing_point handle

Returns an optimizing point for the MIP problem referenced by handle.

ppl_MIP_Problem_optimal_value handle

Returns a pair of numbers, the first being the numerator and the second the denominator, for the optimal value for the MIP problem referenced by handle.

ppl_MIP_Problem_evaluate_objective_function handle generator

Evaluates the objective function of the MIP problem referenced by handle at point generator. Returns a pair of numbers, the first being the numerator and the second the denominator, for the objective function value for the MIP problem referenced by handle.

ppl_MIP_Problem_OK handle

Returns true if the MIP Problem referenced by handle is well formed, i.e., if it satisfies all its implementation invariants and false, otherwise. Useful for debugging purposes.

ppl_MIP_Problem_ascii_dump handle

Returns a string containing an ASCII dump of the internal representation of the MIP_Problem referenced by handle. Useful for debugging purposes.


PIP Functions

Here we describe some functions available for PPL objects defining parametric integer programming problems.

ppl_new_PIP_Problem_from_space_dimension dimension

Return a handle to a PIP Problem $\mathrm{PIP}$ with the feasible region the vector space of dimension dimension, empty constraint_system and empty set of parametric variables.

ppl_new_PIP_Problem dimension constraint_system vars_list

Return a handle to a PIP Problem $\mathrm{PIP}$ having space dimension dimension, a feasible region represented by constraint_system and parametric variables represented by vars_list.

ppl_PIP_Problem_get_control_parameter handle param_name

Returns the value of the control parameter named param_name.

ppl_PIP_Problem_set_control_parameter handle param_value

Sets control parameter value param_value.

ppl_PIP_Problem_swap handle_1 handle_2

Swaps the PIP Problem referenced by handle_1 with the one referenced by handle_2.

ppl_PIP_Problem_space_dimension handle

Returns the dimension of the vector space in which the PIP Problem referenced by handle is embedded.

ppl_PIP_Problem_parameter_space_dimensions handle

Returns a list of variables representing representing the parameter space dimensions of the PIP Problem referenced by handle.

ppl_PIP_Problem_constraints handle

Returns a list of the constraints in the constraints system representing the feasible region for the PIP Problem referenced by handle.

ppl_PIP_Problem_clear handle

Resets the PIP problem referenced by handle to be the trivial problem with space dimension $0$.

ppl_PIP_Problem_add_space_dimensions_and_embed handle dimension_0 dimension_1

Embeds the PIP problem referenced by handle in a space that is enlarged by dimension_0 non-parameter dimensions and dimension_1 parameter dimensions,

ppl_PIP_Problem_add_to_parameter_space_dimensions handle vars_list

Sets the space dimensions whose indexes are in vars_list to be parameter space dimensions.

ppl_PIP_Problem_add_constraint handle constraint

Updates the PIP Problem referenced by handle so that the feasible region is represented by the original constraint system together with the constraint constraint.

ppl_PIP_Problem_add_constraints handle constraint_system

Updates the PIP Problem referenced by handle so that the feasible region is represented by the original constraint system together with all the constraints in constraint_system.

ppl_PIP_Problem_set_big_parameter_dimension handle dimension

Sets the dimension for the big parameter to dimension.

ppl_PIP_Problem_get_big_parameter_dimension handle

Returns the dimension for the big parameter. Exception is thrown if no big parameter dimension has been set.

ppl_PIP_Problem_has_big_parameter_dimension handle

Returns true if and only if the dimension for the big parameter has been set.

ppl_PIP_Problem_is_satisfiable handle

Returns true if the PIP Problem referenced by handle is satisfiable and false otherwise.

ppl_PIP_Problem_solve handle

Solves the PIP problem referenced by handle and returns a status flag indicating the outcome of the optimization attempt: Optimized_Pip_Problem if the optimization attempt succeeds; Unfeasible_Pip_Problem otherwise.

ppl_PIP_Problem_solution handle

Solves the PIP problem referenced by handle and returns a handle to a PIP_Tree representing a feasible solution, if it exists and bottom otherwise.

ppl_PIP_Problem_optimizing_solution handle

Solves the PIP problem referenced by handle and returns a handle to a PIP_Tree representing an optimizing_solution, if it exists and bottom otherwise.

ppl_PIP_Problem_OK handle

Returns true if the PIP Problem referenced by handle is well formed, i.e., if it satisfies all its implementation invariants and false, otherwise. Useful for debugging purposes.

ppl_PIP_Problem_ascii_dump handle

Returns a string containing an ASCII dump of the internal representation of the PIP_Problem referenced by handle. Useful for debugging purposes.

ppl_PIP_Tree_Node_swap handle_1 handle_2

Swaps the PIP tree node referenced by handle_1 with the one referenced by handle_2.

ppl_PIP_Tree_Node_OK handle

Returns true if the PIP tree node referenced by handle is well formed, i.e., if it satisfies all its implementation invariants and false, otherwise. Useful for debugging purposes.

ppl_PIP_Tree_Node_ascii_dump handle

Returns a string containing an ASCII dump of the internal representation of the Pip tree node referenced by handle. Useful for debugging purposes.

ppl_PIP_Tree_Node_constraints handle

Returns a list of the parameter constraints in the PIP tree node referenced by handle.

ppl_PIP_Tree_Node_artificials handle

Returns a list of the artificial parameters in the PIP tree node referenced by handle.

ppl_PIP_Tree_Node_is_bottom handle

Returns true if and only if handle represents bottom.

ppl_PIP_Tree_Node_is_decision handle

Returns true if and only if handle represents a decision node.

ppl_PIP_Tree_Node_is_solution handle

Returns true if and only if handle represents a solution node.

ppl_PIP_Tree_Node_parametric_values handle var

Returns a linear expression representing the values of problem variable var in the solution node represented by handle. The returned linear expression may involve problem parameters as well as artificial parameters.

ppl_PIP_Tree_Node_true_child handle var

Returns a handle to the child on the true branch of the PIP tree node represented by handle.

ppl_PIP_Tree_Node_false_child handle var

Returns a handle to the child on the false branch of the PIP tree node represented by handle.


C_Polyhedron Functions

Here we describe the main functions available for PPL objects defining convex and closed polyhedra.

ppl_new_C_Polyhedron_from_space_dimension space_dimension universe_or_empty

Returns a handle to a C polyhedron $\cP$ with space_dimension dimensions; it is empty or the universe polyhedron depending on whether universe_or_empty is empty or universe, respectively.

ppl_new_C_Polyhedron_from_C_Polyhedron handle

If handle refers to a C polyhedron $\cP_1$, then the expression will returns a handle to a copy $\cP_2$ of $\cP_1$.

ppl_new_C_Polyhedron_from_NNC_Polyhedron handle

If handle refers to an NNC polyhedron $\cP_1$, then the expression returns a handle to a copy $\cP_2$ of $\cP_1$.

When using ppl_new_C_Polyhedron_from_NNC_Polyhedron/2, care must be taken that the source polyhedron referenced by handle is topologically closed.

ppl_new_C_Polyhedron_from_constraints constraint_system

Returns a handle to a C polyhedron $\cP$ represented by constraint_system.

ppl_new_C_Polyhedron_from_generators generator_system

Returns a handle to a C polyhedron $\cP$ represented by generator_system.

ppl_Polyhedron_swap handle_1 handle_2

Swaps the polyhedron $\cP$ referenced by handle_1 with the polyhedron $\cQ$ referenced by handle_2. The polyhedra $\cP$ and $\cQ$ must have the same topology.

ppl_Polyhedron_space_dimension handle

Returns the dimension of the vector space in which the polyhedron referenced by handle is embedded.

ppl_Polyhedron_affine_dimension handle

Returns the actual dimension of the polyhedron referenced by handle.

ppl_Polyhedron_get_constraints handle

Return a list of the constraints in the constraints system representing the polyhedron referenced by handle.

ppl_Polyhedron_get_minimized_constraints handle

Returns a minimized list of the constraints in the constraints system representing the polyhedron referenced by handle.

ppl_Polyhedron_get_generators handle

Returns a list of the generators in the generators system representing the polyhedron referenced by handle.

ppl_Polyhedron_get_minimized_generators handle

Returns a minimized list of the generators in the generators system representing the polyhedron referenced by handle.

ppl_Polyhedron_relation_with_constraint handle constraint

Returns the list of relations the polyhedron referenced by handle has with constraint. The possible relations and their meaning is given in Section Relation-With Operators of the main PPL user manual.

ppl_Polyhedron_relation_with_generator handle generator

Returns the list of relations the polyhedron referenced by handle has with generator. The possible relations and their meaning is given in Section Relation-With Operators of the main PPL user manual.

ppl_Polyhedron_is_empty handle

Returns true if the polyhedron referenced by handle is empty and false, otherwise.

ppl_Polyhedron_is_universe handle

Returns true if the polyhedron referenced by handle is the universe and false, otherwise.

ppl_Polyhedron_is_bounded handle

Returns true if the polyhedron referenced by handle is bounded and false, otherwise.

ppl_Polyhedron_contains_integer_point handle

Returns true if the polyhedron referenced by handle contains at least one integer point and false, otherwise.

ppl_Polyhedron_bounds_from_above handle lin_expr

Returns true if the polyhedron referenced by handle is bounded from above by lin_expr and false, otherwise.

ppl_Polyhedron_bounds_from_below handle lin_expr

Returns true if the polyhedron referenced by handle is bounded from below by lin_expr and false, otherwise.

ppl_Polyhedron_maximize handle lin_expr

Returns a record bool_1 * coefficient_1 * coefficient_2 * bool_2 where: bool_1 is true if the polyhedron $P$ referenced by handle is not empty and lin_expr is bounded from above in $P$ and false, otherwise. coefficient_1 is the numerator of the supremum value and coefficient_2 the denominator of the supremum value. If the supremum is also the maximum, bool_2 is true and false, otherwise.

ppl_Polyhedron_maximize_with_point handle lin_expr

Returns a record bool_1 * coefficient_1 * coefficient_2 * bool_2 * Point bool_1 is true if the polyhedron $P$ referenced by handle is not empty and lin_expr is bounded from above in $P$ and false, otherwise. coefficient_1 is the numerator of the supremum value and coefficient_2 the denominator of the supremum value. If the supremum is also the maximum, bool_2 is true and false, otherwise. Point is the point or closure point where lin_expr reaches the supremum.

ppl_Polyhedron_minimize handle lin_expr

Returns a record bool_1 * coefficient_1 * coefficient_2 * bool_2 bool_1 is true if the polyhedron $P$ referenced by handle is not empty and lin_expr is bounded from below in $P$ and false, otherwise. coefficient_1 is the numerator of the infinum value and coefficient_2 the denominator of the infinum value. If the infinum is also the minimum, bool_2 is true and false, otherwise.

ppl_Polyhedron_minimize_with_point handle lin_expr

Returns a record bool_1 * coefficient_1 * coefficient_2 * bool_2 bool_1 is true if the polyhedron $P$ referenced by handle is not empty and lin_expr is bounded from below in $P$ and false, otherwise. coefficient_1 is the numerator of the infinum value and coefficient_2 the denominator of the infinum value. If the infinum is also the minimum, bool_2 is true and false, otherwise. Point is the point or closure point where lin_expr reaches the infinum.

ppl_Polyhedron_is_topologically_closed handle

Returns true if the polyhedron referenced by handle is topologically closed and false, otherwise.

ppl_Polyhedron_contains_Polyhedron handle_1 handle_2

Returns true if the polyhedron referenced by handle_2 is included in or equal to the polyhedron referenced by handle_1 and false, otherwise.

ppl_Polyhedron_strictly_contains_Polyhedron handle_1 handle_2

Returns true if the polyhedron referenced by handle_2 is included in but not equal to the polyhedron referenced by handle_1 and false, otherwise.

ppl_Polyhedron_is_disjoint_from_Polyhedron handle_1 handle_2

Returns true if the polyhedron referenced by handle_1 is disjoint from the polyhedron referenced by handle_2 and false, otherwise.

ppl_Polyhedron_equals_Polyhedron handle_1 handle_2

Returns true if the polyhedron referenced by handle_1 is equal to the polyhedron referenced by handle_2 and false, otherwise.

ppl_Polyhedron_OK handle

Returns true if the polyhedron referenced by handle is well formed, i.e., if it satisfies all its implementation invariants and false, otherwise. Useful for debugging purposes.

ppl_Polyhedron_add_constraint handle constraint

Updates the polyhedron referenced by handle to one obtained by adding constraint to its constraint system.

ppl_Polyhedron_add_generator handle generator

Updates the polyhedron referenced by handle to one obtained by adding generator to its generator system.

ppl_Polyhedron_add_constraints handle constraint_system

Updates the polyhedron referenced by handle to one obtained by adding to its constraint system the constraints in constraint_system.

ppl_C_Polyhedron_add_generators handle generator_system

Updates the polyhedron referenced by handle to one obtained by adding to its generator system the generators in generator_system.

ppl_Polyhedron_intersection_assign handle_1 handle_2

Assigns to the polyhedron referenced by handle_1 its intersection with the polyhedron referenced by handle_2.

ppl_Polyhedron_poly_hull_assign handle_1 handle_2

Assigns to the polyhedron referenced by handle_1 its poly-hull with the polyhedron referenced by handle_2.

ppl_Polyhedron_poly_difference_assign handle_1 handle_2

Assigns to the polyhedron referenced by handle_1 its poly-difference with the polyhedron referenced by handle_2.

ppl_Polyhedron_affine_image handle var lin_expr coefficient

Transforms the polyhedron referenced by handle assigning the affine expression lin_expr/coefficient to var.

ppl_Polyhedron_affine_preimage handle var lin_expr coefficient

This is the inverse transformation to that for ppl_affine_image.

ppl_Polyhedron_bounded_affine_image handle var lin_expr_1 lin_expr_2 coefficient

Transforms the polyhedron referenced by handle assigning the image with respect to the transfer relation lin_expr_1/coefficient <= var <= lin_expr_2/coefficient.

ppl_Polyhedron_generalized_affine_image handle var Relation_Symbol lin_expr coefficient

Transforms the polyhedron referenced by handle assigning the generalized affine image with respect to the transfer function var Relation_Symbol lin_expr/coefficient.

ppl_Polyhedron_generalized_affine_image_lhs_rhs handle lin_expr_1 Relation_Symbol lin_expr_2

Transforms the polyhedron referenced by handle assigning the generalized affine image with respect to the transfer function lin_expr_1 Relation_Symbol lin_expr_2.

ppl_Polyhedron_time_elapse_assign handle_1 handle_2

Assigns to the polyhedron $\cP$ referenced by handle_1 the time-elapse $ (\cP \nearrow \cQ)$ with the polyhedron $\cQ$ referenced by handle_2.

ppl_Polyhedron_BHRZ03_widening_assign handle_1 handle_2

If the polyhedron $\cP_1$ referenced by handle_1 contains the polyhedron $\cP_2$ referenced by handle_2, then handle_1 will refer to the BHRZ03-widening of $\cP_1$ with $\cP_2$.

ppl_Polyhedron_BHRZ03_widening_assign_with_tokens handle_1 handle_2 c_unsigned_1

It is assumed that the polyhedron $\cP_1$ referenced by handle_1 contains the polyhedron $\cP_2$ referenced by handle_2; let $\cP$ denote the BHRZ03-widening of $\cP_1$ with $\cP_2$, Assuming that the quantity $t_1$ given by c_unsigned_1 is the number of tokens available, Then this function will return the number of tokens remaining at the end of the operation.

ppl_Polyhedron_limited_BHRZ03_extrapolation_assign handle_1 handle_2 constraint_system

If the polyhedron $\cP_1$ referenced by handle_1 contains the polyhedron $\cP_2$ referenced by handle_2, then handle_1 will refer to the BHRZ03-extrapolation of $\cP_1$ with $\cP_2$ improved by enforcing the constraints in constraint_system.

ppl_Polyhedron_limited_BHRZ03_extrapolation_assign_with_tokens handle_1 handle_2 constraint_system c_unsigned_1

It is assumed that the polyhedron $\cP_1$ referenced by handle_1 contains the polyhedron $\cP_2$ referenced by handle_2; let $\cP$ denote the BHRZ03-extrapolation of $\cP_1$ with $\cP_2$, improved by enforcing those constraints in constraint_system.
Assuming that the quantity $t_1$ given by c_unsigned_1 is the number of tokens available, then this function will return the number of tokens $t_2$ remaining at the end of the operation.

ppl_Polyhedron_bounded_BHRZ03_extrapolation_assign handle_1 handle_2 constraint_system

If the polyhedron $\cP_1$ referenced by handle_1 contains the polyhedron $\cP_2$ referenced by handle_2, then handle_1 will refer to the BHRZ03-extrapolation of $\cP_1$ with $\cP_2$ improved by enforcing the constraints in constraint_system together with all constraints of the form $\pm x \leq r$ and $\pm x < r$ that are satisfied by every point in $\cP_1$.

ppl_Polyhedron_bounded_BHRZ03_extrapolation_assign_with_tokens handle_1 handle_2 constraint_system c_unsigned_1

It is assumed that the polyhedron $\cP_1$ referenced by handle_1 contains the polyhedron $\cP_2$ referenced by handle_2; let $\cP$ denote the BHRZ03-extrapolation of $\cP_1$ with $\cP_2$ improved by enforcing those constraints in constraint_system together with all constraints of the form $\pm x \leq r$ and $\pm x < r$ that are satisfied by every point in $\cP_1$.
Assuming that the quantity $t_1$ given by c_unsigned_1 is the number of tokens available, this function will return the number of tokens $t_2$ remaining at the end of the operation.

ppl_Polyhedron_H79_widening_assign handle_1 handle_2

If the polyhedron $\cP_1$ referenced by handle_1 contains the polyhedron $\cP_2$ referenced by handle_2, then handle_1 will refer to the H79-widening of $\cP_1$ with $\cP_2$.

ppl_Polyhedron_H79_widening_assign_with_tokens handle_1 handle_2 c_unsigned_1

It is assumed that the polyhedron $\cP_1$ referenced by handle_1 contains the polyhedron $\cP_2$ referenced by handle_2; let $\cP$ denote the H79-widening of $\cP_1$ with $\cP_2$, Assuming that the quantity $t_1$ given by c_unsigned_1 is the number of tokens available, Then this function will return the number of tokens remaining at the end of the operation.

ppl_Polyhedron_limited_H79_extrapolation_assign handle_1 handle_2 constraint_system

If the polyhedron $\cP_1$ referenced by handle_1 contains the polyhedron $\cP_2$ referenced by handle_2, then handle_1 will refer to the H79-extrapolation of $\cP_1$ with $\cP_2$ improved by enforcing the constraints in constraint_system.

ppl_Polyhedron_limited_H79_extrapolation_assign_with_tokens handle_1 handle_2 constraint_system c_unsigned_1

It is assumed that the polyhedron $\cP_1$ referenced by handle_1 contains the polyhedron $\cP_2$ referenced by handle_2; let $\cP$ denote the H79-extrapolation of $\cP_1$ with $\cP_2$, improved by enforcing those constraints in constraint_system.
Assuming that the quantity $t_1$ given by c_unsigned_1 is the number of tokens available, then this function will return the number of tokens $t_2$ remaining at the end of the operation.

ppl_Polyhedron_bounded_H79_extrapolation_assign handle_1 handle_2 constraint_system

If the polyhedron $\cP_1$ referenced by handle_1 contains the polyhedron $\cP_2$ referenced by handle_2, then handle_1 will refer to the H79-extrapolation of $\cP_1$ with $\cP_2$ improved by enforcing the constraints in constraint_system together with all constraints of the form $\pm x \leq r$ and $\pm x < r$ that are satisfied by every point in $\cP_1$.

ppl_Polyhedron_bounded_H79_extrapolation_assign_with_tokens handle_1 handle_2 constraint_system c_unsigned_1

It is assumed that the polyhedron $\cP_1$ referenced by handle_1 contains the polyhedron $\cP_2$ referenced by handle_2; let $\cP$ denote the H79-extrapolation of $\cP_1$ with $\cP_2$, improved by enforcing those constraints in constraint_system together with all constraints of the form $\pm x \leq r$ and $\pm x < r$ that are satisfied by every point in $\cP_1$.
Assuming that the quantity $t_1$ given by c_unsigned_1 is the number of tokens available, this function will return the number of tokens $t_2$ remaining at the end of the operation.

ppl_Polyhedron_topological_closure_assign handle

Assigns to the polyhedron referenced by handle its topological closure.

ppl_Polyhedron_add_space_dimensions_and_embed handle space_dimension

Embeds the polyhedron referenced by handle in a space that is enlarged by space_dimension dimensions,

ppl_Polyhedron_concatenate_assign handle_1 handle_2

Updates the polyhedron $\cP_1$ referenced by handle_1 by first embedding $\cP_1$ in a new space enlarged by the space dimensions of the polyhedron $\cP_2$ referenced by handle_2, and then adds to its system of constraints a renamed-apart version of the constraints of $\cP_2$.

ppl_Polyhedron_add_space_dimensions_and_project handle space_dimension

Projects the polyhedron referenced by handle onto a space that is enlarged by space_dimension dimensions,

ppl_Polyhedron_remove_space_dimensions handle Int_List

Removes the space dimensions given by the identifiers of the PPL variables in list Int_List from the polyhedron referenced by handle. The identifiers for the remaining PPL variables are renumbered so that they are consecutive and the maximum index is less than the number of dimensions.

ppl_Polyhedron_remove_higher_space_dimensions handle space_dimension

Projects the polyhedron referenced to by handle onto the first space_dimension dimensions.

ppl_Polyhedron_expand_space_dimension handle var space_dimension

space_dimension copies of the space dimension referenced by variable var are added to the polyhedron referenced to by handle.

ppl_Polyhedron_fold_space_dimensions handle list_of_vars var

The space dimensions referenced by the PPL variables in list list_of_vars are folded into the dimension referenced by var and removed. The result is undefined if list_of_vars does not have the properties described in Section Folding Multiple Dimensions of the Vector Space into One Dimension of the main PPL user manual.

ppl_Polyhedron_map_space_dimensions handle p_func

Maps the space dimensions of the polyhedron referenced by handle using the partial function defined by a list of pairs of integers p_func. The result is undefined if p_func does not encode a partial function with the properties described in Section Mapping the Dimensions of the Vector Space of the main PPL user manual.

ppl_Polyhedron_wrap_assign handle list_of_vars width representation overflow constraint_system complexity_threshold wrap_indicator

Transforms the polyhedron referenced by handle by wrapping the dimensions given by list_of_vars while respecting the specified width, representation and overflow behavior of all these variables. The parameter constraint_system represents the conditional or looping construct guard with respect to which wrapping is performed. The non-negative integer complexity_threshold and Boolean wrap_indicator allow control of the complexity/precision ratio; higher values for complexity_threshold will lead to possibly greater precision while a true value for wrap_indicator indicates that the space dimensions should be wrapped individually. See Section Wrapping Operator" for a more detailed description of this operator.

ppl_Polyhedron_ascii_dump handle

Returns a string containing an ASCII dump of the internal representation of the polyhedron referenced by handle. Useful for debugging purposes.

OCamldoc Documentation

For a list of the PPL functions available to the generated domains for the OCaml interface, see the OCamldoc-generated documentation.

NOTE: the complete documentation for module Ppl_ocaml, including all the types and functions that were enabled at configuration time, is only available in the configuration dependent OCamldoc documentation. The configuration independent OCamldoc documentation only contains those types and functions that are always enabled, which are grouped into module Ppl_ocaml_globals. Also note that module Ppl_ocaml automatically includes module Ppl_ocaml_globals.

Compilation and Installation

When the Parma Polyhedra Library is configured, it tests for the existence of the OCaml system. If OCaml is correctly installed in a standard location, things are arranged so that the OCaml interface is built and installed.