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

#include <system.h>

Collaboration diagram for UTAP::TimedAutomataSystem:

Public Member Functions

 TimedAutomataSystem ()
 
 TimedAutomataSystem (const TimedAutomataSystem &)
 
virtual ~TimedAutomataSystem ()
 
declarations_tgetGlobals ()
 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_tgetDynamicTemplate (const std::string &name)
 
std::list< instance_t > & getProcesses ()
 Returns the processes of the system. More...
 
queries_tgetQueries ()
 Returns the queries enclosed in the model. More...
 
void addPosition (uint32_t position, uint32_t offset, uint32_t line, const std::string &path)
 
const Positions::line_tfindPosition (uint32_t position) const
 
variable_taddVariableToFunction (function_t *, frame_t, type_t, const std::string &, expression_t initital)
 
variable_taddVariable (declarations_t *, type_t type, const std::string &, expression_t initial)
 
void addProgressMeasure (declarations_t *, expression_t guard, expression_t measure)
 
template_taddTemplate (const 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_taddDynamicTemplate (const std::string &, frame_t params)
 
instance_taddInstance (const std::string &name, instance_t &instance, frame_t params, const std::vector< expression_t > &arguments)
 
instance_taddLscInstance (const 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 (sync_use_t s)
 
sync_use_t getSyncUsed () const
 
void setUrgentTransition ()
 
bool hasUrgentTransition () const
 
bool hasDynamicTemplates () const
 
void addError (position_t, const std::string &msg, const std::string &ctx="")
 
void addWarning (position_t, const std::string &msg, const std::string &ctx="")
 
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_taddIODecl ()
 

Public Attributes

std::string obsTA
 

Protected Member Functions

variable_taddVariable (std::list< variable_t > &variables, frame_t frame, type_t type, const std::string &)
 

Protected Attributes

bool hasUrgentTrans
 
bool hasPriorities
 
bool hasStrictInv
 
bool stopsClock
 
bool hasStrictLowControlledGuards
 
bool hasGuardOnRecvBroadcast
 
int defaultChanPriority
 
std::list< chan_priority_tchanPriorities
 
std::map< std::string, int > procPriority
 
sync_use_t syncUsed
 
std::list< template_ttemplates
 
std::list< template_tdynamicTemplates
 
std::vector< template_t * > dynamicTemplatesVec
 
std::list< instance_tinstances
 
std::list< instance_tlscInstances
 
bool modified
 
std::list< instance_tprocesses
 
declarations_t global
 
expression_t beforeUpdate
 
expression_t afterUpdate
 
queries_t queries
 
std::string location
 

Detailed Description

Definition at line 471 of file system.h.

Constructor & Destructor Documentation

◆ TimedAutomataSystem() [1/2]

◆ TimedAutomataSystem() [2/2]

TimedAutomataSystem::TimedAutomataSystem ( const TimedAutomataSystem ta)

Definition at line 935 of file system.cpp.

◆ ~TimedAutomataSystem()

TimedAutomataSystem::~TimedAutomataSystem ( )
virtual

Definition at line 946 of file system.cpp.

Member Function Documentation

◆ accept()

◆ addChanPriority()

void TimedAutomataSystem::addChanPriority ( char  separator,
expression_t  chan 
)

Definition at line 1328 of file system.cpp.

References chanPriorities.

Referenced by UTAP::SystemBuilder::addChanPriority().

Here is the caller graph for this function:

◆ addDynamicTemplate()

template_t & TimedAutomataSystem::addDynamicTemplate ( const std::string &  ,
frame_t  params 
)

◆ addError()

void TimedAutomataSystem::addError ( position_t  position,
const std::string &  msg,
const std::string &  ctx = "" 
)

Definition at line 1403 of file system.cpp.

References UTAP::position_t::end, and UTAP::position_t::start.

Referenced by UTAP::ExpressionBuilder::handleError(), and UTAP::TypeChecker::TypeChecker().

Here is the caller graph for this function:

◆ addGantt()

void TimedAutomataSystem::addGantt ( declarations_t context,
gantt_t g 
)

Definition at line 1115 of file system.cpp.

References UTAP::declarations_t::ganttChart.

Referenced by UTAP::SystemBuilder::ganttDeclEnd().

Here is the caller graph for this function:

◆ addInstance()

instance_t & TimedAutomataSystem::addInstance ( const std::string &  name,
instance_t instance,
frame_t  params,
const std::vector< expression_t > &  arguments 
)

◆ addIODecl()

iodecl_t * TimedAutomataSystem::addIODecl ( )

Definition at line 1461 of file system.cpp.

References global, and UTAP::declarations_t::iodecl.

Referenced by UTAP::SystemBuilder::exprSync().

Here is the caller graph for this function:

◆ addLscInstance()

instance_t & TimedAutomataSystem::addLscInstance ( const std::string &  name,
instance_t instance,
frame_t  params,
const std::vector< expression_t > &  arguments 
)

◆ addPosition()

void TimedAutomataSystem::addPosition ( uint32_t  position,
uint32_t  offset,
uint32_t  line,
const std::string &  path 
)

Definition at line 1392 of file system.cpp.

References UTAP::Positions::add().

Referenced by UTAP::ExpressionBuilder::addPosition().

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

◆ addProcess()

void TimedAutomataSystem::addProcess ( instance_t instance)

◆ addProgressMeasure()

void TimedAutomataSystem::addProgressMeasure ( declarations_t context,
expression_t  guard,
expression_t  measure 
)

Definition at line 1189 of file system.cpp.

References UTAP::progress_t::guard, UTAP::progress_t::measure, and UTAP::declarations_t::progress.

Referenced by UTAP::SystemBuilder::declProgress().

Here is the caller graph for this function:

◆ addQuery()

void TimedAutomataSystem::addQuery ( const query_t query)

Definition at line 1120 of file system.cpp.

References queries.

Referenced by UTAP::SystemBuilder::queryEnd().

Here is the caller graph for this function:

◆ addTemplate()

template_t & TimedAutomataSystem::addTemplate ( const 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.

Definition at line 971 of file system.cpp.

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::declarations_t::frame, UTAP::frame_t::getSize(), global, UTAP::instance_t::parameters, UTAP::instance_t::templ, templates, UTAP::instance_t::uid, and UTAP::instance_t::unbound.

Referenced by UTAP::SystemBuilder::procBegin().

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

◆ addVariable() [1/2]

variable_t* UTAP::TimedAutomataSystem::addVariable ( declarations_t ,
type_t  type,
const std::string &  ,
expression_t  initial 
)

Referenced by UTAP::SystemBuilder::addVariable(), addVariableToFunction(), getQueries(), and TimedAutomataSystem().

Here is the caller graph for this function:

◆ addVariable() [2/2]

variable_t* UTAP::TimedAutomataSystem::addVariable ( std::list< variable_t > &  variables,
frame_t  frame,
type_t  type,
const std::string &   
)
protected

◆ addVariableToFunction()

variable_t * TimedAutomataSystem::addVariableToFunction ( function_t ,
frame_t  ,
type_t  ,
const std::string &  ,
expression_t  initital 
)

Definition at line 1142 of file system.cpp.

References UTAP::frame_t::addSymbol(), addVariable(), UTAP::variable_t::expr, UTAP::frame_t::getIndexOf(), UTAP::variable_t::uid, and variables.

Referenced by UTAP::SystemBuilder::addVariable().

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

◆ addWarning()

void TimedAutomataSystem::addWarning ( position_t  position,
const std::string &  msg,
const std::string &  ctx = "" 
)

Definition at line 1411 of file system.cpp.

References UTAP::position_t::end, and UTAP::position_t::start.

Referenced by UTAP::ExpressionBuilder::handleWarning(), and UTAP::TypeChecker::TypeChecker().

Here is the caller graph for this function:

◆ beginChanPriority()

void TimedAutomataSystem::beginChanPriority ( expression_t  chan)

Definition at line 1320 of file system.cpp.

References chanPriorities, hasPriorities, and UTAP::chan_priority_t::head.

Referenced by UTAP::SystemBuilder::beginChanPriority().

Here is the caller graph for this function:

◆ clearErrors()

void TimedAutomataSystem::clearErrors ( )

Definition at line 1441 of file system.cpp.

◆ clearWarnings()

void TimedAutomataSystem::clearWarnings ( )

Definition at line 1446 of file system.cpp.

◆ clockGuardRecvBroadcast()

void UTAP::TimedAutomataSystem::clockGuardRecvBroadcast ( )
inline

Definition at line 570 of file system.h.

Referenced by UTAP::TypeChecker::visitEdge().

Here is the caller graph for this function:

◆ copyFunctionsFromTo()

void TimedAutomataSystem::copyFunctionsFromTo ( template_t from,
template_t to 
) const

Definition at line 1184 of file system.cpp.

◆ copyVariablesFromTo()

void TimedAutomataSystem::copyVariablesFromTo ( template_t from,
template_t to 
) const

Definition at line 1174 of file system.cpp.

References UTAP::frame_t::add(), UTAP::declarations_t::frame, and UTAP::declarations_t::variables.

Here is the call graph for this function:

◆ findPosition()

const Positions::line_t & TimedAutomataSystem::findPosition ( uint32_t  position) const

Definition at line 1398 of file system.cpp.

◆ getAfterUpdate()

expression_t TimedAutomataSystem::getAfterUpdate ( )

Definition at line 1315 of file system.cpp.

References afterUpdate.

Referenced by UTAP::TypeChecker::TypeChecker().

Here is the caller graph for this function:

◆ getBeforeUpdate()

expression_t TimedAutomataSystem::getBeforeUpdate ( )

Definition at line 1305 of file system.cpp.

References beforeUpdate.

Referenced by UTAP::TypeChecker::TypeChecker().

Here is the caller graph for this function:

◆ getChanPriorities()

const std::list< chan_priority_t > & TimedAutomataSystem::getChanPriorities ( ) const

Definition at line 1335 of file system.cpp.

References chanPriorities.

Referenced by UTAP::XMLWriter::getChanPriority(), and UTAP::TypeChecker::visitSystemAfter().

Here is the caller graph for this function:

◆ getDynamicTemplate()

◆ getDynamicTemplates()

std::vector< template_t * > & TimedAutomataSystem::getDynamicTemplates ( )

Definition at line 1014 of file system.cpp.

References dynamicTemplates, and dynamicTemplatesVec.

◆ getErrors()

const vector< UTAP::error_t > & TimedAutomataSystem::getErrors ( ) const

Definition at line 1420 of file system.cpp.

Referenced by main().

Here is the caller graph for this function:

◆ getGlobals()

declarations_t & TimedAutomataSystem::getGlobals ( )

Returns the global declarations of the system.

Definition at line 961 of file system.cpp.

References global.

Referenced by UTAP::XMLWriter::declaration(), UTAP::ExpressionBuilder::ExpressionBuilder(), UTAP::SystemBuilder::getCurrentDeclarationBlock(), and removeProcess().

Here is the caller graph for this function:

◆ getMutableChanPriorities()

std::list< chan_priority_t > & TimedAutomataSystem::getMutableChanPriorities ( )

Definition at line 1340 of file system.cpp.

References chanPriorities.

◆ getProcesses()

list< instance_t > & TimedAutomataSystem::getProcesses ( )

Returns the processes of the system.

Definition at line 956 of file system.cpp.

References processes.

Referenced by UTAP::SignalFlow::SignalFlow(), and UTAP::XMLWriter::system_instantiation().

Here is the caller graph for this function:

◆ getProcPriority()

int TimedAutomataSystem::getProcPriority ( const char *  name) const

Returns process priority for process name.

Definition at line 1351 of file system.cpp.

References procPriority.

◆ getQueries()

queries_t & TimedAutomataSystem::getQueries ( )

Returns the queries enclosed in the model.

Definition at line 1128 of file system.cpp.

References addVariable(), UTAP::variable_t::expr, UTAP::declarations_t::frame, queries, and UTAP::declarations_t::variables.

Here is the call graph for this function:

◆ getSyncUsed()

sync_use_t UTAP::TimedAutomataSystem::getSyncUsed ( ) const
inline

Definition at line 573 of file system.h.

◆ getTemplates()

list< template_t > & TimedAutomataSystem::getTemplates ( )

Returns the templates of the system.

Definition at line 951 of file system.cpp.

References templates.

Referenced by UTAP::XMLWriter::project().

Here is the caller graph for this function:

◆ getWarnings()

const vector< UTAP::error_t > & TimedAutomataSystem::getWarnings ( ) const

Definition at line 1426 of file system.cpp.

Referenced by main().

Here is the caller graph for this function:

◆ hasClockGuardRecvBroadcast()

bool UTAP::TimedAutomataSystem::hasClockGuardRecvBroadcast ( ) const
inline

Definition at line 571 of file system.h.

◆ hasDynamicTemplates()

bool UTAP::TimedAutomataSystem::hasDynamicTemplates ( ) const
inline

Definition at line 577 of file system.h.

◆ hasErrors()

bool TimedAutomataSystem::hasErrors ( ) const

Definition at line 1431 of file system.cpp.

Referenced by parseExpression(), parseXMLBuffer(), parseXMLFile(), and parseXTA().

Here is the caller graph for this function:

◆ hasPriorityDeclaration()

bool TimedAutomataSystem::hasPriorityDeclaration ( ) const

Returns true if system has some priority declaration.

Definition at line 1357 of file system.cpp.

References hasPriorities.

◆ hasStopWatch()

bool TimedAutomataSystem::hasStopWatch ( ) const

Returns true if the system stops any clock.

Definition at line 1377 of file system.cpp.

References stopsClock.

◆ hasStrictInvariants()

bool TimedAutomataSystem::hasStrictInvariants ( ) const

Returns true if system has some strict invariant.

Definition at line 1367 of file system.cpp.

References hasStrictInv.

◆ hasStrictLowerBoundOnControllableEdges()

bool TimedAutomataSystem::hasStrictLowerBoundOnControllableEdges ( ) const

Returns true if the system has guards on controllable edges with strict lower bounds.

Definition at line 1382 of file system.cpp.

References hasStrictLowControlledGuards.

◆ hasUrgentTransition()

bool UTAP::TimedAutomataSystem::hasUrgentTransition ( ) const
inline

Definition at line 576 of file system.h.

◆ hasWarnings()

bool TimedAutomataSystem::hasWarnings ( ) const

Definition at line 1436 of file system.cpp.

◆ isModified()

bool TimedAutomataSystem::isModified ( ) const

Definition at line 1451 of file system.cpp.

References modified.

◆ queriesEmpty()

bool TimedAutomataSystem::queriesEmpty ( )

Definition at line 1124 of file system.cpp.

References queries.

◆ recordStopWatch()

void TimedAutomataSystem::recordStopWatch ( )

Record that the system stops a clock.

Definition at line 1372 of file system.cpp.

References stopsClock.

Referenced by UTAP::TypeChecker::visitState().

Here is the caller graph for this function:

◆ recordStrictInvariant()

void TimedAutomataSystem::recordStrictInvariant ( )

Record that the system has some strict invariant.

Definition at line 1362 of file system.cpp.

References hasStrictInv.

Referenced by UTAP::TypeChecker::visitState().

Here is the caller graph for this function:

◆ recordStrictLowerBoundOnControllableEdges()

void TimedAutomataSystem::recordStrictLowerBoundOnControllableEdges ( )

Record that the system has guards on controllable edges with strict lower bounds.

Definition at line 1387 of file system.cpp.

References hasStrictLowControlledGuards.

Referenced by UTAP::TypeChecker::visitEdge().

Here is the caller graph for this function:

◆ removeProcess()

void TimedAutomataSystem::removeProcess ( instance_t instance)

Definition at line 1085 of file system.cpp.

References UTAP::declarations_t::frame, getGlobals(), processes, UTAP::frame_t::remove(), and UTAP::instance_t::uid.

Here is the call graph for this function:

◆ setAfterUpdate()

void TimedAutomataSystem::setAfterUpdate ( expression_t  e)

Definition at line 1310 of file system.cpp.

References afterUpdate.

Referenced by UTAP::SystemBuilder::afterUpdate().

Here is the caller graph for this function:

◆ setBeforeUpdate()

void TimedAutomataSystem::setBeforeUpdate ( expression_t  e)

Definition at line 1300 of file system.cpp.

References beforeUpdate.

Referenced by UTAP::SystemBuilder::beforeUpdate().

Here is the caller graph for this function:

◆ setModified()

void TimedAutomataSystem::setModified ( bool  mod)

Definition at line 1456 of file system.cpp.

References modified.

◆ setProcPriority()

void TimedAutomataSystem::setProcPriority ( const char *  name,
int  priority 
)

Sets process priority for process name.

Definition at line 1345 of file system.cpp.

References hasPriorities, and procPriority.

Referenced by UTAP::SystemBuilder::procPriority().

Here is the caller graph for this function:

◆ setSyncUsed()

void UTAP::TimedAutomataSystem::setSyncUsed ( sync_use_t  s)
inline

Definition at line 572 of file system.h.

Referenced by UTAP::TypeChecker::visitIODecl().

Here is the caller graph for this function:

◆ setUrgentTransition()

void UTAP::TimedAutomataSystem::setUrgentTransition ( )
inline

Definition at line 575 of file system.h.

Referenced by UTAP::TypeChecker::visitEdge().

Here is the caller graph for this function:

Member Data Documentation

◆ afterUpdate

expression_t UTAP::TimedAutomataSystem::afterUpdate
protected

Definition at line 611 of file system.h.

Referenced by getAfterUpdate(), and setAfterUpdate().

◆ beforeUpdate

expression_t UTAP::TimedAutomataSystem::beforeUpdate
protected

Definition at line 610 of file system.h.

Referenced by getBeforeUpdate(), and setBeforeUpdate().

◆ chanPriorities

std::list<chan_priority_t> UTAP::TimedAutomataSystem::chanPriorities
protected

◆ defaultChanPriority

int UTAP::TimedAutomataSystem::defaultChanPriority
protected

Definition at line 587 of file system.h.

Referenced by TimedAutomataSystem().

◆ dynamicTemplates

std::list<template_t> UTAP::TimedAutomataSystem::dynamicTemplates
protected

Definition at line 595 of file system.h.

Referenced by accept(), addDynamicTemplate(), getDynamicTemplate(), and getDynamicTemplates().

◆ dynamicTemplatesVec

std::vector<template_t*> UTAP::TimedAutomataSystem::dynamicTemplatesVec
protected

Definition at line 596 of file system.h.

Referenced by getDynamicTemplates().

◆ global

declarations_t UTAP::TimedAutomataSystem::global
protected

◆ hasGuardOnRecvBroadcast

bool UTAP::TimedAutomataSystem::hasGuardOnRecvBroadcast
protected

Definition at line 586 of file system.h.

Referenced by TimedAutomataSystem().

◆ hasPriorities

bool UTAP::TimedAutomataSystem::hasPriorities
protected

◆ hasStrictInv

bool UTAP::TimedAutomataSystem::hasStrictInv
protected

Definition at line 583 of file system.h.

Referenced by hasStrictInvariants(), recordStrictInvariant(), and TimedAutomataSystem().

◆ hasStrictLowControlledGuards

bool UTAP::TimedAutomataSystem::hasStrictLowControlledGuards
protected

◆ hasUrgentTrans

bool UTAP::TimedAutomataSystem::hasUrgentTrans
protected

Definition at line 581 of file system.h.

Referenced by TimedAutomataSystem().

◆ instances

std::list<instance_t> UTAP::TimedAutomataSystem::instances
protected

Definition at line 599 of file system.h.

Referenced by addInstance().

◆ location

std::string UTAP::TimedAutomataSystem::location
protected

Definition at line 618 of file system.h.

◆ lscInstances

std::list<instance_t> UTAP::TimedAutomataSystem::lscInstances
protected

Definition at line 601 of file system.h.

Referenced by addLscInstance().

◆ modified

bool UTAP::TimedAutomataSystem::modified
protected

Definition at line 602 of file system.h.

Referenced by isModified(), setModified(), and TimedAutomataSystem().

◆ obsTA

std::string UTAP::TimedAutomataSystem::obsTA

Definition at line 521 of file system.h.

Referenced by UTAP::ExpressionBuilder::exprScenario().

◆ processes

std::list<instance_t> UTAP::TimedAutomataSystem::processes
protected

Definition at line 605 of file system.h.

Referenced by addProcess(), getProcesses(), and removeProcess().

◆ procPriority

std::map<std::string,int> UTAP::TimedAutomataSystem::procPriority
protected

Definition at line 589 of file system.h.

Referenced by getProcPriority(), and setProcPriority().

◆ queries

queries_t UTAP::TimedAutomataSystem::queries
protected

Definition at line 612 of file system.h.

Referenced by addQuery(), getQueries(), and queriesEmpty().

◆ stopsClock

bool UTAP::TimedAutomataSystem::stopsClock
protected

Definition at line 584 of file system.h.

Referenced by hasStopWatch(), recordStopWatch(), and TimedAutomataSystem().

◆ syncUsed

sync_use_t UTAP::TimedAutomataSystem::syncUsed
protected

Definition at line 590 of file system.h.

◆ templates

std::list<template_t> UTAP::TimedAutomataSystem::templates
protected

Definition at line 593 of file system.h.

Referenced by accept(), addTemplate(), and getTemplates().


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