24 #ifndef PPL_Powerset_defs_hh
25 #define PPL_Powerset_defs_hh
39 void swap(Powerset<D>& x, Powerset<D>& y);
45 operator==(
const Powerset<D>& x,
const Powerset<D>& y);
51 operator!=(
const Powerset<D>& x,
const Powerset<D>& y);
53 namespace IO_Operators {
59 operator<<(std::ostream& s, const Powerset<D>& x);
151 template <
typename D>
216 bool OK(
bool disallow_bottom =
false)
const;
280 size_type
size()
const;
301 const_iterator
begin()
const;
304 const_iterator
end()
const;
310 reverse_iterator
rbegin();
313 reverse_iterator
rend();
320 const_reverse_iterator
rbegin()
const;
323 const_reverse_iterator
rend()
const;
393 void collapse(
unsigned max_disjuncts);
429 template <
typename Binary_Operator_Assign>
431 Binary_Operator_Assign op_assign);
444 void collapse(Sequence_iterator sink);
450 #endif // !defined(PPL_Powerset_defs_hh)
bool operator!=(const Box< ITV > &x, const Box< ITV > &y)
size_type size() const
Returns the number of disjuncts.
void upper_bound_assign(const Powerset &y)
Assigns to *this an upper bound of *this and y.
void swap(CO_Tree &x, CO_Tree &y)
bool is_bottom() const
Returns true if and only if *this is the bottom element of the powerset constraint system (i...
Sequence sequence
The sequence container holding powerset's elements.
std::reverse_iterator< const_iterator > const_reverse_iterator
The reverse iterator type built from Powerset::const_iterator.
iterator add_non_bottom_disjunct_preserve_reduction(const D &d, iterator first, iterator last)
Adds to *this the disjunct d, assuming d is not the bottom element and ensuring partial Omega-reducti...
iterator drop_disjunct(iterator position)
Drops the disjunct in *this pointed to by position, returning an iterator to the disjunct following p...
memory_size_type total_memory_in_bytes() const
Returns a lower bound to the total size in bytes of the memory occupied by *this. ...
void clear()
Drops all the disjuncts, making *this an empty powerset.
reverse_iterator rbegin()
Returns a reverse_iterator pointing to the last disjunct, if *this is not empty; otherwise, returns the before-the-start reverse_iterator.
iterator_to_const< Sequence > iterator
Alias for a read-only bidirectional iterator on the disjuncts of a Powerset element.
bool OK(bool disallow_bottom=false) const
Checks if all the invariants are satisfied.
iterator begin()
Returns an iterator pointing to the first disjunct, if *this is not empty; otherwise, returns the past-the-end iterator.
void omega_reduce() const
Drops from the sequence of disjuncts in *this all the non-maximal elements so that *this is non-redun...
The powerset construction on a base-level domain.
Sequence::const_iterator Sequence_const_iterator
Alias for the low-level const_iterator on the disjuncts.
Sequence::value_type value_type
const_iterator_to_const< Sequence > const_iterator
A bidirectional const_iterator on the disjuncts of a 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...
bool reduced
If true, *this is Omega-reduced.
reverse_iterator rend()
Returns the before-the-start reverse_iterator.
Powerset()
Default constructor: builds the bottom of the powerset constraint system (i.e., the empty powerset)...
void m_swap(Powerset &y)
Swaps *this with y.
void least_upper_bound_assign(const Powerset &y)
Assigns to *this the least upper bound of *this and y.
iterator end()
Returns the past-the-end iterator.
A const_iterator on a sequence of read-only objects.
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 ...
The entire library is confined to this namespace.
void add_disjunct(const D &d)
Adds to *this the disjunct d.
bool empty() const
Returns true if and only if there are no disjuncts in *this.
memory_size_type external_memory_in_bytes() const
Returns a lower bound to the size in bytes of the memory managed by *this.
Sequence::size_type size_type
bool is_top() const
Returns true if and only if *this is the top element of the powerset constraint system (i...
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.
bool operator==(const Box< ITV > &x, const Box< ITV > &y)
An iterator on a sequence of read-only objects.
size_t memory_size_type
An unsigned integral type for representing memory size in bytes.
bool upper_bound_assign_if_exact(const Powerset &y)
Assigns to *this the least upper bound of *this and y and returns true.
Powerset & operator=(const Powerset &y)
The assignment operator.
bool is_omega_reduced() const
Returns true if and only if *this does not contain non-maximal elements.
std::list< D > Sequence
A powerset is implemented as a sequence of elements.
void drop_disjuncts(iterator first, iterator last)
Drops all the disjuncts from first to last (excluded).
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...
bool check_omega_reduced() const
Does the hard work of checking whether *this contains non-maximal elements and returns true if and on...