#include <Determinate.defs.hh>
Public Member Functions | |
Constructors and Destructor | |
Determinate (const PH &p) | |
Injection operator: builds the determinate constraint system element corresponding to the base-level element p . | |
Determinate (const Constraint_System &cs) | |
Injection operator: builds the determinate constraint system element corresponding to the base-level element represented by cs . | |
Determinate (const Congruence_System &cgs) | |
Injection operator: builds the determinate constraint system element corresponding to the base-level element represented by cgs . | |
Determinate (const Determinate &y) | |
Copy constructor. | |
~Determinate () | |
Destructor. | |
Member Functions that Do Not Modify the Domain Element | |
const PH & | element () const |
Returns a const reference to the embedded element. | |
bool | is_top () const |
Returns true if and only if *this is the top of the determinate constraint system (i.e., the whole vector space). | |
bool | is_bottom () const |
Returns true if and only if *this is the bottom of the determinate constraint system. | |
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 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. | |
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 | concatenate_assign (const Determinate &y) |
Assigns to *this the concatenation of *this and y , taken in this order. | |
PH & | element () |
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< PH > &x, const Determinate< PH > &y) |
Returns true if and only if x and y are the same domain element. | |
bool | operator!= (const Determinate< PH > &x, const Determinate< PH > &y) |
Returns true if and only if x and y are different domain elements. | |
Related Functions | |
(Note that these are not member functions.) | |
template<typename PH> | |
std::ostream & | operator<< (std::ostream &, const Determinate< PH > &) |
Output operator. | |
template<typename PH> | |
void | swap (Parma_Polyhedra_Library::Determinate< PH > &x, Parma_Polyhedra_Library::Determinate< PH > &y) |
Specializes std::swap . | |
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... |
Definition at line 69 of file Determinate.defs.hh.
Parma_Polyhedra_Library::Determinate< PH >::Determinate | ( | const PH & | p | ) | [inline] |
Injection operator: builds the determinate constraint system element corresponding to the base-level element p
.
Definition at line 93 of file Determinate.inlines.hh.
References Parma_Polyhedra_Library::Determinate< PH >::Rep::new_reference(), and Parma_Polyhedra_Library::Determinate< PH >::prep.
00094 : prep(new Rep(ph)) { 00095 prep->new_reference(); 00096 }
Parma_Polyhedra_Library::Determinate< PH >::Determinate | ( | const Constraint_System & | cs | ) | [inline] |
Injection operator: builds the determinate constraint system element corresponding to the base-level element represented by cs
.
Definition at line 100 of file Determinate.inlines.hh.
References Parma_Polyhedra_Library::Determinate< PH >::Rep::new_reference(), and Parma_Polyhedra_Library::Determinate< PH >::prep.
00101 : prep(new Rep(cs)) { 00102 prep->new_reference(); 00103 }
Parma_Polyhedra_Library::Determinate< PH >::Determinate | ( | const Congruence_System & | cgs | ) | [inline] |
Injection operator: builds the determinate constraint system element corresponding to the base-level element represented by cgs
.
Definition at line 107 of file Determinate.inlines.hh.
References Parma_Polyhedra_Library::Determinate< PH >::Rep::new_reference(), and Parma_Polyhedra_Library::Determinate< PH >::prep.
00108 : prep(new Rep(cgs)) { 00109 prep->new_reference(); 00110 }
Parma_Polyhedra_Library::Determinate< PH >::Determinate | ( | const Determinate< PH > & | y | ) | [inline] |
Copy constructor.
Definition at line 114 of file Determinate.inlines.hh.
References Parma_Polyhedra_Library::Determinate< PH >::Rep::new_reference(), and Parma_Polyhedra_Library::Determinate< PH >::prep.
00115 : prep(y.prep) { 00116 prep->new_reference(); 00117 }
Parma_Polyhedra_Library::Determinate< PH >::~Determinate | ( | ) | [inline] |
Destructor.
Definition at line 121 of file Determinate.inlines.hh.
References Parma_Polyhedra_Library::Determinate< PH >::Rep::del_reference(), and Parma_Polyhedra_Library::Determinate< PH >::prep.
00121 { 00122 if (prep->del_reference()) 00123 delete prep; 00124 }
const PH & Parma_Polyhedra_Library::Determinate< PH >::element | ( | ) | const [inline] |
Returns a const reference to the embedded element.
Definition at line 155 of file Determinate.inlines.hh.
References Parma_Polyhedra_Library::Determinate< PH >::Rep::ph, and Parma_Polyhedra_Library::Determinate< PH >::prep.
Referenced by Parma_Polyhedra_Library::Determinate< PH >::concatenate_assign(), Parma_Polyhedra_Library::Determinate< PH >::meet_assign(), Parma_Polyhedra_Library::Determinate< PH >::Binary_Operator_Assign_Lifter< Binary_Operator_Assign >::operator()(), and Parma_Polyhedra_Library::Determinate< PH >::upper_bound_assign().
bool Parma_Polyhedra_Library::Determinate< PH >::is_top | ( | ) | const [inline] |
Returns true
if and only if *this
is the top of the determinate constraint system (i.e., the whole vector space).
Definition at line 198 of file Determinate.inlines.hh.
References Parma_Polyhedra_Library::Determinate< PH >::Rep::ph, and Parma_Polyhedra_Library::Determinate< PH >::prep.
bool Parma_Polyhedra_Library::Determinate< PH >::is_bottom | ( | ) | const [inline] |
Returns true
if and only if *this
is the bottom of the determinate constraint system.
Definition at line 204 of file Determinate.inlines.hh.
References Parma_Polyhedra_Library::Determinate< PH >::Rep::ph, and Parma_Polyhedra_Library::Determinate< PH >::prep.
Referenced by Parma_Polyhedra_Library::Polyhedra_Powerset< PH >::concatenate_assign().
bool Parma_Polyhedra_Library::Determinate< PH >::definitely_entails | ( | const Determinate< PH > & | y | ) | const [inline] |
Returns true
if and only if *this
entails y
.
Definition at line 186 of file Determinate.inlines.hh.
References Parma_Polyhedra_Library::Determinate< PH >::Rep::ph, and Parma_Polyhedra_Library::Determinate< PH >::prep.
bool Parma_Polyhedra_Library::Determinate< PH >::is_definitely_equivalent_to | ( | const Determinate< PH > & | y | ) | const [inline] |
Returns true
if and only if *this
and y
are equivalent.
Definition at line 192 of file Determinate.inlines.hh.
References Parma_Polyhedra_Library::Determinate< PH >::Rep::ph, and Parma_Polyhedra_Library::Determinate< PH >::prep.
memory_size_type Parma_Polyhedra_Library::Determinate< PH >::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 216 of file Determinate.inlines.hh.
References Parma_Polyhedra_Library::Determinate< PH >::external_memory_in_bytes().
00216 { 00217 return sizeof(*this) + external_memory_in_bytes(); 00218 }
memory_size_type Parma_Polyhedra_Library::Determinate< PH >::external_memory_in_bytes | ( | ) | const [inline] |
Returns a lower bound to the size in bytes of the memory managed by *this
.
Definition at line 210 of file Determinate.inlines.hh.
References Parma_Polyhedra_Library::Determinate< PH >::prep, and Parma_Polyhedra_Library::Determinate< PH >::Rep::total_memory_in_bytes().
Referenced by Parma_Polyhedra_Library::Determinate< PH >::total_memory_in_bytes().
00210 { 00211 return prep->total_memory_in_bytes(); 00212 }
bool Parma_Polyhedra_Library::Determinate< PH >::OK | ( | ) | const [inline] |
Checks if all the invariants are satisfied.
Definition at line 222 of file Determinate.inlines.hh.
References Parma_Polyhedra_Library::Determinate< PH >::Rep::ph, and Parma_Polyhedra_Library::Determinate< PH >::prep.
void Parma_Polyhedra_Library::Determinate< PH >::upper_bound_assign | ( | const Determinate< PH > & | y | ) | [inline] |
Assigns to *this
the upper bound of *this
and y
.
Definition at line 168 of file Determinate.inlines.hh.
References Parma_Polyhedra_Library::Determinate< PH >::element().
00168 { 00169 element().upper_bound_assign(y.element()); 00170 }
void Parma_Polyhedra_Library::Determinate< PH >::meet_assign | ( | const Determinate< PH > & | y | ) | [inline] |
Assigns to *this
the meet of *this
and y
.
Definition at line 174 of file Determinate.inlines.hh.
References Parma_Polyhedra_Library::Determinate< PH >::element().
00174 { 00175 element().intersection_assign(y.element()); 00176 }
void Parma_Polyhedra_Library::Determinate< PH >::concatenate_assign | ( | const Determinate< PH > & | y | ) | [inline] |
Assigns to *this
the concatenation of *this
and y
, taken in this order.
Definition at line 180 of file Determinate.inlines.hh.
References Parma_Polyhedra_Library::Determinate< PH >::element().
Referenced by Parma_Polyhedra_Library::Polyhedra_Powerset< PH >::concatenate_assign().
00180 { 00181 element().concatenate_assign(y.element()); 00182 }
PH & Parma_Polyhedra_Library::Determinate< PH >::element | ( | ) | [inline] |
Returns a reference to the embedded element.
Definition at line 161 of file Determinate.inlines.hh.
References Parma_Polyhedra_Library::Determinate< PH >::mutate(), Parma_Polyhedra_Library::Determinate< PH >::Rep::ph, and Parma_Polyhedra_Library::Determinate< PH >::prep.
void Parma_Polyhedra_Library::Determinate< PH >::mutate | ( | ) | [inline] |
On return from this method, the representation of *this
is not shared by different Determinate objects.
Definition at line 144 of file Determinate.inlines.hh.
References Parma_Polyhedra_Library::Determinate< PH >::Rep::del_reference(), Parma_Polyhedra_Library::Determinate< PH >::Rep::is_shared(), Parma_Polyhedra_Library::Determinate< PH >::Rep::new_reference(), Parma_Polyhedra_Library::Determinate< PH >::Rep::ph, and Parma_Polyhedra_Library::Determinate< PH >::prep.
Referenced by Parma_Polyhedra_Library::Determinate< PH >::element().
00144 { 00145 if (prep->is_shared()) { 00146 Rep* new_prep = new Rep(prep->ph); 00147 (void) prep->del_reference(); 00148 new_prep->new_reference(); 00149 prep = new_prep; 00150 } 00151 }
Determinate< PH > & Parma_Polyhedra_Library::Determinate< PH >::operator= | ( | const Determinate< PH > & | y | ) | [inline] |
Assignment operator.
Definition at line 128 of file Determinate.inlines.hh.
References Parma_Polyhedra_Library::Determinate< PH >::Rep::del_reference(), Parma_Polyhedra_Library::Determinate< PH >::Rep::new_reference(), and Parma_Polyhedra_Library::Determinate< PH >::prep.
00128 { 00129 y.prep->new_reference(); 00130 if (prep->del_reference()) 00131 delete prep; 00132 prep = y.prep; 00133 return *this; 00134 }
void Parma_Polyhedra_Library::Determinate< PH >::swap | ( | Determinate< PH > & | y | ) | [inline] |
Swaps *this
with y
.
Definition at line 138 of file Determinate.inlines.hh.
References Parma_Polyhedra_Library::Determinate< PH >::prep.
Referenced by Parma_Polyhedra_Library::Determinate< PH >::swap().
00138 { 00139 std::swap(prep, y.prep); 00140 }
Determinate< PH >::Binary_Operator_Assign_Lifter< Binary_Operator_Assign > Parma_Polyhedra_Library::Determinate< PH >::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 272 of file Determinate.inlines.hh.
Referenced by Parma_Polyhedra_Library::Polyhedra_Powerset< PH >::intersection_assign(), and Parma_Polyhedra_Library::Polyhedra_Powerset< PH >::time_elapse_assign().
bool operator== | ( | const Determinate< PH > & | x, | |
const Determinate< PH > & | y | |||
) | [friend] |
Returns true
if and only if x
and y
are the same domain element.
Definition at line 241 of file Determinate.inlines.hh.
bool operator!= | ( | const Determinate< PH > & | x, | |
const Determinate< PH > & | y | |||
) | [friend] |
Returns true
if and only if x
and y
are different domain elements.
Definition at line 248 of file Determinate.inlines.hh.
std::ostream & operator<< | ( | std::ostream & | s, | |
const Determinate< PH > & | x | |||
) | [related] |
void swap | ( | Parma_Polyhedra_Library::Determinate< PH > & | x, | |
Parma_Polyhedra_Library::Determinate< PH > & | y | |||
) | [related] |
Specializes std::swap
.
Definition at line 284 of file Determinate.inlines.hh.
References Parma_Polyhedra_Library::Determinate< PH >::swap().
00285 { 00286 x.swap(y); 00287 }
Rep* Parma_Polyhedra_Library::Determinate< PH >::prep [private] |
A pointer to the possibly shared representation of the base-level domain element.
Definition at line 295 of file Determinate.defs.hh.
Referenced by Parma_Polyhedra_Library::Determinate< PH >::definitely_entails(), Parma_Polyhedra_Library::Determinate< PH >::Determinate(), Parma_Polyhedra_Library::Determinate< PH >::element(), Parma_Polyhedra_Library::Determinate< PH >::external_memory_in_bytes(), Parma_Polyhedra_Library::Determinate< PH >::is_bottom(), Parma_Polyhedra_Library::Determinate< PH >::is_definitely_equivalent_to(), Parma_Polyhedra_Library::Determinate< PH >::is_top(), Parma_Polyhedra_Library::Determinate< PH >::mutate(), Parma_Polyhedra_Library::Determinate< PH >::OK(), Parma_Polyhedra_Library::Determinate< PH >::operator=(), Parma_Polyhedra_Library::Determinate< PH >::swap(), and Parma_Polyhedra_Library::Determinate< PH >::~Determinate().