DiaDes  0.1
DIAgnosisofDiscrete-EventSystem
Public Types | Private Member Functions | Private Attributes | List of all members
Diades::Altarica::AltaricaModel Class Reference

#include <AltaricaModel.hh>

Public Types

typedef reference_wrapper< AltaricaModelReference
 
typedef reference_wrapper< AltaricaModel const > ConstReference
 
typedef AltaricaModelPointer
 
typedef const AltaricaModelConstPointer
 
typedef vector< NodeDecl::ReferenceNodeDecls
 
typedef NodeDecls::const_iterator NodeDeclIterator
 
typedef unordered_map< Identifier, Domain::ConstReferenceDomainDictionary
 
typedef unordered_map< Identifier, Value::ConstReferenceConstantDictionary
 
typedef unordered_map< Identifier, NodeDecl::ReferenceNodeDeclDictionary
 

Public Member Functions

Constants
const ConstantDictionaryconstants () const
 
void addConstant (const Identifier &name, const Value &value)
 
const ValuegetConstant (const Identifier &name) const
 
Constructors/Destructor
 AltaricaModel (const Identifier &name)
 
 ~AltaricaModel ()
 
BasicAccessors

Basic methods of AltaricaModel

const Identifiername () const
 
bool operator== (const AltaricaModel &model) const
 
bool operator!= (const AltaricaModel &model) const
 
TypeAccessors

Methods to access the Type of the elements of the current model

const TypenullType () const
 
const TypegetBoolean () const
 
const TypegetIdentifier () const
 
const TypegetInteger () const
 
const TypegetStructureType (const Type::StructureFields &fields) const
 
const TypegetArrayType (const Type &type, unsigned size) const
 
ValueAccessors

Methods to access the Value involved in the elements of the current model

const ValuenullValue () const
 
const ValuegetValue (const Identifier &value) const
 
const ValuegetValue (bool value) const
 
const ValuegetValue (int value) const
 
const ValuegetValue (const Value::ArrayFields &array) const
 
const ValuegetValue (const Value::StructureFields &structure) const
 
DomainAccessors

Methods to access the Domains involved in the elements of the current model

const DomaingetBooleans () const
 
const DomaingetIntegers () const
 
const DomainnewDomain (const Identifier &name, const Domain &associatedDomain, NodeDecl &node)
 
const DomainnewDomain (const Identifier &name, const Value &min, const Value &max, NodeDecl &node)
 
const DomainnewDomain (const Identifier &name, const ValueEnumeration &enumeration, NodeDecl &node)
 
const DomainnewDomain (const Identifier &name, const map< Identifier, Domain::ConstReference > &structure, NodeDecl &node)
 
const DomainnewDomain (const Identifier &name, const Domain &domain, unsigned size, NodeDecl &node)
 
const DomaingetDomain (const Identifier &name, NodeDecl &node)
 
const DomaingetDomain (const NodeDecl &node)
 
const DomainnullDomain () const
 
const vector< Domain::ConstReference > & domains () const
 
VariableDeclAccessors
VariableDeclgetNodeVariableDecl (const Identifier &id, NodeDecl &node, const set< Identifier > &attributes, VariableDecl &scope)
 
VariableDeclgetVariableDecl (const Diades::Utils::Identifier &label, NodeDecl::VarType type, const Domain &domain, const set< Identifier > &attributes, VariableDecl &scope)
 
const VariableDeclnullVariableDecl () const
 
VariableDeclnullVariableDecl ()
 
const VariableDeclFactoryvariableDeclFactory () const
 
NodeAccessors

Methods to access the Nodes involved in the elements of the current model

void noMainNodeDecl ()
 
void setMainNodeDecl (const Identifier &name)
 
bool containsNodeDecl (const Identifier &nodeName) const
 
NodeDeclgetNodeDecl (const Identifier &nodeName)
 
NodeDeclnullNodeDecl ()
 
const NodeDeclnullNodeDecl () const
 
unsigned numberOfNodeDecls () const
 
NodeDeclIterator nodeDeclBegin () const
 
NodeDeclIterator nodeDeclEnd () const
 
model construction methods

These methods are use to "fill" the declared nodes

EventDeclgetEventDecl (const Identifier &id, NodeDecl &owner)
 
const EventDeclgetEventDecl (const Identifier &id, const NodeDecl &owner) const
 
const EventDeclnullEventDecl () const
 
EventDeclnullEventDecl ()
 
model instance methods

These methods are use to instanciate the declared model

const VariableDeclmainVariableDecl () const
 
VariableDeclmainVariableDecl ()
 
const NodeDeclmainNodeDecl () const
 
NodeDeclmainNodeDecl ()
 
parameter methods

These methods are use to instanciate the parameters

const ParameterDeclgetParameterDecl (const Identifier &name, const Domain &domain, NodeDecl &node)
 
const ParameterDeclnullParameterDecl () const
 

Private Member Functions

unsigned typeIndex (Domain::DomainType type) const
 

Private Attributes

TypeFactory _typeFactory
 
ValueFactory _valueFactory
 
DomainFactory _domainFactory
 
VariableDeclFactory _varDeclFactory
 
vector< VariableDecl::Reference_mainVariableDecl
 
NodeDeclFactory _nodeDeclFactory
 
EventDeclFactory _eventFactory
 
ExpressionFactory _expressionFactory
 
ParameterDeclFactory _paramDeclFactory
 
DomainDictionary _domainDictionary
 
vector< Domain::ConstReference_globalDomains
 
NodeDecls _nodeDecls
 
vector< NodeDecl::Reference_mainNodeDecl
 
NodeDeclDictionary _nodeDeclOfLabel
 
Identifier _name
 
ConstantDictionary _constantDictionary
 

Exception

Exception mechanism

typedef Utils::Exception< AltaricaModelException
 
static string typeName ()
 

ExpressionAccessors

typedef ExpressionFactory::ExprVector ExprVector
 
const ExpressiongetVarExpression (const NodeDecl &node, const VariableDecl &var)
 
const ExpressiongetIdentifierExpression (const NodeDecl &node, const Identifier &id)
 
const ExpressiongetBooleanExpression (Expression::Category category)
 
const ExpressiongetIntegerExpression (int value)
 
const ExpressiongetIteExpression (const NodeDecl &node, const Expression &ifE, const Expression &thenE, const Expression &elseE)
 
const ExpressiongetCaseExpression (const NodeDecl &node, const ExprVector &choices, const ExprVector &expressions)
 
const ExpressiongetBinaryExpression (const NodeDecl &node, Expression::Category category, const Expression &left, const Expression &right)
 
const ExpressiongetUnaryExpression (const NodeDecl &node, Expression::Category category, const Expression &expr)
 
const ExpressiongetListExpression (const NodeDecl &node, Expression::Category category, const ExprVector &expressions)
 
const ExpressiongetStructExpression (const NodeDecl &node, const vector< Identifier > &identifiers, const ExprVector &expressions)
 

Detailed Description

Class that implements a internal representation of a model written in alatarca language. This is the fundamental class to use altarica models with Dialtarica.

Definition at line 28 of file AltaricaModel.hh.

Member Typedef Documentation

◆ ConstantDictionary

ConstantDictionary dictionary of the global domains

Definition at line 103 of file AltaricaModel.hh.

◆ ConstPointer

Definition at line 35 of file AltaricaModel.hh.

◆ ConstReference

Definition at line 33 of file AltaricaModel.hh.

◆ DomainDictionary

DomainDictionary dictionary of the global domains

Definition at line 99 of file AltaricaModel.hh.

◆ Exception

Definition at line 162 of file AltaricaModel.hh.

◆ ExprVector

ExprVector vector of constant Expression references

Definition at line 817 of file AltaricaModel.hh.

◆ NodeDeclDictionary

NodeDeclDictionary dictionary of the node declarations

Definition at line 107 of file AltaricaModel.hh.

◆ NodeDeclIterator

typedef NodeDecls::const_iterator Diades::Altarica::AltaricaModel::NodeDeclIterator

NodeDeclIterator iterator of NodeDecls

Definition at line 95 of file AltaricaModel.hh.

◆ NodeDecls

NodeDecls vector of node declarations

Definition at line 91 of file AltaricaModel.hh.

◆ Pointer

Definition at line 34 of file AltaricaModel.hh.

◆ Reference

Definition at line 32 of file AltaricaModel.hh.

Constructor & Destructor Documentation

◆ AltaricaModel()

Diades::Altarica::AltaricaModel::AltaricaModel ( const Identifier name)

Parametrised constructor creation of a new altarica model.

Parameters
namethe name of the new model

Referenced by getConstant().

◆ ~AltaricaModel()

Diades::Altarica::AltaricaModel::~AltaricaModel ( )

Destructor.

Referenced by getConstant().

Member Function Documentation

◆ addConstant()

void Diades::Altarica::AltaricaModel::addConstant ( const Identifier name,
const Value value 
)
inline

Definition at line 177 of file AltaricaModel.hh.

References always_require, and getConstant().

◆ constants()

const ConstantDictionary& Diades::Altarica::AltaricaModel::constants ( ) const
inline

Definition at line 172 of file AltaricaModel.hh.

References _constantDictionary.

◆ containsNodeDecl()

bool Diades::Altarica::AltaricaModel::containsNodeDecl ( const Identifier nodeName) const
Parameters
nodeNamethe identifier of a NodeDecl
Returns
true if such a node is present in the model
Todo:
test

Referenced by setMainNodeDecl().

◆ domains()

const vector<Domain::ConstReference>& Diades::Altarica::AltaricaModel::domains ( ) const
inline
Returns
the global user-defined domains

Definition at line 598 of file AltaricaModel.hh.

References _globalDomains.

◆ getArrayType()

const Type& Diades::Altarica::AltaricaModel::getArrayType ( const Type type,
unsigned  size 
) const
inline
Parameters
typeType of an element
sizeSize of the array
Returns
the Type array<Type>[size]

Definition at line 351 of file AltaricaModel.hh.

References Diades::Altarica::TypeFactory::getArrayType(), and nullType().

Referenced by BOOST_AUTO_TEST_CASE().

◆ getBinaryExpression()

const Expression& Diades::Altarica::AltaricaModel::getBinaryExpression ( const NodeDecl node,
Expression::Category  category,
const Expression left,
const Expression right 
)
inline
Parameters
nodethe owner of the Expression
categoryCategory of the expression (Binary categories like Or And Add etc)
leftthe left member
rightthe right member
Returns
the corresponding binary Expression

Definition at line 912 of file AltaricaModel.hh.

References Diades::Altarica::ExpressionFactory::getBinaryExpression().

Referenced by BOOST_AUTO_TEST_CASE().

◆ getBoolean()

const Type& Diades::Altarica::AltaricaModel::getBoolean ( ) const
inline

Boolean type

Returns
the boolean type of the model

Definition at line 295 of file AltaricaModel.hh.

References Diades::Altarica::TypeFactory::getBoolean().

Referenced by BOOST_AUTO_TEST_CASE().

◆ getBooleanExpression()

const Expression& Diades::Altarica::AltaricaModel::getBooleanExpression ( Expression::Category  category)
inline
Parameters
categorythe category (either True or False)
Returns
the boolean Expression associated with this category

Definition at line 853 of file AltaricaModel.hh.

References Diades::Altarica::ExpressionFactory::getBooleanExpression().

Referenced by BOOST_AUTO_TEST_CASE().

◆ getBooleans()

const Domain& Diades::Altarica::AltaricaModel::getBooleans ( ) const
inline
Returns
the boolean domain

Definition at line 485 of file AltaricaModel.hh.

References Diades::Altarica::DomainFactory::getBooleans().

Referenced by BOOST_AUTO_TEST_CASE().

◆ getCaseExpression()

const Expression& Diades::Altarica::AltaricaModel::getCaseExpression ( const NodeDecl node,
const ExprVector choices,
const ExprVector expressions 
)
inline
Parameters
nodethe owner of the Expression*
choicesthe set of cases
expressionsthe set of expressions (cases[i] associated with expressions[i]) plus the default case
Returns
the corresponding Case Expression

Definition at line 895 of file AltaricaModel.hh.

References Diades::Altarica::ExpressionFactory::getCaseExpression().

Referenced by BOOST_AUTO_TEST_CASE().

◆ getConstant()

const Value& Diades::Altarica::AltaricaModel::getConstant ( const Identifier name) const
inline

Definition at line 184 of file AltaricaModel.hh.

References AltaricaModel(), name(), nullValue(), and ~AltaricaModel().

Referenced by addConstant().

◆ getDomain() [1/2]

const Domain& Diades::Altarica::AltaricaModel::getDomain ( const Identifier name,
NodeDecl node 
)

Get the domain of the model with this name

Parameters
namethe name of the resulting Domain
nodeDeclthe nodeDecl where is the domain (NodelDecl() is it is the global one)
Returns
the Domain with this name or an invalid one if it does not exist.
Todo:
test

Referenced by getIntegers().

◆ getDomain() [2/2]

const Domain& Diades::Altarica::AltaricaModel::getDomain ( const NodeDecl node)

Get the domain associated to the Node

Parameters
nodeDeclthe nodeDecl
Returns
the Domain of the NodeDecl. A NodeDecl can be seen as a structured VariableDecl whose the Domain is the one returned by this method
Todo:
test

◆ getEventDecl() [1/2]

EventDecl& Diades::Altarica::AltaricaModel::getEventDecl ( const Identifier id,
NodeDecl owner 
)
inline

Get an event declaration

Parameters
labelthe label of the event declaration
nodeDeclthe owner of the event declaration
Returns
the event 'label' declared in the node 'owner'
Todo:
test

Definition at line 970 of file AltaricaModel.hh.

References always_require, Diades::Altarica::EventDeclFactory::getEventDecl(), and Diades::Altarica::NodeDecl::owner().

◆ getEventDecl() [2/2]

const EventDecl& Diades::Altarica::AltaricaModel::getEventDecl ( const Identifier id,
const NodeDecl owner 
) const
inline

Get an event declaration

Parameters
labelthe label of the event declaration
nodeDeclthe owner of the event declaration
Returns
the event 'label' declared in the node 'owner'
Todo:
test

Definition at line 982 of file AltaricaModel.hh.

References always_require, Diades::Altarica::EventDeclFactory::getEventDecl(), and Diades::Altarica::NodeDecl::owner().

◆ getIdentifier()

const Type& Diades::Altarica::AltaricaModel::getIdentifier ( ) const
inline

Identifier type

Returns
the identifier type of the model

Definition at line 305 of file AltaricaModel.hh.

References Diades::Altarica::TypeFactory::getIdentifier().

Referenced by BOOST_AUTO_TEST_CASE().

◆ getIdentifierExpression()

const Expression& Diades::Altarica::AltaricaModel::getIdentifierExpression ( const NodeDecl node,
const Identifier id 
)
inline
Parameters
nodethe owner of the identifer
idan Identifier
Returns
the Expression associated with this Identifier

Definition at line 841 of file AltaricaModel.hh.

References Diades::Altarica::ExpressionFactory::getIdentifierExpression().

Referenced by BOOST_AUTO_TEST_CASE().

◆ getInteger()

const Type& Diades::Altarica::AltaricaModel::getInteger ( ) const
inline

Integer type

Returns
the integer type of the model

Definition at line 316 of file AltaricaModel.hh.

References Diades::Altarica::TypeFactory::getInteger().

Referenced by BOOST_AUTO_TEST_CASE().

◆ getIntegerExpression()

const Expression& Diades::Altarica::AltaricaModel::getIntegerExpression ( int  value)
inline
Parameters
valuea integer
Returns
the boolean Expression associated with this integer

Definition at line 866 of file AltaricaModel.hh.

References Diades::Altarica::ExpressionFactory::getIntegerExpression().

Referenced by BOOST_AUTO_TEST_CASE().

◆ getIntegers()

const Domain& Diades::Altarica::AltaricaModel::getIntegers ( ) const
inline
Returns
the integer domain

Definition at line 494 of file AltaricaModel.hh.

References getDomain(), Diades::Altarica::DomainFactory::getIntegers(), and newDomain().

Referenced by BOOST_AUTO_TEST_CASE().

◆ getIteExpression()

const Expression& Diades::Altarica::AltaricaModel::getIteExpression ( const NodeDecl node,
const Expression ifE,
const Expression thenE,
const Expression elseE 
)
inline
Parameters
nodethe owner of the Expression
ifEa boolean Expression
thenEan Expression
elseEan Expression
Returns
the If/Then/Else Expression

Definition at line 881 of file AltaricaModel.hh.

References Diades::Altarica::ExpressionFactory::getIteExpression().

Referenced by BOOST_AUTO_TEST_CASE().

◆ getListExpression()

const Expression& Diades::Altarica::AltaricaModel::getListExpression ( const NodeDecl node,
Expression::Category  category,
const ExprVector expressions 
)
inline
Parameters
nodethe owner of the Expression
categoryCategory of the expression (categories made of expression list like min max array...)
expressionsthe list of expressions)
Returns
the corresponding Expression

Definition at line 938 of file AltaricaModel.hh.

References Diades::Altarica::ExpressionFactory::getListExpression().

Referenced by BOOST_AUTO_TEST_CASE().

◆ getNodeDecl()

NodeDecl& Diades::Altarica::AltaricaModel::getNodeDecl ( const Identifier nodeName)
Parameters
nodeNamethe identifier of a NodeDecl
Returns
the NodeDecl with the name 'nodeName'
Todo:
test

Referenced by analyseComponent(), and setMainNodeDecl().

◆ getNodeVariableDecl()

VariableDecl& Diades::Altarica::AltaricaModel::getNodeVariableDecl ( const Identifier id,
NodeDecl node,
const set< Identifier > &  attributes,
VariableDecl scope 
)
inline

Get the VariableDecl associated to a NodeDecl

Parameters
nodethe given node
attributesthe attributes of the Variable
scopethe scope of the Variable. If the scope is VariableDecl(), it is the global scope
Returns
the VariableDecl for this NodeDecl

Definition at line 624 of file AltaricaModel.hh.

References Diades::Altarica::VariableDeclFactory::getNodeVariableDecl(), and nullVariableDecl().

◆ getParameterDecl()

const ParameterDecl& Diades::Altarica::AltaricaModel::getParameterDecl ( const Identifier name,
const Domain domain,
NodeDecl node 
)
inline

Parameter declaration

Parameters
namethe identifier of the Parameter
domainthe domain of the Parameter
nodethe NodeDec that owns the Parameter
Returns
the ParameterDecl

Definition at line 1086 of file AltaricaModel.hh.

References always_require, Diades::Altarica::ParameterDeclFactory::getParameterDecl(), Diades::Altarica::Domain::isNull(), and Diades::Utils::Identifier::str().

◆ getStructExpression()

const Expression& Diades::Altarica::AltaricaModel::getStructExpression ( const NodeDecl node,
const vector< Identifier > &  identifiers,
const ExprVector expressions 
)
inline
Parameters
nodethe owner of the Expression
identifiersa set of identifiers (the field names of the structure)
expressionsa set of expressions (associated with each field name)
Returns
the corresponding Expressions

Definition at line 952 of file AltaricaModel.hh.

References Diades::Altarica::ExpressionFactory::getStructExpression().

◆ getStructureType()

const Type& Diades::Altarica::AltaricaModel::getStructureType ( const Type::StructureFields fields) const
inline

Get the structure type defined by fields

Parameters
fieldsa set of Type
Returns
the Type struct{ fields[0], fields[1],...}

Definition at line 328 of file AltaricaModel.hh.

References Diades::Altarica::TypeFactory::getStructureType(), and nullType().

Referenced by BOOST_AUTO_TEST_CASE().

◆ getUnaryExpression()

const Expression& Diades::Altarica::AltaricaModel::getUnaryExpression ( const NodeDecl node,
Expression::Category  category,
const Expression expr 
)
inline
Parameters
nodethe owner of the Expression
categoryCategory of the expression (Unary categories like Not Neg Paren etc)
exprthe unique member
Returns
the corresponding unary Expression

Definition at line 925 of file AltaricaModel.hh.

References Diades::Altarica::ExpressionFactory::getUnaryExpression().

Referenced by BOOST_AUTO_TEST_CASE().

◆ getValue() [1/5]

const Value& Diades::Altarica::AltaricaModel::getValue ( const Identifier value) const
inline
Parameters
valuean Identifier
Returns
the Value of the model associated with 'value'
Precondition
!value.empty()

Definition at line 392 of file AltaricaModel.hh.

References Diades::Altarica::ValueFactory::getValue(), and nullValue().

Referenced by BOOST_AUTO_TEST_CASE().

◆ getValue() [2/5]

const Value& Diades::Altarica::AltaricaModel::getValue ( bool  value) const
inline
Parameters
valuean boolean
Returns
the Value of the model associated with 'value'

Definition at line 412 of file AltaricaModel.hh.

References Diades::Altarica::ValueFactory::getValue().

◆ getValue() [3/5]

const Value& Diades::Altarica::AltaricaModel::getValue ( int  value) const
inline
Parameters
valuean integer
Returns
the Value of the model associated with 'value'

Definition at line 424 of file AltaricaModel.hh.

References Diades::Altarica::ValueFactory::getValue().

◆ getValue() [4/5]

const Value& Diades::Altarica::AltaricaModel::getValue ( const Value::ArrayFields array) const
inline
Parameters
arrayan array of Value
Returns
the Value of Type array<array[0].type()>[array.size]
Precondition
the Values in array must have the same Type.

Definition at line 437 of file AltaricaModel.hh.

References Diades::Altarica::ValueFactory::getValue(), and nullValue().

◆ getValue() [5/5]

const Value& Diades::Altarica::AltaricaModel::getValue ( const Value::StructureFields structure) const
inline
Parameters
structurean set of Values indedex with field names
Returns
the Value of Type structure{ fields[0],.... }
Precondition
the structure must not ne empty.

Definition at line 459 of file AltaricaModel.hh.

References Diades::Altarica::ValueFactory::getValue(), and nullValue().

◆ getVarExpression()

const Expression& Diades::Altarica::AltaricaModel::getVarExpression ( const NodeDecl node,
const VariableDecl var 
)
inline
Parameters
nodethe owner of the VariableDecl
vara VariableDecl
Returns
the Expression associated with this variable declaration

Definition at line 826 of file AltaricaModel.hh.

References Diades::Altarica::ExpressionFactory::getVarExpression().

Referenced by BOOST_AUTO_TEST_CASE().

◆ getVariableDecl()

VariableDecl& Diades::Altarica::AltaricaModel::getVariableDecl ( const Diades::Utils::Identifier label,
NodeDecl::VarType  type,
const Domain domain,
const set< Identifier > &  attributes,
VariableDecl scope 
)
inline

Get the VariableDecl

Parameters
labelthe name of the Variable
typethe type (flow.state,subnode) of the variable
domainthe Domain of the Variable
attributesthe attributes of the Variable
scopethe scope of the Variable. If the scope is VariableDecl(), it is the global scope
Returns
the VariableDecl for this Variable.

Definition at line 655 of file AltaricaModel.hh.

References Diades::Altarica::VariableDeclFactory::getVariableDecl(), and nullVariableDecl().

Referenced by BOOST_AUTO_TEST_CASE().

◆ mainNodeDecl() [1/2]

const NodeDecl& Diades::Altarica::AltaricaModel::mainNodeDecl ( ) const
inline
Returns
the declaration node of 'main'

Definition at line 1056 of file AltaricaModel.hh.

Referenced by BOOST_AUTO_TEST_CASE().

◆ mainNodeDecl() [2/2]

NodeDecl& Diades::Altarica::AltaricaModel::mainNodeDecl ( )
inline
Returns
the declaration node of 'main'

Definition at line 1066 of file AltaricaModel.hh.

◆ mainVariableDecl() [1/2]

const VariableDecl& Diades::Altarica::AltaricaModel::mainVariableDecl ( ) const
inline

get the main Node of the model

Returns
the the main Node of the model.
Todo:
confirm
Returns
the variable declaration associated to the whole model

Definition at line 1031 of file AltaricaModel.hh.

Referenced by BOOST_AUTO_TEST_CASE().

◆ mainVariableDecl() [2/2]

VariableDecl& Diades::Altarica::AltaricaModel::mainVariableDecl ( )
inline
Returns
the variable declaration associated to the whole model

Definition at line 1042 of file AltaricaModel.hh.

◆ name()

const Identifier& Diades::Altarica::AltaricaModel::name ( ) const
inline

Validity of an AltaricaModel

Returns
true if the AltaricaModel is valid
Todo:
implement

Name of the model

Returns
the name of the model

Definition at line 244 of file AltaricaModel.hh.

References _name.

Referenced by getConstant().

◆ newDomain() [1/5]

const Domain& Diades::Altarica::AltaricaModel::newDomain ( const Identifier name,
const Domain associatedDomain,
NodeDecl node 
)

Reference Domain constructor

Parameters
namean Identifier that represents a Domain (if name is empty, it is considered as a shadow domain)
associatedDomainthe Domain associated to the Identifier name
nodeDeclthe NodeDecl where this Domain is declared
Returns
a Domain defined by the Identifier name in the scope nodeDecl that is equivalent to the Domain associatedDomain

Referenced by BOOST_AUTO_TEST_CASE(), and getIntegers().

◆ newDomain() [2/5]

const Domain& Diades::Altarica::AltaricaModel::newDomain ( const Identifier name,
const Value min,
const Value max,
NodeDecl node 
)

Integer Range Domain constructor

Parameters
namean Identifier that represents a Domain (if name is empty, it is considered as a shadow domain)
minthe minimal integer bound
maxthe maximal integer bound
nodeDeclthe NodeDecl where this Domain is declared
Returns
the integer Domain [min,max] in the scope nodeDecl

◆ newDomain() [3/5]

const Domain& Diades::Altarica::AltaricaModel::newDomain ( const Identifier name,
const ValueEnumeration enumeration,
NodeDecl node 
)

Finite Enumeration Domain constructor

Parameters
namean Identifier that represents a Domain (if name is empty, it is considered as a shadow domain)
enumerationthe set of Value objects in the enumeration
nodeDeclthe NodeDecl where this Domain is declared
Returns
an enumeration Domain in the scope of nodeDecl

◆ newDomain() [4/5]

const Domain& Diades::Altarica::AltaricaModel::newDomain ( const Identifier name,
const map< Identifier, Domain::ConstReference > &  structure,
NodeDecl node 
)

Structure Domain constructor

Parameters
namean Identifier that represents a Domain (if name is empty, it is considered as a shadow domain)
structurethe underlying structure of this Domain
nodeDeclthe NodeDecl where this Domain is declared
Returns
the corresponding structured Domain in the scope nodeDecl.

◆ newDomain() [5/5]

const Domain& Diades::Altarica::AltaricaModel::newDomain ( const Identifier name,
const Domain domain,
unsigned  size,
NodeDecl node 
)

Array Domain constructor

Parameters
namean Identifier that represents a Domain (if name is empty, it is considered as a shadow domain)
domainthe domain of any Variable contained in the array
thesize of the array domain
nodeDeclthe NodeDecl where this Domain is declared
Returns
the corresponding array Domain in the scope nodeDecl.

◆ nodeDeclBegin()

NodeDeclIterator Diades::Altarica::AltaricaModel::nodeDeclBegin ( ) const
inline

NodeDecl iterator (begin)

Returns
an iterator on the NodeDecls in the model
Todo:
test

Definition at line 792 of file AltaricaModel.hh.

◆ nodeDeclEnd()

NodeDeclIterator Diades::Altarica::AltaricaModel::nodeDeclEnd ( ) const
inline

NodeDecl iterator (end)

Returns
an iterator on the NodeDecls in the model
Todo:
test

Definition at line 801 of file AltaricaModel.hh.

◆ noMainNodeDecl()

void Diades::Altarica::AltaricaModel::noMainNodeDecl ( )
inline

Set the fact that the model has no main nodes

Definition at line 712 of file AltaricaModel.hh.

References nullNodeDecl().

◆ nullDomain()

const Domain& Diades::Altarica::AltaricaModel::nullDomain ( ) const
inline
Returns
the null domain
Todo:
test

Definition at line 586 of file AltaricaModel.hh.

References Diades::Altarica::DomainFactory::nullDomain().

Referenced by BOOST_AUTO_TEST_CASE().

◆ nullEventDecl() [1/2]

const EventDecl& Diades::Altarica::AltaricaModel::nullEventDecl ( ) const
inline
Returns
the null event declaration

Definition at line 994 of file AltaricaModel.hh.

References Diades::Altarica::EventDeclFactory::nullEventDecl().

◆ nullEventDecl() [2/2]

EventDecl& Diades::Altarica::AltaricaModel::nullEventDecl ( )
inline
Returns
the null event declaration

Definition at line 1004 of file AltaricaModel.hh.

References Diades::Altarica::EventDeclFactory::nullEventDecl().

◆ nullNodeDecl() [1/2]

NodeDecl& Diades::Altarica::AltaricaModel::nullNodeDecl ( )
inline
Returns
the null NodeDecl

Definition at line 760 of file AltaricaModel.hh.

References Diades::Altarica::NodeDeclFactory::nullNodeDecl().

Referenced by noMainNodeDecl().

◆ nullNodeDecl() [2/2]

const NodeDecl& Diades::Altarica::AltaricaModel::nullNodeDecl ( ) const
inline
Returns
the null NodeDecl

Definition at line 771 of file AltaricaModel.hh.

References Diades::Altarica::NodeDeclFactory::nullNodeDecl().

◆ nullParameterDecl()

const ParameterDecl& Diades::Altarica::AltaricaModel::nullParameterDecl ( ) const
inline
Returns
the null Parameter declaration

Definition at line 1101 of file AltaricaModel.hh.

References Diades::Altarica::ParameterDeclFactory::nullParameterDecl().

◆ nullType()

const Type& Diades::Altarica::AltaricaModel::nullType ( ) const
inline

Not a Type

Returns
not a type

Definition at line 284 of file AltaricaModel.hh.

References Diades::Altarica::TypeFactory::nullType().

Referenced by BOOST_AUTO_TEST_CASE(), getArrayType(), and getStructureType().

◆ nullValue()

const Value& Diades::Altarica::AltaricaModel::nullValue ( ) const
inline
Todo:
test
Returns
the null value

Definition at line 378 of file AltaricaModel.hh.

References Diades::Altarica::ValueFactory::nullValue().

Referenced by BOOST_AUTO_TEST_CASE(), getConstant(), and getValue().

◆ nullVariableDecl() [1/2]

const VariableDecl& Diades::Altarica::AltaricaModel::nullVariableDecl ( ) const
inline
Returns
the null declaration

Definition at line 677 of file AltaricaModel.hh.

References Diades::Altarica::VariableDeclFactory::nullVariableDecl().

Referenced by getNodeVariableDecl(), and getVariableDecl().

◆ nullVariableDecl() [2/2]

VariableDecl& Diades::Altarica::AltaricaModel::nullVariableDecl ( )
inline
Returns
the null declaration

Definition at line 688 of file AltaricaModel.hh.

References Diades::Altarica::VariableDeclFactory::nullVariableDecl().

◆ numberOfNodeDecls()

unsigned Diades::Altarica::AltaricaModel::numberOfNodeDecls ( ) const
inline
Returns
the number of nodes declared in the model
Todo:
test

Definition at line 782 of file AltaricaModel.hh.

◆ operator!=()

bool Diades::Altarica::AltaricaModel::operator!= ( const AltaricaModel model) const
inline

Difference operator (reference equality)

Parameters
modelthe AltaricaModel to compare with
Returns
true of both model are not equal (by reference, time-constant)

Definition at line 269 of file AltaricaModel.hh.

◆ operator==()

bool Diades::Altarica::AltaricaModel::operator== ( const AltaricaModel model) const
inline

Equality operator (reference equality)

Parameters
modelthe AltaricaModel to compare with
Returns
true of both model are equal (by reference, time-constant)

Definition at line 257 of file AltaricaModel.hh.

◆ setMainNodeDecl()

void Diades::Altarica::AltaricaModel::setMainNodeDecl ( const Identifier name)
inline

Set the main node to the given name

Parameters
namethe Identifier of the main node

Definition at line 725 of file AltaricaModel.hh.

References containsNodeDecl(), getNodeDecl(), Diades::Altarica::ExpressionFactory::init(), and Diades::Altarica::EventDeclFactory::init().

Referenced by BOOST_AUTO_TEST_CASE().

◆ typeIndex()

unsigned Diades::Altarica::AltaricaModel::typeIndex ( Domain::DomainType  type) const
private
Parameters
typea Domain::DomainType
Returns
the index associated to the type.

◆ typeName()

static string Diades::Altarica::AltaricaModel::typeName ( )
inlinestatic

Definition at line 163 of file AltaricaModel.hh.

◆ variableDeclFactory()

const VariableDeclFactory& Diades::Altarica::AltaricaModel::variableDeclFactory ( ) const
inline

Definition at line 695 of file AltaricaModel.hh.

References _varDeclFactory.

Referenced by main().

Member Data Documentation

◆ _constantDictionary

ConstantDictionary Diades::Altarica::AltaricaModel::_constantDictionary
private

_constantDictionary the set of declared constant

Definition at line 145 of file AltaricaModel.hh.

Referenced by constants().

◆ _domainDictionary

DomainDictionary Diades::Altarica::AltaricaModel::_domainDictionary
private

_domainDictionary the dictionary of the global domains

Definition at line 114 of file AltaricaModel.hh.

◆ _domainFactory

DomainFactory Diades::Altarica::AltaricaModel::_domainFactory
private

_domainFactory factory to generate the domains

Definition at line 52 of file AltaricaModel.hh.

◆ _eventFactory

EventDeclFactory Diades::Altarica::AltaricaModel::_eventFactory
mutableprivate

_eventFactory factory to generate the events

Definition at line 73 of file AltaricaModel.hh.

◆ _expressionFactory

ExpressionFactory Diades::Altarica::AltaricaModel::_expressionFactory
private

_expressionFactory factory to generate the expressions

Definition at line 78 of file AltaricaModel.hh.

◆ _globalDomains

vector<Domain::ConstReference> Diades::Altarica::AltaricaModel::_globalDomains
private

_globalDomains the set of global user defined domains

Definition at line 119 of file AltaricaModel.hh.

Referenced by domains().

◆ _mainNodeDecl

vector<NodeDecl::Reference> Diades::Altarica::AltaricaModel::_mainNodeDecl
private

Definition at line 127 of file AltaricaModel.hh.

◆ _mainVariableDecl

vector<VariableDecl::Reference> Diades::Altarica::AltaricaModel::_mainVariableDecl
private

_mainVariableDecl the vector that will contain the global scope variable

Definition at line 64 of file AltaricaModel.hh.

◆ _name

Identifier Diades::Altarica::AltaricaModel::_name
private

_name the name of the model

Definition at line 138 of file AltaricaModel.hh.

Referenced by name().

◆ _nodeDeclFactory

NodeDeclFactory Diades::Altarica::AltaricaModel::_nodeDeclFactory
private

_nodeDeclFactory factory to generate the node declarations

Definition at line 69 of file AltaricaModel.hh.

◆ _nodeDeclOfLabel

NodeDeclDictionary Diades::Altarica::AltaricaModel::_nodeDeclOfLabel
private

_nodeDeclOfLabel the dictionary of node declarations.

Definition at line 133 of file AltaricaModel.hh.

◆ _nodeDecls

NodeDecls Diades::Altarica::AltaricaModel::_nodeDecls
private

_nodeDecls the set of node declarations

Definition at line 126 of file AltaricaModel.hh.

◆ _paramDeclFactory

ParameterDeclFactory Diades::Altarica::AltaricaModel::_paramDeclFactory
private

_varFactory factory to generate the variables (i.e. instances of an VariableDecl) _paramDeclFactory factory to generate the parameters

Definition at line 86 of file AltaricaModel.hh.

◆ _typeFactory

TypeFactory Diades::Altarica::AltaricaModel::_typeFactory
mutableprivate

_typeFactory factory to generate the types

Definition at line 44 of file AltaricaModel.hh.

◆ _valueFactory

ValueFactory Diades::Altarica::AltaricaModel::_valueFactory
mutableprivate

_valueFactory factory to generate the values

Definition at line 48 of file AltaricaModel.hh.

◆ _varDeclFactory

VariableDeclFactory Diades::Altarica::AltaricaModel::_varDeclFactory
private

_varDeclFactory factory to generate the variable declarations

Definition at line 56 of file AltaricaModel.hh.

Referenced by variableDeclFactory().


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