Types and functions for the domains of C and NNC convex polyhedra. More...
Related Functions | |
(Note that these are not member functions.) | |
Constructors and Assignment for C_Polyhedron | |
int | ppl_new_C_Polyhedron_from_space_dimension (ppl_Polyhedron_t *pph, ppl_dimension_type d, int empty) |
Builds a C polyhedron of dimension d and writes an handle to it at address pph . If empty is different from zero, the newly created polyhedron will be empty; otherwise, it will be a universe polyhedron. | |
int | ppl_new_C_Polyhedron_from_C_Polyhedron (ppl_Polyhedron_t *pph, ppl_const_Polyhedron_t ph) |
Builds a C polyhedron that is a copy of ph ; writes a handle for the newly created polyhedron at address pph . | |
int | ppl_new_C_Polyhedron_from_C_Polyhedron_with_complexity (ppl_Polyhedron_t *pph, ppl_const_Polyhedron_t ph, int complexity) |
Builds a C polyhedron that is a copy of ph ; writes a handle for the newly created polyhedron at address pph . | |
int | ppl_new_C_Polyhedron_from_Constraint_System (ppl_Polyhedron_t *pph, ppl_const_Constraint_System_t cs) |
Builds a new C polyhedron from the system of constraints cs and writes a handle for the newly created polyhedron at address pph . | |
int | ppl_new_C_Polyhedron_recycle_Constraint_System (ppl_Polyhedron_t *pph, ppl_Constraint_System_t cs) |
Builds a new C polyhedron recycling the system of constraints cs and writes a handle for the newly created polyhedron at address pph . | |
int | ppl_new_C_Polyhedron_from_Congruence_System (ppl_Polyhedron_t *pph, ppl_const_Congruence_System_t cs) |
Builds a new C polyhedron from the system of congruences cs and writes a handle for the newly created polyhedron at address pph . | |
int | ppl_new_C_Polyhedron_recycle_Congruence_System (ppl_Polyhedron_t *pph, ppl_Congruence_System_t cs) |
Builds a new C polyhedron recycling the system of congruences cs and writes a handle for the newly created polyhedron at address pph . | |
int | ppl_assign_C_Polyhedron_from_C_Polyhedron (ppl_Polyhedron_t dst, ppl_const_Polyhedron_t src) |
Assigns a copy of the C polyhedron src to the C polyhedron dst . | |
Constructors and Assignment for NNC_Polyhedron | |
int | ppl_new_NNC_Polyhedron_from_space_dimension (ppl_Polyhedron_t *pph, ppl_dimension_type d, int empty) |
Builds an NNC polyhedron of dimension d and writes an handle to it at address pph . If empty is different from zero, the newly created polyhedron will be empty; otherwise, it will be a universe polyhedron. | |
int | ppl_new_NNC_Polyhedron_from_NNC_Polyhedron (ppl_Polyhedron_t *pph, ppl_const_Polyhedron_t ph) |
Builds an NNC polyhedron that is a copy of ph ; writes a handle for the newly created polyhedron at address pph . | |
int | ppl_new_NNC_Polyhedron_from_NNC_Polyhedron_with_complexity (ppl_Polyhedron_t *pph, ppl_const_Polyhedron_t ph, int complexity) |
Builds an NNC polyhedron that is a copy of ph ; writes a handle for the newly created polyhedron at address pph . | |
int | ppl_new_NNC_Polyhedron_from_Constraint_System (ppl_Polyhedron_t *pph, ppl_const_Constraint_System_t cs) |
Builds a new NNC polyhedron from the system of constraints cs and writes a handle for the newly created polyhedron at address pph . | |
int | ppl_new_NNC_Polyhedron_recycle_Constraint_System (ppl_Polyhedron_t *pph, ppl_Constraint_System_t cs) |
Builds a new NNC polyhedron recycling the system of constraints cs and writes a handle for the newly created polyhedron at address pph . | |
int | ppl_new_NNC_Polyhedron_from_Congruence_System (ppl_Polyhedron_t *pph, ppl_const_Congruence_System_t cs) |
Builds a new NNC polyhedron from the system of congruences cs and writes a handle for the newly created polyhedron at address pph . | |
int | ppl_new_NNC_Polyhedron_recycle_Congruence_System (ppl_Polyhedron_t *pph, ppl_Congruence_System_t cs) |
Builds a new NNC polyhedron recycling the system of congruences cs and writes a handle for the newly created polyhedron at address pph . | |
int | ppl_assign_NNC_Polyhedron_from_NNC_Polyhedron (ppl_Polyhedron_t dst, ppl_const_Polyhedron_t src) |
Assigns a copy of the NNC polyhedron src to the NNC polyhedron dst . | |
Constructors Behaving as Conversion Operators | |
Besides the conversions listed here below, the library also provides conversion operators that build a semantic geometric description starting from any other semantic geometric description (e.g., ppl_new_Grid_from_C_Polyhedron, ppl_new_C_Polyhedron_from_BD_Shape_mpq_class, etc.). Clearly, the conversion operators are only available if both the source and the target semantic geometric descriptions have been enabled when configuring the library. The conversions also taking as argument a complexity class sometimes provide non-trivial precision/efficiency trade-offs. | |
int | ppl_new_C_Polyhedron_from_NNC_Polyhedron (ppl_Polyhedron_t *pph, ppl_const_Polyhedron_t ph) |
Builds a C polyhedron that is a copy of the topological closure of the NNC polyhedron ph ; writes a handle for the newly created polyhedron at address pph . | |
int | ppl_new_C_Polyhedron_from_NNC_Polyhedron_with_complexity (ppl_Polyhedron_t *pph, ppl_const_Polyhedron_t ph, int complexity) |
Builds a C polyhedron that approximates NNC_Polyhedron ph , using an algorithm whose complexity does not exceed complexity ; writes a handle for the newly created polyhedron at address pph . | |
int | ppl_new_NNC_Polyhedron_from_C_Polyhedron (ppl_Polyhedron_t *pph, ppl_const_Polyhedron_t ph) |
Builds an NNC polyhedron that is a copy of the C polyhedron ph ; writes a handle for the newly created polyhedron at address pph . | |
int | ppl_new_NNC_Polyhedron_from_C_Polyhedron_with_complexity (ppl_Polyhedron_t *pph, ppl_const_Polyhedron_t ph, int complexity) |
Builds an NNC polyhedron that approximates C_Polyhedron ph , using an algorithm whose complexity does not exceed complexity ; writes a handle for the newly created polyhedron at address pph . | |
Destructor for (C or NNC) Polyhedra | |
int | ppl_delete_Polyhedron (ppl_const_Polyhedron_t ph) |
Invalidates the handle ph: this makes sure the corresponding resources will eventually be released. | |
Functions that Do Not Modify the Polyhedron | |
int | ppl_Polyhedron_space_dimension (ppl_const_Polyhedron_t ph, ppl_dimension_type *m) |
Writes to m the dimension of the vector space enclosing ph . | |
int | ppl_Polyhedron_affine_dimension (ppl_const_Polyhedron_t ph, ppl_dimension_type *m) |
Writes to m the affine dimension of ph (not to be confused with the dimension of its enclosing vector space) or 0, if ph is empty. | |
int | ppl_Polyhedron_relation_with_Constraint (ppl_const_Polyhedron_t ph, ppl_const_Constraint_t c) |
Checks the relation between the polyhedron ph and the constraint c . | |
int | ppl_Polyhedron_relation_with_Generator (ppl_const_Polyhedron_t ph, ppl_const_Generator_t g) |
Checks the relation between the polyhedron ph and the generator g . | |
int | ppl_Polyhedron_get_constraints (ppl_const_Polyhedron_t ph, ppl_const_Constraint_System_t *pcs) |
Writes a const handle to the constraint system defining the polyhedron ph at address pcs . | |
int | ppl_Polyhedron_get_congruences (ppl_const_Polyhedron_t ph, ppl_const_Congruence_System_t *pcs) |
Writes at address pcs a const handle to a system of congruences approximating the polyhedron ph . | |
int | ppl_Polyhedron_get_minimized_constraints (ppl_const_Polyhedron_t ph, ppl_const_Constraint_System_t *pcs) |
Writes a const handle to the minimized constraint system defining the polyhedron ph at address pcs . | |
int | ppl_Polyhedron_get_minimized_congruences (ppl_const_Polyhedron_t ph, ppl_const_Congruence_System_t *pcs) |
Writes at address pcs a const handle to a system of minimized congruences approximating the polyhedron ph . | |
int | ppl_Polyhedron_is_empty (ppl_const_Polyhedron_t ph) |
Returns a positive integer if ph is empty; returns 0 if ph is not empty. | |
int | ppl_Polyhedron_is_universe (ppl_const_Polyhedron_t ph) |
Returns a positive integer if ph is a universe polyhedron; returns 0 if it is not. | |
int | ppl_Polyhedron_is_bounded (ppl_const_Polyhedron_t ph) |
Returns a positive integer if ph is bounded; returns 0 if ph is unbounded. | |
int | ppl_Polyhedron_contains_integer_point (ppl_const_Polyhedron_t ph) |
Returns a positive integer if ph contains at least one integer point; returns 0 otherwise. | |
int | ppl_Polyhedron_is_topologically_closed (ppl_const_Polyhedron_t ph) |
Returns a positive integer if ph is topologically closed; returns 0 if ph is not topologically closed. | |
int | ppl_Polyhedron_is_discrete (ppl_const_Polyhedron_t ph) |
Returns a positive integer if ph is a discrete set; returns 0 if ph is not a discrete set. | |
int | ppl_Polyhedron_constrains (ppl_Polyhedron_t ph, ppl_dimension_type var) |
Returns a positive integer if ph constrains var ; returns 0 if ph does not constrain var . | |
int | ppl_Polyhedron_bounds_from_above (ppl_const_Polyhedron_t ph, ppl_const_Linear_Expression_t le) |
Returns a positive integer if le is bounded from above in ph ; returns 0 otherwise. | |
int | ppl_Polyhedron_bounds_from_below (ppl_const_Polyhedron_t ph, ppl_const_Linear_Expression_t le) |
Returns a positive integer if le is bounded from below in ph ; returns 0 otherwise. | |
int | ppl_Polyhedron_maximize_with_point (ppl_const_Polyhedron_t ph, ppl_const_Linear_Expression_t le, ppl_Coefficient_t sup_n, ppl_Coefficient_t sup_d, int *pmaximum, ppl_Generator_t point) |
Returns a positive integer if ph is not empty and le is bounded from above in ph , in which case the supremum value and a point where le reaches it are computed. | |
int | ppl_Polyhedron_maximize (ppl_const_Polyhedron_t ph, ppl_const_Linear_Expression_t le, ppl_Coefficient_t sup_n, ppl_Coefficient_t sup_d, int *pmaximum) |
The same as ppl_Polyhedron_maximize_with_point, but without the output argument for the location where the supremum value is reached. | |
int | ppl_Polyhedron_minimize_with_point (ppl_const_Polyhedron_t ph, ppl_const_Linear_Expression_t le, ppl_Coefficient_t inf_n, ppl_Coefficient_t inf_d, int *pminimum, ppl_Generator_t point) |
Returns a positive integer if ph is not empty and le is bounded from below in ph , in which case the infimum value and a point where le reaches it are computed. | |
int | ppl_Polyhedron_minimize_with_point (ppl_const_Polyhedron_t ph, ppl_const_Linear_Expression_t le, ppl_Coefficient_t inf_n, ppl_Coefficient_t inf_d, int *pminimum) |
The same as ppl_Polyhedron_minimize_with_point, but without the output argument for the location where the infimum value is reached. | |
int | ppl_Polyhedron_contains_Polyhedron (ppl_const_Polyhedron_t x, ppl_const_Polyhedron_t y) |
Returns a positive integer if x contains or is equal to y ; returns 0 if it does not. | |
int | ppl_Polyhedron_strictly_contains_Polyhedron (ppl_const_Polyhedron_t x, ppl_const_Polyhedron_t y) |
Returns a positive integer if x strictly contains y ; returns 0 if it does not. | |
int | ppl_Polyhedron_is_disjoint_from_Polyhedron (ppl_const_Polyhedron_t x, ppl_const_Polyhedron_t y) |
Returns a positive integer if x and y are disjoint; returns 0 if they are not. | |
int | ppl_Polyhedron_equals_Polyhedron (ppl_const_Polyhedron_t x, ppl_const_Polyhedron_t y) |
Returns a positive integer if x and y are the same polyhedron; returns 0 if they are different. | |
int | ppl_Polyhedron_OK (ppl_const_Polyhedron_t ph) |
Returns a positive integer if ph is well formed, i.e., if it satisfies all its implementation invariants; returns 0 and perhaps makes some noise if ph is broken. Useful for debugging purposes. | |
int | ppl_Polyhedron_external_memory_in_bytes (ppl_const_Polyhedron_t ph, size_t *sz) |
Writes to sz a lower bound to the size in bytes of the memory managed by ph . | |
int | ppl_Polyhedron_total_memory_in_bytes (ppl_const_Polyhedron_t ph, size_t *sz) |
Writes to sz a lower bound to the size in bytes of the memory managed by ph . | |
Space Dimension Preserving Functions that May Modify the Polyhedron | |
int | ppl_Polyhedron_add_constraint (ppl_Polyhedron_t ph, ppl_const_Constraint_t c) |
Adds a copy of the constraint c to the system of constraints of ph . | |
int | ppl_Polyhedron_add_congruence (ppl_Polyhedron_t ph, ppl_const_Congruence_t c) |
Adds a copy of the congruence c to polyhedron of ph . | |
int | ppl_Polyhedron_add_constraints (ppl_Polyhedron_t ph, ppl_const_Constraint_System_t cs) |
Adds a copy of the system of constraints cs to the system of constraints of ph . | |
int | ppl_Polyhedron_add_congruences (ppl_Polyhedron_t ph, ppl_const_Congruence_System_t cs) |
Adds a copy of the system of congruences cs to the polyhedron ph . | |
int | ppl_Polyhedron_add_recycled_constraints (ppl_Polyhedron_t ph, ppl_Constraint_System_t cs) |
Adds the system of constraints cs to the system of constraints of ph . | |
int | ppl_Polyhedron_add_recycled_congruences (ppl_Polyhedron_t ph, ppl_Congruence_System_t cs) |
Adds the system of congruences cs to the polyhedron ph . | |
int | ppl_Polyhedron_refine_with_constraint (ppl_Polyhedron_t ph, ppl_const_Constraint_t c) |
Refines ph using constraint c . | |
int | ppl_Polyhedron_refine_with_congruence (ppl_Polyhedron_t ph, ppl_const_Congruence_t c) |
Refines ph using congruence c . | |
int | ppl_Polyhedron_refine_with_constraints (ppl_Polyhedron_t ph, ppl_const_Constraint_System_t cs) |
Refines ph using the constraints in cs . | |
int | ppl_Polyhedron_refine_with_congruences (ppl_Polyhedron_t ph, ppl_const_Congruence_System_t cs) |
Refines ph using the congruences in cs . | |
int | ppl_Polyhedron_intersection_assign (ppl_Polyhedron_t x, ppl_const_Polyhedron_t y) |
Intersects x with polyhedron y and assigns the result to x . | |
int | ppl_Polyhedron_upper_bound_assign (ppl_Polyhedron_t x, ppl_const_Polyhedron_t y) |
Assigns to x an upper bound of x and y . | |
int | ppl_Polyhedron_difference_assign (ppl_Polyhedron_t x, ppl_const_Polyhedron_t y) |
Same as ppl_Polyhedron_poly_difference_assign(x, y). | |
int | ppl_Polyhedron_simplify_using_context_assign (ppl_Polyhedron_t x, ppl_const_Polyhedron_t y) |
Assigns to x the meet-preserving simplification of x with respect to context y . Returns a positive integer if x and y have a nonempty intersection; returns 0 if they are disjoint. | |
int | ppl_Polyhedron_time_elapse_assign (ppl_Polyhedron_t x, ppl_const_Polyhedron_t y) |
Assigns to x the time-elapse between the polyhedra x and y . | |
int | ppl_Polyhedron_topological_closure_assign (ppl_Polyhedron_t ph) |
Assigns to ph its topological closure. | |
int | ppl_Polyhedron_unconstrain_space_dimension (ppl_Polyhedron_t ph, ppl_dimension_type var) |
Modifies ph by unconstraining the space dimension var . | |
int | ppl_Polyhedron_unconstrain_space_dimensions (ppl_Polyhedron_t ph, ppl_dimension_type ds[], size_t n) |
Modifies ph by unconstraining the space dimensions that are specified in the first n positions of the array ds . The presence of duplicates in ds is a waste but an innocuous one. | |
int | ppl_Polyhedron_affine_image (ppl_Polyhedron_t ph, ppl_dimension_type var, ppl_const_Linear_Expression_t le, ppl_const_Coefficient_t d) |
Transforms the polyhedron ph , assigning an affine expression to the specified variable. | |
int | ppl_Polyhedron_affine_preimage (ppl_Polyhedron_t ph, ppl_dimension_type var, ppl_const_Linear_Expression_t le, ppl_const_Coefficient_t d) |
Transforms the polyhedron ph , substituting an affine expression to the specified variable. | |
int | ppl_Polyhedron_bounded_affine_image (ppl_Polyhedron_t ph, ppl_dimension_type var, ppl_const_Linear_Expression_t lb, ppl_const_Linear_Expression_t ub, ppl_const_Coefficient_t d) |
Assigns to ph the image of ph with respect to the generalized affine transfer relation ![]() | |
int | ppl_Polyhedron_bounded_affine_preimage (ppl_Polyhedron_t ph, ppl_dimension_type var, ppl_const_Linear_Expression_t lb, ppl_const_Linear_Expression_t ub, ppl_const_Coefficient_t d) |
Assigns to ph the preimage of ph with respect to the generalized affine transfer relation ![]() | |
int | ppl_Polyhedron_generalized_affine_image (ppl_Polyhedron_t ph, ppl_dimension_type var, enum ppl_enum_Constraint_Type relsym, ppl_const_Linear_Expression_t le, ppl_const_Coefficient_t d) |
Assigns to ph the image of ph with respect to the generalized affine transfer relation ![]() ![]() relsym . | |
int | ppl_Polyhedron_generalized_affine_preimage (ppl_Polyhedron_t ph, ppl_dimension_type var, enum ppl_enum_Constraint_Type relsym, ppl_const_Linear_Expression_t le, ppl_const_Coefficient_t d) |
Assigns to ph the preimage of ph with respect to the generalized affine transfer relation ![]() ![]() relsym . | |
int | ppl_Polyhedron_generalized_affine_image_lhs_rhs (ppl_Polyhedron_t ph, ppl_const_Linear_Expression_t lhs, enum ppl_enum_Constraint_Type relsym, ppl_const_Linear_Expression_t rhs) |
Assigns to ph the image of ph with respect to the generalized affine transfer relation ![]() ![]() relsym . | |
int | ppl_Polyhedron_generalized_affine_preimage_lhs_rhs (ppl_Polyhedron_t ph, ppl_const_Linear_Expression_t lhs, enum ppl_enum_Constraint_Type relsym, ppl_const_Linear_Expression_t rhs) |
Assigns to ph the preimage of ph with respect to the generalized affine transfer relation ![]() ![]() relsym . | |
Functions that May Modify the Dimension of the Vector Space | |
int | ppl_Polyhedron_concatenate_assign (ppl_Polyhedron_t x, ppl_const_Polyhedron_t y) |
Seeing a polyhedron as a set of tuples (its points), assigns to x all the tuples that can be obtained by concatenating, in the order given, a tuple of x with a tuple of y . | |
int | ppl_Polyhedron_add_space_dimensions_and_embed (ppl_Polyhedron_t ph, ppl_dimension_type d) |
Adds d new dimensions to the space enclosing the polyhedron ph and to ph itself. | |
int | ppl_Polyhedron_add_space_dimensions_and_project (ppl_Polyhedron_t ph, ppl_dimension_type d) |
Adds d new dimensions to the space enclosing the polyhedron ph . | |
int | ppl_Polyhedron_remove_space_dimensions (ppl_Polyhedron_t ph, ppl_dimension_type ds[], size_t n) |
Removes from the vector space enclosing ph the space dimensions that are specified in first n positions of the array ds . The presence of duplicates in ds is a waste but an innocuous one. | |
int | ppl_Polyhedron_remove_higher_space_dimensions (ppl_Polyhedron_t ph, ppl_dimension_type d) |
Removes the higher dimensions from the vector space enclosing ph so that, upon successful return, the new space dimension is d . | |
int | ppl_Polyhedron_map_space_dimensions (ppl_Polyhedron_t ph, ppl_dimension_type maps[], size_t n) |
Remaps the dimensions of the vector space according to a partial function. This function is specified by means of the maps array, which has n entries. | |
int | ppl_Polyhedron_expand_space_dimension (ppl_Polyhedron_t ph, ppl_dimension_type d, ppl_dimension_type m) |
Expands the ![]() ph to m new space dimensions. | |
int | ppl_Polyhedron_fold_space_dimensions (ppl_Polyhedron_t ph, ppl_dimension_type ds[], size_t n, ppl_dimension_type d) |
Modifies ph by folding the space dimensions contained in the first n positions of the array ds into dimension d . The presence of duplicates in ds is a waste but an innocuous one. | |
Input/Output Functions | |
int | ppl_io_print_Polyhedron (ppl_const_Polyhedron_t x) |
Prints x to stdout . | |
int | ppl_io_fprint_Polyhedron (FILE *stream, ppl_const_Polyhedron_t x) |
Prints x to the given output stream . | |
int | ppl_io_asprint_Polyhedron (char **strp, ppl_const_Polyhedron_t x) |
Prints x to a malloc-allocated string, a pointer to which is returned via strp . | |
int | ppl_Polyhedron_ascii_dump (ppl_const_Polyhedron_t x, FILE *stream) |
Dumps an ascii representation of x on stream . | |
int | ppl_Polyhedron_ascii_load (ppl_Polyhedron_t x, FILE *stream) |
Loads an ascii representation of x from stream . | |
Ad Hoc Functions for (C or NNC) Polyhedra | |
The functions listed here below, being specific of the polyhedron domains, do not have a correspondence in other semantic geometric descriptions. | |
int | ppl_new_C_Polyhedron_from_Generator_System (ppl_Polyhedron_t *pph, ppl_const_Generator_System_t gs) |
Builds a new C polyhedron from the system of generators gs and writes a handle for the newly created polyhedron at address pph . | |
int | ppl_new_C_Polyhedron_recycle_Generator_System (ppl_Polyhedron_t *pph, ppl_Generator_System_t gs) |
Builds a new C polyhedron recycling the system of generators gs and writes a handle for the newly created polyhedron at address pph . | |
int | ppl_new_NNC_Polyhedron_from_Generator_System (ppl_Polyhedron_t *pph, ppl_const_Generator_System_t gs) |
Builds a new NNC polyhedron from the system of generators gs and writes a handle for the newly created polyhedron at address pph . | |
int | ppl_new_NNC_Polyhedron_recycle_Generator_System (ppl_Polyhedron_t *pph, ppl_Generator_System_t gs) |
Builds a new NNC polyhedron recycling the system of generators gs and writes a handle for the newly created polyhedron at address pph . | |
int | ppl_Polyhedron_get_generators (ppl_const_Polyhedron_t ph, ppl_const_Generator_System_t *pgs) |
Writes a const handle to the generator system defining the polyhedron ph at address pgs . | |
int | ppl_Polyhedron_get_minimized_generators (ppl_const_Polyhedron_t ph, ppl_const_Generator_System_t *pgs) |
Writes a const handle to the minimized generator system defining the polyhedron ph at address pgs . | |
int | ppl_Polyhedron_add_generator (ppl_Polyhedron_t ph, ppl_const_Generator_t g) |
Adds a copy of the generator g to the system of generators of ph . | |
int | ppl_Polyhedron_add_generators (ppl_Polyhedron_t ph, ppl_const_Generator_System_t gs) |
Adds a copy of the system of generators gs to the system of generators of ph . | |
int | ppl_Polyhedron_add_recycled_generators (ppl_Polyhedron_t ph, ppl_Generator_System_t gs) |
Adds the system of generators gs to the system of generators of ph . | |
int | ppl_Polyhedron_poly_hull_assign (ppl_Polyhedron_t x, ppl_const_Polyhedron_t y) |
Assigns to x the poly-hull of x and y . | |
int | ppl_Polyhedron_poly_difference_assign (ppl_Polyhedron_t x, ppl_const_Polyhedron_t y) |
Assigns to x the poly-difference of x and y . | |
int | wrap_assign (ppl_Polyhedron_t ph, ppl_dimension_type ds[], size_t n, ppl_enum_Bounded_Integer_Type_Width w, ppl_enum_Bounded_Integer_Type_Representation r, ppl_enum_Bounded_Integer_Type_Overflow o, const ppl_const_Constraint_System_t *pcs, unsigned complexity_threshold, int wrap_individually) |
Assigns to ph the polyhedron obtained from ph by "wrapping" the vector space defined by the first n space dimensions in ds []. | |
int | ppl_Polyhedron_BHRZ03_widening_assign_with_tokens (ppl_Polyhedron_t x, ppl_const_Polyhedron_t y, unsigned *tp) |
If the polyhedron y is contained in (or equal to) the polyhedron x , assigns to x the BHRZ03-widening of x and y . If tp is not the null pointer, the widening with tokens delay technique is applied with *tp available tokens. | |
int | ppl_Polyhedron_H79_widening_assign_with_tokens (ppl_Polyhedron_t x, ppl_const_Polyhedron_t y, unsigned *tp) |
If the polyhedron y is contained in (or equal to) the polyhedron x , assigns to x the H79-widening of x and y . If tp is not the null pointer, the widening with tokens delay technique is applied with *tp available tokens. | |
int | ppl_Polyhedron_BHRZ03_widening_assign (ppl_Polyhedron_t x, ppl_const_Polyhedron_t y) |
If the polyhedron y is contained in (or equal to) the polyhedron x , assigns to x the BHRZ03-widening of x and y . | |
int | ppl_Polyhedron_H79_widening_assign (ppl_Polyhedron_t x, ppl_const_Polyhedron_t y) |
If the polyhedron y is contained in (or equal to) the polyhedron x , assigns to x the H79-widening of x and y . | |
int | ppl_Polyhedron_limited_BHRZ03_extrapolation_assign_with_tokens (ppl_Polyhedron_t x, ppl_const_Polyhedron_t y, ppl_const_Constraint_System_t cs, unsigned *tp) |
If the polyhedron y is contained in (or equal to) the polyhedron x , assigns to x the BHRZ03-widening of x and y intersected with the constraints in cs that are satisfied by all the points of x . If tp is not the null pointer, the widening with tokens delay technique is applied with *tp available tokens. | |
int | ppl_Polyhedron_limited_H79_extrapolation_assign_with_tokens (ppl_Polyhedron_t x, ppl_const_Polyhedron_t y, ppl_const_Constraint_System_t cs, unsigned *tp) |
If the polyhedron y is contained in (or equal to) the polyhedron x , assigns to x the H79-widening of x and y intersected with the constraints in cs that are satisfied by all the points of x . If tp is not the null pointer, the widening with tokens delay technique is applied with *tp available tokens. | |
int | ppl_Polyhedron_limited_BHRZ03_extrapolation_assign (ppl_Polyhedron_t x, ppl_const_Polyhedron_t y, ppl_const_Constraint_System_t cs) |
If the polyhedron y is contained in (or equal to) the polyhedron x , assigns to x the BHRZ03-widening of x and y intersected with the constraints in cs that are satisfied by all the points of x . | |
int | ppl_Polyhedron_limited_H79_extrapolation_assign (ppl_Polyhedron_t x, ppl_const_Polyhedron_t y, ppl_const_Constraint_System_t cs) |
If the polyhedron y is contained in (or equal to) the polyhedron x , assigns to x the H79-widening of x and y intersected with the constraints in cs that are satisfied by all the points of x . | |
int | ppl_Polyhedron_bounded_BHRZ03_extrapolation_assign_with_tokens (ppl_Polyhedron_t x, ppl_const_Polyhedron_t y, ppl_const_Constraint_System_t cs, unsigned *tp) |
If the polyhedron y is contained in (or equal to) the polyhedron x , assigns to x the BHRZ03-widening of x and y intersected with the constraints in cs that are satisfied by all the points of x , further intersected with all the constraints of the form ![]() ![]() ![]() x . If tp is not the null pointer, the widening with tokens delay technique is applied with *tp available tokens. | |
int | ppl_Polyhedron_bounded_H79_extrapolation_assign_with_tokens (ppl_Polyhedron_t x, ppl_const_Polyhedron_t y, ppl_const_Constraint_System_t cs, unsigned *tp) |
If the polyhedron y is contained in (or equal to) the polyhedron x , assigns to x the H79-widening of x and y intersected with the constraints in cs that are satisfied by all the points of x , further intersected with all the constraints of the form ![]() ![]() ![]() x . If tp is not the null pointer, the widening with tokens delay technique is applied with *tp available tokens. | |
int | ppl_Polyhedron_bounded_BHRZ03_extrapolation_assign (ppl_Polyhedron_t x, ppl_const_Polyhedron_t y, ppl_const_Constraint_System_t cs) |
If the polyhedron y is contained in (or equal to) the polyhedron x , assigns to x the BHRZ03-widening of x and y intersected with the constraints in cs that are satisfied by all the points of x , further intersected with all the constraints of the form ![]() ![]() ![]() x . | |
int | ppl_Polyhedron_bounded_H79_extrapolation_assign (ppl_Polyhedron_t x, ppl_const_Polyhedron_t y, ppl_const_Constraint_System_t cs) |
If the polyhedron y is contained in (or equal to) the polyhedron x , assigns to x the H79-widening of x and y intersected with the constraints in cs that are satisfied by all the points of x , further intersected with all the constraints of the form ![]() ![]() ![]() x . |
Types and functions for the domains of C and NNC convex polyhedra.
The types and functions for convex polyhedra provide a single interface for accessing both topologically closed (C) and not necessarily closed (NNC) convex polyhedra. The distinction between C and NNC polyhedra need only be explicitly stated when creating or assigning a polyhedron object, by means of one of the functions ppl_new_*
and ppl_assign_*
.
Having a single datatype does not mean that C and NNC polyhedra can be freely interchanged: as specified in the main manual, most library functions require their arguments to be topologically and/or space-dimension compatible.
int ppl_new_C_Polyhedron_from_C_Polyhedron_with_complexity | ( | ppl_Polyhedron_t * | pph, | |
ppl_const_Polyhedron_t | ph, | |||
int | complexity | |||
) | [related] |
Builds a C polyhedron that is a copy of ph
; writes a handle for the newly created polyhedron at address pph
.
int ppl_new_C_Polyhedron_from_Constraint_System | ( | ppl_Polyhedron_t * | pph, | |
ppl_const_Constraint_System_t | cs | |||
) | [related] |
Builds a new C polyhedron from the system of constraints cs
and writes a handle for the newly created polyhedron at address pph
.
The new polyhedron will inherit the space dimension of cs
.
int ppl_new_C_Polyhedron_recycle_Constraint_System | ( | ppl_Polyhedron_t * | pph, | |
ppl_Constraint_System_t | cs | |||
) | [related] |
Builds a new C polyhedron recycling the system of constraints cs
and writes a handle for the newly created polyhedron at address pph
.
The new polyhedron will inherit the space dimension of cs
.
cs:
upon return, no assumption can be made on its value. int ppl_new_C_Polyhedron_from_Congruence_System | ( | ppl_Polyhedron_t * | pph, | |
ppl_const_Congruence_System_t | cs | |||
) | [related] |
Builds a new C polyhedron from the system of congruences cs
and writes a handle for the newly created polyhedron at address pph
.
The new polyhedron will inherit the space dimension of cs
.
int ppl_new_C_Polyhedron_recycle_Congruence_System | ( | ppl_Polyhedron_t * | pph, | |
ppl_Congruence_System_t | cs | |||
) | [related] |
Builds a new C polyhedron recycling the system of congruences cs
and writes a handle for the newly created polyhedron at address pph
.
The new polyhedron will inherit the space dimension of cs
.
cs:
upon return, no assumption can be made on its value. int ppl_new_NNC_Polyhedron_from_NNC_Polyhedron_with_complexity | ( | ppl_Polyhedron_t * | pph, | |
ppl_const_Polyhedron_t | ph, | |||
int | complexity | |||
) | [related] |
Builds an NNC polyhedron that is a copy of ph
; writes a handle for the newly created polyhedron at address pph
.
int ppl_new_NNC_Polyhedron_from_Constraint_System | ( | ppl_Polyhedron_t * | pph, | |
ppl_const_Constraint_System_t | cs | |||
) | [related] |
Builds a new NNC polyhedron from the system of constraints cs
and writes a handle for the newly created polyhedron at address pph
.
The new polyhedron will inherit the space dimension of cs
.
int ppl_new_NNC_Polyhedron_recycle_Constraint_System | ( | ppl_Polyhedron_t * | pph, | |
ppl_Constraint_System_t | cs | |||
) | [related] |
Builds a new NNC polyhedron recycling the system of constraints cs
and writes a handle for the newly created polyhedron at address pph
.
The new polyhedron will inherit the space dimension of cs
.
cs:
upon return, no assumption can be made on its value. int ppl_new_NNC_Polyhedron_from_Congruence_System | ( | ppl_Polyhedron_t * | pph, | |
ppl_const_Congruence_System_t | cs | |||
) | [related] |
Builds a new NNC polyhedron from the system of congruences cs
and writes a handle for the newly created polyhedron at address pph
.
The new polyhedron will inherit the space dimension of cs
.
int ppl_new_NNC_Polyhedron_recycle_Congruence_System | ( | ppl_Polyhedron_t * | pph, | |
ppl_Congruence_System_t | cs | |||
) | [related] |
Builds a new NNC polyhedron recycling the system of congruences cs
and writes a handle for the newly created polyhedron at address pph
.
The new polyhedron will inherit the space dimension of cs
.
cs:
upon return, no assumption can be made on its value. int ppl_new_C_Polyhedron_from_NNC_Polyhedron_with_complexity | ( | ppl_Polyhedron_t * | pph, | |
ppl_const_Polyhedron_t | ph, | |||
int | complexity | |||
) | [related] |
Builds a C polyhedron that approximates NNC_Polyhedron ph
, using an algorithm whose complexity does not exceed complexity
; writes a handle for the newly created polyhedron at address pph
.
PPL_COMPLEXITY_CLASS_POLYNOMIAL
, PPL_COMPLEXITY_CLASS_SIMPLEX
and PPL_COMPLEXITY_CLASS_ANY
, is ignored since the exact constructor has polynomial complexity. int ppl_new_NNC_Polyhedron_from_C_Polyhedron_with_complexity | ( | ppl_Polyhedron_t * | pph, | |
ppl_const_Polyhedron_t | ph, | |||
int | complexity | |||
) | [related] |
Builds an NNC polyhedron that approximates C_Polyhedron ph
, using an algorithm whose complexity does not exceed complexity
; writes a handle for the newly created polyhedron at address pph
.
PPL_COMPLEXITY_CLASS_POLYNOMIAL
, PPL_COMPLEXITY_CLASS_SIMPLEX
and PPL_COMPLEXITY_CLASS_ANY
, is ignored since the exact constructor has polynomial complexity. int ppl_Polyhedron_relation_with_Constraint | ( | ppl_const_Polyhedron_t | ph, | |
ppl_const_Constraint_t | c | |||
) | [related] |
Checks the relation between the polyhedron ph
and the constraint c
.
If successful, returns a non-negative integer that is obtained as the bitwise or of the bits (chosen among PPL_POLY_CON_RELATION_IS_DISJOINT PPL_POLY_CON_RELATION_STRICTLY_INTERSECTS, PPL_POLY_CON_RELATION_IS_INCLUDED, and PPL_POLY_CON_RELATION_SATURATES) that describe the relation between ph
and c
.
int ppl_Polyhedron_relation_with_Generator | ( | ppl_const_Polyhedron_t | ph, | |
ppl_const_Generator_t | g | |||
) | [related] |
Checks the relation between the polyhedron ph
and the generator g
.
If successful, returns a non-negative integer that is obtained as the bitwise or of the bits (only PPL_POLY_GEN_RELATION_SUBSUMES, at present) that describe the relation between ph
and g
.
int ppl_Polyhedron_maximize_with_point | ( | ppl_const_Polyhedron_t | ph, | |
ppl_const_Linear_Expression_t | le, | |||
ppl_Coefficient_t | sup_n, | |||
ppl_Coefficient_t | sup_d, | |||
int * | pmaximum, | |||
ppl_Generator_t | point | |||
) | [related] |
Returns a positive integer if ph
is not empty and le
is bounded from above in ph
, in which case the supremum value and a point where le
reaches it are computed.
ph | The polyhedron constraining le ; | |
le | The linear expression to be maximized subject to ph ; | |
sup_n | Will be assigned the numerator of the supremum value; | |
sup_d | Will be assigned the denominator of the supremum value; | |
pmaximum | Will store 1 in this location if the supremum is also the maximum, will store 0 otherwise; | |
point | Will be assigned the point or closure point where le reaches the extremum value. |
If ph
is empty or le
is not bounded from above, 0 will be returned and sup_n
, sup_d
, *pmaximum
and point
will be left untouched.
int ppl_Polyhedron_minimize_with_point | ( | ppl_const_Polyhedron_t | ph, | |
ppl_const_Linear_Expression_t | le, | |||
ppl_Coefficient_t | inf_n, | |||
ppl_Coefficient_t | inf_d, | |||
int * | pminimum, | |||
ppl_Generator_t | point | |||
) | [related] |
Returns a positive integer if ph
is not empty and le
is bounded from below in ph
, in which case the infimum value and a point where le
reaches it are computed.
ph | The polyhedron constraining le ; | |
le | The linear expression to be minimized subject to ph ; | |
inf_n | Will be assigned the numerator of the infimum value; | |
inf_d | Will be assigned the denominator of the infimum value; | |
pminimum | Will store 1 in this location if the infimum is also the minimum, will store 0 otherwise; | |
point | Will be assigned the point or closure point where le reaches the extremum value. |
If ph
is empty or le
is not bounded from below, 0 will be returned and sup_n
, sup_d
, *pmaximum
and point
will be left untouched.
int ppl_Polyhedron_equals_Polyhedron | ( | ppl_const_Polyhedron_t | x, | |
ppl_const_Polyhedron_t | y | |||
) | [related] |
Returns a positive integer if x
and y
are the same polyhedron; returns 0 if they are different.
Note that x
and y
may be topology- and/or dimension-incompatible polyhedra: in those cases, the value 0 is returned.
int ppl_Polyhedron_add_recycled_constraints | ( | ppl_Polyhedron_t | ph, | |
ppl_Constraint_System_t | cs | |||
) | [related] |
Adds the system of constraints cs
to the system of constraints of ph
.
cs:
upon return, no assumption can be made on its value. int ppl_Polyhedron_add_recycled_congruences | ( | ppl_Polyhedron_t | ph, | |
ppl_Congruence_System_t | cs | |||
) | [related] |
Adds the system of congruences cs
to the polyhedron ph
.
cs:
upon return, no assumption can be made on its value. int ppl_Polyhedron_upper_bound_assign | ( | ppl_Polyhedron_t | x, | |
ppl_const_Polyhedron_t | y | |||
) | [related] |
Assigns to x
an upper bound of x
and y
.
For the domain of polyhedra, this is the same as ppl_Polyhedron_poly_hull_assign(x, y)
.
int ppl_Polyhedron_affine_image | ( | ppl_Polyhedron_t | ph, | |
ppl_dimension_type | var, | |||
ppl_const_Linear_Expression_t | le, | |||
ppl_const_Coefficient_t | d | |||
) | [related] |
Transforms the polyhedron ph
, assigning an affine expression to the specified variable.
ph | The polyhedron that is transformed; | |
var | The variable to which the affine expression is assigned; | |
le | The numerator of the affine expression; | |
d | The denominator of the affine expression. |
int ppl_Polyhedron_affine_preimage | ( | ppl_Polyhedron_t | ph, | |
ppl_dimension_type | var, | |||
ppl_const_Linear_Expression_t | le, | |||
ppl_const_Coefficient_t | d | |||
) | [related] |
Transforms the polyhedron ph
, substituting an affine expression to the specified variable.
ph | The polyhedron that is transformed; | |
var | The variable to which the affine expression is substituted; | |
le | The numerator of the affine expression; | |
d | The denominator of the affine expression. |
int ppl_Polyhedron_bounded_affine_image | ( | ppl_Polyhedron_t | ph, | |
ppl_dimension_type | var, | |||
ppl_const_Linear_Expression_t | lb, | |||
ppl_const_Linear_Expression_t | ub, | |||
ppl_const_Coefficient_t | d | |||
) | [related] |
Assigns to ph
the image of ph
with respect to the generalized affine transfer relation .
ph | The polyhedron that is transformed; | |
var | The variable bounded by the generalized affine transfer relation; | |
lb | The numerator of the lower bounding affine expression; | |
ub | The numerator of the upper bounding affine expression; | |
d | The (common) denominator of the lower and upper bounding affine expressions. |
int ppl_Polyhedron_bounded_affine_preimage | ( | ppl_Polyhedron_t | ph, | |
ppl_dimension_type | var, | |||
ppl_const_Linear_Expression_t | lb, | |||
ppl_const_Linear_Expression_t | ub, | |||
ppl_const_Coefficient_t | d | |||
) | [related] |
Assigns to ph
the preimage of ph
with respect to the generalized affine transfer relation .
ph | The polyhedron that is transformed; | |
var | The variable bounded by the generalized affine transfer relation; | |
lb | The numerator of the lower bounding affine expression; | |
ub | The numerator of the upper bounding affine expression; | |
d | The (common) denominator of the lower and upper bounding affine expressions. |
int ppl_Polyhedron_generalized_affine_image | ( | ppl_Polyhedron_t | ph, | |
ppl_dimension_type | var, | |||
enum ppl_enum_Constraint_Type | relsym, | |||
ppl_const_Linear_Expression_t | le, | |||
ppl_const_Coefficient_t | d | |||
) | [related] |
Assigns to ph
the image of ph
with respect to the generalized affine transfer relation , where
is the relation symbol encoded by
relsym
.
ph | The polyhedron that is transformed; | |
var | The left hand side variable of the generalized affine transfer relation; | |
relsym | The relation symbol; | |
le | The numerator of the right hand side affine expression; | |
d | The denominator of the right hand side affine expression. |
int ppl_Polyhedron_generalized_affine_preimage | ( | ppl_Polyhedron_t | ph, | |
ppl_dimension_type | var, | |||
enum ppl_enum_Constraint_Type | relsym, | |||
ppl_const_Linear_Expression_t | le, | |||
ppl_const_Coefficient_t | d | |||
) | [related] |
Assigns to ph
the preimage of ph
with respect to the generalized affine transfer relation , where
is the relation symbol encoded by
relsym
.
ph | The polyhedron that is transformed; | |
var | The left hand side variable of the generalized affine transfer relation; | |
relsym | The relation symbol; | |
le | The numerator of the right hand side affine expression; | |
d | The denominator of the right hand side affine expression. |
int ppl_Polyhedron_generalized_affine_image_lhs_rhs | ( | ppl_Polyhedron_t | ph, | |
ppl_const_Linear_Expression_t | lhs, | |||
enum ppl_enum_Constraint_Type | relsym, | |||
ppl_const_Linear_Expression_t | rhs | |||
) | [related] |
Assigns to ph
the image of ph
with respect to the generalized affine transfer relation , where
is the relation symbol encoded by
relsym
.
ph | The polyhedron that is transformed; | |
lhs | The left hand side affine expression; | |
relsym | The relation symbol; | |
rhs | The right hand side affine expression. |
int ppl_Polyhedron_generalized_affine_preimage_lhs_rhs | ( | ppl_Polyhedron_t | ph, | |
ppl_const_Linear_Expression_t | lhs, | |||
enum ppl_enum_Constraint_Type | relsym, | |||
ppl_const_Linear_Expression_t | rhs | |||
) | [related] |
Assigns to ph
the preimage of ph
with respect to the generalized affine transfer relation , where
is the relation symbol encoded by
relsym
.
ph | The polyhedron that is transformed; | |
lhs | The left hand side affine expression; | |
relsym | The relation symbol; | |
rhs | The right hand side affine expression. |
int ppl_Polyhedron_map_space_dimensions | ( | ppl_Polyhedron_t | ph, | |
ppl_dimension_type | maps[], | |||
size_t | n | |||
) | [related] |
Remaps the dimensions of the vector space according to a partial function. This function is specified by means of the maps
array, which has n
entries.
The partial function is defined on dimension i
if i < n
and maps[i] != ppl_not_a_dimension
; otherwise it is undefined on dimension i
. If the function is defined on dimension i
, then dimension i
is mapped onto dimension maps[i]
.
The result is undefined if maps
does not encode a partial function with the properties described in the specification of the mapping operator.
int ppl_new_C_Polyhedron_from_Generator_System | ( | ppl_Polyhedron_t * | pph, | |
ppl_const_Generator_System_t | gs | |||
) | [related] |
Builds a new C polyhedron from the system of generators gs
and writes a handle for the newly created polyhedron at address pph
.
The new polyhedron will inherit the space dimension of gs
.
int ppl_new_C_Polyhedron_recycle_Generator_System | ( | ppl_Polyhedron_t * | pph, | |
ppl_Generator_System_t | gs | |||
) | [related] |
Builds a new C polyhedron recycling the system of generators gs
and writes a handle for the newly created polyhedron at address pph
.
The new polyhedron will inherit the space dimension of gs
.
gs:
upon return, no assumption can be made on its value. int ppl_new_NNC_Polyhedron_from_Generator_System | ( | ppl_Polyhedron_t * | pph, | |
ppl_const_Generator_System_t | gs | |||
) | [related] |
Builds a new NNC polyhedron from the system of generators gs
and writes a handle for the newly created polyhedron at address pph
.
The new polyhedron will inherit the space dimension of gs
.
int ppl_new_NNC_Polyhedron_recycle_Generator_System | ( | ppl_Polyhedron_t * | pph, | |
ppl_Generator_System_t | gs | |||
) | [related] |
Builds a new NNC polyhedron recycling the system of generators gs
and writes a handle for the newly created polyhedron at address pph
.
The new polyhedron will inherit the space dimension of gs
.
gs:
upon return, no assumption can be made on its value. int ppl_Polyhedron_add_recycled_generators | ( | ppl_Polyhedron_t | ph, | |
ppl_Generator_System_t | gs | |||
) | [related] |
Adds the system of generators gs
to the system of generators of ph
.
gs:
upon return, no assumption can be made on its value. int wrap_assign | ( | ppl_Polyhedron_t | ph, | |
ppl_dimension_type | ds[], | |||
size_t | n, | |||
ppl_enum_Bounded_Integer_Type_Width | w, | |||
ppl_enum_Bounded_Integer_Type_Representation | r, | |||
ppl_enum_Bounded_Integer_Type_Overflow | o, | |||
const ppl_const_Constraint_System_t * | pcs, | |||
unsigned | complexity_threshold, | |||
int | wrap_individually | |||
) | [related] |
Assigns to ph
the polyhedron obtained from ph
by "wrapping" the vector space defined by the first n
space dimensions in ds
[].
ph | The polyhedron that is transformed; | |
ds[] | Specifies the space dimensions to be wrapped. | |
n | The first n space dimensions in the array ds [] will be wrapped. | |
w | The width of the bounded integer type corresponding to all the dimensions to be wrapped. | |
r | The representation of the bounded integer type corresponding to all the dimensions to be wrapped. | |
o | The overflow behavior of the bounded integer type corresponding to all the dimensions to be wrapped. | |
pcs | Possibly null pointer to a constraint system whose space dimensions are the first n dimensions in ds []. If *pcs depends on variables not in vars , the behavior is undefined. When non-null, the constraint system is assumed to represent the conditional or looping construct guard with respect to which wrapping is performed. Since wrapping requires the computation of upper bounds and due to non-distributivity of constraint refinement over upper bounds, passing a constraint system in this way can be more precise than refining the result of the wrapping operation with the constraints in cs . | |
complexity_threshold | A precision parameter where higher values result in possibly improved precision. | |
wrap_individually | Non-zero if the dimensions should be wrapped individually (something that results in much greater efficiency to the detriment of precision). |