DiaDes
0.1
DIAgnosisofDiscrete-EventSystem
|
#include <Expression.hh>
Public Types | |
typedef Value::BinaryOperator | Operator |
Public Types inherited from Diades::Altarica::Expression | |
enum | Category { IfThenElse =0, Case =1, Or =2, And =3, Eq =4, Neq =5, Imply =6, Lt =7, Gt =8, Leq =9, Geq =10, Add =11, Sub =12, Mul =13, Div =14, Mod =15, Neg =16, Not =17, Paren =18, StructMember =19, ArrayMember =20, Var =21, Id =22, Min =23, Max =24, True =25, False =26, Integer =27, ForAll =28, Exist =29, FunctionCall =30, Struct =31, Array =32 } |
typedef reference_wrapper< Expression const > | ConstReference |
typedef reference_wrapper< Expression > | Reference |
typedef std::vector< ConstReference > | ExprVector |
typedef Utils::Exception< Expression > | Exception |
typedef std::vector< VariableDecl::ConstReference >::const_iterator | VariableIterator |
typedef std::vector< VariableDecl::ConstReference >::size_type | SizeType |
typedef std::vector< VariableDecl::ConstReference > | Support |
Public Member Functions | |
BinaryExpression (const NodeDecl &owner, unsigned id, const Expression &left, const Expression &right, Category category) | |
virtual bool | valid () const |
Operator | op () const |
const Expression & | left () const |
const Expression & | right () const |
Category | category () const |
virtual const Type & | valueType () const |
virtual bool | isConstant () const |
virtual | ~BinaryExpression () |
Public Member Functions inherited from Diades::Altarica::Expression | |
virtual | ~Expression () |
const AltaricaModel & | model () const |
const NodeDecl & | owner () const |
bool | operator== (const Expression &e) const |
Expression (const NodeDecl &owner, unsigned id) | |
unsigned | id () const |
VariableIterator | variableBegin () const |
VariableIterator | variableEnd () const |
SizeType | supportSize () const |
const Support & | support () const |
Private Attributes | |
const Expression & | _left |
const Expression & | _right |
Category | _category |
Operator | _op |
Additional Inherited Members | |
Static Public Member Functions inherited from Diades::Altarica::Expression | |
static string | typeName () |
Protected Attributes inherited from Diades::Altarica::Expression | |
Support | _varSupport |
const NodeDecl & | _owner |
VariableDecls that are supporting the Expression. More... | |
unsigned | _id |
Definition at line 361 of file Expression.hh.
Definition at line 364 of file Expression.hh.
Diades::Altarica::BinaryExpression::BinaryExpression | ( | const NodeDecl & | owner, |
unsigned | id, | ||
const Expression & | left, | ||
const Expression & | right, | ||
Category | category | ||
) |
|
inlinevirtual |
Definition at line 389 of file Expression.hh.
|
inlinevirtual |
Expression evaluation: this operation evaluates the expression with the current value associated to the variables that support the Expression. The evaluation is failing if there is a variable of the support that is still free (that is an unassigned variable).
value | the Value resulting from the evaluation of the current Expression. |
Implements Diades::Altarica::Expression.
Definition at line 383 of file Expression.hh.
References Diades::Altarica::Expression::valueType().
|
inlinevirtual |
Implements Diades::Altarica::Expression.
Definition at line 385 of file Expression.hh.
|
inline |
Definition at line 381 of file Expression.hh.
|
inline |
Definition at line 380 of file Expression.hh.
|
inline |
Definition at line 382 of file Expression.hh.
|
inlinevirtual |
Validity of an Expression
Implements Diades::Altarica::Expression.
Definition at line 376 of file Expression.hh.
References Diades::Altarica::Expression::valid().
|
virtual |
Type of the Value returned by the Expression (lazy computation)
Implements Diades::Altarica::Expression.
|
private |
Definition at line 369 of file Expression.hh.
|
private |
Definition at line 367 of file Expression.hh.
|
private |
Definition at line 370 of file Expression.hh.
|
private |
Definition at line 368 of file Expression.hh.