22 #ifndef UTAP_EXPRESSION_HH
23 #define UTAP_EXPRESSION_HH
133 std::string
toString(
bool old =
false)
const;
175 void getSymbols(std::set<symbol_t> &symbols)
const;
194 bool dependsOn(
const std::set<symbol_t> &)
const;
238 const std::vector<expression_t> &,
261 struct expression_data;
262 expression_data *data;
263 int getPrecedence()
const;
264 void toString(
bool,
char *&str,
char *&end,
int &size)
const;
265 void appendBoundType(
char *&str,
char*&end,
int &size,
expression_t e)
const;
bool isTrue() const
Definition: expression.cpp:561
static expression_t createBinary(Constants::kind_t, expression_t, expression_t, position_t=position_t(), type_t=type_t())
Create a binary expression.
Definition: expression.cpp:2061
A reference to a symbol.
Definition: symbols.h:107
bool equal(const expression_t &) const
Equality operator.
Definition: expression.cpp:570
Constants::synchronisation_t getSync() const
Returns the synchronisation type of SYNC operations.
Definition: expression.cpp:526
expression_t deeperClone() const
Makes a deep clone of the expression.
Definition: expression.cpp:101
bool isDynamic() const
Definition: expression.cpp:278
size_t getSize() const
Returns the number of subexpression.
Definition: expression.cpp:328
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...
Definition: expression.cpp:763
double getDoubleValue() const
Returns the value field of this expression.
Definition: expression.cpp:514
bool hasDynamicSub() const
Definition: expression.cpp:302
kind_t
Definition: common.h:37
static expression_t createDeadlock(position_t=position_t())
Create a DEADLOCK expression.
Definition: expression.cpp:2107
A reference to a frame.
Definition: symbols.h:183
bool empty() const
Returns true if this is an empty expression.
Definition: expression.cpp:556
void collectPossibleWrites(std::set< symbol_t > &) const
Definition: expression.cpp:1891
int32_t getIndex() const
Returns the index field of this expression.
Definition: expression.cpp:520
expression_t subst(symbol_t, expression_t) const
Definition: expression.cpp:167
synchronisation_t
Definition: common.h:263
static expression_t createDouble(double, position_t=position_t())
Definition: expression.cpp:2014
bool isReferenceTo(const std::set< symbol_t > &) const
Returns true if this expression is a reference to a symbol in the given set.
Definition: expression.cpp:740
bool operator==(const expression_t) const
Equality operator.
Definition: expression.cpp:1863
static expression_t createIdentifier(symbol_t, position_t=position_t())
Create an IDENTIFIER expression.
Definition: expression.cpp:2022
A reference to an expression.
Definition: expression.h:68
type_t
Definition: tracer.cpp:51
static expression_t createSync(expression_t, Constants::synchronisation_t, position_t=position_t())
Create a SYNC expression.
Definition: expression.cpp:2097
static expression_t createExit(position_t=position_t())
Definition: expression.cpp:2006
int32_t getValue() const
Returns the value field of this expression.
Definition: expression.cpp:508
static expression_t createConstant(int32_t, position_t=position_t())
Create a CONSTANT expression.
Definition: expression.cpp:1998
static int getPrecedence(Constants::kind_t)
Definition: expression.cpp:777
Definition: position.h:42
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.
Definition: expression.cpp:2073
bool changesVariable(const std::set< symbol_t > &) const
True if this expression can change any of the variables identified by the given symbols.
Definition: expression.cpp:748
bool usesFP() const
Definition: expression.cpp:217
const position_t & getPosition() const
Returns the position of this expression.
Definition: expression.cpp:211
bool usesClock() const
Definition: expression.cpp:257
bool operator<(const expression_t) const
Less-than operator.
Definition: expression.cpp:1858
expression_t()
Default constructor.
Definition: expression.cpp:63
A reference to a type.
Definition: type.h:92
Constants::kind_t getKind() const
Returns the kind of the expression.
Definition: expression.cpp:205
bool changesAnyVariable() const
True if this expression can change any variable at all.
Definition: expression.cpp:756
std::ostream & operator<<(std::ostream &o, const UTAP::expression_t &e)
void setType(type_t)
Sets the type of the expression.
Definition: expression.cpp:502
std::string toString(bool old=false) const
Returns a string representation of the expression.
Definition: expression.cpp:1872
expression_t & operator[](uint32_t)
Returns the ith subexpression.
Definition: expression.cpp:532
static expression_t createUnary(Constants::kind_t, expression_t, position_t=position_t(), type_t=type_t())
Create a unary expression.
Definition: expression.cpp:2051
expression_t & operator=(const expression_t &)
Assignment operator.
Definition: expression.cpp:596
static expression_t createDot(expression_t, int32_t=-1, position_t=position_t(), type_t=type_t())
Create a DOT expression.
Definition: expression.cpp:2086
symbol_t getSymbol()
Returns the symbol of a variable reference.
Definition: expression.cpp:622
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.
Definition: expression.cpp:2037
expression_t clone() const
Make a shallow clone of the expression.
Definition: expression.cpp:87
void collectPossibleReads(std::set< symbol_t > &, bool collectRandom=false) const
Definition: expression.cpp:1953
void getSymbols(std::set< symbol_t > &symbols) const
Returns the set of symbols this expression might resolve into.
Definition: expression.cpp:679
type_t getType() const
Returns the type of the expression.
Definition: expression.cpp:496
~expression_t()
Destructor.
Definition: expression.cpp:192