libutap
Main Page
Namespaces
Classes
Files
File List
File Members
src
utap
common.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-2006 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_COMMON_HH
23
#define UTAP_COMMON_HH
24
25
#ifdef __MINGW32__
26
#include <stdint.h>
27
#else
28
#include <inttypes.h>
29
#endif
30
#include <string>
31
#include <vector>
32
33
namespace
UTAP
34
{
35
namespace
Constants
36
{
37
enum
kind_t
38
{
39
PLUS
,
40
MINUS
,
41
MULT
,
42
DIV
,
43
MOD
,
44
BIT_AND
,
45
BIT_OR
,
46
BIT_XOR
,
47
BIT_LSHIFT
,
48
BIT_RSHIFT
,
49
AND
,
50
OR
,
51
XOR
,
52
MIN
,
53
MAX
,
54
RATE
,
55
FRACTION
,
56
57
/********************************************************
58
* Relational operators
59
*/
60
LT
,
61
LE
,
62
EQ
,
63
NEQ
,
64
GE
,
65
GT
,
66
67
/********************************************************
68
* TIGA operators in properties.
69
*/
70
SIMULATION_LE
,
71
SIMULATION_GE
,
72
REFINEMENT_LE
,
73
REFINEMENT_GE
,
74
TIOCOMPOSITION
,
75
TIOCONJUNCTION
,
76
TIOQUOTIENT
,
77
78
/********************************************************
79
* Unary operators
80
*/
81
NOT
,
82
FORALL
,
83
EXISTS
,
84
SUM
,
85
86
/********************************************************
87
* Built-in functions
88
*/
89
COS_F
,
90
SIN_F
,
91
LOG_F
,
92
EXP_F
,
93
SQRT_F
,
94
RANDOM_F
,
95
FABS_F
,
96
LN_F
,
97
POW_F
,
98
CEIL_F
,
99
FLOOR_F
,
100
101
/********************************************************
102
* Assignment operators
103
*/
104
ASSIGN
,
105
ASSPLUS
,
106
ASSMINUS
,
107
ASSDIV
,
108
ASSMOD
,
109
ASSMULT
,
110
ASSAND
,
111
ASSOR
,
112
ASSXOR
,
113
ASSLSHIFT
,
114
ASSRSHIFT
,
115
116
/*******************************************************
117
* CTL Quantifiers
118
*/
119
EF
,
120
EG
,
121
AF
,
122
AG
,
123
LEADSTO
,
124
A_UNTIL
,
125
A_WEAKUNTIL
,
126
AG_R_Piotr
,
127
EF_R_Piotr
,
128
A_BUCHI
,
129
PMAX
,
130
PROBAMINBOX
,
131
PROBAMINDIAMOND
,
132
PROBABOX
,
133
PROBADIAMOND
,
134
PROBACMP
,
135
PROBAEXP
,
136
SIMULATE
,
137
SIMULATEREACH
,
138
BOX
,
139
DIAMOND
,
140
141
/*******************************************************
142
* Control Synthesis Operator
143
*/
144
CONTROL
,
145
PO_CONTROL
,
146
EF_CONTROL
,
147
CONTROL_TOPT
,
148
CONTROL_TOPT_DEF1
,
149
CONTROL_TOPT_DEF2
,
150
SMC_CONTROL
,
151
CONSISTENCY
,
152
RESTRICT
,
153
IMPLEMENTATION
,
154
SPECIFICATION
,
155
SYNTAX_COMPOSITION
,
156
157
/*******************************************************
158
* Get supremum or infimum of variables/clocks
159
*/
160
SUP_VAR
,
INF_VAR
,
161
162
/*******************************************************
163
* Verify a LSC scenario
164
*/
165
SCENARIO
,
//identifier of the LSC instance
166
SCENARIO2
,
//scenario property of size 2 "obsTA.lmin --> obsTA.lmax"
167
168
/*******************************************************
169
* Additional constants used by ExpressionProgram's and
170
* the TypeCheckBuilder (but not by the parser, although
171
* some of then ought to be used, FIXME).
172
*/
173
IDENTIFIER
,
174
CONSTANT
,
175
ARRAY
,
176
POSTINCREMENT
,
177
PREINCREMENT
,
178
POSTDECREMENT
,
179
PREDECREMENT
,
180
UNARY_MINUS
,
181
LIST
,
182
DOT
,
183
INLINEIF
,
184
COMMA
,
185
SYNC
,
186
DEADLOCK
,
187
FUNCALL
,
188
189
/*******************************************************
190
* Types
191
*/
192
UNKNOWN
,
193
VOID_TYPE
,
194
CLOCK
,
195
INT
,
196
DOUBLE
,
197
BOOL
,
198
SCALAR
,
199
LOCATION
,
200
CHANNEL
,
201
COST
,
202
INVARIANT
,
203
INVARIANT_WR
,
204
GUARD
,
205
DIFF
,
206
CONSTRAINT
,
207
FORMULA
,
208
BRANCHPOINT
,
209
PROBABILITY
,
210
TIOGRAPH
,
211
//LSC
212
INSTANCELINE
,
213
MESSAGE
,
214
CONDITION
,
215
UPDATE
,
216
217
RANGE
,
218
LABEL
,
219
RECORD
,
220
REF
,
221
URGENT
,
222
COMMITTED
,
223
BROADCAST
,
224
HYBRID
,
225
TYPEDEF
,
226
PROCESS
,
227
PROCESSSET
,
228
INSTANCE
,
// TA template (instantiated or not)
229
SYSTEM_META
,
230
FUNCTION
,
231
LSCINSTANCE
,
// LSC template (instantiated or not)
232
233
234
/******************************************************
235
* MITL Extension
236
*/
237
MITLFORMULA
,
238
MITLRELEASE
,
239
MITLUNTIL
,
240
MITLCONJ
,
241
MITLDISJ
,
242
MITLNEXT
,
243
MITLATOM
,
244
MITLEXISTS
,
245
MITLFORALL
,
246
/*Dynamic */
247
SPAWN
,
248
EXIT
,
249
NUMOF
,
250
FORALLDYNAMIC
,
251
EXISTSDYNAMIC
,
252
SUMDYNAMIC
,
253
FOREACHDYNAMIC
,
254
DYNAMICEVAL
,
255
PROCESSVAR
,
256
DOUBLEINVGUARD
,
257
258
};
259
260
/**********************************************************
261
* Synchronisations:
262
*/
263
enum
synchronisation_t
264
{
265
SYNC_QUE
,
266
SYNC_BANG
,
267
SYNC_CSP
268
};
269
}
270
272
typedef
enum
273
{
274
S_XTA
,
// entire system
275
S_DECLARATION
,
S_LOCAL_DECL
,
S_INST
,
S_SYSTEM
,
S_PARAMETERS
,
276
S_INVARIANT
,
S_EXPONENTIALRATE
,
S_SELECT
,
S_GUARD
,
S_SYNC
,
S_ASSIGN
,
277
S_EXPRESSION
,
S_EXPRESSION_LIST
,
S_PROPERTY
,
S_XTA_PROCESS
,
278
S_PROBABILITY
,
/*LSC*/
S_INSTANCELINE
,
S_MESSAGE
,
S_UPDATE
,
S_CONDITION
279
}
xta_part_t
;
280
281
}
282
283
#endif
UTAP::Constants::SCALAR
Definition:
common.h:198
UTAP::Constants::MITLDISJ
Definition:
common.h:241
UTAP::Constants::PROBABILITY
Definition:
common.h:209
UTAP::Constants::DOUBLEINVGUARD
Definition:
common.h:256
UTAP::Constants::SYNC
Definition:
common.h:185
UTAP::Constants::BIT_AND
Definition:
common.h:44
UTAP::Constants::SUM
Definition:
common.h:84
UTAP::Constants::ASSDIV
Definition:
common.h:107
UTAP::Constants::SIMULATE
Definition:
common.h:136
UTAP::Constants::FLOOR_F
Definition:
common.h:99
UTAP::S_MESSAGE
Definition:
common.h:278
UTAP::Constants::CONSTRAINT
Definition:
common.h:206
UTAP::Constants::RESTRICT
Definition:
common.h:152
UTAP::Constants::LSCINSTANCE
Definition:
common.h:231
UTAP::Constants::MITLCONJ
Definition:
common.h:240
UTAP::Constants::DYNAMICEVAL
Definition:
common.h:254
UTAP::S_INVARIANT
Definition:
common.h:276
UTAP::Constants::FUNCTION
Definition:
common.h:230
UTAP::Constants::FORALLDYNAMIC
Definition:
common.h:250
UTAP::S_LOCAL_DECL
Definition:
common.h:275
UTAP::Constants::SIN_F
Definition:
common.h:90
UTAP::Constants::LIST
Definition:
common.h:181
UTAP::Constants::MITLNEXT
Definition:
common.h:242
UTAP::Constants::SYSTEM_META
Definition:
common.h:229
UTAP::Constants::SIMULATION_LE
Definition:
common.h:70
UTAP::Constants::MOD
Definition:
common.h:43
UTAP::Constants::BOX
Definition:
common.h:138
UTAP::S_PARAMETERS
Definition:
common.h:275
UTAP::Constants::PREINCREMENT
Definition:
common.h:177
UTAP::Constants::DOUBLE
Definition:
common.h:196
UTAP::xta_part_t
xta_part_t
Type for specifying which XTA part to parse (syntax switch)
Definition:
common.h:272
UTAP::Constants::TIOCOMPOSITION
Definition:
common.h:74
UTAP::Constants::COS_F
Definition:
common.h:89
UTAP::S_EXPRESSION
Definition:
common.h:277
UTAP::Constants::PROCESS
Definition:
common.h:226
UTAP::Constants::BRANCHPOINT
Definition:
common.h:208
UTAP::S_XTA
Definition:
common.h:274
UTAP::Constants::MAX
Definition:
common.h:53
UTAP::Constants::PLUS
Definition:
common.h:39
UTAP::Constants::MITLFORMULA
Definition:
common.h:237
UTAP::S_PROPERTY
Definition:
common.h:277
UTAP::Constants::A_WEAKUNTIL
Definition:
common.h:125
UTAP::Constants::INT
Definition:
common.h:195
UTAP::Constants::PROBAMINDIAMOND
Definition:
common.h:131
UTAP::Constants::A_UNTIL
Definition:
common.h:124
UTAP::Constants::COMMITTED
Definition:
common.h:222
UTAP::Constants::SIMULATEREACH
Definition:
common.h:137
UTAP::Constants::SYNC_BANG
Definition:
common.h:266
UTAP::Constants::BIT_XOR
Definition:
common.h:46
UTAP::Constants::NEQ
Definition:
common.h:63
UTAP::Constants::PROCESSSET
Definition:
common.h:227
UTAP::Constants::MITLUNTIL
Definition:
common.h:239
UTAP::Constants::TIOQUOTIENT
Definition:
common.h:76
UTAP
Definition:
lexer.cc:585
UTAP::Constants::GT
Definition:
common.h:65
UTAP::Constants::BIT_LSHIFT
Definition:
common.h:47
UTAP::Constants::CONTROL_TOPT_DEF2
Definition:
common.h:149
UTAP::Constants::ASSXOR
Definition:
common.h:112
UTAP::Constants::ASSMOD
Definition:
common.h:108
UTAP::Constants::REF
Definition:
common.h:220
UTAP::Constants::DIAMOND
Definition:
common.h:139
UTAP::Constants::SPECIFICATION
Definition:
common.h:154
UTAP::Constants::CONTROL
Definition:
common.h:144
UTAP::Constants::kind_t
kind_t
Definition:
common.h:37
UTAP::Constants::NUMOF
Definition:
common.h:249
UTAP::Constants::INLINEIF
Definition:
common.h:183
UTAP::Constants::TIOGRAPH
Definition:
common.h:210
UTAP::Constants::PROBAEXP
Definition:
common.h:135
UTAP::Constants::SYNC_CSP
Definition:
common.h:267
UTAP::Constants::ARRAY
Definition:
common.h:175
UTAP::Constants::EXISTSDYNAMIC
Definition:
common.h:251
UTAP::S_SELECT
Definition:
common.h:276
UTAP::Constants::LOCATION
Definition:
common.h:199
UTAP::Constants::ASSIGN
Definition:
common.h:104
UTAP::Constants::DIV
Definition:
common.h:42
UTAP::Constants::DOT
Definition:
common.h:182
UTAP::Constants::INF_VAR
Definition:
common.h:160
UTAP::S_EXPRESSION_LIST
Definition:
common.h:277
UTAP::Constants::GUARD
Definition:
common.h:204
UTAP::Constants::SUMDYNAMIC
Definition:
common.h:252
UTAP::Constants::CONSISTENCY
Definition:
common.h:151
UTAP::Constants::FORALL
Definition:
common.h:82
UTAP::Constants::CONTROL_TOPT_DEF1
Definition:
common.h:148
UTAP::Constants::EF_R_Piotr
Definition:
common.h:127
UTAP::Constants::NOT
Definition:
common.h:81
UTAP::S_SYNC
Definition:
common.h:276
UTAP::Constants::PROCESSVAR
Definition:
common.h:255
UTAP::Constants::BOOL
Definition:
common.h:197
UTAP::S_ASSIGN
Definition:
common.h:276
UTAP::Constants::FOREACHDYNAMIC
Definition:
common.h:253
UTAP::Constants::PO_CONTROL
Definition:
common.h:145
UTAP::Constants::PROBABOX
Definition:
common.h:132
UTAP::Constants::SMC_CONTROL
Definition:
common.h:150
UTAP::Constants::BIT_OR
Definition:
common.h:45
UTAP::Constants::DEADLOCK
Definition:
common.h:186
UTAP::Constants::OR
Definition:
common.h:50
UTAP::Constants::EF
Definition:
common.h:119
UTAP::Constants::EQ
Definition:
common.h:62
UTAP::Constants::synchronisation_t
synchronisation_t
Definition:
common.h:263
UTAP::Constants::REFINEMENT_GE
Definition:
common.h:73
UTAP::Constants::POSTINCREMENT
Definition:
common.h:176
UTAP::Constants::COMMA
Definition:
common.h:184
UTAP::Constants::LOG_F
Definition:
common.h:91
UTAP::Constants::ASSMINUS
Definition:
common.h:106
UTAP::Constants::PREDECREMENT
Definition:
common.h:179
UTAP::Constants::UPDATE
Definition:
common.h:215
UTAP::Constants::XOR
Definition:
common.h:51
UTAP::Constants::LT
Definition:
common.h:60
UTAP::Constants::INSTANCE
Definition:
common.h:228
UTAP::Constants::REFINEMENT_LE
Definition:
common.h:72
UTAP::Constants::BIT_RSHIFT
Definition:
common.h:48
UTAP::Constants::RATE
Definition:
common.h:54
UTAP::Constants::FORMULA
Definition:
common.h:207
UTAP::Constants::PMAX
Definition:
common.h:129
UTAP::Constants::LN_F
Definition:
common.h:96
UTAP::Constants::BROADCAST
Definition:
common.h:223
UTAP::Constants::SYNC_QUE
Definition:
common.h:265
UTAP::Constants::ASSRSHIFT
Definition:
common.h:114
UTAP::S_CONDITION
Definition:
common.h:278
UTAP::Constants::SPAWN
Definition:
common.h:247
UTAP::Constants::POSTDECREMENT
Definition:
common.h:178
UTAP::Constants::ASSPLUS
Definition:
common.h:105
UTAP::Constants::ASSAND
Definition:
common.h:110
UTAP::Constants::RECORD
Definition:
common.h:219
UTAP::Constants::IMPLEMENTATION
Definition:
common.h:153
UTAP::Constants::MITLEXISTS
Definition:
common.h:244
UTAP::Constants::TIOCONJUNCTION
Definition:
common.h:75
UTAP::Constants::SQRT_F
Definition:
common.h:93
UTAP::Constants::ASSMULT
Definition:
common.h:109
UTAP::Constants::SCENARIO2
Definition:
common.h:166
UTAP::S_UPDATE
Definition:
common.h:278
UTAP::Constants::EG
Definition:
common.h:120
UTAP::Constants::CONDITION
Definition:
common.h:214
UTAP::Constants::EXIT
Definition:
common.h:248
UTAP::Constants::SYNTAX_COMPOSITION
Definition:
common.h:155
UTAP::Constants::PROBADIAMOND
Definition:
common.h:133
UTAP::S_DECLARATION
Definition:
common.h:275
UTAP::Constants::CHANNEL
Definition:
common.h:200
UTAP::Constants::URGENT
Definition:
common.h:221
UTAP::Constants::CLOCK
Definition:
common.h:194
UTAP::Constants::CEIL_F
Definition:
common.h:98
UTAP::Constants::A_BUCHI
Definition:
common.h:128
UTAP::Constants::AG_R_Piotr
Definition:
common.h:126
UTAP::Constants::GE
Definition:
common.h:64
UTAP::Constants::TYPEDEF
Definition:
common.h:225
UTAP::Constants::RANGE
Definition:
common.h:217
UTAP::Constants::MITLATOM
Definition:
common.h:243
UTAP::Constants::ASSOR
Definition:
common.h:111
UTAP::Constants::AND
Definition:
common.h:49
UTAP::Constants::LE
Definition:
common.h:61
UTAP::Constants::SCENARIO
Definition:
common.h:165
UTAP::Constants::RANDOM_F
Definition:
common.h:94
UTAP::Constants::MIN
Definition:
common.h:52
UTAP::S_GUARD
Definition:
common.h:276
UTAP::Constants::EXISTS
Definition:
common.h:83
UTAP::S_PROBABILITY
Definition:
common.h:278
UTAP::Constants::INVARIANT
Definition:
common.h:202
UTAP::S_EXPONENTIALRATE
Definition:
common.h:276
UTAP::Constants::HYBRID
Definition:
common.h:224
UTAP::S_INSTANCELINE
Definition:
common.h:278
UTAP::Constants::INSTANCELINE
Definition:
common.h:212
UTAP::Constants::MULT
Definition:
common.h:41
UTAP::Constants::CONSTANT
Definition:
common.h:174
UTAP::S_XTA_PROCESS
Definition:
common.h:277
UTAP::Constants::MESSAGE
Definition:
common.h:213
UTAP::Constants::FRACTION
Definition:
common.h:55
UTAP::Constants::SUP_VAR
Definition:
common.h:160
UTAP::Constants::COST
Definition:
common.h:201
UTAP::Constants::POW_F
Definition:
common.h:97
UTAP::S_SYSTEM
Definition:
common.h:275
UTAP::Constants::PROBACMP
Definition:
common.h:134
UTAP::Constants::FABS_F
Definition:
common.h:95
UTAP::Constants::FUNCALL
Definition:
common.h:187
UTAP::Constants::AG
Definition:
common.h:122
UTAP::Constants::EF_CONTROL
Definition:
common.h:146
UTAP::Constants::LABEL
Definition:
common.h:218
UTAP::Constants::MITLFORALL
Definition:
common.h:245
UTAP::Constants::UNARY_MINUS
Definition:
common.h:180
UTAP::Constants::PROBAMINBOX
Definition:
common.h:130
UTAP::Constants::LEADSTO
Definition:
common.h:123
UTAP::Constants::SIMULATION_GE
Definition:
common.h:71
UTAP::Constants::EXP_F
Definition:
common.h:92
UTAP::Constants::UNKNOWN
Definition:
common.h:192
UTAP::Constants::CONTROL_TOPT
Definition:
common.h:147
UTAP::Constants::VOID_TYPE
Definition:
common.h:193
UTAP::Constants::INVARIANT_WR
Definition:
common.h:203
UTAP::Constants::IDENTIFIER
Definition:
common.h:173
UTAP::S_INST
Definition:
common.h:275
UTAP::Constants::ASSLSHIFT
Definition:
common.h:113
UTAP::Constants::MITLRELEASE
Definition:
common.h:238
UTAP::Constants::DIFF
Definition:
common.h:205
UTAP::Constants::AF
Definition:
common.h:121
UTAP::Constants::MINUS
Definition:
common.h:40
Generated on Mon Mar 30 2015 12:09:21 for libutap by
1.8.8