libutap  0.93
Uppaal Timed Automata Parser
systembuilder.h
Go to the documentation of this file.
1 // -*- mode: C++; c-file-style: "stroustrup"; c-basic-offset: 4; indent-tabs-mode: nil; -*-
2 
3 /* libutap - Uppaal Timed Automata Parser.
4  Copyright (C) 2002-2004 Uppsala University and Aalborg University.
5 
6  This library is free software; you can redistribute it and/or
7  modify it under the terms of the GNU Lesser General Public License
8  as published by the Free Software Foundation; either version 2.1 of
9  the License, or (at your option) any later version.
10 
11  This library is distributed in the hope that it will be useful, but
12  WITHOUT ANY WARRANTY; without even the implied warranty of
13  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14  Lesser General Public License for more details.
15 
16  You should have received a copy of the GNU Lesser General Public
17  License along with this library; if not, write to the Free Software
18  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
19  USA
20 */
21 
22 #ifndef UTAP_SYSTEMBUILDER_H
23 #define UTAP_SYSTEMBUILDER_H
24 
25 #include "utap/statementbuilder.h"
26 #include "utap/utap.h"
27 
28 #include <cinttypes>
29 #include <cassert>
30 #include <vector>
31 
32 namespace UTAP
33 {
70  {
71  protected:
74 
77 
80 
83 
86 
89 
92 
94 
96 
97  //
98  // Method for handling types
99  //
100 
102 
103  variable_t *addVariable(type_t type, const char* name,
104  expression_t init) override;
105  bool addFunction(type_t type, const char* name) override;
106 
107  void addSelectSymbolToFrame(const char* name, frame_t&);
109 
110  public:
112 
113  void ganttDeclStart(const char* name) override;
114  void ganttDeclSelect(const char *id) override;
115  void ganttDeclEnd() override;
116  void ganttEntryStart() override;
117  void ganttEntrySelect(const char *id) override;
118  void ganttEntryEnd() override;
119  void declProgress(bool) override;
120  void procBegin(const char* name, const bool isTA = true,
121  const std::string type = "", const std::string mode = "") override;
122  void procEnd() override;
123  void procState(const char* name, bool hasInvariant, bool hasER) override;
124  void procStateCommit(const char* name) override;
125  void procStateUrgent(const char* name) override;
126  void procStateInit(const char* name) override;
127  void procBranchpoint(const char* name) override;
128  void procEdgeBegin(const char* from, const char* to, const bool control, const char* actname) override;
129  void procEdgeEnd(const char* from = 0, const char* to = 0) override;
130  void procSelect(const char *id) override;
131  void procGuard() override;
132  void procSync(Constants::synchronisation_t type) override;
133  void procUpdate() override;
134  void procProb() override;
135  void instantiationBegin(const char*, size_t, const char*) override;
136  void instantiationEnd(
137  const char *, size_t, const char *, size_t) override;
138  void process(const char*) override;
139  void processListEnd() override;
140  void done() override;
141  void beforeUpdate() override;
142  void afterUpdate() override;
143  void beginChanPriority() override;
144  void addChanPriority(char separator) override;
145  void defaultChanPriority() override;
146  void incProcPriority() override;
147  void procPriority(const char*) override;
148  void procInstanceLine() override;
149  void instanceName(const char* name, bool templ=true) override;
150  void instanceNameBegin(const char *name) override;
151  void instanceNameEnd(const char *name, size_t arguments) override;
152  void procMessage(const char* from, const char* to, const int loc, const bool pch) override;
153  void procMessage(Constants::synchronisation_t type) override;
154  void procCondition(const std::vector<char*> anchors, const int loc,
155  const bool pch, const bool hot) override;
156  void procCondition() override; // Label
157  void procLscUpdate(const char* anchor, const int loc, const bool pch) override;
158  void procLscUpdate() override; // Label
159  void hasPrechart(const bool pch) override;
160 
161  void exprSync(Constants::synchronisation_t type) override;
162  void declIO(const char*,int,int) override;
163  void declDynamicTemplate(const std::string&) override;
164 
165  void queryBegin() override;
166  void queryFormula(const char* formula, const char* location) override;
167  void queryComment(const char* comment) override;
168  void queryEnd() override;
169  };
170 }
171 #endif
void procLscUpdate() override
void procPriority(const char *) override
void exprSync(Constants::synchronisation_t type) override
void ganttEntrySelect(const char *id) override
void procProb() override
void procBegin(const char *name, const bool isTA=true, const std::string type="", const std::string mode="") override
void declHybridRec(expression_t)
void ganttEntryEnd() override
void incProcPriority() override
void procMessage(const char *from, const char *to, const int loc, const bool pch) override
Add a message to the current template.
void ganttDeclEnd() override
void beforeUpdate() override
void processListEnd() override
void procUpdate() override
This class constructs a TimedAutomataSystem.
Definition: systembuilder.h:69
void addSelectSymbolToFrame(const char *name, frame_t &)
edge_t * currentEdge
The edge under construction.
Definition: systembuilder.h:76
void queryEnd() override
Information about an edge.
Definition: system.h:85
void declDynamicTemplate(const std::string &) override
Dynamic.
void process(const char *) override
Information about an update.
Definition: system.h:213
void addChanPriority(char separator) override
void ganttDeclStart(const char *name) override
void afterUpdate() override
variable_t * addVariable(type_t type, const char *name, expression_t init) override
void instanceNameBegin(const char *name) override
bool addFunction(type_t type, const char *name) override
Partial implementation of the builder interface, useful for building something with statements that i...
Gantt chart entry.
Definition: system.h:148
condition_t * currentCondition
The condition under construction.
Definition: systembuilder.h:82
void instantiationEnd(const char *, size_t, const char *, size_t) override
Information about an instance line.
Definition: system.h:346
void procCondition() override
#define comment
Definition: lexer.cc:856
void procSelect(const char *id) override
Base type for variables, clocks, etc.
Definition: system.h:43
void done() override
SystemBuilder(TimedAutomataSystem *)
void procInstanceLine() override
Adds an instance line to the current template.
void procEnd() override
void beginChanPriority() override
void ganttEntryStart() override
A reference to a frame.
Definition: symbols.h:183
void instantiationBegin(const char *, size_t, const char *) override
A reference to a type.
Definition: type.h:93
void procStateInit(const char *name) override
void defaultChanPriority() override
void procEdgeBegin(const char *from, const char *to, const bool control, const char *actname) override
void procGuard() override
void procBranchpoint(const char *name) override
Information about a message.
Definition: system.h:188
A reference to an expression.
Definition: expression.h:70
void queryBegin() override
Verification queries.
void procSync(Constants::synchronisation_t type) override
void instanceName(const char *name, bool templ=true) override
templ is true if the name of the instance contains parameters like "Train(1)".
declarations_t * getCurrentDeclarationBlock()
query_t * currentQuery
Definition: systembuilder.h:95
void declProgress(bool) override
Guard progress measure declaration.
void procStateCommit(const char *name) override
void procEdgeEnd(const char *from=0, const char *to=0) override
update_t * currentUpdate
The update under construction.
Definition: systembuilder.h:85
iodecl_t * currentIODecl
Definition: systembuilder.h:93
Definition: lexer.cc:817
void declIO(const char *, int, int) override
instanceLine_t * currentInstanceLine
The instance line under construction.
Definition: systembuilder.h:91
message_t * currentMessage
The message under construction.
Definition: systembuilder.h:88
void ganttDeclSelect(const char *id) override
void instanceNameEnd(const char *name, size_t arguments) override
void procStateUrgent(const char *name) override
void hasPrechart(const bool pch) override
int32_t currentProcPriority
The current process priority level.
Definition: systembuilder.h:73
Information about a condition.
Definition: system.h:200
void procState(const char *name, bool hasInvariant, bool hasER) override
Add a state to the current template.
gantt_t * currentGantt
The gantt map under construction.
Definition: systembuilder.h:79
void queryComment(const char *comment) override
void queryFormula(const char *formula, const char *location) override