#include <IbexEnv.h>

Public Member Functions | |
| ~Env () | |
| int | nb_keys () const |
| pair< int, Dim > | symbol_info (const char full_name[]) const |
| pair< int, Dim > | symbol_info (const char *base_name, int index1, int index2, int index3) const |
| int | symbol_key (const char *full_name) const |
| Dim | symbol_dim (const char *full_name) const |
| const char * | symbol_name (int key) const |
| const Symbol & | symbol (int key) const |
| const Symbol & | add_symbol (const char *base_name, const Dim &dim) |
| const Symbol & | symbol_expr (const char *base_name) const |
| const ExtendedSymbol & | ext_symbol_expr (const char *full_name) const |
| bool | used (const char *base_name) const |
| const Symbol & | add_symbol (const char *base_name, int length1=0, int length2=0, int length3=0) |
| const Symbol & | add_anonymous_symbol (int length1=0, int length2=0, int length3=0) |
| const Expr & | expression (int i) |
| void | add_expression (const Expr &expr) |
| int | nb_expressions () |
| int | add_ctr (const Constraint &c, const char *name=NULL) |
| int | nb_constraints () const |
| const Constraint & | constraint (int num) const |
| const Constraint & | constraint (const char *ctr_name) const |
| void | add_function (const Function &func) |
| const Function & | function (const char *func_name) const |
Friends | |
| std::ostream & | operator<< (std::ostream &, const Env &) |
Handles the symbolic part of constraint processing.
For the moment, this class is only used as a container for symbols, expressions and constraints. All the expressions of the same context (i.e., whose variable symbols have to be bound to the same entity) must be stored in the same environment. An environment therefore also defines the context of different constraints/contractors. Any symbolic handling such as creation, copy (and possibly factorization, development, etc. in the future) has to be performed via the environment.
| ibex::Env::~Env | ( | ) |
Delete this instance.
| int ibex::Env::nb_keys | ( | ) | const [inline] |
Return the number of symbol keys in the environment.
| pair< int, struct Dim > ibex::Env::symbol_info | ( | const char | full_name[] | ) | const |
Return the information (key and dimension) of a symbol, from its full name.
| pair< int, struct Dim > ibex::Env::symbol_info | ( | const char * | base_name, | |
| int | index1, | |||
| int | index2, | |||
| int | index3 | |||
| ) | const |
Return the information (key and dimension) of a symbol, from its base name and indexes.
| int ibex::Env::symbol_key | ( | const char * | full_name | ) | const [inline] |
Returnthe key associated to a symbol.
| Dim ibex::Env::symbol_dim | ( | const char * | full_name | ) | const [inline] |
Return the dimension associated to a symbol.
| const char * ibex::Env::symbol_name | ( | int | key | ) | const |
Return the name associated to a symbol key.
| const Symbol & ibex::Env::symbol | ( | int | key | ) | const |
Return the symbol whose key is key.
Insert a new symbol into the environment.
| base_name | The symbol name, e.g., "x". | |
| dim | The dimension, e.g., Dim(0,2,3) which means that "x" is a 2x3 array. |
| const Symbol& ibex::Env::symbol_expr | ( | const char * | base_name | ) | const [inline] |
Get the symbol expression from its base name.
| const ExtendedSymbol & ibex::Env::ext_symbol_expr | ( | const char * | full_name | ) | const |
Get the extended symbol expression from its full name.
| bool ibex::Env::used | ( | const char * | base_name | ) | const [inline] |
Return true if the symbol base_name exists in the environment.
| const Symbol & ibex::Env::add_symbol | ( | const char * | base_name, | |
| int | length1 = 0, |
|||
| int | length2 = 0, |
|||
| int | length3 = 0 | |||
| ) |
Insert a new symbol into the environment. This function is typically used by ibex::CSP::CSP(const char*). It can also be used when equations are not defined explicitely but via contractors (in this case, symbols must be inserted manually).
| base_name | - the symbol base name (e.g., "x"). | |
| length1 | (optional) - if set, this symbol is a vector of dimension length1. | |
| length2 | (optional) - if set, this symbol is a matrix of length1 rows and length2 columns. If x is such a symbol, x[i] designates the transpose of the ith row (i.e., a column vector) and x[i][j] designates the entry (i,j). | |
| length3 | (optional) - if set this symbol is an array of length1 matrices of dimension length2 x length3. If x is such a symbol, x[k] designates a matrix, x[k][i] the transpose of the ith row of the kth matrix (i.e., a column vector) and x[k][i][j] an entry. |
| const Symbol & ibex::Env::add_anonymous_symbol | ( | int | length1 = 0, |
|
| int | length2 = 0, |
|||
| int | length3 = 0 | |||
| ) |
Insert a new, automaticaly generated, symbol. This function is useful, e.g., when a contractor needs to create an entity for its own purpose. In this case, since the symbol associated to the entity is not used anywhere else, its actual name does not matter (provided that it is decided to handle this symbol only by its key in the contractor).
| const Expr& ibex::Env::expression | ( | int | i | ) | [inline] |
Return the ith expression.
| void ibex::Env::add_expression | ( | const Expr & | expr | ) | [inline] |
Add a new expression.
| int ibex::Env::nb_expressions | ( | ) | [inline] |
Return the total number of expressions.
| int ibex::Env::add_ctr | ( | const Constraint & | c, | |
| const char * | name = NULL | |||
| ) |
Add a new constraint into the environment.
| int ibex::Env::nb_constraints | ( | ) | const [inline] |
Return the number of constraint expressions in the environment.
| const Constraint& ibex::Env::constraint | ( | int | num | ) | const [inline] |
Return the expression of the num th constraint.
| const Constraint& ibex::Env::constraint | ( | const char * | ctr_name | ) | const [inline] |
Return the expression of the constraint named ctr_name.
| void ibex::Env::add_function | ( | const Function & | func | ) |
Add a new function into the environment. The memory will be disallocated by the environment itself.
| const Function& ibex::Env::function | ( | const char * | func_name | ) | const [inline] |
Return the function whose name is func_name.
| std::ostream& operator<< | ( | std::ostream & | os, | |
| const Env & | env | |||
| ) | [friend] |
Stream out the content of the environment (for debug purposes).
1.5.5