Main Page | Modules | Namespace List | Class Hierarchy | Class List | Directories | Namespace Members | Class Members | Related Pages

Parma_Polyhedra_Library::Powerset< CS > Class Template Reference

The powerset construction on constraint systems. More...

List of all members.

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
Powersetoperator= (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.


Detailed Description

template<typename CS>
class Parma_Polyhedra_Library::Powerset< CS >

The powerset construction on constraint systems.

This class offers a generic implementation of powerset constraint systems as defined in [Bag98]. See also the description in Section The Powerset Construction.


Member Typedef Documentation

template<typename CS>
typedef std::list<CS> Parma_Polyhedra_Library::Powerset< CS >::Sequence [protected]
 

A powerset is implemented as a sequence of elements.

The particular sequence employed must support efficient deletion in any position and efficient back insertion.


Constructor & Destructor Documentation

template<typename CS>
Parma_Polyhedra_Library::Powerset< CS >::Powerset  ) 
 

Default constructor: builds the bottom of the powerset constraint system (i.e., the empty powerset).


Member Function Documentation

template<typename CS>
void Parma_Polyhedra_Library::Powerset< CS >::upper_bound_assign const Powerset< CS > &  y  ) 
 

Assigns to *this an upper bound of *this and y.

The result will be the least upper bound of *this and y.

template<typename CS>
void Parma_Polyhedra_Library::Powerset< CS >::add_non_bottom_disjunct Sequence s,
const CS &  d,
iterator &  first,
iterator  last
[static, protected]
 

Adds to *this the disjunct d, assuming d is not the bottom element and ensuring partial omega-reduction.

If d is not the bottom element and is not redundant with respect to the elements in positions between first and last, adds to *this the disjunct d, erasing all the elements in the above mentioned positions that are made omega-redundant by the addition of d.

template<typename CS>
template<typename Binary_Operator_Assign>
void Parma_Polyhedra_Library::Powerset< CS >::pairwise_apply_assign const Powerset< CS > &  y,
Binary_Operator_Assign  op_assign
[protected]
 

Assigns to *this the result of applying op_assign pairwise to the elements in *this and y.

The elements of the powerset result are obtained by applying op_assign to each pair of elements whose components are drawn from *this and y, respectively.


Generated on Fri Dec 24 16:50:19 2004 for PPL by  doxygen 1.3.9.1-20041213