24 #ifndef PPL_Pointset_Powerset_defs_hh
25 #define PPL_Pointset_Powerset_defs_hh
60 template <
typename PSET>
63 <Parma_Polyhedra_Library::Determinate<PSET> > {
107 template <
typename QH>
116 template <
typename QH1,
typename QH2,
typename R>
213 template <
typename T>
234 template <
typename T>
254 template <
typename Interval>
771 Coefficient_traits::const_reference denominator
797 Coefficient_traits::const_reference denominator
829 Coefficient_traits::const_reference denominator
862 Coefficient_traits::const_reference denominator
942 Coefficient_traits::const_reference denominator
974 Coefficient_traits::const_reference denominator
1038 unsigned complexity_threshold = 16,
1039 bool wrap_individually =
true);
1078 template <
typename W
idening>
1081 unsigned max_disjuncts);
1111 template <
typename Cert,
typename W
idening>
1130 template <
typename QH>
1184 template <
typename Partial_Function>
1280 template <
typename W
idening>
1284 template <
typename Cert>
1286 typename Cert::Compare>& cert_ms)
const;
1292 template <
typename Cert>
1294 typename Cert::Compare>&
1301 template <
typename Cons_or_Congr>
1315 template <
typename PSET>
1338 template <
typename PSET>
1339 std::pair<PSET, Pointset_Powerset<NNC_Polyhedron> >
1340 linear_partition(
const PSET& p,
const PSET& q);
1374 std::pair<Grid, Pointset_Powerset<Grid> >
1375 approximate_partition(
const Grid& p,
const Grid& q,
bool& finite_partition);
1384 check_containment(
const Grid& ph,
1397 template <
typename PSET>
1406 template <
typename QH>
1456 #endif // !defined(PPL_Pointset_Powerset_defs_hh)
Poly_Con_Relation relation_with(const Constraint &c) const
Returns the relations holding between the powerset *this and the constraint c.
void add_congruence(const Congruence &cg)
Intersects *this with congruence cg.
The partially reduced product of two abstractions.
void BHZ03_widening_assign(const Pointset_Powerset &y, Widening widen_fun)
Assigns to *this the result of computing the BHZ03-widening between *this and y, using the widening f...
A linear equality or inequality.
bool bounds_from_below(const Linear_Expression &expr) const
Returns true if and only if expr is bounded from below in *this.
void swap(CO_Tree &x, CO_Tree &y)
void pairwise_reduce()
Assign to *this the result of (recursively) merging together the pairs of disjuncts whose upper-bound...
bool maximize(const Linear_Expression &expr, Coefficient &sup_n, Coefficient &sup_d, bool &maximum) const
Returns true if and only if *this is not empty and expr is bounded from above in *this, in which case the supremum value is computed.
std::reverse_iterator< const_iterator > const_reverse_iterator
The reverse iterator type built from Powerset::const_iterator.
size_t dimension_type
An unsigned integral type for representing space dimensions.
bool ascii_load(std::istream &s)
Loads from s an ASCII representation (as produced by ascii_dump(std::ostream&) const) and sets *this ...
static dimension_type max_space_dimension()
Returns the maximum space dimension a Pointset_Powerset
can handle.
An std::set of variables' indexes.
bool is_topologically_closed() const
Returns true if and only if all the disjuncts in *this are topologically closed.
A line, ray, point or closure point.
Base::size_type size_type
void generalized_affine_image(Variable var, Relation_Symbol relsym, const Linear_Expression &expr, Coefficient_traits::const_reference denominator=Coefficient_one())
Assigns to *this the image of *this with respect to the generalized affine relation ...
void refine_with_constraints(const Constraint_System &cs)
Use the constraints in cs to refine *this.
void time_elapse_assign(const Pointset_Powerset &y)
Assigns to *this the result of computing the time-elapse between *this and y.
bool contains_integer_point() const
Returns true if and only if *this contains at least one integer point.
void remove_space_dimensions(const Variables_Set &vars)
Removes all the specified space dimensions.
Base::Sequence_iterator Sequence_iterator
Base::value_type value_type
void concatenate_assign(const Pointset_Powerset &y)
Assigns to *this the concatenation of *this and y.
bool OK() const
Checks if all the invariants are satisfied.
Base::const_iterator const_iterator
bool geometrically_equals(const Pointset_Powerset &y) const
Returns true if and only if *this is geometrically equal to y, i.e., if (the elements of) *this and y...
void difference_assign(const Pointset_Powerset &y)
Assigns to *this an (a smallest) over-approximation as a powerset of the disjunct domain of the set-t...
A wrapper for PPL pointsets, providing them with a determinate constraint system interface, as defined in [Bag98].
void add_constraints(const Constraint_System &cs)
Intersects *this with the constraints in cs.
void m_swap(Pointset_Powerset &y)
Swaps *this with y.
bool is_bounded() const
Returns true if and only if all elements in *this are bounded.
Base::reverse_iterator reverse_iterator
The powerset construction on a base-level domain.
int32_t hash_code() const
Returns a 32-bit hash code for *this.
A dimension of the vector space.
Bounded_Integer_Type_Overflow
Sequence::const_iterator Sequence_const_iterator
Alias for the low-level const_iterator on the disjuncts.
void refine_with_constraint(const Constraint &c)
Use the constraint c to refine *this.
Sequence::value_type value_type
Complexity_Class
Complexity pseudo-classes.
bool geometrically_covers(const Pointset_Powerset &y) const
Returns true if and only if *this geometrically covers y, i.e., if any point (in some element) of y i...
void add_space_dimensions_and_embed(dimension_type m)
Adds m new dimensions to the vector space containing *this and embeds each disjunct in *this in the n...
#define PPL_OUTPUT_DECLARATIONS
Relation_Symbol
Relation symbols.
Degenerate_Element
Kinds of degenerate abstract elements.
bool minimize(const Linear_Expression &expr, Coefficient &inf_n, Coefficient &inf_d, bool &minimum) const
Returns true if and only if *this is not empty and expr is bounded from below in *this, in which case the infimum value is computed.
Base::const_reverse_iterator const_reverse_iterator
void wrap_assign(const Variables_Set &vars, Bounded_Integer_Type_Width w, Bounded_Integer_Type_Representation r, Bounded_Integer_Type_Overflow o, const Constraint_System *cs_p=0, unsigned complexity_threshold=16, bool wrap_individually=true)
Wraps the specified dimensions of the vector space.
Bounded_Integer_Type_Width
dimension_type space_dimension() const
Returns the dimension of the vector space enclosing *this.
void unconstrain(Variable var)
Computes the cylindrification of *this with respect to space dimension var, assigning the result to *...
void refine_with_congruence(const Congruence &cg)
Use the congruence cg to refine *this.
void fold_space_dimensions(const Variables_Set &vars, Variable dest)
Folds the space dimensions in vars into dest.
void affine_preimage(Variable var, const Linear_Expression &expr, Coefficient_traits::const_reference denominator=Coefficient_one())
Assigns to *this the affine preimage of *this under the function mapping variable var to the affine e...
bool is_universe() const
Returns true if and only if *this is the top element of the powerset lattice.
Pointset_Powerset(dimension_type num_dimensions=0, Degenerate_Element kind=UNIVERSE)
Builds a universe (top) or empty (bottom) Pointset_Powerset.
void collect_certificates(std::map< Cert, size_type, typename Cert::Compare > &cert_ms) const
Records in cert_ms the certificates for this set of disjuncts.
A not necessarily closed convex polyhedron.
dimension_type affine_dimension() const
Returns the dimension of the vector space enclosing *this.
A not necessarily closed, iso-oriented hyperrectangle.
A closed convex polyhedron.
bool is_discrete() const
Returns true if and only if *this is discrete.
PPL_COEFFICIENT_TYPE Coefficient
An alias for easily naming the type of PPL coefficients.
void bounded_affine_image(Variable var, const Linear_Expression &lb_expr, const Linear_Expression &ub_expr, Coefficient_traits::const_reference denominator=Coefficient_one())
Assigns to *this the image of *this with respect to the bounded affine relation . ...
Powerset< Det_PSET > Base
void expand_space_dimension(Variable var, dimension_type m)
Creates m copies of the space dimension corresponding to var.
bool contains(const Pointset_Powerset &y) const
Returns true if and only if each disjunct of y is contained in a disjunct of *this.
bool constrains(Variable var) const
Returns true if and only if var is constrained in *this.
void map_space_dimensions(const Partial_Function &pfunc)
Remaps the dimensions of the vector space according to a partial function.
void add_congruences(const Congruence_System &cgs)
Intersects *this with the congruences in cgs.
The universe element, i.e., the whole vector space.
void generalized_affine_preimage(Variable var, Relation_Symbol relsym, const Linear_Expression &expr, Coefficient_traits::const_reference denominator=Coefficient_one())
Assigns to *this the preimage of *this with respect to the generalized affine relation ...
void bounded_affine_preimage(Variable var, const Linear_Expression &lb_expr, const Linear_Expression &ub_expr, Coefficient_traits::const_reference denominator=Coefficient_one())
Assigns to *this the preimage of *this with respect to the bounded affine relation ...
bool is_empty() const
Returns true if and only if *this is an empty powerset.
A const_iterator on a sequence of read-only objects.
bool bounds_from_above(const Linear_Expression &expr) const
Returns true if and only if expr is bounded from above in *this.
void remove_higher_space_dimensions(dimension_type new_dimension)
Removes the higher space dimensions so that the resulting space will have dimension new_dimension...
The powerset construction instantiated on PPL pointset domains.
The entire library is confined to this namespace.
Determinate< PSET > Det_PSET
bool intersection_preserving_enlarge_element(PSET &dest) const
Assigns to dest a powerset meet-preserving enlargement of itself with respect to *this. If false is returned, then the intersection is empty.
void add_disjunct(const PSET &ph)
Adds to *this the disjunct ph.
void add_space_dimensions_and_project(dimension_type m)
Adds m new dimensions to the vector space containing *this without embedding the disjuncts in *this i...
void intersection_assign(const Pointset_Powerset &y)
Assigns to *this the intersection of *this and y.
bool is_disjoint_from(const Pointset_Powerset &y) const
Returns true if and only if *this and y are disjoint.
bool strictly_contains(const Pointset_Powerset &y) const
Returns true if and only if each disjunct of y is strictly contained in a disjunct of *this...
A bounded difference shape.
void drop_some_non_integer_points(Complexity_Class complexity=ANY_COMPLEXITY)
Possibly tightens *this by dropping some points with non-integer coordinates.
Sequence::size_type size_type
void BGP99_heuristics_assign(const Pointset_Powerset &y, Widening widen_fun)
Assigns to *this the result of applying the BGP99 heuristics to *this and y, using the widening funct...
Sequence::iterator Sequence_iterator
Alias for the low-level iterator on the disjuncts.
std::reverse_iterator< iterator > reverse_iterator
The reverse iterator type built from Powerset::iterator.
void refine_with_congruences(const Congruence_System &cgs)
Use the congruences in cgs to refine *this.
An iterator on a sequence of read-only objects.
memory_size_type external_memory_in_bytes() const
Returns a lower bound to the size in bytes of the memory managed by *this.
size_t memory_size_type
An unsigned integral type for representing memory size in bytes.
void add_constraint(const Constraint &c)
Intersects *this with constraint c.
dimension_type space_dim
The number of dimensions of the enclosing vector space.
memory_size_type total_memory_in_bytes() const
Returns a lower bound to the total size in bytes of the memory occupied by *this. ...
Pointset_Powerset & operator=(const Pointset_Powerset &y)
The assignment operator (*this and y can be dimension-incompatible).
Coefficient_traits::const_reference Coefficient_one()
Returns a const reference to a Coefficient with value 1.
Poly_Con_Relation relation_with_aux(const Cons_or_Congr &c) const
Template helper: common implementation for constraints and congruences.
std::list< D > Sequence
A powerset is implemented as a sequence of elements.
bool is_cert_multiset_stabilizing(const std::map< Cert, size_type, typename Cert::Compare > &y_cert_ms) const
Returns true if and only if the current set of disjuncts is stabilizing with respect to the multiset ...
void affine_image(Variable var, const Linear_Expression &expr, Coefficient_traits::const_reference denominator=Coefficient_one())
Assigns to *this the affine image of *this under the function mapping variable var to the affine expr...
The relation between a polyhedron and a generator.
Bounded_Integer_Type_Representation
bool simplify_using_context_assign(const Pointset_Powerset &y)
Assigns to *this a meet-preserving simplification of *this with respect to y. If false is returned...
void topological_closure_assign()
Assigns to *this its topological closure.
The relation between a polyhedron and a constraint.
Base::Sequence_const_iterator Sequence_const_iterator
void BGP99_extrapolation_assign(const Pointset_Powerset &y, Widening widen_fun, unsigned max_disjuncts)
Assigns to *this the result of applying the BGP99 extrapolation operator to *this and y...