DiaDes  0.1
DIAgnosisofDiscrete-EventSystem
ModelAcquisition.hh
Go to the documentation of this file.
1 #ifndef __DIADES__ALTARICA__MODEL__ACQUISITION__HH
2 #define __DIADES__ALTARICA__MODEL__ACQUISITION__HH
3 
4 #include<string>
5 #include<arsyntax/altarica-tree.h>
6 #include<diades/utils/Log.hh>
9 
10 using namespace std;
11 
12 namespace Diades
13 {
14  namespace Altarica
15  {
16 
17  typedef ::altarica_tree AltaricaTree;
19 
24  void getModel(AltaricaTree * tree, AltaricaModel & model);
25 
30  void getConstant(AltaricaTree * tree, AltaricaModel & model);
31 
36  void getDomain(AltaricaTree * tree, AltaricaModel & model);
37 
42  void getNodeDeclStep1(AltaricaTree * tree, AltaricaModel & model);
47  void getNodeDeclStep2(AltaricaTree * tree, AltaricaModel & model);
48 
49 
54  void getIdentifier(AltaricaTree * tree, Identifier & id);
55 
56 
63  const Domain & getDomainContent(AltaricaTree * tree, AltaricaModel & model,
64  const Identifier & domainName);
65 
66 
67 
75  void getRange(AltaricaTree * tree,int & min, int & max, NodeDecl & node);
76 
77 
78 
86  void getSymbolSet(AltaricaTree * tree, AltaricaModel & model, ValueEnumeration & symbols);
87 
88 
89 
94  void getAttributes(AltaricaTree * attributes, set<Identifier> & newAttributes);
95 
96 
102  void getNodeDeclParametersDecl(AltaricaTree * nodeField, NodeDecl & nodeDecl);
103 
109  void getNodeDeclVariablesDecl(AltaricaTree * nodeField,NodeDecl & nodeDecl);
110 
111 
117  void getNodeDeclEventsDecl(AltaricaTree * eventDeclNode, NodeDecl & nodeDecl);
118 
124  void getSubNodeDeclSet(AltaricaTree * nodeField,NodeDecl & nodeDecl);
125 
126 
132  void getNodeDeclAssertionsDef(AltaricaTree * nodeField,NodeDecl & nodeDecl);
133 
134 
135 
141  void getNodeDeclTransitionsDef(AltaricaTree * transitionsDefNode,NodeDecl & nodeDecl);
142 
143 
144 
150  void getNodeDeclSynchronizationDef(AltaricaTree * synchronisationsNodeDecl,NodeDecl & nodeDecl);
151 
152 
153 
160  void getNodeDeclInitDecl(AltaricaTree * nodeField,NodeDecl & nodeDecl);
161 
162 
169  void getNodeDeclParamSetDecl(AltaricaTree * nodeField,NodeDecl & nodeDecl);
170 
171 
177  void getIdList(AltaricaTree * idListNodeDecl, set<Identifier> & list);
178 
179 
180 
187  void getNodeDeclVariablesDeclPerType(AltaricaTree * varDecl, NodeDecl::VarType type,
188  NodeDecl & nodeDecl);
189 
190 
191 
192 
193 
200  void getNodeDeclEventDeclDagList(AltaricaTree * eventDagListNodeDecl,NodeDecl & nodeDecl,
201  list<EventDecl::Reference> & events);
202 
203 
204 
205 
212  void getEventDeclDag(AltaricaTree * eventDagNodeDecl,NodeDecl & nodeDecl,
213  list<EventDecl::Reference> & events);
214 
215 
216 
217 
224  void getEventDeclLt(AltaricaTree * eventLtNode,NodeDecl & nodeDecl,
225  list<EventDecl::Reference> & events);
226 
227 
228 
235  void getEventDeclGt(AltaricaTree * eventLtNode,NodeDecl & nodeDecl,
236  list<EventDecl::Reference> & events);
237 
238 
239 
240 
246  void getSubNodeDecl(AltaricaTree * nodeField,NodeDecl & nodeDecl);
247 
248 
249 
255  void getTransitionTgt(AltaricaTree * transitionTgtNode ,
256  Transition & transition,
257  NodeDecl & nodeDecl);
258 
259 
260 
261 
267  void getNodeDeclSyncVector(AltaricaTree * vectorNode,
268  NodeDecl & nodeDecl);
269 
270 
271 
272 
273 
279  void getNodeDeclEventDeclInstance(AltaricaTree * eventInstanceNode,
280  list<Identifier> & path);
281 
282 
283 
284 
285 
292  const Assignment & getAssignment(AltaricaTree * assignmentNode,
293  NodeDecl & nodeDecl);
294 
295 
296 
297 
298 
299 
300 
301 
302 
303 
304 
305 
306 
307 
315  string getLabelType(unsigned type);
316 
317 
326  void altaricaNodeCheck(AltaricaTree * parent, AltaricaTree * node, unsigned type, const string & function) throw();
327 
335 
343  Diades::Utils::Log parserLog(const char * msg);
344 
345 
353  Diades::Utils::Log parserLogDebug(const char * msg);
354 
355 
356 
357 
358 
359 
360 
361 
362 
363 
364 
365 
366 
367 
368 
369 
370 
371 
372 
373 
374 
375 
376 
377 
378 
379 
380 
381 
382 
383 
384 
385 
386 
387 
388 
389 
390 
391 
392 
393 
394 
395 
400  void logMissingNode(AltaricaTree * syntaxicalNodeDecl);
401 
402 
407  void logUnexpectedNode(AltaricaTree * syntaxicalNode);
408 
409 
415  void logUnexpectedNode(AltaricaTree * syntaxicalNode, const string & expected);
416 
417 
423  void logLine(AltaricaTree * syntaxicalNode);
424 
425 
433  string seeLine(AltaricaTree * tree);
434 
435 
436  };
437 };
438 
439 
440 #endif
void getNodeDeclVariablesDeclPerType(AltaricaTree *varDecl, NodeDecl::VarType type, NodeDecl &nodeDecl)
void getAttributes(AltaricaTree *attributes, set< Identifier > &newAttributes)
void getNodeDeclAssertionsDef(AltaricaTree *nodeField, NodeDecl &nodeDecl)
An Identifier is a reference to a string (IdentifierData) that only contains alpha-numeric characters...
Definition: Identifier.hh:121
void logLine(AltaricaTree *syntaxicalNode)
void getNodeDeclSynchronizationDef(AltaricaTree *synchronisationsNodeDecl, NodeDecl &nodeDecl)
Diades::Graph::Edge Transition
Definition: Component.hh:46
void getNodeDeclParametersDecl(AltaricaTree *nodeField, NodeDecl &nodeDecl)
void getModel(AltaricaTree *tree, AltaricaModel &model)
void getEventDeclLt(AltaricaTree *eventLtNode, NodeDecl &nodeDecl, list< EventDecl::Reference > &events)
void altaricaNodeCheck(AltaricaTree *parent, AltaricaTree *node, unsigned type, const string &function)
void getNodeDeclStep1(AltaricaTree *tree, AltaricaModel &model)
const Assignment & getAssignment(AltaricaTree *assignmentNode, NodeDecl &nodeDecl)
STL namespace.
Diades::Utils::Logger parserLogger()
void getIdentifier(AltaricaTree *tree, Identifier &id)
void getIdList(AltaricaTree *idListNodeDecl, set< Identifier > &list)
void getNodeDeclEventsDecl(AltaricaTree *eventDeclNode, NodeDecl &nodeDecl)
void getSymbolSet(AltaricaTree *tree, AltaricaModel &model, ValueEnumeration &symbols)
void getNodeDeclVariablesDecl(AltaricaTree *nodeField, NodeDecl &nodeDecl)
void getConstant(AltaricaTree *tree, AltaricaModel &model)
void logUnexpectedNode(AltaricaTree *syntaxicalNode, const string &expected)
void getDomain(AltaricaTree *tree, AltaricaModel &model)
void getNodeDeclInitDecl(AltaricaTree *nodeField, NodeDecl &nodeDecl)
void logMissingNode(AltaricaTree *syntaxicalNodeDecl)
Diades::Utils::Log parserLog(const char *msg)
Namespace of the Diades project.
altarica_tree AltaricaTree
void getEventDeclDag(AltaricaTree *eventDagNodeDecl, NodeDecl &nodeDecl, list< EventDecl::Reference > &events)
void getEventDeclGt(AltaricaTree *eventLtNode, NodeDecl &nodeDecl, list< EventDecl::Reference > &events)
void getNodeDeclEventDeclDagList(AltaricaTree *eventDagListNodeDecl, NodeDecl &nodeDecl, list< EventDecl::Reference > &events)
void getNodeDeclStep2(AltaricaTree *tree, AltaricaModel &model)
void getNodeDeclEventDeclInstance(AltaricaTree *eventInstanceNode, list< Identifier > &path)
string seeLine(AltaricaTree *tree)
void getNodeDeclSyncVector(AltaricaTree *vectorNode, NodeDecl &nodeDecl)
string getLabelType(unsigned type)
vector< Value::ConstReference > ValueEnumeration
enumeration of Value elements (unicity and sorting is in charge of the user)
Definition: Value.hh:244
void getSubNodeDeclSet(AltaricaTree *nodeField, NodeDecl &nodeDecl)
const Domain & getDomainContent(AltaricaTree *tree, AltaricaModel &model, const Identifier &domainName)
Logging facilities for the Diades projects.
void getNodeDeclParamSetDecl(AltaricaTree *nodeField, NodeDecl &nodeDecl)
Diades::Utils::Log parserLogDebug(const char *msg)
void getNodeDeclTransitionsDef(AltaricaTree *transitionsDefNode, NodeDecl &nodeDecl)
void getTransitionTgt(AltaricaTree *transitionTgtNode, Transition &transition, NodeDecl &nodeDecl)
void getRange(AltaricaTree *tree, int &min, int &max, NodeDecl &node)
void getSubNodeDecl(AltaricaTree *nodeField, NodeDecl &nodeDecl)