APRONXX
0.9.12
|
Level 1 arbitrary expression tree (ap_texpr1_t wrapper). More...
#include <apxx_texpr1.hh>
Inherits apron::use_malloc.
Classes | |
class | builder |
Temporary expression nodes used when constructing a texpr1. More... | |
class | const_iterator |
Iterators to traverse a constant expression tree. More... | |
class | iterator |
Iterators to traverse and mutate an expression tree. More... | |
Public Member Functions | |
Constructors | |
texpr1 (const builder &c) | |
Makes an expression from a temporary. More... | |
texpr1 (const const_iterator &x) | |
Makes a (deep) copy of the expression tree. More... | |
texpr1 (const texpr1 &x) | |
Makes a (deep) copy of the expression tree. More... | |
texpr1 (const environment &e, const var &v) | |
Makes a variable name dimension leaf. More... | |
texpr1 (const environment &e, const texpr0::const_iterator &x) | |
Makes a (deep) copy of the level 0 expression tree and associates an environment (increments reference count). More... | |
texpr1 (const environment &e, const texpr0 &x) | |
Makes a (deep) copy of the level 0 expression tree and associates an environment (increments reference count). More... | |
texpr1 (const environment &e, const texpr0::builder &c) | |
Makes an expression from a level 0 temporary. More... | |
texpr1 (const linexpr1 &l) | |
Makes an expression tree from a linear expression (copying coefficients). More... | |
texpr1 (const texpr1 &x, const environment &e) | |
Makes a (deep) copy of x and extends its environment. More... | |
texpr1 (const texpr1 &x, const var &src, const texpr1 &dst) | |
Makes a (deep) copy of x and substitutes every occurrence of the src variable name with a fresh copy of the dst expression. More... | |
Destructor | |
~texpr1 () | |
Frees the memory occupied by the expression and decrements the reference count of the environment. More... | |
Assignments | |
texpr1 & | operator= (const texpr1 &x) |
Makes a (deep) copy of the expression. More... | |
texpr1 & | operator= (const const_iterator &x) |
Makes a (deep) copy of the expression. More... | |
texpr1 & | operator= (const builder &x) |
Assigns from a temporary expression, performing a deep copy and deleting the previous value of *this. More... | |
texpr1 & | operator= (const linexpr1 &x) |
Makes *this equal to the linear expression x (coefficients are copied), deleting the previous value of *this. More... | |
Iterators | |
const_iterator | root () const |
Returns a new iterator at the root of a constant expression tree. More... | |
iterator | root () |
Returns a new iterator at the root of a mutable expression tree. More... | |
Dimension operations | |
void | extend_environment (const environment &e) |
Extends the environment of the expression. More... | |
Accesses, tests, size | |
environment | get_environment () const |
Returns the environment of the expression (with incremented reference count). More... | |
texpr0::const_iterator | get_texpr0 () const |
Returns a constant iterator at the root of the underlying texpr0. More... | |
texpr0::iterator | get_texpr0 () |
Returns an iterator at the root of the underlying texpr0. More... | |
bool | is_zero () const |
Whether the expression is a single coefficient node with 0 value. More... | |
bool | equal (const texpr1 &x) const |
Whether two expressions are syntactically, structurally equal. More... | |
size_t | depth () const |
Returns the depth of the expression tree (counting only operator nodes). More... | |
size_t | size () const |
Returns the number of operator nodes in the expression tree. More... | |
bool | has_var (const var &v) const |
Whether the given variable name occurs in the expression. More... | |
bool | is_interval_cst () const |
Whether the expression is constant (i.e., has no dimension leaves). More... | |
bool | is_interval_linear () const |
Whether the expression is linear and there is no rounding. More... | |
bool | is_interval_polynomial () const |
Whether the expression is polynomial and there is no rounding. More... | |
bool | is_interval_polyfrac () const |
Whether the expression is a polynomial fraction and there is no rounding. More... | |
bool | is_scalar () const |
Whether all occurring constants are scalar. More... | |
Operations | |
void | substitute (const var &src, const texpr1 &dst) |
Substitutes each occurrence of src with (a fresh copy of) dst. More... | |
C API compatibility | |
ap_texpr1_t * | get_ap_texpr1_t () |
Returns a pointer to the internal APRON object stored in *this. More... | |
const ap_texpr1_t * | get_ap_texpr1_t () const |
Returns a pointer to the internal APRON object stored in *this. More... | |
![]() | |
void * | operator new (size_t sz) |
void * | operator new[] (size_t sz) |
void | operator delete (void *p) |
void | operator delete[] (void *p) |
Protected Member Functions | |
texpr1 (ap_texpr1_t *x) | |
Internal use only. Shallow copy. More... | |
void | init_from (ap_environment_t *e, ap_texpr0_t *x) |
Internal use only. Shallow copy. More... | |
void | init_from (ap_texpr1_t *x) |
Internal use only. Shallow copy. More... | |
Protected Attributes | |
ap_texpr1_t | l |
Structure managed by APRON. More... | |
Printing | |
void | print (FILE *stream=stdout) const |
Prints to a C stream. More... | |
std::ostream & | operator<< (std::ostream &os, const texpr1 &s) |
Printing. More... | |
Level 1 arbitrary expression tree (ap_texpr1_t wrapper).
Level 1 version of arbitrary expression trees (texpr0). Variable names (var) are used instead of dimensions (ap_dim_t). Internally, a texpr1 wraps together a texpr0 (memory managed) and an environment (holding a reference count).
There are also level 1 equivalent of the helper classes: builder, iterator, and const_iterator.
|
inlineprotected |
Internal use only. Shallow copy.
|
inline |
Makes an expression from a temporary.
|
inline |
Makes a (deep) copy of the expression tree.
|
inline |
Makes a (deep) copy of the expression tree.
|
inline |
Makes a variable name dimension leaf.
std::invalid_argument | if the environment does not contain the variable. |
|
inline |
Makes a (deep) copy of the level 0 expression tree and associates an environment (increments reference count).
|
inline |
Makes a (deep) copy of the level 0 expression tree and associates an environment (increments reference count).
|
inline |
Makes an expression from a level 0 temporary.
|
inline |
Makes an expression tree from a linear expression (copying coefficients).
Real-valued addition and multiplication operators are used (i.e., no rounding).
|
inline |
Makes a (deep) copy of x and extends its environment.
std::invalid_argument | if e is not a super-environment of that of x. |
Makes a (deep) copy of x and substitutes every occurrence of the src variable name with a fresh copy of the dst expression.
std::invalid_argument | if the environments are not equal or do not contain the variable. |
|
inline |
Frees the memory occupied by the expression and decrements the reference count of the environment.
|
inline |
Returns the depth of the expression tree (counting only operator nodes).
|
inline |
Whether two expressions are syntactically, structurally equal.
|
inline |
Extends the environment of the expression.
std::invalid_argument | if e is not a super-environment of that of *this. |
|
inline |
Returns a pointer to the internal APRON object stored in *this.
|
inline |
Returns a pointer to the internal APRON object stored in *this.
|
inline |
Returns the environment of the expression (with incremented reference count).
|
inline |
Returns a constant iterator at the root of the underlying texpr0.
|
inline |
Returns an iterator at the root of the underlying texpr0.
|
inline |
Whether the given variable name occurs in the expression.
|
inlineprotected |
Internal use only. Shallow copy.
|
inlineprotected |
Internal use only. Shallow copy.
|
inline |
Whether the expression is constant (i.e., has no dimension leaves).
|
inline |
Whether the expression is linear and there is no rounding.
|
inline |
Whether the expression is a polynomial fraction and there is no rounding.
|
inline |
Whether the expression is polynomial and there is no rounding.
|
inline |
Whether all occurring constants are scalar.
|
inline |
Whether the expression is a single coefficient node with 0 value.
|
inline |
Makes a (deep) copy of the expression.
Assigns from a temporary expression, performing a deep copy and deleting the previous value of *this.
Makes *this equal to the linear expression x (coefficients are copied), deleting the previous value of *this.
Real-valued addition and multiplication operators are used (i.e., no rounding).
|
inline |
Prints to a C stream.
|
inline |
Returns a new iterator at the root of a constant expression tree.
|
inline |
Returns a new iterator at the root of a mutable expression tree.
|
inline |
Returns the number of operator nodes in the expression tree.
Substitutes each occurrence of src with (a fresh copy of) dst.
std::invalid_argument | if the environments are not equal or do not contain src. |
|
friend |
Printing.
|
protected |
Structure managed by APRON.