#include <Determinate.defs.hh>
Member Functions that Do Not Modify the Domain Element | |
const PS & | 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. | |
static bool | has_nontrivial_weakening () |
Public Member Functions | |
Constructors and Destructor | |
Determinate (const PS &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 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. | |
PS & | 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< PS > &x, const Determinate< PS > &y) |
Returns true if and only if x and y are the same domain element. | |
bool | operator!= (const Determinate< PS > &x, const Determinate< PS > &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 PS> | |
std::ostream & | operator<< (std::ostream &, const Determinate< PS > &) |
Output operator. | |
template<typename PS> | |
void | swap (Parma_Polyhedra_Library::Determinate< PS > &x, Parma_Polyhedra_Library::Determinate< PS > &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< PS >::Determinate | ( | const PS & | 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< PS >::Rep::new_reference(), and Parma_Polyhedra_Library::Determinate< PS >::prep.
00094 : prep(new Rep(ph)) { 00095 prep->new_reference(); 00096 }
Parma_Polyhedra_Library::Determinate< PS >::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< PS >::Rep::new_reference(), and Parma_Polyhedra_Library::Determinate< PS >::prep.
00101 : prep(new Rep(cs)) { 00102 prep->new_reference(); 00103 }
Parma_Polyhedra_Library::Determinate< PS >::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< PS >::Rep::new_reference(), and Parma_Polyhedra_Library::Determinate< PS >::prep.
00108 : prep(new Rep(cgs)) { 00109 prep->new_reference(); 00110 }
Parma_Polyhedra_Library::Determinate< PS >::Determinate | ( | const Determinate< PS > & | y | ) | [inline] |
Copy constructor.
Definition at line 114 of file Determinate.inlines.hh.
References Parma_Polyhedra_Library::Determinate< PS >::Rep::new_reference(), and Parma_Polyhedra_Library::Determinate< PS >::prep.
00115 : prep(y.prep) { 00116 prep->new_reference(); 00117 }
Parma_Polyhedra_Library::Determinate< PS >::~Determinate | ( | ) | [inline] |
Destructor.
Definition at line 121 of file Determinate.inlines.hh.
References Parma_Polyhedra_Library::Determinate< PS >::Rep::del_reference(), and Parma_Polyhedra_Library::Determinate< PS >::prep.
00121 { 00122 if (prep->del_reference()) 00123 delete prep; 00124 }
const PS & Parma_Polyhedra_Library::Determinate< PS >::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< PS >::Rep::ph, and Parma_Polyhedra_Library::Determinate< PS >::prep.
Referenced by Parma_Polyhedra_Library::Determinate< PS >::concatenate_assign(), Parma_Polyhedra_Library::Determinate< PS >::meet_assign(), Parma_Polyhedra_Library::Determinate< PS >::Binary_Operator_Assign_Lifter< Binary_Operator_Assign >::operator()(), Parma_Polyhedra_Library::Determinate< PS >::upper_bound_assign(), and Parma_Polyhedra_Library::Determinate< PS >::weakening_assign().
bool Parma_Polyhedra_Library::Determinate< PS >::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 212 of file Determinate.inlines.hh.
References Parma_Polyhedra_Library::Determinate< PS >::Rep::ph, and Parma_Polyhedra_Library::Determinate< PS >::prep.
bool Parma_Polyhedra_Library::Determinate< PS >::is_bottom | ( | ) | const [inline] |
Returns true
if and only if *this
is the bottom of the determinate constraint system.
Definition at line 218 of file Determinate.inlines.hh.
References Parma_Polyhedra_Library::Determinate< PS >::Rep::ph, and Parma_Polyhedra_Library::Determinate< PS >::prep.
Referenced by Parma_Polyhedra_Library::Pointset_Powerset< PS >::concatenate_assign().
bool Parma_Polyhedra_Library::Determinate< PS >::definitely_entails | ( | const Determinate< PS > & | y | ) | const [inline] |
Returns true
if and only if *this
entails y
.
Definition at line 200 of file Determinate.inlines.hh.
References Parma_Polyhedra_Library::Determinate< PS >::Rep::ph, and Parma_Polyhedra_Library::Determinate< PS >::prep.
bool Parma_Polyhedra_Library::Determinate< PS >::is_definitely_equivalent_to | ( | const Determinate< PS > & | y | ) | const [inline] |
Returns true
if and only if *this
and y
are equivalent.
Definition at line 206 of file Determinate.inlines.hh.
References Parma_Polyhedra_Library::Determinate< PS >::Rep::ph, and Parma_Polyhedra_Library::Determinate< PS >::prep.
memory_size_type Parma_Polyhedra_Library::Determinate< PS >::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 230 of file Determinate.inlines.hh.
References Parma_Polyhedra_Library::Determinate< PS >::external_memory_in_bytes().
00230 { 00231 return sizeof(*this) + external_memory_in_bytes(); 00232 }
memory_size_type Parma_Polyhedra_Library::Determinate< PS >::external_memory_in_bytes | ( | ) | const [inline] |
Returns a lower bound to the size in bytes of the memory managed by *this
.
Definition at line 224 of file Determinate.inlines.hh.
References Parma_Polyhedra_Library::Determinate< PS >::prep, and Parma_Polyhedra_Library::Determinate< PS >::Rep::total_memory_in_bytes().
Referenced by Parma_Polyhedra_Library::Determinate< PS >::total_memory_in_bytes().
00224 { 00225 return prep->total_memory_in_bytes(); 00226 }
bool Parma_Polyhedra_Library::Determinate< PS >::has_nontrivial_weakening | ( | ) | [inline, static] |
Returns true
if and only if this domain has a nontrivial weakening operator.
Definition at line 180 of file Determinate.inlines.hh.
bool Parma_Polyhedra_Library::Determinate< PS >::OK | ( | ) | const [inline] |
Checks if all the invariants are satisfied.
Definition at line 236 of file Determinate.inlines.hh.
References Parma_Polyhedra_Library::Determinate< PS >::Rep::ph, and Parma_Polyhedra_Library::Determinate< PS >::prep.
void Parma_Polyhedra_Library::Determinate< PS >::upper_bound_assign | ( | const Determinate< PS > & | 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< PS >::element().
00168 { 00169 element().upper_bound_assign(y.element()); 00170 }
void Parma_Polyhedra_Library::Determinate< PS >::meet_assign | ( | const Determinate< PS > & | 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< PS >::element().
00174 { 00175 element().intersection_assign(y.element()); 00176 }
void Parma_Polyhedra_Library::Determinate< PS >::weakening_assign | ( | const Determinate< PS > & | y | ) | [inline] |
Assigns to *this
the result of weakening *this
with y
.
Definition at line 187 of file Determinate.inlines.hh.
References Parma_Polyhedra_Library::Determinate< PS >::element().
00187 { 00188 // FIXME 00189 element().difference_assign(y.element()); 00190 }
void Parma_Polyhedra_Library::Determinate< PS >::concatenate_assign | ( | const Determinate< PS > & | y | ) | [inline] |
Assigns to *this
the concatenation of *this
and y
, taken in this order.
Definition at line 194 of file Determinate.inlines.hh.
References Parma_Polyhedra_Library::Determinate< PS >::element().
Referenced by Parma_Polyhedra_Library::Pointset_Powerset< PS >::concatenate_assign().
00194 { 00195 element().concatenate_assign(y.element()); 00196 }
PS & Parma_Polyhedra_Library::Determinate< PS >::element | ( | ) | [inline] |
Returns a reference to the embedded element.
Definition at line 161 of file Determinate.inlines.hh.
References Parma_Polyhedra_Library::Determinate< PS >::mutate(), Parma_Polyhedra_Library::Determinate< PS >::Rep::ph, and Parma_Polyhedra_Library::Determinate< PS >::prep.
void Parma_Polyhedra_Library::Determinate< PS >::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< PS >::Rep::del_reference(), Parma_Polyhedra_Library::Determinate< PS >::Rep::is_shared(), Parma_Polyhedra_Library::Determinate< PS >::Rep::new_reference(), Parma_Polyhedra_Library::Determinate< PS >::Rep::ph, and Parma_Polyhedra_Library::Determinate< PS >::prep.
Referenced by Parma_Polyhedra_Library::Determinate< PS >::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< PS > & Parma_Polyhedra_Library::Determinate< PS >::operator= | ( | const Determinate< PS > & | y | ) | [inline] |
Assignment operator.
Definition at line 128 of file Determinate.inlines.hh.
References Parma_Polyhedra_Library::Determinate< PS >::Rep::del_reference(), Parma_Polyhedra_Library::Determinate< PS >::Rep::new_reference(), and Parma_Polyhedra_Library::Determinate< PS >::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< PS >::swap | ( | Determinate< PS > & | y | ) | [inline] |
Swaps *this
with y
.
Definition at line 138 of file Determinate.inlines.hh.
References Parma_Polyhedra_Library::Determinate< PS >::prep, and Parma_Polyhedra_Library::swap().
Referenced by Parma_Polyhedra_Library::Determinate< PS >::swap().
Determinate< PS >::Binary_Operator_Assign_Lifter< Binary_Operator_Assign > Parma_Polyhedra_Library::Determinate< PS >::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 286 of file Determinate.inlines.hh.
Referenced by Parma_Polyhedra_Library::Pointset_Powerset< PS >::intersection_assign(), and Parma_Polyhedra_Library::Pointset_Powerset< PS >::time_elapse_assign().
bool operator== | ( | const Determinate< PS > & | x, | |
const Determinate< PS > & | y | |||
) | [friend] |
Returns true
if and only if x
and y
are the same domain element.
Definition at line 255 of file Determinate.inlines.hh.
bool operator!= | ( | const Determinate< PS > & | x, | |
const Determinate< PS > & | y | |||
) | [friend] |
Returns true
if and only if x
and y
are different domain elements.
Definition at line 262 of file Determinate.inlines.hh.
std::ostream & operator<< | ( | std::ostream & | s, | |
const Determinate< PS > & | x | |||
) | [related] |
void swap | ( | Parma_Polyhedra_Library::Determinate< PS > & | x, | |
Parma_Polyhedra_Library::Determinate< PS > & | y | |||
) | [related] |
Specializes std::swap
.
Definition at line 298 of file Determinate.inlines.hh.
References Parma_Polyhedra_Library::Determinate< PS >::swap().
00299 { 00300 x.swap(y); 00301 }
Rep* Parma_Polyhedra_Library::Determinate< PS >::prep [private] |
A pointer to the possibly shared representation of the base-level domain element.
Definition at line 304 of file Determinate.defs.hh.
Referenced by Parma_Polyhedra_Library::Determinate< PS >::definitely_entails(), Parma_Polyhedra_Library::Determinate< PS >::Determinate(), Parma_Polyhedra_Library::Determinate< PS >::element(), Parma_Polyhedra_Library::Determinate< PS >::external_memory_in_bytes(), Parma_Polyhedra_Library::Determinate< PS >::is_bottom(), Parma_Polyhedra_Library::Determinate< PS >::is_definitely_equivalent_to(), Parma_Polyhedra_Library::Determinate< PS >::is_top(), Parma_Polyhedra_Library::Determinate< PS >::mutate(), Parma_Polyhedra_Library::Determinate< PS >::OK(), Parma_Polyhedra_Library::Determinate< PS >::operator=(), Parma_Polyhedra_Library::Determinate< PS >::swap(), and Parma_Polyhedra_Library::Determinate< PS >::~Determinate().