libutap
|
#include <system.h>
Public Member Functions | |
TimedAutomataSystem () | |
TimedAutomataSystem (const TimedAutomataSystem &) | |
virtual | ~TimedAutomataSystem () |
declarations_t & | getGlobals () |
Returns the global declarations of the system. More... | |
std::list< template_t > & | getTemplates () |
Returns the templates of the system. More... | |
std::vector< template_t * > & | getDynamicTemplates () |
template_t * | getDynamicTemplate (const std::string name) |
std::list< instance_t > & | getProcesses () |
Returns the processes of the system. More... | |
queries_t & | getQueries () |
Returns the queries enclosed in the model. More... | |
void | addPosition (uint32_t position, uint32_t offset, uint32_t line, std::string path) |
const Positions::line_t & | findPosition (uint32_t position) const |
variable_t * | addVariableToFunction (function_t *, frame_t, type_t, std::string, expression_t initital) |
variable_t * | addVariable (declarations_t *, type_t type, std::string, expression_t initial) |
void | addProgressMeasure (declarations_t *, expression_t guard, expression_t measure) |
template_t & | addTemplate (std::string, frame_t params, const bool isTA=true, const std::string type="", const std::string mode="") |
Creates and returns a new template. More... | |
template_t & | addDynamicTemplate (std::string, frame_t params) |
instance_t & | addInstance (std::string name, instance_t &instance, frame_t params, const std::vector< expression_t > &arguments) |
instance_t & | addLscInstance (std::string name, instance_t &instance, frame_t params, const std::vector< expression_t > &arguments) |
void | removeProcess (instance_t &instance) |
void | copyVariablesFromTo (template_t *from, template_t *to) const |
void | copyFunctionsFromTo (template_t *from, template_t *to) const |
void | addProcess (instance_t &instance) |
void | addGantt (declarations_t *, gantt_t &) |
void | accept (SystemVisitor &) |
void | setBeforeUpdate (expression_t) |
expression_t | getBeforeUpdate () |
void | setAfterUpdate (expression_t) |
expression_t | getAfterUpdate () |
void | addQuery (const query_t &query) |
bool | queriesEmpty () |
void | beginChanPriority (expression_t chan) |
void | addChanPriority (char separator, expression_t chan) |
const std::list < chan_priority_t > & | getChanPriorities () const |
std::list< chan_priority_t > & | getMutableChanPriorities () |
void | setProcPriority (const char *name, int priority) |
Sets process priority for process name. More... | |
int | getProcPriority (const char *name) const |
Returns process priority for process name. More... | |
bool | hasPriorityDeclaration () const |
Returns true if system has some priority declaration. More... | |
bool | hasStrictInvariants () const |
Returns true if system has some strict invariant. More... | |
void | recordStrictInvariant () |
Record that the system has some strict invariant. More... | |
bool | hasStopWatch () const |
Returns true if the system stops any clock. More... | |
void | recordStopWatch () |
Record that the system stops a clock. More... | |
bool | hasStrictLowerBoundOnControllableEdges () const |
Returns true if the system has guards on controllable edges with strict lower bounds. More... | |
void | recordStrictLowerBoundOnControllableEdges () |
Record that the system has guards on controllable edges with strict lower bounds. More... | |
void | clockGuardRecvBroadcast () |
bool | hasClockGuardRecvBroadcast () const |
void | setSyncUsed (int s) |
int | getSyncUsed () const |
void | setUrgentTransition () |
bool | hasUrgentTransition () const |
bool | hasDynamicTemplates () const |
void | addError (position_t, std::string, std::string location="") |
void | addWarning (position_t, std::string) |
bool | hasErrors () const |
bool | hasWarnings () const |
const std::vector< error_t > & | getErrors () const |
const std::vector< error_t > & | getWarnings () const |
void | clearErrors () |
void | clearWarnings () |
bool | isModified () const |
void | setModified (bool mod) |
iodecl_t * | addIODecl () |
Public Attributes | |
std::string | obsTA |
Protected Member Functions | |
variable_t * | addVariable (std::list< variable_t > &variables, frame_t frame, type_t type, std::string) |
Protected Attributes | |
bool | hasUrgentTrans |
bool | hasPriorities |
bool | hasStrictInv |
bool | stopsClock |
bool | hasStrictLowControlledGuards |
bool | hasGuardOnRecvBroadcast |
int | defaultChanPriority |
std::list< chan_priority_t > | chanPriorities |
std::map< std::string, int > | procPriority |
int | syncUsed |
std::list< template_t > | templates |
std::list< template_t > | dynamicTemplates |
std::vector< template_t * > | dynamicTemplatesVec |
std::list< instance_t > | instances |
std::list< instance_t > | lscInstances |
bool | modified |
std::list< instance_t > | processes |
declarations_t | global |
expression_t | beforeUpdate |
expression_t | afterUpdate |
queries_t | queries |
std::string | location |
TimedAutomataSystem::TimedAutomataSystem | ( | ) |
TimedAutomataSystem::TimedAutomataSystem | ( | const TimedAutomataSystem & | ta | ) |
|
virtual |
void TimedAutomataSystem::accept | ( | SystemVisitor & | visitor | ) |
References dynamicTemplates, UTAP::declarations_t::frame, UTAP::declarations_t::ganttChart, UTAP::frame_t::getSize(), global, UTAP::Constants::INSTANCE, UTAP::declarations_t::iodecl, UTAP::type_t::is(), UTAP::Constants::LSCINSTANCE, UTAP::Constants::PROCESS, UTAP::Constants::PROCESSSET, UTAP::declarations_t::progress, UTAP::type_t::stripArray(), templates, visit(), UTAP::SystemVisitor::visitCondition(), UTAP::SystemVisitor::visitEdge(), UTAP::SystemVisitor::visitGanttChart(), UTAP::SystemVisitor::visitInstance(), UTAP::SystemVisitor::visitIODecl(), UTAP::SystemVisitor::visitMessage(), UTAP::SystemVisitor::visitProcess(), UTAP::SystemVisitor::visitProgressMeasure(), UTAP::SystemVisitor::visitSystemAfter(), UTAP::SystemVisitor::visitSystemBefore(), UTAP::SystemVisitor::visitTemplateAfter(), UTAP::SystemVisitor::visitTemplateBefore(), and UTAP::SystemVisitor::visitUpdate().
Referenced by main(), parseXMLBuffer(), parseXMLFile(), parseXTA(), and UTAP::TypeChecker::TypeChecker().
void TimedAutomataSystem::addChanPriority | ( | char | separator, |
expression_t | chan | ||
) |
References chanPriorities.
Referenced by UTAP::SystemBuilder::addChanPriority().
template_t & TimedAutomataSystem::addDynamicTemplate | ( | std::string | name, |
frame_t | params | ||
) |
References UTAP::frame_t::add(), UTAP::frame_t::addSymbol(), UTAP::instance_t::arguments, UTAP::frame_t::createFrame(), UTAP::type_t::createInstance(), UTAP::template_t::dynamic, dynamicTemplates, UTAP::template_t::dynindex, UTAP::declarations_t::frame, UTAP::frame_t::getSize(), global, UTAP::template_t::isDefined, UTAP::template_t::isTA, UTAP::instance_t::parameters, UTAP::instance_t::templ, UTAP::instance_t::uid, and UTAP::instance_t::unbound.
Referenced by UTAP::SystemBuilder::declDynamicTemplate().
void TimedAutomataSystem::addError | ( | position_t | position, |
std::string | msg, | ||
std::string | location = "" |
||
) |
References UTAP::position_t::end, location, and UTAP::position_t::start.
Referenced by UTAP::ExpressionBuilder::handleError(), and UTAP::TypeChecker::visitIODecl().
void TimedAutomataSystem::addGantt | ( | declarations_t * | context, |
gantt_t & | g | ||
) |
References UTAP::declarations_t::ganttChart.
Referenced by UTAP::SystemBuilder::ganttDeclEnd().
instance_t & TimedAutomataSystem::addInstance | ( | std::string | name, |
instance_t & | instance, | ||
frame_t | params, | ||
const std::vector< expression_t > & | arguments | ||
) |
References UTAP::frame_t::add(), UTAP::frame_t::addSymbol(), UTAP::instance_t::arguments, UTAP::type_t::createInstance(), UTAP::declarations_t::frame, UTAP::frame_t::getSize(), global, UTAP::instance_t::mapping, UTAP::instance_t::parameters, UTAP::instance_t::templ, UTAP::instance_t::uid, and UTAP::instance_t::unbound.
Referenced by UTAP::SystemBuilder::instantiationEnd().
iodecl_t * TimedAutomataSystem::addIODecl | ( | ) |
References global, and UTAP::declarations_t::iodecl.
Referenced by UTAP::SystemBuilder::exprSync().
instance_t & TimedAutomataSystem::addLscInstance | ( | std::string | name, |
instance_t & | instance, | ||
frame_t | params, | ||
const std::vector< expression_t > & | arguments | ||
) |
References UTAP::frame_t::add(), UTAP::frame_t::addSymbol(), UTAP::instance_t::arguments, UTAP::type_t::createLscInstance(), UTAP::declarations_t::frame, UTAP::frame_t::getSize(), global, lscInstances, UTAP::instance_t::mapping, UTAP::instance_t::parameters, UTAP::instance_t::templ, UTAP::instance_t::uid, and UTAP::instance_t::unbound.
Referenced by UTAP::SystemBuilder::instantiationEnd().
void TimedAutomataSystem::addPosition | ( | uint32_t | position, |
uint32_t | offset, | ||
uint32_t | line, | ||
std::string | path | ||
) |
References UTAP::Positions::add().
Referenced by UTAP::ExpressionBuilder::addPosition().
void TimedAutomataSystem::addProcess | ( | instance_t & | instance | ) |
References UTAP::frame_t::addSymbol(), UTAP::type_t::createProcess(), UTAP::type_t::createProcessSet(), UTAP::declarations_t::frame, UTAP::symbol_t::getName(), UTAP::symbol_t::getType(), global, processes, UTAP::instance_t::templ, UTAP::instance_t::uid, and UTAP::instance_t::unbound.
Referenced by UTAP::SystemBuilder::process().
void TimedAutomataSystem::addProgressMeasure | ( | declarations_t * | context, |
expression_t | guard, | ||
expression_t | measure | ||
) |
References UTAP::progress_t::guard, UTAP::progress_t::measure, and UTAP::declarations_t::progress.
Referenced by UTAP::SystemBuilder::declProgress().
void TimedAutomataSystem::addQuery | ( | const query_t & | query | ) |
References queries.
Referenced by UTAP::SystemBuilder::queryEnd().
template_t & TimedAutomataSystem::addTemplate | ( | std::string | , |
frame_t | params, | ||
const bool | isTA = true , |
||
const std::string | type = "" , |
||
const std::string | mode = "" |
||
) |
Creates and returns a new template.
The template is created with the given name and parameters and added to the global frame. The method does not check for duplicate declarations. An instance with the same name and parameters is added as well.
References UTAP::frame_t::add(), UTAP::frame_t::addSymbol(), UTAP::instance_t::arguments, UTAP::frame_t::createFrame(), UTAP::type_t::createInstance(), UTAP::type_t::createLscInstance(), UTAP::template_t::dynamic, UTAP::declarations_t::frame, UTAP::frame_t::getSize(), global, UTAP::template_t::isTA, UTAP::template_t::mode, UTAP::instance_t::parameters, UTAP::instance_t::templ, templates, UTAP::template_t::type, UTAP::instance_t::uid, and UTAP::instance_t::unbound.
Referenced by UTAP::SystemBuilder::procBegin().
variable_t* UTAP::TimedAutomataSystem::addVariable | ( | declarations_t * | , |
type_t | type, | ||
std::string | , | ||
expression_t | initial | ||
) |
Referenced by UTAP::SystemBuilder::addVariable(), addVariableToFunction(), and TimedAutomataSystem().
|
protected |
variable_t * TimedAutomataSystem::addVariableToFunction | ( | function_t * | , |
frame_t | , | ||
type_t | , | ||
std::string | , | ||
expression_t | initital | ||
) |
References addVariable(), and UTAP::variable_t::expr.
Referenced by UTAP::SystemBuilder::addVariable().
void TimedAutomataSystem::addWarning | ( | position_t | position, |
std::string | msg | ||
) |
References UTAP::position_t::end, and UTAP::position_t::start.
Referenced by UTAP::ExpressionBuilder::handleWarning().
void TimedAutomataSystem::beginChanPriority | ( | expression_t | chan | ) |
References chanPriorities, hasPriorities, and UTAP::chan_priority_t::head.
Referenced by UTAP::SystemBuilder::beginChanPriority().
void TimedAutomataSystem::clearErrors | ( | ) |
void TimedAutomataSystem::clearWarnings | ( | ) |
|
inline |
References hasGuardOnRecvBroadcast.
Referenced by UTAP::TypeChecker::visitEdge().
void TimedAutomataSystem::copyFunctionsFromTo | ( | template_t * | from, |
template_t * | to | ||
) | const |
void TimedAutomataSystem::copyVariablesFromTo | ( | template_t * | from, |
template_t * | to | ||
) | const |
References UTAP::frame_t::add(), UTAP::declarations_t::frame, and UTAP::declarations_t::variables.
const Positions::line_t & TimedAutomataSystem::findPosition | ( | uint32_t | position | ) | const |
expression_t TimedAutomataSystem::getAfterUpdate | ( | ) |
References afterUpdate.
Referenced by UTAP::TypeChecker::TypeChecker().
expression_t TimedAutomataSystem::getBeforeUpdate | ( | ) |
References beforeUpdate.
Referenced by UTAP::TypeChecker::TypeChecker().
const std::list< chan_priority_t > & TimedAutomataSystem::getChanPriorities | ( | ) | const |
References chanPriorities.
Referenced by UTAP::XMLWriter::getChanPriority(), and UTAP::TypeChecker::visitSystemAfter().
template_t * TimedAutomataSystem::getDynamicTemplate | ( | const std::string | name | ) |
References dynamicTemplates.
Referenced by UTAP::TypeChecker::checkExpression(), UTAP::ExpressionBuilder::exprExistsDynamicBegin(), UTAP::ExpressionBuilder::exprForAllDynamicBegin(), UTAP::ExpressionBuilder::exprForeachDynamicBegin(), UTAP::ExpressionBuilder::exprSumDynamicBegin(), and UTAP::SystemBuilder::procBegin().
std::vector< template_t * > & TimedAutomataSystem::getDynamicTemplates | ( | ) |
References dynamicTemplates, and dynamicTemplatesVec.
const vector< UTAP::error_t > & TimedAutomataSystem::getErrors | ( | ) | const |
Referenced by main().
declarations_t & TimedAutomataSystem::getGlobals | ( | ) |
Returns the global declarations of the system.
References global.
Referenced by UTAP::XMLWriter::declaration(), UTAP::ExpressionBuilder::ExpressionBuilder(), UTAP::SystemBuilder::getCurrentDeclarationBlock(), and removeProcess().
std::list< chan_priority_t > & TimedAutomataSystem::getMutableChanPriorities | ( | ) |
References chanPriorities.
list< instance_t > & TimedAutomataSystem::getProcesses | ( | ) |
Returns the processes of the system.
References processes.
Referenced by UTAP::SignalFlow::SignalFlow(), and UTAP::XMLWriter::system_instantiation().
int TimedAutomataSystem::getProcPriority | ( | const char * | name | ) | const |
Returns process priority for process name.
References procPriority.
queries_t & TimedAutomataSystem::getQueries | ( | ) |
Returns the queries enclosed in the model.
References queries.
|
inline |
References syncUsed.
list< template_t > & TimedAutomataSystem::getTemplates | ( | ) |
Returns the templates of the system.
References templates.
Referenced by UTAP::XMLWriter::project().
const vector< UTAP::error_t > & TimedAutomataSystem::getWarnings | ( | ) | const |
Referenced by main().
|
inline |
References hasGuardOnRecvBroadcast.
|
inline |
References dynamicTemplates.
bool TimedAutomataSystem::hasErrors | ( | ) | const |
Referenced by parseExpression(), parseXMLBuffer(), parseXMLFile(), and parseXTA().
bool TimedAutomataSystem::hasPriorityDeclaration | ( | ) | const |
Returns true if system has some priority declaration.
References hasPriorities.
bool TimedAutomataSystem::hasStopWatch | ( | ) | const |
Returns true if the system stops any clock.
References stopsClock.
bool TimedAutomataSystem::hasStrictInvariants | ( | ) | const |
Returns true if system has some strict invariant.
References hasStrictInv.
bool TimedAutomataSystem::hasStrictLowerBoundOnControllableEdges | ( | ) | const |
Returns true if the system has guards on controllable edges with strict lower bounds.
References hasStrictLowControlledGuards.
|
inline |
References hasUrgentTrans.
bool TimedAutomataSystem::hasWarnings | ( | ) | const |
bool TimedAutomataSystem::isModified | ( | ) | const |
References modified.
bool TimedAutomataSystem::queriesEmpty | ( | ) |
References queries.
void TimedAutomataSystem::recordStopWatch | ( | ) |
Record that the system stops a clock.
References stopsClock.
Referenced by UTAP::TypeChecker::visitState().
void TimedAutomataSystem::recordStrictInvariant | ( | ) |
Record that the system has some strict invariant.
References hasStrictInv.
Referenced by UTAP::TypeChecker::visitState().
void TimedAutomataSystem::recordStrictLowerBoundOnControllableEdges | ( | ) |
Record that the system has guards on controllable edges with strict lower bounds.
References hasStrictLowControlledGuards.
Referenced by UTAP::TypeChecker::visitEdge().
void TimedAutomataSystem::removeProcess | ( | instance_t & | instance | ) |
References UTAP::declarations_t::frame, getGlobals(), processes, UTAP::frame_t::remove(), and UTAP::instance_t::uid.
void TimedAutomataSystem::setAfterUpdate | ( | expression_t | e | ) |
References afterUpdate.
Referenced by UTAP::SystemBuilder::afterUpdate().
void TimedAutomataSystem::setBeforeUpdate | ( | expression_t | e | ) |
References beforeUpdate.
Referenced by UTAP::SystemBuilder::beforeUpdate().
void TimedAutomataSystem::setModified | ( | bool | mod | ) |
References modified.
void TimedAutomataSystem::setProcPriority | ( | const char * | name, |
int | priority | ||
) |
Sets process priority for process name.
References hasPriorities, and procPriority.
Referenced by UTAP::SystemBuilder::procPriority().
|
inline |
References syncUsed.
Referenced by UTAP::TypeChecker::visitIODecl().
|
inline |
References hasUrgentTrans.
Referenced by UTAP::TypeChecker::visitEdge().
|
protected |
Referenced by getAfterUpdate(), and setAfterUpdate().
|
protected |
Referenced by getBeforeUpdate(), and setBeforeUpdate().
|
protected |
Referenced by addChanPriority(), beginChanPriority(), getChanPriorities(), and getMutableChanPriorities().
|
protected |
Referenced by TimedAutomataSystem().
|
protected |
Referenced by accept(), addDynamicTemplate(), getDynamicTemplate(), getDynamicTemplates(), and hasDynamicTemplates().
|
protected |
Referenced by getDynamicTemplates().
|
protected |
Referenced by accept(), addDynamicTemplate(), addInstance(), addIODecl(), addLscInstance(), addProcess(), addTemplate(), getGlobals(), and TimedAutomataSystem().
|
protected |
Referenced by clockGuardRecvBroadcast(), hasClockGuardRecvBroadcast(), and TimedAutomataSystem().
|
protected |
Referenced by beginChanPriority(), hasPriorityDeclaration(), setProcPriority(), and TimedAutomataSystem().
|
protected |
Referenced by hasStrictInvariants(), recordStrictInvariant(), and TimedAutomataSystem().
|
protected |
|
protected |
Referenced by hasUrgentTransition(), setUrgentTransition(), and TimedAutomataSystem().
|
protected |
|
protected |
Referenced by addError().
|
protected |
Referenced by addLscInstance().
|
protected |
Referenced by isModified(), setModified(), and TimedAutomataSystem().
std::string UTAP::TimedAutomataSystem::obsTA |
Referenced by UTAP::ExpressionBuilder::exprScenario().
|
protected |
Referenced by addProcess(), getProcesses(), and removeProcess().
|
protected |
Referenced by getProcPriority(), and setProcPriority().
|
protected |
Referenced by addQuery(), getQueries(), and queriesEmpty().
|
protected |
Referenced by hasStopWatch(), recordStopWatch(), and TimedAutomataSystem().
|
protected |
Referenced by getSyncUsed(), and setSyncUsed().
|
protected |
Referenced by accept(), addTemplate(), and getTemplates().