libutap
Public Member Functions | Public Attributes | List of all members
UTAP::template_t Struct Reference

#include <system.h>

Inheritance diagram for UTAP::template_t:
UTAP::instance_t UTAP::declarations_t

Public Member Functions

int addDynamicEval (expression_t t)
 
std::vector< expression_t > & getDynamicEval ()
 
state_taddLocation (std::string, expression_t inv, expression_t er)
 Add another location to template. More...
 
branchpoint_taddBranchpoint (std::string)
 Add another branchpoint to template. More...
 
edge_taddEdge (symbol_t src, symbol_t dst, bool type, std::string actname)
 Add edge to template. More...
 
instanceLine_taddInstanceLine ()
 Add another instance line to template. More...
 
message_taddMessage (symbol_t src, symbol_t dst, int loc, bool pch)
 Add message to template. More...
 
condition_taddCondition (std::vector< symbol_t > anchors, int loc, bool pch, bool isHot)
 Add condition to template. More...
 
update_taddUpdate (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_tgetSimregions ()
 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)
 
- Public Member Functions inherited from UTAP::instance_t
std::string writeMapping () const
 
std::string writeParameters () const
 
std::string writeArguments () const
 
- Public Member Functions inherited from UTAP::declarations_t
bool addFunction (type_t type, 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_tstates
 Locations. More...
 
std::deque< branchpoint_tbranchpoints
 Branchpoints. More...
 
std::deque< edge_tedges
 Edges. More...
 
std::vector< expression_tdynamicEvals
 
bool isTA
 
std::deque< instanceLine_tinstances
 Instance Lines. More...
 
std::deque< message_tmessages
 Messages. More...
 
std::deque< update_tupdates
 Updates. More...
 
std::deque< condition_tconditions
 Conditions. More...
 
std::string type
 
std::string mode
 
bool hasPrechart
 
bool dynamic
 
int dynindex
 
bool isDefined
 
- Public Attributes inherited from UTAP::instance_t
symbol_t uid
 The name. More...
 
frame_t parameters
 The parameters. More...
 
std::map< symbol_t, expression_tmapping
 The arguments. More...
 
size_t arguments
 
size_t unbound
 
struct template_ttempl
 
std::set< symbol_trestricted
 Restricted variables. More...
 
- Public Attributes inherited from UTAP::declarations_t
frame_t frame
 
std::list< variable_tvariables
 Variables. More...
 
std::list< function_tfunctions
 Functions. More...
 
std::list< progress_tprogress
 Progress measures. More...
 
std::list< iodecl_tiodecl
 
std::list< gantt_tganttChart
 

Member Function Documentation

branchpoint_t & template_t::addBranchpoint ( std::string  )
condition_t & template_t::addCondition ( std::vector< symbol_t anchors,
int  loc,
bool  pch,
bool  isHot 
)

Add condition to template.

References UTAP::condition_t::nr.

int UTAP::template_t::addDynamicEval ( expression_t  t)
inline
edge_t & template_t::addEdge ( symbol_t  src,
symbol_t  dst,
bool  type,
std::string  actname 
)
instanceLine_t & template_t::addInstanceLine ( )

Add another instance line to template.

References UTAP::instanceLine_t::instanceNr.

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

state_t & template_t::addLocation ( std::string  ,
expression_t  inv,
expression_t  er 
)
message_t & template_t::addMessage ( symbol_t  src,
symbol_t  dst,
int  loc,
bool  pch 
)

Add message to template.

References UTAP::symbol_t::getData(), and UTAP::message_t::nr.

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

update_t & template_t::addUpdate ( symbol_t  anchor,
int  loc,
bool  pch 
)

Add update to template.

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

References UTAP::condition_t::anchors, UTAP::instanceLine_t::instanceNr, and UTAP::condition_t::location.

std::vector<expression_t>& UTAP::template_t::getDynamicEval ( )
inline

References dynamicEvals.

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

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

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

Member Data Documentation

std::deque<branchpoint_t> UTAP::template_t::branchpoints

Branchpoints.

std::deque<condition_t> UTAP::template_t::conditions

Conditions.

bool UTAP::template_t::dynamic
std::vector<expression_t> UTAP::template_t::dynamicEvals

Referenced by getDynamicEval().

int UTAP::template_t::dynindex
std::deque<edge_t> UTAP::template_t::edges
bool UTAP::template_t::hasPrechart
symbol_t UTAP::template_t::init

The initial location.

Referenced by UTAP::XMLWriter::init(), and UTAP::SystemBuilder::procStateInit().

std::deque<instanceLine_t> UTAP::template_t::instances

Instance Lines.

bool UTAP::template_t::isDefined
bool UTAP::template_t::isTA
std::deque<message_t> UTAP::template_t::messages

Messages.

std::string UTAP::template_t::mode
std::deque<state_t> UTAP::template_t::states
frame_t UTAP::template_t::templateset

Template set decls.

std::string UTAP::template_t::type
std::deque<update_t> UTAP::template_t::updates

Updates.


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