libutap
|
Partial implementation of the builder interface: The ExpressionBuilder implements all expression related methods. More...
#include <expressionbuilder.h>
Classes | |
class | ExpressionFragments |
class | TypeFragments |
Public Member Functions | |
ExpressionBuilder (TimedAutomataSystem *) | |
ExpressionFragments & | getExpressions () |
virtual void | addPosition (uint32_t position, uint32_t offset, uint32_t line, std::string path) |
Add mapping from an absolute position to a relative XML element. More... | |
virtual void | handleError (std::string) |
virtual void | handleWarning (std::string) |
virtual void | typeDuplicate () |
Duplicate type at the top of the type stack. More... | |
virtual void | typePop () |
Pop type at the topof the type stack. More... | |
virtual void | typeBool (PREFIX) |
Called whenever a boolean type is parsed. More... | |
virtual void | typeInt (PREFIX) |
Called whenever an integer type is parsed. More... | |
virtual void | typeDouble (PREFIX) |
Called whenever a double type is parsed. More... | |
virtual void | typeBoundedInt (PREFIX) |
Called whenever an integer type with a range is parsed. More... | |
virtual void | typeChannel (PREFIX) |
Called whenever a channel type is parsed. More... | |
virtual void | typeClock (PREFIX) |
Called whenever a clock type is parsed. More... | |
virtual void | typeVoid () |
Called whenever a void type is parsed. More... | |
virtual void | typeScalar (PREFIX) |
Called whenever a scalar type is parsed. More... | |
virtual void | typeName (PREFIX, const char *name) |
Called when a type name has been parsed. More... | |
virtual bool | isType (const char *) |
Must return true if and only if name is registered in the symbol table as a named type, for instance, "int" or "bool" or a user defined type. More... | |
virtual void | exprTrue () |
virtual void | exprFalse () |
virtual void | exprDouble (double) |
virtual void | exprId (const char *varName) |
virtual void | exprNat (int32_t) |
virtual void | exprCallBegin () |
virtual void | exprCallEnd (uint32_t n) |
virtual void | exprArray () |
virtual void | exprPostIncrement () |
virtual void | exprPreIncrement () |
virtual void | exprPostDecrement () |
virtual void | exprPreDecrement () |
virtual void | exprAssignment (Constants::kind_t op) |
virtual void | exprUnary (Constants::kind_t unaryop) |
virtual void | exprBinary (Constants::kind_t binaryop) |
virtual void | exprNary (Constants::kind_t op, uint32_t num) |
virtual void | exprScenario (const char *name) |
virtual expression_t | exprScenario () |
virtual void | exprTernary (Constants::kind_t ternaryop, bool firstMissing) |
virtual void | exprInlineIf () |
virtual void | exprComma () |
virtual void | exprDot (const char *) |
virtual void | exprDeadlock () |
virtual void | exprForAllBegin (const char *name) |
virtual void | exprForAllEnd (const char *name) |
virtual void | exprExistsBegin (const char *name) |
virtual void | exprExistsEnd (const char *name) |
virtual void | exprSumBegin (const char *name) |
virtual void | exprSumEnd (const char *name) |
virtual void | exprSMCControl (int) |
virtual void | exprProbaQualitative (int, Constants::kind_t, Constants::kind_t, double) |
virtual void | exprProbaQuantitative (int, Constants::kind_t, bool stopCondition=false) |
virtual void | exprProbaCompare (int, Constants::kind_t, int, Constants::kind_t) |
virtual void | exprProbaExpected (int, const char *) |
virtual void | exprBuiltinFunction1 (Constants::kind_t) |
virtual void | exprBuiltinFunction2 (Constants::kind_t) |
virtual void | exprSimulate (int, int, int, bool=false, int=0) |
virtual void | exprMitlFormula () |
virtual void | exprMitlUntil (int, int) |
virtual void | exprMitlRelease (int, int) |
virtual void | exprMitlDisj () |
virtual void | exprMitlConj () |
virtual void | exprMitlNext () |
virtual void | exprMitlAtom () |
virtual void | exprMitlDiamond (int, int) |
virtual void | exprMitlBox (int, int) |
virtual void | exprSpawn (int params) |
virtual void | exprExit () |
virtual void | exprNumOf () |
virtual void | exprForAllDynamicBegin (const char *, const char *) |
virtual void | exprForAllDynamicEnd (const char *name) |
virtual void | exprExistsDynamicBegin (const char *, const char *) |
virtual void | exprExistsDynamicEnd (const char *) |
virtual void | exprSumDynamicBegin (const char *, const char *) |
virtual void | exprSumDynamicEnd (const char *name) |
virtual void | exprForeachDynamicBegin (const char *, const char *) |
virtual void | exprForeachDynamicEnd (const char *name) |
virtual void | pushDynamicFrameOf (template_t *t, std::string name) |
virtual void | popDynamicFrameOf (std::string name) |
![]() | |
AbstractBuilder () | |
virtual void | setPosition (uint32_t, uint32_t) |
Sets the current position. More... | |
virtual void | typeStruct (PREFIX, uint32_t fields) |
Called when a struct-type has been parsed. More... | |
virtual void | typeArrayOfSize (size_t) |
Called to create an array type. More... | |
virtual void | typeArrayOfType (size_t) |
Called to create an array type. More... | |
virtual void | structField (const char *name) |
Called to declare a field of a structure. More... | |
virtual void | declTypeDef (const char *name) |
Used when a typedef declaration was parsed. More... | |
virtual void | declVar (const char *name, bool init) |
Called to when a variable declaration has been parsed. More... | |
virtual void | declInitialiserList (uint32_t num) |
virtual void | declFieldInit (const char *name) |
virtual void | ganttDeclStart (const char *name) |
virtual void | ganttDeclSelect (const char *id) |
virtual void | ganttDeclEnd () |
virtual void | ganttEntryStart () |
virtual void | ganttEntrySelect (const char *id) |
virtual void | ganttEntryEnd () |
virtual void | declProgress (bool) |
Guard progress measure declaration. More... | |
virtual void | declParameter (const char *name, bool) |
virtual void | declFuncBegin (const char *name) |
virtual void | declFuncEnd () |
virtual void | procBegin (const char *name, const bool isTA=true, const std::string type="", const std::string mode="") |
virtual void | procEnd () |
virtual void | procState (const char *name, bool hasInvariant, bool hasER) |
virtual void | procStateCommit (const char *name) |
virtual void | procStateUrgent (const char *name) |
virtual void | procStateInit (const char *name) |
virtual void | procBranchpoint (const char *name) |
virtual void | procEdgeBegin (const char *from, const char *to, const bool control, const char *actname) |
virtual void | procEdgeEnd (const char *from, const char *to) |
virtual void | procSelect (const char *id) |
virtual void | procGuard () |
virtual void | procSync (Constants::synchronisation_t type) |
virtual void | procUpdate () |
virtual void | procProb () |
virtual void | procInstanceLine () |
virtual void | instanceName (const char *name, bool templ=true) |
virtual void | instanceNameBegin (const char *name) |
virtual void | instanceNameEnd (const char *name, size_t arguments) |
virtual void | procMessage (const char *from, const char *to, const int loc, const bool pch) |
virtual void | procMessage (Constants::synchronisation_t type) |
virtual void | procCondition (const std::vector< char * > anchors, const int loc, const bool pch, const bool hot) |
virtual void | procCondition () |
virtual void | procLscUpdate (const char *anchor, const int loc, const bool pch) |
virtual void | procLscUpdate () |
virtual void | hasPrechart (const bool pch) |
virtual void | blockBegin () |
virtual void | blockEnd () |
virtual void | emptyStatement () |
virtual void | forBegin () |
virtual void | forEnd () |
virtual void | iterationBegin (const char *name) |
virtual void | iterationEnd (const char *name) |
virtual void | whileBegin () |
virtual void | whileEnd () |
virtual void | doWhileBegin () |
virtual void | doWhileEnd () |
virtual void | ifBegin () |
virtual void | ifElse () |
virtual void | ifEnd (bool) |
virtual void | breakStatement () |
virtual void | continueStatement () |
virtual void | switchBegin () |
virtual void | switchEnd () |
virtual void | caseBegin () |
virtual void | caseEnd () |
virtual void | defaultBegin () |
virtual void | defaultEnd () |
virtual void | exprStatement () |
virtual void | returnStatement (bool) |
virtual void | assertStatement () |
virtual void | exprSync (Constants::synchronisation_t type) |
virtual void | declIO (const char *, int, int) |
virtual void | exprProbaQuantitative (int, Constants::kind_t) |
virtual void | exprSimulate (int, int, int) |
virtual void | instantiationBegin (const char *, size_t, const char *) |
virtual void | instantiationEnd (const char *, size_t, const char *, size_t) |
virtual void | process (const char *) |
virtual void | processListEnd () |
virtual void | done () |
virtual void | property () |
virtual void | scenario (const char *) |
virtual void | parse (const char *) |
virtual void | beforeUpdate () |
virtual void | afterUpdate () |
virtual void | beginChanPriority () |
virtual void | addChanPriority (char separator) |
virtual void | defaultChanPriority () |
virtual void | incProcPriority () |
virtual void | procPriority (const char *) |
virtual void | declDynamicTemplate (std::string) |
Dynamic. More... | |
virtual void | exprDynamicProcessExpr (const char *) |
virtual void | exprMITLForAllDynamicBegin (const char *, const char *) |
virtual void | exprMITLForAllDynamicEnd (const char *name) |
virtual void | exprMITLExistsDynamicBegin (const char *, const char *) |
virtual void | exprMITLExistsDynamicEnd (const char *name) |
virtual void | queryBegin () |
Verification queries. More... | |
virtual void | queryFormula (const char *formula, const char *location) |
virtual void | queryComment (const char *comment) |
virtual void | queryEnd () |
![]() | |
virtual | ~ParserBuilder () |
void | handleWarning (const char *msg,...) |
void | handleError (const char *msg,...) |
Protected Member Functions | |
void | pushFrame (frame_t) |
Push a new frame. More... | |
void | popFrame () |
Pop the topmost frame. More... | |
bool | resolve (std::string, symbol_t &) |
expression_t | makeConstant (int value) |
expression_t | makeConstant (double value) |
type_t | applyPrefix (PREFIX, type_t type) |
Given a prefix and a type, this method creates a new type by applying the prefix. More... | |
virtual bool | allowProcessReferences () |
If this method returns true, it is allowed to access the private identifiers of a process by prefixing the identifier with the process name. More... | |
Protected Attributes | |
ExpressionFragments | fragments |
Expression stack. More... | |
TypeFragments | typeFragments |
Type stack. More... | |
std::stack< frame_t > | frames |
Frame stack. More... | |
TimedAutomataSystem * | system |
Pointer to the system under construction. More... | |
template_t * | currentTemplate |
The template currently being parsed. More... | |
int32_t | scalar_count |
Counter for creating unique scalarset names. More... | |
std::map< std::string, frame_t > | dynamicFrames |
![]() | |
position_t | position |
Additional Inherited Members | |
![]() | |
enum | PREFIX { PREFIX_NONE = 0, PREFIX_CONST = 1, PREFIX_URGENT = 2, PREFIX_BROADCAST = 4, PREFIX_URGENT_BROADCAST = 6, PREFIX_SYSTEM_META = 8, PREFIX_HYBRID = 16 } |
![]() | |
std::vector< std::string > | lscTemplateNames |
Partial implementation of the builder interface: The ExpressionBuilder implements all expression related methods.
In order to support quantifier expressions, this class also handles the type related methods.
This class does not implement any declaration related methods.
Internally, three stacks are maintained: One for expressions, one for types and for frames (scopes).
ExpressionBuilder::ExpressionBuilder | ( | TimedAutomataSystem * | system | ) |
|
virtual |
Add mapping from an absolute position to a relative XML element.
Implements UTAP::ParserBuilder.
References UTAP::TimedAutomataSystem::addPosition(), and system.
|
inlineprotectedvirtual |
If this method returns true, it is allowed to access the private identifiers of a process by prefixing the identifier with the process name.
This is only interesting when parsing properties. In this case the method should be overridden by a sub class.
Given a prefix and a type, this method creates a new type by applying the prefix.
TypeExceptions might be thrown if the combination of the prefix and the type is illegal.
References UTAP::Constants::BROADCAST, UTAP::Constants::CONSTANT, UTAP::type_t::createPrefix(), UTAP::Constants::HYBRID, UTAP::AbstractBuilder::position, UTAP::ParserBuilder::PREFIX_BROADCAST, UTAP::ParserBuilder::PREFIX_CONST, UTAP::ParserBuilder::PREFIX_HYBRID, UTAP::ParserBuilder::PREFIX_SYSTEM_META, UTAP::ParserBuilder::PREFIX_URGENT, UTAP::ParserBuilder::PREFIX_URGENT_BROADCAST, UTAP::Constants::SYSTEM_META, and URGENT.
Referenced by typeBool(), typeBoundedInt(), typeChannel(), typeClock(), typeDouble(), typeInt(), typeName(), typeScalar(), and UTAP::StatementBuilder::typeStruct().
|
virtual |
Reimplemented from UTAP::AbstractBuilder.
References UTAP::Constants::ARRAY, UTAP::expression_t::createBinary(), fragments, UTAP::type_t::getSub(), UTAP::expression_t::getType(), UTAP::type_t::isArray(), UTAP::ExpressionBuilder::ExpressionFragments::pop(), UTAP::AbstractBuilder::position, and UTAP::ExpressionBuilder::ExpressionFragments::push().
|
virtual |
|
virtual |
Reimplemented from UTAP::AbstractBuilder.
References UTAP::Constants::AND, UTAP::expression_t::createBinary(), fragments, isMITL(), UTAP::Constants::MITLCONJ, UTAP::Constants::MITLDISJ, UTAP::ExpressionBuilder::ExpressionFragments::pop(), UTAP::AbstractBuilder::position, UTAP::ExpressionBuilder::ExpressionFragments::push(), and toMITLAtom().
Referenced by UTAP::StatementBuilder::typeArrayOfSize(), and typeScalar().
|
virtual |
Reimplemented from UTAP::AbstractBuilder.
References UTAP::expression_t::createUnary(), fragments, and UTAP::AbstractBuilder::position.
|
virtual |
Reimplemented from UTAP::AbstractBuilder.
References UTAP::expression_t::createBinary(), fragments, UTAP::expression_t::getType(), UTAP::ExpressionBuilder::ExpressionFragments::pop(), and UTAP::AbstractBuilder::position.
|
virtual |
Reimplemented from UTAP::AbstractBuilder.
Reimplemented in UTAP::StatementBuilder.
Referenced by UTAP::StatementBuilder::exprCallBegin().
|
virtual |
Reimplemented from UTAP::AbstractBuilder.
References UTAP::Constants::ARRAY, UTAP::type_t::createArray(), UTAP::expression_t::createBinary(), UTAP::expression_t::createNary(), UTAP::type_t::createProcess(), fragments, UTAP::declarations_t::frame, UTAP::Constants::FUNCALL, UTAP::Constants::FUNCTION, UTAP::type_t::getSub(), handleError(), makeConstant(), UTAP::instance_t::parameters, UTAP::ExpressionBuilder::ExpressionFragments::pop(), UTAP::AbstractBuilder::position, UTAP::Constants::PROCESSSET, UTAP::ExpressionBuilder::ExpressionFragments::push(), UTAP::expression_t::setType(), UTAP::instance_t::templ, and UTAP::instance_t::unbound.
|
virtual |
|
virtual |
Reimplemented from UTAP::AbstractBuilder.
References UTAP::expression_t::createDeadlock(), fragments, UTAP::AbstractBuilder::position, and UTAP::ExpressionBuilder::ExpressionFragments::push().
|
virtual |
Reimplemented from UTAP::AbstractBuilder.
References UTAP::Constants::BOOL, UTAP::expression_t::createDot(), UTAP::expression_t::createIdentifier(), UTAP::expression_t::createNary(), UTAP::type_t::createPrimitive(), UTAP::Constants::DYNAMICEVAL, dynamicFrames, exprFalse(), UTAP::type_t::findIndexOf(), fragments, UTAP::symbol_t::getData(), UTAP::symbol_t::getName(), UTAP::type_t::getSub(), UTAP::expression_t::getSymbol(), UTAP::expression_t::getType(), UTAP::ParserBuilder::handleError(), UTAP::type_t::is(), UTAP::type_t::isLocation(), UTAP::type_t::isProcess(), UTAP::type_t::isRecord(), UTAP::instance_t::mapping, popFrame(), UTAP::AbstractBuilder::position, UTAP::AbstractBuilder::process(), UTAP::Constants::PROCESSVAR, pushFrame(), UTAP::type_t::rename(), resolve(), UTAP::type_t::subst(), UTAP::instance_t::templ, UTAP::expression_t::toString(), and UTAP::instance_t::uid.
|
virtual |
|
virtual |
Reimplemented from UTAP::AbstractBuilder.
References exprForAllBegin().
|
virtual |
|
virtual |
Reimplemented from UTAP::AbstractBuilder.
References UTAP::Constants::BOOL, UTAP::expression_t::clone(), UTAP::expression_t::createIdentifier(), UTAP::expression_t::createNary(), UTAP::type_t::createPrimitive(), UTAP::Constants::EXISTSDYNAMIC, fragments, frames, UTAP::expression_t::get(), UTAP::expression_t::getKind(), isMITL(), UTAP::Constants::MITLATOM, UTAP::Constants::MITLEXISTS, UTAP::ExpressionBuilder::ExpressionFragments::pop(), popDynamicFrameOf(), popFrame(), UTAP::AbstractBuilder::position, UTAP::AbstractBuilder::process(), and UTAP::ExpressionBuilder::ExpressionFragments::push().
|
virtual |
Reimplemented from UTAP::AbstractBuilder.
References UTAP::expression_t::createBinary(), UTAP::expression_t::createIdentifier(), UTAP::Constants::EXISTS, fragments, frames, popFrame(), and UTAP::AbstractBuilder::position.
|
virtual |
Reimplemented from UTAP::AbstractBuilder.
References UTAP::expression_t::createExit(), fragments, UTAP::AbstractBuilder::position, and UTAP::ExpressionBuilder::ExpressionFragments::push().
|
virtual |
Reimplemented from UTAP::AbstractBuilder.
References UTAP::Constants::BOOL, UTAP::type_t::createPrimitive(), fragments, makeConstant(), UTAP::ExpressionBuilder::ExpressionFragments::push(), and UTAP::expression_t::setType().
|
virtual |
Reimplemented from UTAP::AbstractBuilder.
References UTAP::Constants::CONSTANT, UTAP::frame_t::createFrame(), UTAP::type_t::createPrefix(), frames, handleError(), UTAP::type_t::is(), UTAP::type_t::isInteger(), UTAP::type_t::isScalar(), UTAP::ExpressionBuilder::TypeFragments::pop(), pushFrame(), UTAP::symbol(), and typeFragments.
Referenced by exprExistsBegin(), and exprSumBegin().
|
virtual |
|
virtual |
Reimplemented from UTAP::AbstractBuilder.
References UTAP::Constants::BOOL, UTAP::expression_t::clone(), UTAP::expression_t::createIdentifier(), UTAP::expression_t::createNary(), UTAP::type_t::createPrimitive(), UTAP::Constants::FORALLDYNAMIC, fragments, frames, UTAP::expression_t::get(), UTAP::expression_t::getKind(), isMITL(), UTAP::Constants::MITLATOM, UTAP::Constants::MITLFORALL, UTAP::ExpressionBuilder::ExpressionFragments::pop(), popDynamicFrameOf(), popFrame(), UTAP::AbstractBuilder::position, UTAP::AbstractBuilder::process(), and UTAP::ExpressionBuilder::ExpressionFragments::push().
|
virtual |
Reimplemented from UTAP::AbstractBuilder.
References UTAP::expression_t::createBinary(), UTAP::expression_t::createIdentifier(), UTAP::Constants::FORALL, fragments, frames, popFrame(), and UTAP::AbstractBuilder::position.
|
virtual |
|
virtual |
Reimplemented from UTAP::AbstractBuilder.
References UTAP::expression_t::createIdentifier(), UTAP::expression_t::createNary(), UTAP::type_t::createPrimitive(), UTAP::Constants::FOREACHDYNAMIC, fragments, frames, UTAP::Constants::INT, UTAP::ExpressionBuilder::ExpressionFragments::pop(), popDynamicFrameOf(), popFrame(), UTAP::AbstractBuilder::position, UTAP::AbstractBuilder::process(), and UTAP::ExpressionBuilder::ExpressionFragments::push().
|
virtual |
Reimplemented from UTAP::AbstractBuilder.
References UTAP::expression_t::createIdentifier(), exprFalse(), fragments, UTAP::AbstractBuilder::position, UTAP::ExpressionBuilder::ExpressionFragments::push(), and resolve().
|
virtual |
Reimplemented from UTAP::AbstractBuilder.
References UTAP::expression_t::createTernary(), fragments, UTAP::expression_t::getType(), UTAP::Constants::INLINEIF, UTAP::ExpressionBuilder::ExpressionFragments::pop(), UTAP::AbstractBuilder::position, and UTAP::ExpressionBuilder::ExpressionFragments::push().
|
virtual |
|
virtual |
Implements UTAP::ParserBuilder.
References UTAP::expression_t::createConstant(), UTAP::expression_t::createNary(), UTAP::expression_t::createUnary(), fragments, isMITL(), UTAP::Constants::MITLATOM, UTAP::Constants::MITLRELEASE, UTAP::ExpressionBuilder::ExpressionFragments::pop(), UTAP::AbstractBuilder::position, UTAP::ExpressionBuilder::ExpressionFragments::push(), and toMITLAtom().
|
virtual |
|
virtual |
Implements UTAP::ParserBuilder.
References UTAP::expression_t::createConstant(), UTAP::expression_t::createNary(), UTAP::expression_t::createUnary(), fragments, isMITL(), UTAP::Constants::MITLATOM, UTAP::Constants::MITLUNTIL, UTAP::ExpressionBuilder::ExpressionFragments::pop(), UTAP::AbstractBuilder::position, UTAP::ExpressionBuilder::ExpressionFragments::push(), and toMITLAtom().
|
virtual |
|
virtual |
|
virtual |
|
virtual |
Reimplemented from UTAP::AbstractBuilder.
References UTAP::expression_t::createConstant(), UTAP::expression_t::createNary(), fragments, isMITL(), UTAP::Constants::MITLRELEASE, UTAP::ExpressionBuilder::ExpressionFragments::pop(), UTAP::AbstractBuilder::position, UTAP::ExpressionBuilder::ExpressionFragments::push(), and toMITLAtom().
|
virtual |
Reimplemented from UTAP::AbstractBuilder.
References UTAP::expression_t::createConstant(), UTAP::expression_t::createNary(), fragments, isMITL(), UTAP::Constants::MITLUNTIL, UTAP::ExpressionBuilder::ExpressionFragments::pop(), UTAP::AbstractBuilder::position, UTAP::ExpressionBuilder::ExpressionFragments::push(), and toMITLAtom().
|
virtual |
|
virtual |
Reimplemented from UTAP::AbstractBuilder.
References fragments, makeConstant(), and UTAP::ExpressionBuilder::ExpressionFragments::push().
Referenced by UTAP::StatementBuilder::typeArrayOfSize(), and typeScalar().
|
virtual |
Reimplemented from UTAP::AbstractBuilder.
References UTAP::type_t::createPrimitive(), UTAP::expression_t::createUnary(), fragments, UTAP::Constants::INT, UTAP::Constants::NUMOF, UTAP::ExpressionBuilder::ExpressionFragments::pop(), UTAP::AbstractBuilder::position, and UTAP::ExpressionBuilder::ExpressionFragments::push().
|
virtual |
Reimplemented from UTAP::AbstractBuilder.
References UTAP::expression_t::createUnary(), fragments, UTAP::AbstractBuilder::position, and UTAP::Constants::POSTDECREMENT.
|
virtual |
Reimplemented from UTAP::AbstractBuilder.
References UTAP::expression_t::createUnary(), fragments, UTAP::AbstractBuilder::position, and UTAP::Constants::POSTINCREMENT.
|
virtual |
Reimplemented from UTAP::AbstractBuilder.
References UTAP::expression_t::createUnary(), fragments, UTAP::AbstractBuilder::position, and UTAP::Constants::PREDECREMENT.
|
virtual |
Reimplemented from UTAP::AbstractBuilder.
References UTAP::expression_t::createUnary(), fragments, UTAP::AbstractBuilder::position, and UTAP::Constants::PREINCREMENT.
|
virtual |
Reimplemented from UTAP::AbstractBuilder.
References UTAP::expression_t::createConstant(), UTAP::expression_t::createNary(), fragments, UTAP::ExpressionBuilder::ExpressionFragments::pop(), UTAP::AbstractBuilder::position, UTAP::Constants::PROBACMP, and UTAP::ExpressionBuilder::ExpressionFragments::push().
|
virtual |
Reimplemented from UTAP::AbstractBuilder.
References UTAP::expression_t::createConstant(), UTAP::expression_t::createNary(), fragments, UTAP::ExpressionBuilder::ExpressionFragments::pop(), UTAP::AbstractBuilder::position, UTAP::Constants::PROBAEXP, and UTAP::ExpressionBuilder::ExpressionFragments::push().
|
virtual |
Reimplemented from UTAP::AbstractBuilder.
References UTAP::Constants::BOX, UTAP::expression_t::createConstant(), UTAP::expression_t::createDouble(), UTAP::expression_t::createNary(), UTAP::expression_t::createUnary(), fragments, UTAP::Constants::LE, UTAP::Constants::NOT, UTAP::AbstractBuilder::position, UTAP::Constants::PROBAMINBOX, and UTAP::Constants::PROBAMINDIAMOND.
|
virtual |
Implements UTAP::ParserBuilder.
References UTAP::Constants::BOOL, UTAP::Constants::BOX, UTAP::expression_t::createConstant(), UTAP::expression_t::createNary(), UTAP::type_t::createPrimitive(), fragments, makeConstant(), UTAP::ExpressionBuilder::ExpressionFragments::pop(), UTAP::AbstractBuilder::position, UTAP::Constants::PROBABOX, UTAP::Constants::PROBADIAMOND, UTAP::ExpressionBuilder::ExpressionFragments::push(), and UTAP::expression_t::setType().
|
virtual |
|
virtual |
References UTAP::Constants::BOOL, UTAP::expression_t::createBinary(), UTAP::expression_t::createDot(), UTAP::expression_t::createIdentifier(), UTAP::type_t::createPrimitive(), UTAP::type_t::findIndexOf(), UTAP::expression_t::getType(), UTAP::TimedAutomataSystem::obsTA, UTAP::AbstractBuilder::position, resolve(), UTAP::Constants::SCENARIO2, and system.
|
virtual |
Implements UTAP::ParserBuilder.
References UTAP::expression_t::createConstant(), UTAP::expression_t::createNary(), fragments, UTAP::ExpressionBuilder::ExpressionFragments::pop(), UTAP::AbstractBuilder::position, UTAP::ExpressionBuilder::ExpressionFragments::push(), UTAP::Constants::SIMULATE, and UTAP::Constants::SIMULATEREACH.
|
virtual |
Reimplemented from UTAP::AbstractBuilder.
References UTAP::expression_t::createConstant(), UTAP::expression_t::createTernary(), fragments, UTAP::ExpressionBuilder::ExpressionFragments::pop(), UTAP::AbstractBuilder::position, UTAP::ExpressionBuilder::ExpressionFragments::push(), and UTAP::Constants::SMC_CONTROL.
|
virtual |
|
virtual |
Reimplemented from UTAP::AbstractBuilder.
References exprForAllBegin().
|
virtual |
|
virtual |
Reimplemented from UTAP::AbstractBuilder.
References UTAP::expression_t::createIdentifier(), UTAP::expression_t::createNary(), fragments, frames, UTAP::expression_t::getType(), UTAP::ExpressionBuilder::ExpressionFragments::pop(), popDynamicFrameOf(), popFrame(), UTAP::AbstractBuilder::position, UTAP::AbstractBuilder::process(), UTAP::ExpressionBuilder::ExpressionFragments::push(), and UTAP::Constants::SUMDYNAMIC.
|
virtual |
Reimplemented from UTAP::AbstractBuilder.
References UTAP::expression_t::createBinary(), UTAP::expression_t::createIdentifier(), fragments, frames, popFrame(), UTAP::AbstractBuilder::position, and UTAP::Constants::SUM.
|
virtual |
|
virtual |
Reimplemented from UTAP::AbstractBuilder.
References UTAP::Constants::BOOL, UTAP::type_t::createPrimitive(), fragments, makeConstant(), UTAP::ExpressionBuilder::ExpressionFragments::push(), and UTAP::expression_t::setType().
|
virtual |
Reimplemented from UTAP::AbstractBuilder.
References UTAP::expression_t::createUnary(), fragments, UTAP::Constants::MINUS, UTAP::Constants::PLUS, UTAP::AbstractBuilder::position, and UTAP::Constants::UNARY_MINUS.
ExpressionBuilder::ExpressionFragments & ExpressionBuilder::getExpressions | ( | ) |
References fragments.
Referenced by parseExpression().
|
virtual |
Implements UTAP::ParserBuilder.
References UTAP::TimedAutomataSystem::addError(), UTAP::AbstractBuilder::position, and system.
Referenced by UTAP::SystemBuilder::addSelectSymbolToFrame(), UTAP::SystemBuilder::declDynamicTemplate(), UTAP::StatementBuilder::declFuncBegin(), UTAP::StatementBuilder::declFuncEnd(), UTAP::StatementBuilder::declVar(), UTAP::StatementBuilder::exprCallBegin(), exprCallEnd(), exprForAllBegin(), UTAP::SystemBuilder::instanceName(), UTAP::SystemBuilder::instanceNameEnd(), UTAP::SystemBuilder::instantiationBegin(), UTAP::SystemBuilder::instantiationEnd(), UTAP::SystemBuilder::procBegin(), UTAP::SystemBuilder::procEdgeBegin(), UTAP::SystemBuilder::procLscUpdate(), UTAP::SystemBuilder::procMessage(), UTAP::SystemBuilder::procPriority(), UTAP::SystemBuilder::procStateCommit(), UTAP::SystemBuilder::procStateInit(), UTAP::SystemBuilder::procStateUrgent(), UTAP::StatementBuilder::returnStatement(), UTAP::StatementBuilder::structField(), and UTAP::StatementBuilder::typeArrayOfType().
|
virtual |
Implements UTAP::ParserBuilder.
References UTAP::TimedAutomataSystem::addWarning(), UTAP::AbstractBuilder::position, and system.
Referenced by UTAP::SystemBuilder::addSelectSymbolToFrame().
|
virtual |
Must return true if and only if name is registered in the symbol table as a named type, for instance, "int" or "bool" or a user defined type.
Reimplemented from UTAP::AbstractBuilder.
References UTAP::type_t::getKind(), UTAP::symbol_t::getType(), resolve(), and UTAP::Constants::TYPEDEF.
|
protected |
|
protected |
References UTAP::expression_t::createDouble(), and UTAP::AbstractBuilder::position.
|
virtual |
References dynamicFrames.
Referenced by exprExistsDynamicEnd(), exprForAllDynamicEnd(), exprForeachDynamicEnd(), and exprSumDynamicEnd().
|
protected |
Pop the topmost frame.
References frames.
Referenced by UTAP::StatementBuilder::blockEnd(), UTAP::StatementBuilder::declFuncEnd(), exprDot(), exprExistsDynamicEnd(), exprExistsEnd(), exprForAllDynamicEnd(), exprForAllEnd(), exprForeachDynamicEnd(), exprSumDynamicEnd(), exprSumEnd(), UTAP::SystemBuilder::ganttDeclEnd(), UTAP::SystemBuilder::ganttEntryEnd(), UTAP::SystemBuilder::instanceNameEnd(), UTAP::SystemBuilder::instantiationEnd(), UTAP::StatementBuilder::iterationEnd(), UTAP::SystemBuilder::procEdgeEnd(), and UTAP::SystemBuilder::procEnd().
|
virtual |
References dynamicFrames, UTAP::declarations_t::frame, and UTAP::template_t::isDefined.
Referenced by exprExistsDynamicBegin(), exprForAllDynamicBegin(), exprForeachDynamicBegin(), and exprSumDynamicBegin().
|
protected |
Push a new frame.
References frames.
Referenced by UTAP::StatementBuilder::blockBegin(), UTAP::StatementBuilder::declFuncBegin(), exprDot(), ExpressionBuilder(), exprExistsDynamicBegin(), exprForAllBegin(), exprForAllDynamicBegin(), exprForeachDynamicBegin(), exprSumDynamicBegin(), UTAP::SystemBuilder::ganttDeclStart(), UTAP::SystemBuilder::ganttEntryStart(), UTAP::SystemBuilder::instanceNameBegin(), UTAP::SystemBuilder::instantiationBegin(), UTAP::StatementBuilder::iterationBegin(), UTAP::SystemBuilder::procBegin(), and UTAP::SystemBuilder::procEdgeBegin().
|
protected |
References frames.
Referenced by UTAP::SystemBuilder::addSelectSymbolToFrame(), exprDot(), exprId(), exprScenario(), UTAP::SystemBuilder::instanceName(), UTAP::SystemBuilder::instanceNameEnd(), UTAP::SystemBuilder::instantiationBegin(), UTAP::SystemBuilder::instantiationEnd(), isType(), UTAP::SystemBuilder::procEdgeBegin(), UTAP::SystemBuilder::process(), UTAP::SystemBuilder::procLscUpdate(), UTAP::SystemBuilder::procMessage(), UTAP::SystemBuilder::procPriority(), UTAP::SystemBuilder::procStateCommit(), UTAP::SystemBuilder::procStateInit(), UTAP::SystemBuilder::procStateUrgent(), and typeName().
|
virtual |
Called whenever a boolean type is parsed.
Reimplemented from UTAP::AbstractBuilder.
References applyPrefix(), UTAP::Constants::BOOL, UTAP::type_t::createPrimitive(), UTAP::AbstractBuilder::position, UTAP::ExpressionBuilder::TypeFragments::push(), and typeFragments.
|
virtual |
Called whenever an integer type with a range is parsed.
Expressions for the lower and upper have been pushed before.
Reimplemented from UTAP::AbstractBuilder.
References applyPrefix(), UTAP::type_t::createPrimitive(), UTAP::type_t::createRange(), fragments, UTAP::Constants::INT, UTAP::ExpressionBuilder::ExpressionFragments::pop(), UTAP::AbstractBuilder::position, UTAP::ExpressionBuilder::TypeFragments::push(), and typeFragments.
Referenced by UTAP::StatementBuilder::typeArrayOfSize().
|
virtual |
Called whenever a channel type is parsed.
Reimplemented from UTAP::AbstractBuilder.
References applyPrefix(), UTAP::Constants::CHANNEL, UTAP::type_t::createPrimitive(), UTAP::AbstractBuilder::position, UTAP::ExpressionBuilder::TypeFragments::push(), and typeFragments.
|
virtual |
Called whenever a clock type is parsed.
Reimplemented from UTAP::AbstractBuilder.
References applyPrefix(), CLOCK, UTAP::type_t::createPrimitive(), UTAP::AbstractBuilder::position, UTAP::ExpressionBuilder::TypeFragments::push(), and typeFragments.
|
virtual |
Called whenever a double type is parsed.
Reimplemented from UTAP::AbstractBuilder.
References applyPrefix(), UTAP::type_t::createPrimitive(), UTAP::Constants::DOUBLE, UTAP::AbstractBuilder::position, UTAP::ExpressionBuilder::TypeFragments::push(), and typeFragments.
|
virtual |
Duplicate type at the top of the type stack.
Reimplemented from UTAP::AbstractBuilder.
References UTAP::ExpressionBuilder::TypeFragments::duplicate(), and typeFragments.
|
virtual |
Called whenever an integer type is parsed.
Reimplemented from UTAP::AbstractBuilder.
References applyPrefix(), UTAP::type_t::createPrimitive(), UTAP::type_t::createRange(), defaultIntMax, defaultIntMin, UTAP::Constants::INT, makeConstant(), UTAP::AbstractBuilder::position, UTAP::ParserBuilder::PREFIX_CONST, UTAP::ExpressionBuilder::TypeFragments::push(), and typeFragments.
|
virtual |
Called when a type name has been parsed.
Prefix indicates whether the type named was prefixed (e.g. with 'const').
Reimplemented from UTAP::AbstractBuilder.
References applyPrefix(), UTAP::type_t::createLabel(), UTAP::type_t::createPrimitive(), UTAP::type_t::getKind(), UTAP::symbol_t::getName(), UTAP::symbol_t::getType(), UTAP::AbstractBuilder::position, UTAP::ExpressionBuilder::TypeFragments::push(), resolve(), UTAP::Constants::TYPEDEF, typeFragments, and UTAP::Constants::VOID_TYPE.
|
virtual |
Pop type at the topof the type stack.
Reimplemented from UTAP::AbstractBuilder.
References UTAP::ExpressionBuilder::TypeFragments::pop(), and typeFragments.
|
virtual |
Called whenever a scalar type is parsed.
The size of the scalar set was pushed as an expression before.
Reimplemented from UTAP::AbstractBuilder.
References applyPrefix(), collectDependencies(), UTAP::type_t::createLabel(), UTAP::type_t::createPrimitive(), UTAP::type_t::createRange(), currentTemplate, exprBinary(), exprNat(), fragments, UTAP::symbol_t::getName(), makeConstant(), UTAP::Constants::MINUS, UTAP::ExpressionBuilder::ExpressionFragments::pop(), UTAP::AbstractBuilder::position, UTAP::ExpressionBuilder::TypeFragments::push(), UTAP::instance_t::restricted, UTAP::Constants::SCALAR, scalar_count, typeFragments, and UTAP::instance_t::uid.
|
virtual |
Called whenever a void type is parsed.
Reimplemented from UTAP::AbstractBuilder.
References UTAP::type_t::createPrimitive(), UTAP::AbstractBuilder::position, UTAP::ExpressionBuilder::TypeFragments::push(), typeFragments, and UTAP::Constants::VOID_TYPE.
|
protected |
The template currently being parsed.
Referenced by UTAP::SystemBuilder::declDynamicTemplate(), UTAP::SystemBuilder::getCurrentDeclarationBlock(), UTAP::SystemBuilder::hasPrechart(), UTAP::SystemBuilder::instanceName(), UTAP::SystemBuilder::procBegin(), UTAP::SystemBuilder::procBranchpoint(), UTAP::SystemBuilder::procEdgeBegin(), UTAP::SystemBuilder::procEnd(), UTAP::SystemBuilder::procInstanceLine(), UTAP::SystemBuilder::procLscUpdate(), UTAP::SystemBuilder::procMessage(), UTAP::SystemBuilder::procState(), UTAP::SystemBuilder::procStateInit(), UTAP::StatementBuilder::StatementBuilder(), UTAP::StatementBuilder::typeArrayOfType(), and typeScalar().
|
protected |
Referenced by exprDot(), popDynamicFrameOf(), and pushDynamicFrameOf().
|
protected |
Expression stack.
Referenced by UTAP::SystemBuilder::addChanPriority(), UTAP::SystemBuilder::afterUpdate(), UTAP::StatementBuilder::assertStatement(), UTAP::SystemBuilder::beforeUpdate(), UTAP::SystemBuilder::beginChanPriority(), UTAP::StatementBuilder::declFieldInit(), UTAP::StatementBuilder::declInitialiserList(), UTAP::SystemBuilder::declIO(), UTAP::SystemBuilder::declProgress(), UTAP::StatementBuilder::declVar(), UTAP::SystemBuilder::defaultChanPriority(), UTAP::StatementBuilder::doWhileEnd(), exprArray(), exprAssignment(), exprBinary(), exprBuiltinFunction1(), exprBuiltinFunction2(), UTAP::StatementBuilder::exprCallBegin(), exprCallEnd(), exprComma(), exprDeadlock(), exprDot(), exprDouble(), exprExistsDynamicEnd(), exprExistsEnd(), exprExit(), exprFalse(), exprForAllDynamicEnd(), exprForAllEnd(), exprForeachDynamicEnd(), exprId(), exprInlineIf(), exprMitlAtom(), exprMitlBox(), exprMitlConj(), exprMitlDiamond(), exprMitlDisj(), exprMitlFormula(), exprMitlNext(), exprMitlRelease(), exprMitlUntil(), exprNary(), exprNat(), exprNumOf(), exprPostDecrement(), exprPostIncrement(), exprPreDecrement(), exprPreIncrement(), exprProbaCompare(), exprProbaExpected(), exprProbaQualitative(), exprProbaQuantitative(), exprScenario(), exprSimulate(), exprSMCControl(), exprSpawn(), UTAP::StatementBuilder::exprStatement(), exprSumDynamicEnd(), exprSumEnd(), UTAP::SystemBuilder::exprSync(), exprTernary(), exprTrue(), exprUnary(), UTAP::StatementBuilder::forEnd(), UTAP::SystemBuilder::ganttEntryEnd(), getExpressions(), UTAP::StatementBuilder::ifEnd(), UTAP::SystemBuilder::instanceNameEnd(), UTAP::SystemBuilder::instantiationEnd(), UTAP::SystemBuilder::procCondition(), UTAP::SystemBuilder::procGuard(), UTAP::SystemBuilder::procLscUpdate(), UTAP::SystemBuilder::procMessage(), UTAP::SystemBuilder::procProb(), UTAP::SystemBuilder::procState(), UTAP::SystemBuilder::procSync(), UTAP::SystemBuilder::procUpdate(), UTAP::StatementBuilder::returnStatement(), UTAP::StatementBuilder::typeArrayOfSize(), typeBoundedInt(), typeScalar(), and UTAP::StatementBuilder::whileEnd().
|
protected |
Frame stack.
Referenced by UTAP::SystemBuilder::addVariable(), UTAP::StatementBuilder::blockBegin(), UTAP::SystemBuilder::declDynamicTemplate(), UTAP::StatementBuilder::declFuncBegin(), UTAP::StatementBuilder::declTypeDef(), exprExistsDynamicBegin(), exprExistsDynamicEnd(), exprExistsEnd(), exprForAllBegin(), exprForAllDynamicBegin(), exprForAllDynamicEnd(), exprForAllEnd(), exprForeachDynamicBegin(), exprForeachDynamicEnd(), exprSumDynamicBegin(), exprSumDynamicEnd(), exprSumEnd(), UTAP::SystemBuilder::ganttDeclEnd(), UTAP::SystemBuilder::ganttDeclSelect(), UTAP::SystemBuilder::ganttDeclStart(), UTAP::SystemBuilder::ganttEntryEnd(), UTAP::SystemBuilder::ganttEntrySelect(), UTAP::SystemBuilder::ganttEntryStart(), UTAP::SystemBuilder::instanceNameBegin(), UTAP::SystemBuilder::instanceNameEnd(), UTAP::SystemBuilder::instantiationBegin(), UTAP::SystemBuilder::instantiationEnd(), UTAP::StatementBuilder::iterationBegin(), popFrame(), UTAP::SystemBuilder::procBegin(), UTAP::SystemBuilder::procEdgeBegin(), pushFrame(), and resolve().
|
protected |
Counter for creating unique scalarset names.
Referenced by ExpressionBuilder(), and typeScalar().
|
protected |
Pointer to the system under construction.
Referenced by UTAP::SystemBuilder::addChanPriority(), addPosition(), UTAP::SystemBuilder::addVariable(), UTAP::SystemBuilder::afterUpdate(), UTAP::SystemBuilder::beforeUpdate(), UTAP::SystemBuilder::beginChanPriority(), UTAP::SystemBuilder::declDynamicTemplate(), UTAP::SystemBuilder::declProgress(), exprExistsDynamicBegin(), exprForAllDynamicBegin(), exprForeachDynamicBegin(), exprScenario(), exprSumDynamicBegin(), UTAP::SystemBuilder::exprSync(), UTAP::SystemBuilder::ganttDeclEnd(), UTAP::SystemBuilder::getCurrentDeclarationBlock(), handleError(), handleWarning(), UTAP::SystemBuilder::instantiationEnd(), UTAP::SystemBuilder::procBegin(), UTAP::SystemBuilder::process(), UTAP::SystemBuilder::procPriority(), and UTAP::SystemBuilder::queryEnd().
|
protected |
Type stack.
Referenced by UTAP::SystemBuilder::addSelectSymbolToFrame(), UTAP::StatementBuilder::declFuncBegin(), UTAP::StatementBuilder::declParameter(), UTAP::StatementBuilder::declTypeDef(), UTAP::StatementBuilder::declVar(), exprForAllBegin(), UTAP::StatementBuilder::iterationBegin(), UTAP::StatementBuilder::structField(), UTAP::StatementBuilder::typeArrayOfType(), typeBool(), typeBoundedInt(), typeChannel(), typeClock(), typeDouble(), typeDuplicate(), typeInt(), typeName(), typePop(), typeScalar(), UTAP::StatementBuilder::typeStruct(), and typeVoid().