libutap
0.93
Uppaal Timed Automata Parser
|
#include <system.h>
Public Member Functions | |
int | addDynamicEval (expression_t t) |
std::vector< expression_t > & | getDynamicEval () |
state_t & | addLocation (const std::string &, expression_t inv, expression_t er) |
Add another location to template. More... | |
branchpoint_t & | addBranchpoint (const std::string &) |
Add another branchpoint to template. More... | |
edge_t & | addEdge (symbol_t src, symbol_t dst, bool type, const std::string &actname) |
Add edge to template. More... | |
instanceLine_t & | addInstanceLine () |
Add another instance line to template. More... | |
message_t & | addMessage (symbol_t src, symbol_t dst, int loc, bool pch) |
Add message to template. More... | |
condition_t & | addCondition (std::vector< symbol_t > anchors, int loc, bool pch, bool isHot) |
Add condition to template. More... | |
update_t & | addUpdate (symbol_t anchor, int loc, bool pch) |
Add update to template. More... | |
bool | isInvariant () |
return true if the LSC is of invariant mode More... | |
const std::vector< simregion_t > | getSimregions () |
returns the simregions of an LSC scenario. More... | |
bool | getCondition (instanceLine_t *instance, int y, condition_t *&simCondition) |
gets the condition on the given instance, at y location, returns false if there isn't any More... | |
bool | getUpdate (instanceLine_t *instance, int y, update_t *&simUpdate) |
gets the update on the given instance at y location, returns false if there isn't any More... | |
bool | getUpdate (const std::vector< instanceLine_t *> &instances, int y, update_t *&simUpdate) |
![]() | |
std::string | writeMapping () const |
std::string | writeParameters () const |
std::string | writeArguments () const |
![]() | |
bool | addFunction (type_t type, const std::string &, function_t *&) |
Add function declaration. More... | |
std::string | toString (bool global=false) const |
The following methods are used to write the declarations in an XML file. More... | |
std::string | getConstants () const |
std::string | getTypeDefinitions () const |
std::string | getVariables (bool global) const |
std::string | getFunctions () const |
Public Attributes | |
symbol_t | init |
The initial location. More... | |
frame_t | templateset |
Template set decls. More... | |
std::deque< state_t > | states |
Locations. More... | |
std::deque< branchpoint_t > | branchpoints |
Branchpoints. More... | |
std::deque< edge_t > | edges |
Edges. More... | |
std::vector< expression_t > | dynamicEvals |
bool | isTA |
std::deque< instanceLine_t > | instances |
Instance Lines. More... | |
std::deque< message_t > | messages |
Messages. More... | |
std::deque< update_t > | updates |
Updates. More... | |
std::deque< condition_t > | conditions |
Conditions. More... | |
std::string | type |
std::string | mode |
bool | hasPrechart |
bool | dynamic |
int | dynindex |
bool | isDefined |
![]() | |
symbol_t | uid |
The name. More... | |
frame_t | parameters |
The parameters. More... | |
std::map< symbol_t, expression_t > | mapping |
The arguments. More... | |
size_t | arguments |
size_t | unbound |
struct template_t * | templ |
std::set< symbol_t > | restricted |
Restricted variables. More... | |
![]() | |
frame_t | frame |
std::list< variable_t > | variables |
Variables. More... | |
std::list< function_t > | functions |
Functions. More... | |
std::list< progress_t > | progress |
Progress measures. More... | |
std::list< iodecl_t > | iodecl |
std::list< gantt_t > | ganttChart |
branchpoint_t & template_t::addBranchpoint | ( | const std::string & | ) |
Add another branchpoint to template.
Definition at line 308 of file system.cpp.
References UTAP::branchpoint_t::bpNr, UTAP::Constants::BRANCHPOINT, UTAP::type_t::createPrimitive(), and UTAP::branchpoint_t::uid.
Referenced by UTAP::SystemBuilder::procBranchpoint().
condition_t & template_t::addCondition | ( | std::vector< symbol_t > | anchors, |
int | loc, | ||
bool | pch, | ||
bool | isHot | ||
) |
Add condition to template.
Definition at line 398 of file system.cpp.
References UTAP::condition_t::nr.
Referenced by UTAP::SystemBuilder::procMessage().
|
inline |
Add edge to template.
Definition at line 325 of file system.cpp.
References edges, UTAP::symbol_t::getData(), UTAP::symbol_t::getType(), and UTAP::type_t::isLocation().
Referenced by UTAP::SystemBuilder::procEdgeBegin().
instanceLine_t & template_t::addInstanceLine | ( | ) |
Add another instance line to template.
Definition at line 357 of file system.cpp.
References UTAP::instanceLine_t::instanceNr.
Referenced by UTAP::SystemBuilder::procInstanceLine().
state_t & template_t::addLocation | ( | const std::string & | , |
expression_t | inv, | ||
expression_t | er | ||
) |
Add another location to template.
Definition at line 287 of file system.cpp.
References UTAP::type_t::createPrimitive(), UTAP::state_t::exponentialRate, UTAP::state_t::invariant, UTAP::Constants::LOCATION, UTAP::state_t::locNr, and UTAP::state_t::uid.
Referenced by UTAP::SystemBuilder::procState().
Add message to template.
Definition at line 374 of file system.cpp.
References UTAP::symbol_t::getData(), and UTAP::message_t::nr.
Referenced by UTAP::SystemBuilder::procMessage().
Add update to template.
Definition at line 387 of file system.cpp.
References UTAP::symbol_t::getData(), and UTAP::update_t::nr.
Referenced by UTAP::SystemBuilder::procLscUpdate().
bool template_t::getCondition | ( | instanceLine_t * | instance, |
int | y, | ||
condition_t *& | simCondition | ||
) |
gets the condition on the given instance, at y location, returns false if there isn't any
Definition at line 594 of file system.cpp.
References UTAP::condition_t::anchors, UTAP::instanceLine_t::instanceNr, and UTAP::condition_t::location.
|
inline |
const vector< simregion_t > template_t::getSimregions | ( | ) |
returns the simregions of an LSC scenario.
A simregion is a simultaneous region containing 1 or 0 message, 1 or 0 update and 1 or 0 condition, at the same location. a message, update or condition must be in only one simregion.
we copy the messages, conditions and updates from the scenario
iterates over messages
we give priority to the condition on the target, if there is also one in the source, it must be part of another simregion
iterates over remaining conditions
iterates over remaining updates
Definition at line 460 of file system.cpp.
References UTAP::condition_t::anchors, UTAP::simregion_t::condition, conditions_nr(), UTAP::message_t::dst, UTAP::message_t::location, UTAP::condition_t::location, UTAP::simregion_t::message, messages_nr(), UTAP::condition_t::nr, UTAP::update_t::nr, UTAP::simregion_t::nr, UTAP::simregion_t::setCondition(), UTAP::simregion_t::setMessage(), UTAP::simregion_t::setUpdate(), UTAP::message_t::src, UTAP::simregion_t::update, and updates_nr().
bool template_t::getUpdate | ( | instanceLine_t * | instance, |
int | y, | ||
update_t *& | simUpdate | ||
) |
gets the update on the given instance at y location, returns false if there isn't any
Definition at line 623 of file system.cpp.
References UTAP::update_t::anchor, UTAP::instanceLine_t::instanceNr, and UTAP::update_t::location.
bool UTAP::template_t::getUpdate | ( | const std::vector< instanceLine_t *> & | instances, |
int | y, | ||
update_t *& | simUpdate | ||
) |
bool template_t::isInvariant | ( | ) |
return true if the LSC is of invariant mode
Definition at line 890 of file system.cpp.
std::deque<branchpoint_t> UTAP::template_t::branchpoints |
std::deque<condition_t> UTAP::template_t::conditions |
bool UTAP::template_t::dynamic |
Definition at line 388 of file system.h.
Referenced by UTAP::TypeChecker::checkExpression().
std::vector<expression_t> UTAP::template_t::dynamicEvals |
std::deque<edge_t> UTAP::template_t::edges |
Edges.
Definition at line 360 of file system.h.
Referenced by UTAP::DistanceCalculator::addProcessNeedle(), UTAP::XMLWriter::taTempl(), and UTAP::SignalFlow::visitProcess().
bool UTAP::template_t::hasPrechart |
Definition at line 387 of file system.h.
Referenced by UTAP::SystemBuilder::hasPrechart().
symbol_t UTAP::template_t::init |
The initial location.
Definition at line 356 of file system.h.
Referenced by UTAP::XMLWriter::init(), and UTAP::SystemBuilder::procStateInit().
std::deque<instanceLine_t> UTAP::template_t::instances |
bool UTAP::template_t::isDefined |
Definition at line 390 of file system.h.
Referenced by UTAP::TypeChecker::checkExpression(), UTAP::SystemBuilder::procBegin(), and UTAP::ExpressionBuilder::pushDynamicFrameOf().
bool UTAP::template_t::isTA |
Definition at line 362 of file system.h.
Referenced by UTAP::XMLWriter::taTempl().
std::deque<state_t> UTAP::template_t::states |
Locations.
Definition at line 358 of file system.h.
Referenced by UTAP::XMLWriter::taTempl(), and UTAP::SignalFlow::visitProcess().