Public Member Functions | |
| const_iterator | begin () const |
| A const_iterator pointing to the first element in the sequence. | |
| const_iterator | end () const |
| The past-the-end const_iterator. | |
| void | omega_reduce () const |
| Erase from the sequence of disjuncts all the non-maximal elements. | |
Constructors and Destructor | |
| Powerset () | |
| Powerset (const Powerset &y) | |
| Copy constructor. | |
| Powerset (const CS &d) | |
If d is not bottom, builds a powerset containing only d. Builds the empty powerset otherwise. | |
| ~Powerset () | |
| Destructor. | |
Member Functions that Do Not Modify the Powerset Element | |
| bool | definitely_entails (const Powerset &y) const |
Returns true if *this definitely entails y. Returns false if *this may not entail y (i.e., if *this does not entail y or if entailment could not be decided). | |
| bool | is_top () const |
Returns true if and only if *this is the top element of the powerset constraint system (i.e., it represents the universe). | |
| bool | is_bottom () const |
Returns true if and only if *this is the bottom element of the powerset constraint system (i.e., it represents the empty set). | |
| memory_size_type | total_memory_in_bytes () const |
Returns a lower bound to the total size in bytes of the memory occupied by *this. | |
| memory_size_type | external_memory_in_bytes () const |
Returns a lower bound to the size in bytes of the memory managed by *this. | |
| bool | OK (bool disallow_bottom=false) const |
| Checks if all the invariants are satisfied. | |
Member Functions that May Modify the Powerset Element | |
| Powerset & | operator= (const Powerset &y) |
| The assignment operator. | |
| void | swap (Powerset &y) |
Swaps *this with y. | |
| void | add_disjunct (const CS &d) |
Adds to *this the disjunct d. | |
| void | least_upper_bound_assign (const Powerset &y) |
Assigns to *this the least upper bound of *this and y. | |
| void | upper_bound_assign (const Powerset &y) |
Assigns to *this an upper bound of *this and y. | |
| void | meet_assign (const Powerset &y) |
Assigns to *this the meet of *this and y. | |
| void | collapse () |
If *this is not empty (i.e., it is not the bottom element), it is reduced to a singleton obtained by computing an upper-bound of all the disjuncts. | |
Protected Types | |
| typedef std::list< CS > | Sequence |
| A powerset is implemented as a sequence of elements. | |
Protected Member Functions | |
| bool | is_omega_reduced () const |
Returns true if and only if *this does not contain non-maximal elements. | |
| void | collapse (unsigned max_disjuncts) |
Upon return, *this will contain max_disjuncts elements at most, by replacing all the exceeding disjuncts, if any, with their upper-bound. | |
| template<typename Binary_Operator_Assign> | |
| void | pairwise_apply_assign (const Powerset &y, Binary_Operator_Assign op_assign) |
Assigns to *this the result of applying op_assign pairwise to the elements in *this and y. | |
Static Protected Member Functions | |
| void | add_non_bottom_disjunct (Sequence &s, const CS &d, iterator &first, iterator last) |
Adds to *this the disjunct d, assuming d is not the bottom element and ensuring partial omega-reduction. | |
| void | add_non_bottom_disjunct (Sequence &s, const CS &d) |
Adds to *this the disjunct d, assuming d is not the bottom element. | |
Protected Attributes | |
| Sequence | sequence |
| The sequence container holding powerset's elements. | |
| bool | reduced |
If true, *this is omega-reduced. | |
Related Functions | |
| (Note that these are not member functions.) | |
| bool | operator== (const Powerset< CS > &x, const Powerset< CS > &y) |
Returns true if and only if x and y are equivalent. | |
| bool | operator!= (const Powerset< CS > &x, const Powerset< CS > &y) |
Returns true if and only if x and y are not equivalent. | |
| std::ostream & | operator<< (std::ostream &s, const Powerset< CS > &x) |
| Output operator. | |
| void | swap (Parma_Polyhedra_Library::Powerset< CS > &x, Parma_Polyhedra_Library::Powerset< CS > &y) |
Specializes std::swap. | |
This class offers a generic implementation of powerset constraint systems as defined in [Bag98]. See also the description in Section The Powerset Construction.
|
|||||
|
A powerset is implemented as a sequence of elements. The particular sequence employed must support efficient deletion in any position and efficient back insertion. |
|
|||||||||
|
Default constructor: builds the bottom of the powerset constraint system (i.e., the empty powerset). |
|
||||||||||
|
Assigns to
The result will be the least upper bound of |
|
||||||||||||||||||||||||
|
Adds to
If |
|
||||||||||||||||||||
|
Assigns to
The elements of the powerset result are obtained by applying |
1.3.9.1-20041213