libutap  0.93
Uppaal Timed Automata Parser
UTAP::expression_t Class Reference

A reference to an expression. More...

#include <expression.h>

Public Member Functions

 expression_t ()
 Default constructor. More...
 
 expression_t (const expression_t &)
 Copy constructor. More...
 
expression_toperator= (const expression_t &)
 Assignment operator. More...
 
 ~expression_t ()
 Destructor. More...
 
bool usesFP () const
 
bool usesClock () const
 
bool isDynamic () const
 
bool hasDynamicSub () const
 
expression_t clone () const
 Make a shallow clone of the expression. More...
 
expression_t deeperClone () const
 Makes a deep clone of the expression. More...
 
expression_t deeperClone (symbol_t from, symbol_t to) const
 Makes a deep clone of the expression and replaces the symbol "from" with the symbol "to". More...
 
expression_t deeperClone (frame_t frame, frame_t select=frame_t()) const
 Makes a deep clone of the expression and replaces each symbol with a symbol from the given frame(s), with the same name. More...
 
Constants::kind_t getKind () const
 Returns the kind of the expression. More...
 
size_t getSize () const
 Returns the number of subexpression. More...
 
const position_tgetPosition () const
 Returns the position of this expression. More...
 
type_t getType () const
 Returns the type of the expression. More...
 
void setType (type_t)
 Sets the type of the expression. More...
 
int32_t getValue () const
 Returns the value field of this expression. More...
 
int32_t getIndex () const
 Returns the index field of this expression. More...
 
double getDoubleValue () const
 Returns the value field of this expression. More...
 
bool empty () const
 Returns true if this is an empty expression. More...
 
Constants::synchronisation_t getSync () const
 Returns the synchronisation type of SYNC operations. More...
 
std::string toString (bool old=false) const
 Returns a string representation of the expression. More...
 
expression_toperator[] (uint32_t)
 Returns the ith subexpression. More...
 
const expression_t operator[] (uint32_t) const
 Returns the ith subexpression. More...
 
expression_tget (uint32_t)
 Returns the ith subexpression. More...
 
const expression_tget (uint32_t) const
 Returns the ith subexpression. More...
 
bool equal (const expression_t &) const
 Equality operator. More...
 
symbol_t getSymbol ()
 Returns the symbol of a variable reference. More...
 
void getSymbols (std::set< symbol_t > &symbols) const
 Returns the set of symbols this expression might resolve into. More...
 
const symbol_t getSymbol () const
 Returns the symbol this expression evaluates to. More...
 
bool isReferenceTo (const std::set< symbol_t > &) const
 Returns true if this expression is a reference to a symbol in the given set. More...
 
bool changesVariable (const std::set< symbol_t > &) const
 True if this expression can change any of the variables identified by the given symbols. More...
 
bool changesAnyVariable () const
 True if this expression can change any variable at all. More...
 
bool dependsOn (const std::set< symbol_t > &) const
 True if the evaluation of this expression depends on any of the symbols in the given set. More...
 
void collectPossibleWrites (std::set< symbol_t > &) const
 
void collectPossibleReads (std::set< symbol_t > &, bool collectRandom=false) const
 
bool operator< (const expression_t) const
 Less-than operator. More...
 
bool operator== (const expression_t) const
 Equality operator. More...
 
expression_t subst (symbol_t, expression_t) const
 
bool isTrue () const
 

Static Public Member Functions

static int getPrecedence (Constants::kind_t)
 
static expression_t createConstant (int32_t, position_t=position_t())
 Create a CONSTANT expression. More...
 
static expression_t createDouble (double, position_t=position_t())
 
static expression_t createIdentifier (symbol_t, position_t=position_t())
 Create an IDENTIFIER expression. More...
 
static expression_t createUnary (Constants::kind_t, expression_t, position_t=position_t(), type_t=type_t())
 Create a unary expression. More...
 
static expression_t createBinary (Constants::kind_t, expression_t, expression_t, position_t=position_t(), type_t=type_t())
 Create a binary expression. More...
 
static expression_t createTernary (Constants::kind_t, expression_t, expression_t, expression_t, position_t=position_t(), type_t=type_t())
 Create a ternary expression. More...
 
static expression_t createNary (Constants::kind_t, const std::vector< expression_t > &, position_t=position_t(), type_t=type_t())
 Create an n-ary expression. More...
 
static expression_t createDot (expression_t, int32_t=-1, position_t=position_t(), type_t=type_t())
 Create a DOT expression. More...
 
static expression_t createSync (expression_t, Constants::synchronisation_t, position_t=position_t())
 Create a SYNC expression. More...
 
static expression_t createDeadlock (position_t=position_t())
 Create a DEADLOCK expression. More...
 
static expression_t createExit (position_t=position_t())
 

Detailed Description

A reference to an expression.

An expression is a tree of operations and is identified by the root of the tree. There are many kinds of operations (see kind_t), some are leafs in the tree (identifers, constants), some are unary operations (unary minus, negation), some are binary (plus, minus, etc.), and some are n-ary (lists, function calls).

Expressions can be annotated with types. The type of an expression should never contain information about whether the expression is a variable reference, a constant value or about the range of the result value. Use the TypeChecker and RangeChecker classes to determine these informations.

All nodes have the following attributes:

kind indicates the kind of operation position indicates the position of the expression in the input file. type the type of the result of evaluating the expression size the number of subexpressions sub the subexpressions

Some nodes have extra attributes (depending on the kind):

value the value of a CONSTANT node sync the synchronisation of a SYNC node index the index of a DOT node symbol the symbol of an IDENTIFIER node

Expressions are created by using the static factory methods.

Definition at line 70 of file expression.h.

Constructor & Destructor Documentation

◆ expression_t() [1/2]

◆ expression_t() [2/2]

expression_t::expression_t ( const expression_t e)

Copy constructor.

Definition at line 70 of file expression.cpp.

◆ ~expression_t()

expression_t::~expression_t ( )

Destructor.

Definition at line 178 of file expression.cpp.

Referenced by expression_t().

Here is the caller graph for this function:

Member Function Documentation

◆ changesAnyVariable()

◆ changesVariable()

bool expression_t::changesVariable ( const std::set< symbol_t > &  symbols) const

True if this expression can change any of the variables identified by the given symbols.

Definition at line 844 of file expression.cpp.

Referenced by expression_t().

Here is the caller graph for this function:

◆ clone()

expression_t expression_t::clone ( ) const

Make a shallow clone of the expression.

Definition at line 81 of file expression.cpp.

Referenced by expression_t(), UTAP::ExpressionBuilder::exprExistsDynamicEnd(), and UTAP::ExpressionBuilder::exprForAllDynamicEnd().

Here is the caller graph for this function:

◆ collectPossibleReads()

◆ collectPossibleWrites()

◆ createBinary()

◆ createConstant()

◆ createDeadlock()

expression_t expression_t::createDeadlock ( position_t  pos = position_t())
static

Create a DEADLOCK expression.

Definition at line 2312 of file expression.cpp.

References UTAP::Constants::CONSTRAINT, UTAP::type_t::createPrimitive(), and UTAP::Constants::DEADLOCK.

Referenced by UTAP::ExpressionBuilder::exprDeadlock(), and expression_t().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ createDot()

expression_t expression_t::createDot ( expression_t  e,
int32_t  idx = -1,
position_t  pos = position_t(),
type_t  type = type_t() 
)
static

Create a DOT expression.

Definition at line 2293 of file expression.cpp.

References UTAP::Constants::DOT.

Referenced by UTAP::ExpressionBuilder::exprDot(), expression_t(), and UTAP::ExpressionBuilder::exprScenario().

Here is the caller graph for this function:

◆ createDouble()

expression_t expression_t::createDouble ( double  value,
position_t  pos = position_t() 
)
static

Definition at line 2225 of file expression.cpp.

References UTAP::Constants::CONSTANT, UTAP::type_t::createPrimitive(), and UTAP::Constants::DOUBLE.

Referenced by UTAP::ExpressionBuilder::exprDouble(), expression_t(), UTAP::ExpressionBuilder::exprProbaQualitative(), and UTAP::ExpressionBuilder::makeConstant().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ createExit()

expression_t expression_t::createExit ( position_t  pos = position_t())
static

Definition at line 2217 of file expression.cpp.

References UTAP::type_t::createPrimitive(), UTAP::Constants::EXIT, and UTAP::Constants::VOID_TYPE.

Referenced by expression_t(), and UTAP::ExpressionBuilder::exprExit().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ createIdentifier()

◆ createNary()

◆ createSync()

expression_t expression_t::createSync ( expression_t  e,
Constants::synchronisation_t  s,
position_t  pos = position_t() 
)
static

Create a SYNC expression.

Definition at line 2303 of file expression.cpp.

References UTAP::Constants::SYNC.

Referenced by expression_t(), UTAP::SystemBuilder::procMessage(), and UTAP::SystemBuilder::procSync().

Here is the caller graph for this function:

◆ createTernary()

expression_t expression_t::createTernary ( Constants::kind_t  kind,
expression_t  e1,
expression_t  e2,
expression_t  e3,
position_t  pos = position_t(),
type_t  type = type_t() 
)
static

Create a ternary expression.

Definition at line 2280 of file expression.cpp.

Referenced by UTAP::ExpressionBuilder::exprBuiltinFunction3(), expression_t(), UTAP::ExpressionBuilder::exprInlineIf(), UTAP::ExpressionBuilder::exprSMCControl(), and UTAP::ExpressionBuilder::exprTernary().

Here is the caller graph for this function:

◆ createUnary()

◆ deeperClone() [1/3]

expression_t expression_t::deeperClone ( ) const

Makes a deep clone of the expression.

Definition at line 92 of file expression.cpp.

Referenced by expression_t().

Here is the caller graph for this function:

◆ deeperClone() [2/3]

expression_t expression_t::deeperClone ( symbol_t  from,
symbol_t  to 
) const

Makes a deep clone of the expression and replaces the symbol "from" with the symbol "to".

Definition at line 107 of file expression.cpp.

References if().

Here is the call graph for this function:

◆ deeperClone() [3/3]

expression_t expression_t::deeperClone ( frame_t  frame,
frame_t  select = frame_t() 
) const

Makes a deep clone of the expression and replaces each symbol with a symbol from the given frame(s), with the same name.

Definition at line 123 of file expression.cpp.

References UTAP::frame_t::resolve().

Here is the call graph for this function:

◆ dependsOn()

bool expression_t::dependsOn ( const std::set< symbol_t > &  symbols) const

True if the evaluation of this expression depends on any of the symbols in the given set.

Definition at line 859 of file expression.cpp.

Referenced by expression_t().

Here is the caller graph for this function:

◆ empty()

◆ equal()

bool expression_t::equal ( const expression_t e) const

Equality operator.

Two expressions are identical iff all the sub expressions are identical and if the kind, value and symbol of the root are identical.

Definition at line 685 of file expression.cpp.

References getSize().

Referenced by expression_t().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ get() [1/2]

expression_t & expression_t::get ( uint32_t  i)

◆ get() [2/2]

const expression_t & expression_t::get ( uint32_t  i) const

Returns the ith subexpression.

Definition at line 665 of file expression.cpp.

◆ getDoubleValue()

double expression_t::getDoubleValue ( ) const

Returns the value field of this expression.

This call is not valid for all expressions.

Definition at line 629 of file expression.cpp.

References UTAP::Constants::CONSTANT, and UTAP::Constants::DOUBLE.

Referenced by expression_t().

Here is the caller graph for this function:

◆ getIndex()

int32_t expression_t::getIndex ( ) const

Returns the index field of this expression.

Definition at line 635 of file expression.cpp.

References UTAP::Constants::DOT.

Referenced by expression_t().

Here is the caller graph for this function:

◆ getKind()

◆ getPosition()

const position_t & expression_t::getPosition ( ) const

Returns the position of this expression.

Definition at line 188 of file expression.cpp.

References UTAP::Statement::accept(), and usesFP().

Referenced by UTAP::CompileTimeComputableValues::contains(), expression_t(), isSameScalarType(), and UTAP::TypeChecker::TypeChecker().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getPrecedence()

int expression_t::getPrecedence ( Constants::kind_t  kind)
static

Definition at line 873 of file expression.cpp.

References UTAP::Constants::A_BUCHI, UTAP::Constants::A_UNTIL, UTAP::Constants::A_WEAKUNTIL, UTAP::Constants::ABS_F, UTAP::Constants::ACOS_F, UTAP::Constants::ACOSH_F, UTAP::Constants::AF, UTAP::Constants::AG, UTAP::Constants::AG_R_Piotr, UTAP::Constants::AND, UTAP::Constants::ARRAY, UTAP::Constants::ASIN_F, UTAP::Constants::ASINH_F, UTAP::Constants::ASSAND, UTAP::Constants::ASSDIV, UTAP::Constants::ASSIGN, UTAP::Constants::ASSLSHIFT, UTAP::Constants::ASSMINUS, UTAP::Constants::ASSMOD, UTAP::Constants::ASSMULT, UTAP::Constants::ASSOR, UTAP::Constants::ASSPLUS, UTAP::Constants::ASSRSHIFT, UTAP::Constants::ASSXOR, UTAP::Constants::ATAN2_F, UTAP::Constants::ATAN_F, UTAP::Constants::ATANH_F, UTAP::Constants::BIT_AND, UTAP::Constants::BIT_LSHIFT, UTAP::Constants::BIT_OR, UTAP::Constants::BIT_RSHIFT, UTAP::Constants::BIT_XOR, UTAP::Constants::CBRT_F, UTAP::Constants::CEIL_F, UTAP::Constants::COMMA, UTAP::Constants::CONSISTENCY, UTAP::Constants::CONSTANT, UTAP::Constants::CONTROL, UTAP::Constants::CONTROL_TOPT, UTAP::Constants::CONTROL_TOPT_DEF1, UTAP::Constants::CONTROL_TOPT_DEF2, UTAP::Constants::COPYSIGN_F, UTAP::Constants::COS_F, UTAP::Constants::COSH_F, UTAP::Constants::DEADLOCK, UTAP::Constants::DIV, UTAP::Constants::DOT, UTAP::Constants::DYNAMICEVAL, UTAP::Constants::EF, UTAP::Constants::EF_CONTROL, UTAP::Constants::EF_R_Piotr, UTAP::Constants::EG, UTAP::Constants::EQ, UTAP::Constants::ERF_F, UTAP::Constants::ERFC_F, UTAP::Constants::EXISTS, UTAP::Constants::EXISTSDYNAMIC, UTAP::Constants::EXIT, UTAP::Constants::EXP2_F, UTAP::Constants::EXP_F, UTAP::Constants::EXPM1_F, UTAP::Constants::FABS_F, UTAP::Constants::FDIM_F, UTAP::Constants::FINT_F, UTAP::Constants::FLOOR_F, UTAP::Constants::FMA_F, UTAP::Constants::FMAX_F, UTAP::Constants::FMIN_F, UTAP::Constants::FMOD_F, UTAP::Constants::FORALL, UTAP::Constants::FORALLDYNAMIC, UTAP::Constants::FOREACHDYNAMIC, UTAP::Constants::FPCLASSIFY_F, UTAP::Constants::FRACTION, UTAP::Constants::FUNCALL, UTAP::Constants::GE, UTAP::Constants::GT, UTAP::Constants::HYPOT_F, UTAP::Constants::IDENTIFIER, UTAP::Constants::ILOGB_F, UTAP::Constants::IMPLEMENTATION, UTAP::Constants::INF_VAR, UTAP::Constants::INLINEIF, UTAP::Constants::ISFINITE_F, UTAP::Constants::ISINF_F, UTAP::Constants::ISNAN_F, UTAP::Constants::ISNORMAL_F, UTAP::Constants::ISUNORDERED_F, UTAP::Constants::LDEXP_F, UTAP::Constants::LE, UTAP::Constants::LEADSTO, UTAP::Constants::LGAMMA_F, UTAP::Constants::LIST, UTAP::Constants::LN_F, UTAP::Constants::LOG10_F, UTAP::Constants::LOG1P_F, UTAP::Constants::LOG2_F, UTAP::Constants::LOG_F, UTAP::Constants::LOGB_F, UTAP::Constants::LT, UTAP::Constants::MAX, UTAP::Constants::MIN, UTAP::Constants::MINUS, UTAP::Constants::MITLATOM, UTAP::Constants::MITLCONJ, UTAP::Constants::MITLDISJ, UTAP::Constants::MITLFORMULA, UTAP::Constants::MITLNEXT, UTAP::Constants::MITLRELEASE, UTAP::Constants::MITLUNTIL, UTAP::Constants::MOD, UTAP::Constants::MULT, UTAP::Constants::NEQ, UTAP::Constants::NEXTAFTER_F, UTAP::Constants::NOT, UTAP::Constants::NUMOF, UTAP::Constants::OR, UTAP::Constants::PLUS, UTAP::Constants::PO_CONTROL, UTAP::Constants::POSTDECREMENT, UTAP::Constants::POSTINCREMENT, UTAP::Constants::POW_F, UTAP::Constants::PREDECREMENT, UTAP::Constants::PREINCREMENT, UTAP::Constants::PROBABOX, UTAP::Constants::PROBADIAMOND, UTAP::Constants::PROBAEXP, UTAP::Constants::PROBAMINBOX, UTAP::Constants::PROBAMINDIAMOND, UTAP::Constants::PROCESSVAR, UTAP::Constants::RANDOM_ARCSINE_F, UTAP::Constants::RANDOM_BETA_F, UTAP::Constants::RANDOM_F, UTAP::Constants::RANDOM_GAMMA_F, UTAP::Constants::RANDOM_NORMAL_F, UTAP::Constants::RANDOM_POISSON_F, UTAP::Constants::RANDOM_TRI_F, UTAP::Constants::RANDOM_WEIBULL_F, UTAP::Constants::RATE, UTAP::Constants::REFINEMENT_GE, UTAP::Constants::REFINEMENT_LE, UTAP::Constants::RESTRICT, UTAP::Constants::ROUND_F, UTAP::Constants::SCENARIO, UTAP::Constants::SCENARIO2, UTAP::Constants::SIGNBIT_F, UTAP::Constants::SIMULATE, UTAP::Constants::SIMULATION_GE, UTAP::Constants::SIMULATION_LE, UTAP::Constants::SIN_F, UTAP::Constants::SINH_F, UTAP::Constants::SMC_CONTROL, UTAP::Constants::SPAWN, UTAP::Constants::SPECIFICATION, UTAP::Constants::SQRT_F, UTAP::Constants::SUM, UTAP::Constants::SUMDYNAMIC, UTAP::Constants::SUP_VAR, UTAP::Constants::SYNC, UTAP::Constants::SYNTAX_COMPOSITION, UTAP::Constants::TAN_F, UTAP::Constants::TANH_F, UTAP::Constants::TGAMMA_F, UTAP::Constants::TIOCOMPOSITION, UTAP::Constants::TIOCONJUNCTION, UTAP::Constants::TIOQUOTIENT, UTAP::Constants::TRUNC_F, UTAP::Constants::UNARY_MINUS, and UTAP::Constants::XOR.

Referenced by expression_t().

Here is the caller graph for this function:

◆ getSize()

size_t expression_t::getSize ( ) const

Returns the number of subexpression.

Definition at line 379 of file expression.cpp.

References UTAP::Constants::A_BUCHI, UTAP::Constants::A_UNTIL, UTAP::Constants::A_WEAKUNTIL, UTAP::Constants::ABS_F, UTAP::Constants::ACOS_F, UTAP::Constants::ACOSH_F, UTAP::Constants::AF, UTAP::Constants::AG, UTAP::Constants::AG_R_Piotr, UTAP::Constants::AND, UTAP::Constants::ARRAY, UTAP::Constants::ASIN_F, UTAP::Constants::ASINH_F, UTAP::Constants::ASSAND, UTAP::Constants::ASSDIV, UTAP::Constants::ASSIGN, UTAP::Constants::ASSLSHIFT, UTAP::Constants::ASSMINUS, UTAP::Constants::ASSMOD, UTAP::Constants::ASSMULT, UTAP::Constants::ASSOR, UTAP::Constants::ASSPLUS, UTAP::Constants::ASSRSHIFT, UTAP::Constants::ASSXOR, UTAP::Constants::ATAN2_F, UTAP::Constants::ATAN_F, UTAP::Constants::ATANH_F, UTAP::Constants::BIT_AND, UTAP::Constants::BIT_LSHIFT, UTAP::Constants::BIT_OR, UTAP::Constants::BIT_RSHIFT, UTAP::Constants::BIT_XOR, UTAP::Constants::CBRT_F, UTAP::Constants::CEIL_F, UTAP::Constants::COMMA, UTAP::Constants::CONSISTENCY, UTAP::Constants::CONSTANT, UTAP::Constants::CONTROL, UTAP::Constants::CONTROL_TOPT, UTAP::Constants::CONTROL_TOPT_DEF1, UTAP::Constants::CONTROL_TOPT_DEF2, UTAP::Constants::COPYSIGN_F, UTAP::Constants::COS_F, UTAP::Constants::COSH_F, UTAP::Constants::DEADLOCK, UTAP::Constants::DIV, UTAP::Constants::DOT, UTAP::Constants::DYNAMICEVAL, UTAP::Constants::EF, UTAP::Constants::EF_CONTROL, UTAP::Constants::EF_R_Piotr, UTAP::Constants::EG, UTAP::Constants::EQ, UTAP::Constants::ERF_F, UTAP::Constants::ERFC_F, UTAP::Constants::EXISTS, UTAP::Constants::EXISTSDYNAMIC, UTAP::Constants::EXIT, UTAP::Constants::EXP2_F, UTAP::Constants::EXP_F, UTAP::Constants::EXPM1_F, UTAP::Constants::FABS_F, UTAP::Constants::FDIM_F, UTAP::Constants::FINT_F, UTAP::Constants::FLOOR_F, UTAP::Constants::FMA_F, UTAP::Constants::FMAX_F, UTAP::Constants::FMIN_F, UTAP::Constants::FMOD_F, UTAP::Constants::FORALL, UTAP::Constants::FORALLDYNAMIC, UTAP::Constants::FOREACHDYNAMIC, UTAP::Constants::FPCLASSIFY_F, UTAP::Constants::FRACTION, UTAP::Constants::FUNCALL, UTAP::Constants::GE, UTAP::Constants::GT, UTAP::Constants::HYPOT_F, UTAP::Constants::IDENTIFIER, UTAP::Constants::ILOGB_F, UTAP::Constants::IMPLEMENTATION, UTAP::Constants::INF_VAR, UTAP::Constants::INLINEIF, UTAP::Constants::ISFINITE_F, UTAP::Constants::ISINF_F, UTAP::Constants::ISNAN_F, UTAP::Constants::ISNORMAL_F, UTAP::Constants::ISUNORDERED_F, UTAP::Constants::LDEXP_F, UTAP::Constants::LE, UTAP::Constants::LEADSTO, UTAP::Constants::LGAMMA_F, UTAP::Constants::LIST, UTAP::Constants::LN_F, UTAP::Constants::LOG10_F, UTAP::Constants::LOG1P_F, UTAP::Constants::LOG2_F, UTAP::Constants::LOG_F, UTAP::Constants::LOGB_F, UTAP::Constants::LT, UTAP::Constants::MAX, UTAP::Constants::MIN, UTAP::Constants::MINUS, UTAP::Constants::MITLATOM, UTAP::Constants::MITLCONJ, UTAP::Constants::MITLDISJ, UTAP::Constants::MITLEXISTS, UTAP::Constants::MITLFORALL, UTAP::Constants::MITLFORMULA, UTAP::Constants::MITLNEXT, UTAP::Constants::MITLRELEASE, UTAP::Constants::MITLUNTIL, UTAP::Constants::MOD, UTAP::Constants::MULT, UTAP::Constants::NEQ, UTAP::Constants::NEXTAFTER_F, UTAP::Constants::NOT, UTAP::Constants::NUMOF, UTAP::Constants::OR, UTAP::Constants::PLUS, UTAP::Constants::PMAX, UTAP::Constants::PO_CONTROL, UTAP::Constants::POSTDECREMENT, UTAP::Constants::POSTINCREMENT, UTAP::Constants::POW_F, UTAP::Constants::PREDECREMENT, UTAP::Constants::PREINCREMENT, UTAP::Constants::PROBABOX, UTAP::Constants::PROBACMP, UTAP::Constants::PROBADIAMOND, UTAP::Constants::PROBAEXP, UTAP::Constants::PROBAMINBOX, UTAP::Constants::PROBAMINDIAMOND, UTAP::Constants::RANDOM_ARCSINE_F, UTAP::Constants::RANDOM_BETA_F, UTAP::Constants::RANDOM_F, UTAP::Constants::RANDOM_GAMMA_F, UTAP::Constants::RANDOM_NORMAL_F, UTAP::Constants::RANDOM_POISSON_F, UTAP::Constants::RANDOM_TRI_F, UTAP::Constants::RANDOM_WEIBULL_F, UTAP::Constants::RATE, UTAP::Constants::REFINEMENT_GE, UTAP::Constants::REFINEMENT_LE, UTAP::Constants::RESTRICT, UTAP::Constants::ROUND_F, UTAP::Constants::SCENARIO, UTAP::Constants::SCENARIO2, UTAP::Constants::SIGNBIT_F, UTAP::Constants::SIMULATE, UTAP::Constants::SIMULATEREACH, UTAP::Constants::SIMULATION_GE, UTAP::Constants::SIMULATION_LE, UTAP::Constants::SIN_F, UTAP::Constants::SINH_F, UTAP::Constants::SMC_CONTROL, UTAP::Constants::SPAWN, UTAP::Constants::SPECIFICATION, UTAP::Constants::SQRT_F, UTAP::Constants::SUM, UTAP::Constants::SUMDYNAMIC, UTAP::Constants::SUP_VAR, UTAP::Constants::SYNC, UTAP::Constants::SYNTAX_COMPOSITION, UTAP::Constants::TAN_F, UTAP::Constants::TANH_F, UTAP::Constants::TGAMMA_F, UTAP::Constants::TIOCOMPOSITION, UTAP::Constants::TIOCONJUNCTION, UTAP::Constants::TIOQUOTIENT, UTAP::Constants::TRUNC_F, UTAP::Constants::UNARY_MINUS, and UTAP::Constants::XOR.

Referenced by UTAP::TypeChecker::checkExpression(), checkIDList(), equal(), expression_t(), hasMITLInQuantifiedSub(), hasSpawnOrExit(), hasStrictLowerBound(), hasStrictUpperBound(), isListOfFormulas(), isSameScalarType(), UTAP::SignalFlow::visitExpression(), and UTAP::TypeChecker::visitProperty().

Here is the caller graph for this function:

◆ getSymbol() [1/2]

symbol_t expression_t::getSymbol ( )

Returns the symbol of a variable reference.

The expression must be a left-hand side value. In case of dot-expressions, the record/process symbol is returned. In case of an inline if, the 'true' branch is returned.

(a=1).getSymbol() returns 'a' (s.f).getSymbol() returns 's' (i<1?j:k).getSymbol() returns 'j'

The expression must be a left-hand side value. The symbol returned is the symbol of the variable the expression if resulting in a reference to. NOTE: In case of inline if, the symbol referenced by the 'true' part is returned.

Definition at line 718 of file expression.cpp.

Referenced by UTAP::ExpressionBuilder::exprDot(), expression_t(), and UTAP::SignalFlow::visitExpression().

Here is the caller graph for this function:

◆ getSymbol() [2/2]

◆ getSymbols()

void expression_t::getSymbols ( std::set< symbol_t > &  symbols) const

Returns the set of symbols this expression might resolve into.

In case of inline if, both the 'true' and 'false' branch is added. In case of dot-expressions, both the left hand reference and the member field are returned.

(a=1).getSymbol() returns 'a' (s.f).getSymbol() returns 's,f' (i<1?j:k).getSymbol() returns 'j,k'

Definition at line 775 of file expression.cpp.

References UTAP::Constants::ARRAY, UTAP::Constants::ASSAND, UTAP::Constants::ASSDIV, UTAP::Constants::ASSIGN, UTAP::Constants::ASSLSHIFT, UTAP::Constants::ASSMINUS, UTAP::Constants::ASSMOD, UTAP::Constants::ASSMULT, UTAP::Constants::ASSOR, UTAP::Constants::ASSPLUS, UTAP::Constants::ASSRSHIFT, UTAP::Constants::ASSXOR, UTAP::Constants::COMMA, UTAP::Constants::DOT, UTAP::Constants::IDENTIFIER, UTAP::Constants::INLINEIF, UTAP::Constants::PREDECREMENT, UTAP::Constants::PREINCREMENT, and UTAP::Constants::SYNC.

Referenced by expression_t().

Here is the caller graph for this function:

◆ getSync()

synchronisation_t expression_t::getSync ( ) const

Returns the synchronisation type of SYNC operations.

Definition at line 641 of file expression.cpp.

References UTAP::Constants::SYNC.

Referenced by expression_t(), UTAP::TypeChecker::visitEdge(), and UTAP::SignalFlow::visitExpression().

Here is the caller graph for this function:

◆ getType()

◆ getValue()

int32_t expression_t::getValue ( ) const

Returns the value field of this expression.

This call is not valid for all expressions.

Definition at line 623 of file expression.cpp.

References UTAP::Constants::CONSTANT.

Referenced by append(), UTAP::TypeChecker::checkDynamicExpressions(), expression_t(), UTAP::SignalFlow::visitExpression(), and UTAP::TypeChecker::visitProperty().

Here is the caller graph for this function:

◆ hasDynamicSub()

bool expression_t::hasDynamicSub ( ) const

Definition at line 353 of file expression.cpp.

Referenced by expression_t(), UTAP::CollectDynamicExpressions::visitExpression(), and UTAP::TypeChecker::visitVariable().

Here is the caller graph for this function:

◆ isDynamic()

◆ isReferenceTo()

bool expression_t::isReferenceTo ( const std::set< symbol_t > &  symbols) const

Returns true if this expression is a reference to a symbol in the given set.

Returns true if expr might be a reference to a symbol in the set.

Definition at line 836 of file expression.cpp.

Referenced by expression_t().

Here is the caller graph for this function:

◆ isTrue()

bool expression_t::isTrue ( ) const

Definition at line 676 of file expression.cpp.

References UTAP::Constants::CONSTANT.

Referenced by expression_t(), and UTAP::TypeChecker::visitEdge().

Here is the caller graph for this function:

◆ operator<()

bool expression_t::operator< ( const expression_t  e) const

Less-than operator.

Makes it possible to put expression_t objects into an STL set.

Definition at line 2048 of file expression.cpp.

Referenced by expression_t().

Here is the caller graph for this function:

◆ operator=()

expression_t & expression_t::operator= ( const expression_t e)

Assignment operator.

Definition at line 75 of file expression.cpp.

Referenced by expression_t().

Here is the caller graph for this function:

◆ operator==()

bool expression_t::operator== ( const expression_t  e) const

Equality operator.

Returns true if the two references point to the same expression object.

Definition at line 2053 of file expression.cpp.

Referenced by expression_t().

Here is the caller graph for this function:

◆ operator[]() [1/2]

expression_t & expression_t::operator[] ( uint32_t  i)

Returns the ith subexpression.

Definition at line 647 of file expression.cpp.

Referenced by expression_t().

Here is the caller graph for this function:

◆ operator[]() [2/2]

const expression_t expression_t::operator[] ( uint32_t  i) const

Returns the ith subexpression.

Definition at line 653 of file expression.cpp.

◆ setType()

void expression_t::setType ( type_t  type)

◆ subst()

expression_t expression_t::subst ( symbol_t  symbol,
expression_t  expr 
) const

Definition at line 153 of file expression.cpp.

References UTAP::Constants::IDENTIFIER, and subst().

Referenced by expression_t(), and subst().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ toString()

std::string expression_t::toString ( bool  old = false) const

◆ usesClock()

bool expression_t::usesClock ( ) const

Definition at line 308 of file expression.cpp.

References isClock().

Referenced by expression_t().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ usesFP()

bool expression_t::usesFP ( ) const

Definition at line 211 of file expression.cpp.

References UTAP::Constants::ACOS_F, UTAP::Constants::ACOSH_F, UTAP::Constants::ASIN_F, UTAP::Constants::ASINH_F, UTAP::Constants::ATAN2_F, UTAP::Constants::ATAN_F, UTAP::Constants::ATANH_F, UTAP::Constants::CBRT_F, UTAP::Constants::CEIL_F, checkForFP(), UTAP::Constants::COPYSIGN_F, UTAP::Constants::COS_F, UTAP::Constants::COSH_F, UTAP::Constants::DOUBLE, UTAP::Constants::ERF_F, UTAP::Constants::ERFC_F, UTAP::Constants::EXP2_F, UTAP::Constants::EXP_F, UTAP::Constants::EXPM1_F, UTAP::Constants::FABS_F, UTAP::Constants::FDIM_F, UTAP::Constants::FINT_F, UTAP::Constants::FLOOR_F, UTAP::Constants::FMA_F, UTAP::Constants::FMAX_F, UTAP::Constants::FMIN_F, UTAP::Constants::FMOD_F, UTAP::Constants::FPCLASSIFY_F, UTAP::Constants::FUNCALL, UTAP::Constants::HYPOT_F, UTAP::Constants::ILOGB_F, UTAP::Constants::ISFINITE_F, UTAP::Constants::ISINF_F, UTAP::Constants::ISNAN_F, UTAP::Constants::ISNORMAL_F, UTAP::Constants::ISUNORDERED_F, UTAP::Constants::LDEXP_F, UTAP::Constants::LGAMMA_F, UTAP::Constants::LN_F, UTAP::Constants::LOG10_F, UTAP::Constants::LOG1P_F, UTAP::Constants::LOG2_F, UTAP::Constants::LOG_F, UTAP::Constants::LOGB_F, UTAP::Constants::NEXTAFTER_F, UTAP::Constants::POW_F, UTAP::Constants::RANDOM_ARCSINE_F, UTAP::Constants::RANDOM_BETA_F, UTAP::Constants::RANDOM_F, UTAP::Constants::RANDOM_GAMMA_F, UTAP::Constants::RANDOM_NORMAL_F, UTAP::Constants::RANDOM_POISSON_F, UTAP::Constants::RANDOM_TRI_F, UTAP::Constants::RANDOM_WEIBULL_F, UTAP::Constants::ROUND_F, UTAP::Constants::SIGNBIT_F, UTAP::Constants::SIN_F, UTAP::Constants::SINH_F, UTAP::Constants::SQRT_F, UTAP::symbol(), UTAP::Constants::TAN_F, UTAP::Constants::TANH_F, UTAP::Constants::TGAMMA_F, and UTAP::Constants::TRUNC_F.

Referenced by expression_t(), and getPosition().

Here is the call graph for this function:
Here is the caller graph for this function:

The documentation for this class was generated from the following files: