DiaDes
0.1
DIAgnosisofDiscrete-EventSystem
|
#include <NodeDecl.hh>
Public Types | |
typedef reference_wrapper< NodeDecl > | Reference |
typedef reference_wrapper< NodeDecl const > | ConstReference |
typedef NodeDecl * | Pointer |
typedef const NodeDecl * | ConstPointer |
typedef VariableDecl::VarType | VarType |
typedef unordered_map< Identifier, NodeDecl::Reference > | SubNodeDictionary |
typedef vector< EventDecl::ConstReference >::const_iterator | EventDeclIterator |
Private Types | |
typedef unordered_map< Identifier, VariableDecl::ConstReference > | VariableDeclDictionary |
typedef unordered_map< Identifier, Domain::ConstReference > | DomainDictionary |
typedef unordered_map< Identifier, Value::ConstReference > | ConstantDictionary |
Private Member Functions | |
NodeDecl (VariableDecl &variable, unsigned id, NodeDeclFactory &factory) | |
Private Attributes | |
NodeDeclFactory & | _factory |
unsigned | _id |
Identifier | _name |
vector< VariableDecl::Reference > | _variableDecl |
VariableDeclDictionary | _variableDeclDictionary |
vector< VariableDecl::ConstReference > | _flowVarDecl |
vector< VariableDecl::ConstReference > | _stateVarDecl |
vector< Transition::Pointer > | _transitions |
vector< Transition::ConstReference > | _transitionsRef |
Diades::Graph::Graph | _eventDag |
map< Diades::Graph::Node, EventDecl::ConstReference > | _events |
vector< EventDecl::ConstReference > | _eventDecls |
set< Identifier > | _attributes |
unordered_map< Identifier, ParameterDecl::ConstReference > | _parameterDecls |
Expression::ExprVector | _assertions |
vector< Assignment::Pointer > | _assignments |
vector< Assignment::ConstReference > | _initialisations |
DomainDictionary | _domains |
vector< vector< list< Identifier > > > | _syncVectors |
SubNodeDictionary | _subNodes |
ConstantDictionary | _constantDictionary |
Friends | |
class | NodeDeclFactory |
class | IdExpression |
Exception | |
typedef Utils::Exception< NodeDecl > | Exception |
static string | typeName () |
A NodeDecl is an object that represents a node declaration in an altarica model From a parsing point of view with arsyntax, this class gathers the information below a AR_TREE_NODE in an altarica tree.
Definition at line 36 of file NodeDecl.hh.
|
private |
ConstantDictionary
dictionary of the global domains
Definition at line 114 of file NodeDecl.hh.
typedef const NodeDecl* Diades::Altarica::NodeDecl::ConstPointer |
Definition at line 42 of file NodeDecl.hh.
typedef reference_wrapper<NodeDecl const> Diades::Altarica::NodeDecl::ConstReference |
Definition at line 40 of file NodeDecl.hh.
|
private |
DomainDictionary
to store domain declarations
Definition at line 81 of file NodeDecl.hh.
typedef vector<EventDecl::ConstReference>::const_iterator Diades::Altarica::NodeDecl::EventDeclIterator |
EventDeclIterator
iterator on the state VariableDecl
Definition at line 273 of file NodeDecl.hh.
Definition at line 51 of file NodeDecl.hh.
Definition at line 41 of file NodeDecl.hh.
typedef reference_wrapper<NodeDecl> Diades::Altarica::NodeDecl::Reference |
Definition at line 39 of file NodeDecl.hh.
typedef unordered_map<Identifier,NodeDecl::Reference> Diades::Altarica::NodeDecl::SubNodeDictionary |
SubNodeDictionary
to store the sub-nodes
Definition at line 64 of file NodeDecl.hh.
|
private |
VariableDeclDictionary
to store variable declarations
Definition at line 73 of file NodeDecl.hh.
VariableType
the type of variable declared in the node A Variable may be declared as a flow, state or subnode variable
Definition at line 59 of file NodeDecl.hh.
|
private |
Parametrised constructor
variable | the associated node variable declaration |
id | its id |
factory | the factory that owns this NodeDecl |
Diades::Altarica::NodeDecl::~NodeDecl | ( | ) |
Destructor
|
inline |
assertion | an expression that defines an assertion of the NodeDecl |
Definition at line 466 of file NodeDecl.hh.
References require, and Diades::Altarica::Expression::valid().
|
inline |
Definition at line 247 of file NodeDecl.hh.
References always_require, getConstant(), isNull(), and name().
void Diades::Altarica::NodeDecl::addEventDecl | ( | EventDecl & | event | ) |
|
inline |
add initialisations
assignment | an assignment |
Definition at line 655 of file NodeDecl.hh.
References Diades::Altarica::Assignment::owner(), require, and Diades::Altarica::Assignment::valid().
|
inline |
Add a sub node
id | the identifier of the sub node |
nodeDecl | the declaration of the sub-node |
Definition at line 703 of file NodeDecl.hh.
|
inline |
add a synchronisation vector to a NodeDecl
paths | a sunchronisation vector |
Definition at line 624 of file NodeDecl.hh.
void Diades::Altarica::NodeDecl::addVariableDecl | ( | const VariableDecl & | var | ) |
var | the variable to add |
Referenced by variableDecl().
|
inline |
Definition at line 478 of file NodeDecl.hh.
References _assertions, and newTransition().
Referenced by Diades::Altarica::Node::assertions().
|
inline |
Definition at line 242 of file NodeDecl.hh.
References _constantDictionary.
|
inline |
Definition at line 525 of file NodeDecl.hh.
|
inline |
Definition at line 533 of file NodeDecl.hh.
References setPriorities().
|
inline |
Definition at line 411 of file NodeDecl.hh.
References _flowVarDecl.
const Value& Diades::Altarica::NodeDecl::getConstant | ( | const Identifier & | name | ) | const |
Referenced by addConstant().
const Domain& Diades::Altarica::NodeDecl::getDomain | ( | const Identifier & | id | ) |
Get the domain of a given name in the scope of this node
id | the id of the domain |
Referenced by setDomain(), and stateVariableDecls().
const EventDecl& Diades::Altarica::NodeDecl::getEventDecl | ( | const Identifier & | id | ) | const |
Get an event
label | the label of the event |
Referenced by transitions().
EventDecl& Diades::Altarica::NodeDecl::getEventDecl | ( | const Identifier & | id | ) |
Get an event
label | the label of the event |
const ParameterDecl& Diades::Altarica::NodeDecl::getParameterDecl | ( | const Identifier & | name | ) | const |
|
inline |
id | Identifier of the sub node |
Definition at line 715 of file NodeDecl.hh.
References always_require, and name().
|
inline |
id | Identifier of the sub node |
Definition at line 732 of file NodeDecl.hh.
References always_require, and name().
const VariableDecl& Diades::Altarica::NodeDecl::getVariableDecl | ( | const Identifier & | id | ) | const |
Get the VariableDecl with the identifier id
id | the identifier of the VariableDecl |
Referenced by variableDecl().
|
inline |
|
inline |
Definition at line 669 of file NodeDecl.hh.
References _initialisations.
Referenced by Diades::Altarica::Node::initialisations().
|
inline |
evt1 | an event of the node |
evt2 | an event of the node |
Definition at line 558 of file NodeDecl.hh.
References Diades::Altarica::EventDecl::graphNode(), and Diades::Graph::Graph::succeeds().
Referenced by isLower(), and notOrdered().
|
inline |
evt1 | an event of the node |
evt2 | an event of the node |
Definition at line 572 of file NodeDecl.hh.
References isGreater().
Referenced by notOrdered().
bool Diades::Altarica::NodeDecl::isNull | ( | ) | const |
Referenced by addConstant(), setDomain(), and valid().
|
inline |
Definition at line 349 of file NodeDecl.hh.
References _name, and terminateInitialisation().
Referenced by addConstant(), getSubNode(), and setDomain().
const Assignment& Diades::Altarica::NodeDecl::newAssignment | ( | const Expression & | memberAccess, |
const Expression & | expression | ||
) |
new assignment to create
the | member to initialise |
the | initialisation expression |
Referenced by synchronisations().
void Diades::Altarica::NodeDecl::newAttribute | ( | const Identifier & | name | ) |
const ParameterDecl& Diades::Altarica::NodeDecl::newParameterDecl | ( | const Identifier & | name, |
const Domain & | domain | ||
) |
Transition& Diades::Altarica::NodeDecl::newTransition | ( | const Expression & | precondition | ) |
precondition | the precondition of the new Transition |
Referenced by assertions().
|
inline |
evt1 | an event of the node |
evt2 | an event of the node |
Definition at line 587 of file NodeDecl.hh.
References getParameterDecl(), isGreater(), isLower(), newAttribute(), and newParameterDecl().
|
inline |
Difference operator (reference equality)
nodeDecl | the NodeDecl to compare with |
Definition at line 303 of file NodeDecl.hh.
References owner().
|
inline |
Equality operator (reference equality)
nodeDecl | the NodeDecl to compare with |
Definition at line 291 of file NodeDecl.hh.
const AltaricaModel& Diades::Altarica::NodeDecl::owner | ( | ) | const |
The AltaricaModel that owns the NodeDecl
Referenced by Diades::Altarica::AltaricaModel::getEventDecl(), operator!=(), and Diades::Altarica::NodeDeclFactory::~NodeDeclFactory().
AltaricaModel& Diades::Altarica::NodeDecl::owner | ( | ) |
|
inline |
Set the domain
dom | a new Domain |
Definition at line 450 of file NodeDecl.hh.
References getDomain(), Diades::Altarica::Domain::isNull(), isNull(), Diades::Altarica::Domain::name(), name(), and require.
void Diades::Altarica::NodeDecl::setPriorities | ( | const list< EventDecl::Reference > & | lowEventDecls, |
const list< EventDecl::Reference > & | highEventDecls | ||
) |
EventDecl priorities
lowEventDecls | the set of events with the lower priority |
highEventDecls | the set of events with the higher priority |
Referenced by eventDeclEnd().
|
inline |
Definition at line 425 of file NodeDecl.hh.
References _stateVarDecl, and getDomain().
|
inline |
|
inline |
Definition at line 636 of file NodeDecl.hh.
References _syncVectors, and newAssignment().
void Diades::Altarica::NodeDecl::terminateInitialisation | ( | ) |
|
inline |
Definition at line 498 of file NodeDecl.hh.
References _transitionsRef, addEventDecl(), and getEventDecl().
Referenced by Diades::Altarica::Node::transitions().
|
inlinestatic |
Definition at line 52 of file NodeDecl.hh.
|
inline |
Definition at line 680 of file NodeDecl.hh.
References isNull().
|
inline |
The associated Variable Declaration. Every declaration of a node is associated to a variable declaration
Definition at line 370 of file NodeDecl.hh.
References require.
|
inline |
The associated Variable Declaration. Every declaration of a node is associated to a variable declaration
Definition at line 384 of file NodeDecl.hh.
References addVariableDecl(), getVariableDecl(), and require.
|
friend |
Definition at line 753 of file NodeDecl.hh.
|
friend |
Definition at line 235 of file NodeDecl.hh.
|
private |
_assertions
the set of assertions of the NodeDecl
Definition at line 183 of file NodeDecl.hh.
Referenced by assertions().
|
private |
_assignments
the set of assignments created in this node
Definition at line 189 of file NodeDecl.hh.
|
private |
_attributes
the set of attributes of the NodeDecl
Definition at line 169 of file NodeDecl.hh.
|
private |
_constantDictionary
the set of declared constant
Definition at line 223 of file NodeDecl.hh.
Referenced by constants().
|
private |
_domains
the set of domains in the scope of the node
Definition at line 200 of file NodeDecl.hh.
|
private |
_eventDag
the direct acyclic graph that encodes the priorities of the events
Definition at line 144 of file NodeDecl.hh.
|
private |
_eventDecls
the set of events
Definition at line 159 of file NodeDecl.hh.
|
private |
_events
the mapping between the nodes og the event DAG and the event
Definition at line 153 of file NodeDecl.hh.
|
private |
_factory
the NodeDeclFactory that generated this NodeDecl
Definition at line 86 of file NodeDecl.hh.
|
private |
_flowVarDecl
list of the flow variable declaration
Definition at line 119 of file NodeDecl.hh.
Referenced by flowVariableDecls().
|
private |
_id
the identifier that is generated by _factory
Definition at line 90 of file NodeDecl.hh.
Referenced by id().
|
private |
_initialisations
the set of initialisations
Definition at line 195 of file NodeDecl.hh.
Referenced by initialisations().
|
private |
|
private |
_parameterDecls
the set of parameter declarations of the NodeDecl
Definition at line 175 of file NodeDecl.hh.
|
private |
_stateVarDecl
list of the state variable declaration
Definition at line 124 of file NodeDecl.hh.
Referenced by stateVariableDecls().
|
private |
_subNodes
to store the sub nodes
Definition at line 216 of file NodeDecl.hh.
Referenced by subNodes().
|
private |
_syncVectors
synchronisation vectors ??
Definition at line 209 of file NodeDecl.hh.
Referenced by synchronisations().
|
private |
_transitions
this vector stores the Transition of the declared node
Definition at line 132 of file NodeDecl.hh.
|
private |
_transitionsRef
this vector stores the references of the Transition of the declared node
Definition at line 137 of file NodeDecl.hh.
Referenced by transitions().
|
private |
_variableDecl
any NodeDecl is associated with a special VariableDecl. In this way, a NodeDecl can also be seen as a VariableDecl and then a NodeDecl also defines a scope for othe VariableDecl. Here this VariableDecl is stored in a vector as a Reference. This is a trick to initialize the reference after the creation of the NodeDecl
Definition at line 103 of file NodeDecl.hh.
|
private |
_variableDeclDictionary
this dictionary stores the declaration of variables of the current node with an efficient access by their identifier.
Definition at line 110 of file NodeDecl.hh.