A wrapper for PPL pointsets, providing them with a determinate constraint system interface, as defined in [Bag98]. More...
#include <Determinate.defs.hh>

Classes | |
| class | Binary_Operator_Assign_Lifter |
| A function adapter for the Determinate class. More... | |
| class | Rep |
| The possibly shared representation of a Determinate object. More... | |
Public Member Functions | |
Constructors and Destructor | |
| Determinate (const PSET &p) | |
Constructs a COW-wrapped object corresponding to the pointset p. | |
| Determinate (const Constraint_System &cs) | |
Constructs a COW-wrapped object corresponding to the pointset defined by cs. | |
| Determinate (const Congruence_System &cgs) | |
Constructs a COW-wrapped object corresponding to the pointset defined by cgs. | |
| Determinate (const Determinate &y) | |
| Copy constructor. | |
| ~Determinate () | |
| Destructor. | |
Member Functions that May Modify the Domain Element | |
| void | upper_bound_assign (const Determinate &y) |
Assigns to *this the upper bound of *this and y. | |
| void | meet_assign (const Determinate &y) |
Assigns to *this the meet of *this and y. | |
| void | weakening_assign (const Determinate &y) |
Assigns to *this the result of weakening *this with y. | |
| void | concatenate_assign (const Determinate &y) |
Assigns to *this the concatenation of *this and y, taken in this order. | |
| PSET & | pointset () |
| Returns a reference to the embedded element. | |
| void | mutate () |
On return from this method, the representation of *this is not shared by different Determinate objects. | |
| Determinate & | operator= (const Determinate &y) |
| Assignment operator. | |
| void | swap (Determinate &y) |
Swaps *this with y. | |
Static Public Member Functions | |
| template<typename Binary_Operator_Assign > | |
| static Binary_Operator_Assign_Lifter < Binary_Operator_Assign > | lift_op_assign (Binary_Operator_Assign op_assign) |
| Helper function returning a Binary_Operator_Assign_Lifter object, also allowing for the deduction of template arguments. | |
Private Attributes | |
| Rep * | prep |
| A pointer to the possibly shared representation of the base-level domain element. | |
Friends | |
| bool | operator== (const Determinate< PSET > &x, const Determinate< PSET > &y) |
Returns true if and only if x and y are the same COW-wrapped pointset. | |
| bool | operator!= (const Determinate< PSET > &x, const Determinate< PSET > &y) |
Returns true if and only if x and y are different COW-wrapped pointsets. | |
Related Functions | |
(Note that these are not member functions.) | |
| template<typename PSET > | |
| std::ostream & | operator<< (std::ostream &, const Determinate< PSET > &) |
| Output operator. | |
| template<typename PSET > | |
| void | swap (Parma_Polyhedra_Library::Determinate< PSET > &x, Parma_Polyhedra_Library::Determinate< PSET > &y) |
Specializes std::swap. | |
Member Functions that Do Not Modify the Domain Element | |
|
| |
| const PSET & | pointset () const |
| Returns a const reference to the embedded pointset. | |
| bool | is_top () const |
Returns true if and only if *this embeds the universe element PSET. | |
| bool | is_bottom () const |
Returns true if and only if *this embeds the empty element of PSET. | |
| bool | definitely_entails (const Determinate &y) const |
Returns true if and only if *this entails y. | |
| bool | is_definitely_equivalent_to (const Determinate &y) const |
Returns true if and only if *this and y are definitely equivalent. | |
| 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 () const |
| Checks if all the invariants are satisfied. | |
| static bool | has_nontrivial_weakening () |
A wrapper for PPL pointsets, providing them with a determinate constraint system interface, as defined in [Bag98].
The implementation uses a copy-on-write optimization, making the class suitable for constructions, like the finite powerset and ask-and-tell of [Bag98], that are likely to perform many copies.
Definition at line 80 of file Determinate.defs.hh.
| Parma_Polyhedra_Library::Determinate< PSET >::Determinate | ( | const PSET & | p | ) | [inline] |
Constructs a COW-wrapped object corresponding to the pointset p.
Definition at line 94 of file Determinate.inlines.hh.
References Parma_Polyhedra_Library::Determinate< PSET >::Rep::new_reference(), and Parma_Polyhedra_Library::Determinate< PSET >::prep.
00095 : prep(new Rep(pset)) { 00096 prep->new_reference(); 00097 }
| Parma_Polyhedra_Library::Determinate< PSET >::Determinate | ( | const Constraint_System & | cs | ) | [inline] |
Constructs a COW-wrapped object corresponding to the pointset defined by cs.
Definition at line 101 of file Determinate.inlines.hh.
References Parma_Polyhedra_Library::Determinate< PSET >::Rep::new_reference(), and Parma_Polyhedra_Library::Determinate< PSET >::prep.
00102 : prep(new Rep(cs)) { 00103 prep->new_reference(); 00104 }
| Parma_Polyhedra_Library::Determinate< PSET >::Determinate | ( | const Congruence_System & | cgs | ) | [inline] |
Constructs a COW-wrapped object corresponding to the pointset defined by cgs.
Definition at line 108 of file Determinate.inlines.hh.
References Parma_Polyhedra_Library::Determinate< PSET >::Rep::new_reference(), and Parma_Polyhedra_Library::Determinate< PSET >::prep.
00109 : prep(new Rep(cgs)) { 00110 prep->new_reference(); 00111 }
| Parma_Polyhedra_Library::Determinate< PSET >::Determinate | ( | const Determinate< PSET > & | y | ) | [inline] |
Copy constructor.
Definition at line 115 of file Determinate.inlines.hh.
References Parma_Polyhedra_Library::Determinate< PSET >::Rep::new_reference(), and Parma_Polyhedra_Library::Determinate< PSET >::prep.
00116 : prep(y.prep) { 00117 prep->new_reference(); 00118 }
| Parma_Polyhedra_Library::Determinate< PSET >::~Determinate | ( | ) | [inline] |
Destructor.
Definition at line 122 of file Determinate.inlines.hh.
References Parma_Polyhedra_Library::Determinate< PSET >::Rep::del_reference(), and Parma_Polyhedra_Library::Determinate< PSET >::prep.
00122 { 00123 if (prep->del_reference()) 00124 delete prep; 00125 }
| void Parma_Polyhedra_Library::Determinate< PSET >::concatenate_assign | ( | const Determinate< PSET > & | y | ) | [inline] |
Assigns to *this the concatenation of *this and y, taken in this order.
Definition at line 199 of file Determinate.inlines.hh.
References Parma_Polyhedra_Library::Determinate< PSET >::pointset().
Referenced by Parma_Polyhedra_Library::Pointset_Powerset< PSET >::concatenate_assign().
00199 { 00200 pointset().concatenate_assign(y.pointset()); 00201 }
| bool Parma_Polyhedra_Library::Determinate< PSET >::definitely_entails | ( | const Determinate< PSET > & | y | ) | const [inline] |
Returns true if and only if *this entails y.
Definition at line 205 of file Determinate.inlines.hh.
References Parma_Polyhedra_Library::Determinate< PSET >::prep, and Parma_Polyhedra_Library::Determinate< PSET >::Rep::pset.
| memory_size_type Parma_Polyhedra_Library::Determinate< PSET >::external_memory_in_bytes | ( | ) | const [inline] |
Returns a lower bound to the size in bytes of the memory managed by *this.
Definition at line 229 of file Determinate.inlines.hh.
References Parma_Polyhedra_Library::Determinate< PSET >::prep, and Parma_Polyhedra_Library::Determinate< PSET >::Rep::total_memory_in_bytes().
Referenced by Parma_Polyhedra_Library::Determinate< PSET >::total_memory_in_bytes().
00229 { 00230 return prep->total_memory_in_bytes(); 00231 }
| bool Parma_Polyhedra_Library::Determinate< PSET >::has_nontrivial_weakening | ( | ) | [inline, static] |
Returns true if and only if this domain has a nontrivial weakening operator.
Definition at line 181 of file Determinate.inlines.hh.
| bool Parma_Polyhedra_Library::Determinate< PSET >::is_bottom | ( | ) | const [inline] |
Returns true if and only if *this embeds the empty element of PSET.
Definition at line 223 of file Determinate.inlines.hh.
References Parma_Polyhedra_Library::Determinate< PSET >::prep, and Parma_Polyhedra_Library::Determinate< PSET >::Rep::pset.
Referenced by Parma_Polyhedra_Library::Pointset_Powerset< PSET >::concatenate_assign().
| bool Parma_Polyhedra_Library::Determinate< PSET >::is_definitely_equivalent_to | ( | const Determinate< PSET > & | y | ) | const [inline] |
Returns true if and only if *this and y are definitely equivalent.
Definition at line 211 of file Determinate.inlines.hh.
References Parma_Polyhedra_Library::Determinate< PSET >::prep, and Parma_Polyhedra_Library::Determinate< PSET >::Rep::pset.
| bool Parma_Polyhedra_Library::Determinate< PSET >::is_top | ( | ) | const [inline] |
Returns true if and only if *this embeds the universe element PSET.
Definition at line 217 of file Determinate.inlines.hh.
References Parma_Polyhedra_Library::Determinate< PSET >::prep, and Parma_Polyhedra_Library::Determinate< PSET >::Rep::pset.
| Determinate< PSET >::Binary_Operator_Assign_Lifter< Binary_Operator_Assign > Parma_Polyhedra_Library::Determinate< PSET >::lift_op_assign | ( | Binary_Operator_Assign | op_assign | ) | [inline, static] |
Helper function returning a Binary_Operator_Assign_Lifter object, also allowing for the deduction of template arguments.
Definition at line 291 of file Determinate.inlines.hh.
Referenced by Parma_Polyhedra_Library::Pointset_Powerset< PSET >::intersection_assign(), and Parma_Polyhedra_Library::Pointset_Powerset< PSET >::time_elapse_assign().
| void Parma_Polyhedra_Library::Determinate< PSET >::meet_assign | ( | const Determinate< PSET > & | y | ) | [inline] |
Assigns to *this the meet of *this and y.
Definition at line 175 of file Determinate.inlines.hh.
References Parma_Polyhedra_Library::Determinate< PSET >::pointset().
00175 { 00176 pointset().intersection_assign(y.pointset()); 00177 }
| void Parma_Polyhedra_Library::Determinate< PSET >::mutate | ( | ) | [inline] |
On return from this method, the representation of *this is not shared by different Determinate objects.
Definition at line 145 of file Determinate.inlines.hh.
References Parma_Polyhedra_Library::Determinate< PSET >::Rep::del_reference(), Parma_Polyhedra_Library::Determinate< PSET >::Rep::is_shared(), Parma_Polyhedra_Library::Determinate< PSET >::Rep::new_reference(), Parma_Polyhedra_Library::Determinate< PSET >::prep, and Parma_Polyhedra_Library::Determinate< PSET >::Rep::pset.
Referenced by Parma_Polyhedra_Library::Determinate< PSET >::pointset().
| bool Parma_Polyhedra_Library::Determinate< PSET >::OK | ( | ) | const [inline] |
Checks if all the invariants are satisfied.
Definition at line 241 of file Determinate.inlines.hh.
References Parma_Polyhedra_Library::Determinate< PSET >::prep, and Parma_Polyhedra_Library::Determinate< PSET >::Rep::pset.
| Determinate< PSET > & Parma_Polyhedra_Library::Determinate< PSET >::operator= | ( | const Determinate< PSET > & | y | ) | [inline] |
Assignment operator.
Definition at line 129 of file Determinate.inlines.hh.
References Parma_Polyhedra_Library::Determinate< PSET >::Rep::del_reference(), Parma_Polyhedra_Library::Determinate< PSET >::Rep::new_reference(), and Parma_Polyhedra_Library::Determinate< PSET >::prep.
00129 { 00130 y.prep->new_reference(); 00131 if (prep->del_reference()) 00132 delete prep; 00133 prep = y.prep; 00134 return *this; 00135 }
| PSET & Parma_Polyhedra_Library::Determinate< PSET >::pointset | ( | ) | [inline] |
Returns a reference to the embedded element.
Definition at line 162 of file Determinate.inlines.hh.
References Parma_Polyhedra_Library::Determinate< PSET >::mutate(), Parma_Polyhedra_Library::Determinate< PSET >::prep, and Parma_Polyhedra_Library::Determinate< PSET >::Rep::pset.
| const PSET & Parma_Polyhedra_Library::Determinate< PSET >::pointset | ( | ) | const [inline] |
Returns a const reference to the embedded pointset.
Definition at line 156 of file Determinate.inlines.hh.
References Parma_Polyhedra_Library::Determinate< PSET >::prep, and Parma_Polyhedra_Library::Determinate< PSET >::Rep::pset.
Referenced by Parma_Polyhedra_Library::Determinate< PSET >::concatenate_assign(), Parma_Polyhedra_Library::Determinate< PSET >::meet_assign(), Parma_Polyhedra_Library::Determinate< PSET >::Binary_Operator_Assign_Lifter< Binary_Operator_Assign >::operator()(), Parma_Polyhedra_Library::Determinate< PSET >::upper_bound_assign(), and Parma_Polyhedra_Library::Determinate< PSET >::weakening_assign().
| void Parma_Polyhedra_Library::Determinate< PSET >::swap | ( | Determinate< PSET > & | y | ) | [inline] |
Swaps *this with y.
Definition at line 139 of file Determinate.inlines.hh.
References Parma_Polyhedra_Library::Determinate< PSET >::prep.
Referenced by Parma_Polyhedra_Library::Determinate< PSET >::swap().
| memory_size_type Parma_Polyhedra_Library::Determinate< PSET >::total_memory_in_bytes | ( | ) | const [inline] |
Returns a lower bound to the total size in bytes of the memory occupied by *this.
Definition at line 235 of file Determinate.inlines.hh.
References Parma_Polyhedra_Library::Determinate< PSET >::external_memory_in_bytes().
00235 { 00236 return sizeof(*this) + external_memory_in_bytes(); 00237 }
| void Parma_Polyhedra_Library::Determinate< PSET >::upper_bound_assign | ( | const Determinate< PSET > & | y | ) | [inline] |
Assigns to *this the upper bound of *this and y.
Definition at line 169 of file Determinate.inlines.hh.
References Parma_Polyhedra_Library::Determinate< PSET >::pointset().
00169 { 00170 pointset().upper_bound_assign(y.pointset()); 00171 }
| void Parma_Polyhedra_Library::Determinate< PSET >::weakening_assign | ( | const Determinate< PSET > & | y | ) | [inline] |
Assigns to *this the result of weakening *this with y.
Definition at line 190 of file Determinate.inlines.hh.
References Parma_Polyhedra_Library::Determinate< PSET >::pointset().
00190 { 00191 // FIXME: the following should be turned into a proper 00192 // implementation. This can be postponed until the time the 00193 // ask-and-tell construction is revived. 00194 pointset().difference_assign(y.pointset()); 00195 }
| bool operator!= | ( | const Determinate< PSET > & | x, | |
| const Determinate< PSET > & | y | |||
| ) | [friend] |
Returns true if and only if x and y are different COW-wrapped pointsets.
Definition at line 267 of file Determinate.inlines.hh.
| std::ostream & operator<< | ( | std::ostream & | s, | |
| const Determinate< PSET > & | x | |||
| ) | [related] |
Output operator.
Definition at line 250 of file Determinate.inlines.hh.
| bool operator== | ( | const Determinate< PSET > & | x, | |
| const Determinate< PSET > & | y | |||
| ) | [friend] |
Returns true if and only if x and y are the same COW-wrapped pointset.
Definition at line 260 of file Determinate.inlines.hh.
| void swap | ( | Parma_Polyhedra_Library::Determinate< PSET > & | x, | |
| Parma_Polyhedra_Library::Determinate< PSET > & | y | |||
| ) | [related] |
Specializes std::swap.
Definition at line 303 of file Determinate.inlines.hh.
References Parma_Polyhedra_Library::Determinate< PSET >::swap().
00304 { 00305 x.swap(y); 00306 }
Rep* Parma_Polyhedra_Library::Determinate< PSET >::prep [private] |
A pointer to the possibly shared representation of the base-level domain element.
Definition at line 315 of file Determinate.defs.hh.
Referenced by Parma_Polyhedra_Library::Determinate< PSET >::definitely_entails(), Parma_Polyhedra_Library::Determinate< PSET >::Determinate(), Parma_Polyhedra_Library::Determinate< PSET >::external_memory_in_bytes(), Parma_Polyhedra_Library::Determinate< PSET >::is_bottom(), Parma_Polyhedra_Library::Determinate< PSET >::is_definitely_equivalent_to(), Parma_Polyhedra_Library::Determinate< PSET >::is_top(), Parma_Polyhedra_Library::Determinate< PSET >::mutate(), Parma_Polyhedra_Library::Determinate< PSET >::OK(), Parma_Polyhedra_Library::Determinate< PSET >::operator=(), Parma_Polyhedra_Library::Determinate< PSET >::pointset(), Parma_Polyhedra_Library::Determinate< PSET >::swap(), and Parma_Polyhedra_Library::Determinate< PSET >::~Determinate().
1.6.3