About
User Reference
C++ API
luafaudes
Developer
Links
libFAUDES online
libFAUDES
C++ API
Sections
Sets
Generators
Functions
PlugIns
Tutorials
Index
Classes
Files
pd_test_util.h
Go to the documentation of this file.
1
/** @file pd_test_util.h Creation of test classes*/
2
3
4
/* Pushdown plugin for FAU Discrete Event Systems Library (libfaudes)
5
6
Copyright (C) 2013 Stefan Jacobi, Sven Schneider, Anne-Kathrin Hess
7
8
*/
9
10
#ifndef FAUDES_PD_TEST_UTIL_H
11
#define FAUDES_PD_TEST_UTIL_H
12
13
#include "
corefaudes.h
"
14
#include "
pd_include.h
"
15
16
namespace
faudes {
17
18
/**
19
* build a test generator
20
*
21
* @return
22
* the populated test generator
23
*/
24
PushdownGenerator
TestGenerator1
();
25
26
/**
27
* build a test generator
28
*
29
<Generator>
30
Generator
31
32
%
33
% Statistics for Generator
34
%
35
% States: 3
36
% Init/Marked: 1/1
37
% Events: 3
38
% Transitions: 4
39
% StateSymbols: 3
40
% Attrib. E/S/T: 1/0/4
41
%
42
43
<Alphabet>
44
lambda a +C+ b d
45
</Alphabet>
46
47
<States>
48
s1 s2 s3
49
</States>
50
51
<TransRel>
52
s1 a s2
53
++ +lambda+ +dot, dot+
54
s1 b s2
55
++ +square+ +dot, square+
56
s2 lambda s3
57
++ +dot, dot+ +square+
58
s3 b s1
59
++ +square+ +square+
60
</TransRel>
61
62
<InitStates>
63
s1
64
</InitStates>
65
66
<MarkedStates>
67
s2
68
</MarkedStates>
69
70
<StackSymbols>
71
lambda dot square bottom
72
</StackSymbols>
73
74
</Generator>
75
76
* @return
77
* the populated test generator
78
*/
79
PushdownGenerator
TestGenerator2
();
80
81
/**
82
<Generator>
83
Generator
84
85
%
86
% Statistics for Generator
87
%
88
% States: 3
89
% Init/Marked: 1/1
90
% Events: 2
91
% Transitions: 4
92
% StateSymbols: 3
93
% Attrib. E/S/T: 1/0/4
94
%
95
96
<Alphabet>
97
a +C+ b
98
</Alphabet>
99
100
<States>
101
s1 s2 s3
102
</States>
103
104
<TransRel>
105
s1 a s2
106
++ +dot+ +dot, dot+
107
s1 b s2
108
++ +square+ +dot, square+
109
s2 a s3
110
++ +dot+ +dot+
111
s3 b s1
112
++ +dot+ +dot+
113
</TransRel>
114
115
<InitStates>
116
s1
117
</InitStates>
118
119
<MarkedStates>
120
s2
121
</MarkedStates>
122
123
<StackSymbols>
124
lambda dot square
125
</StackSymbols>
126
127
</Generator>
128
*/
129
PushdownGenerator
TestGenerator3
();
130
131
/**
132
<Generator>
133
Generator
134
135
%
136
% Statistics for Generator
137
%
138
% States: 3
139
% Init/Marked: 1/1
140
% Events: 2
141
% Transitions: 4
142
% StateSymbols: 3
143
% Attrib. E/S/T: 1/0/4
144
%
145
146
<Alphabet>
147
a +C+ b
148
</Alphabet>
149
150
<States>
151
s1 s2 s3
152
</States>
153
154
<TransRel>
155
s1 a s2
156
++ +dot, dot, dot+ +dot, dot+
157
s1 b s2
158
++ +dot, square+ +dot, square+
159
s2 a s3
160
++ +dot, dot+ +dot+
161
s3 b s1
162
++ +dot+ +dot+
163
</TransRel>
164
165
<InitStates>
166
s1
167
</InitStates>
168
169
<MarkedStates>
170
s2
171
</MarkedStates>
172
173
<StackSymbols>
174
lambda dot square
175
</StackSymbols>
176
177
</Generator>
178
*/
179
PushdownGenerator
TestGenerator4
();
180
181
/**
182
<Generator>
183
Generator
184
185
%
186
% Statistics for Generator
187
%
188
% States: 3
189
% Init/Marked: 1/1
190
% Events: 3
191
% Transitions: 4
192
% StateSymbols: 3
193
% Attrib. E/S/T: 1/0/4
194
%
195
196
<Alphabet>
197
lambda a +C+ b
198
</Alphabet>
199
200
<States>
201
s1 s2 s3
202
</States>
203
204
<TransRel>
205
s1 a s2
206
++ +square+ +square+
207
s1 b s2
208
++ +dot+ +square+
209
s2 lambda s3
210
++ +dot+
211
+square, dot, dot+ +square+ +square+
212
s3 lambda s1
213
++ +square+
214
+lambda+ +square+ +square, dot+
215
</TransRel>
216
217
<InitStates>
218
s1
219
</InitStates>
220
221
<MarkedStates>
222
s2
223
</MarkedStates>
224
225
<StackSymbols>
226
lambda dot square
227
</StackSymbols>
228
229
</Generator>
230
231
*/
232
PushdownGenerator
TestGenerator5
();
233
234
PushdownGenerator
TestGenerator6
();
235
236
PushdownGenerator
TestGenerator7
();
237
238
PushdownGenerator
TestGenerator8
();
239
240
PushdownGenerator
TestGenerator9
();
241
242
PushdownGenerator
TestGenerator10
();
243
244
PushdownGenerator
TestGenerator11
();
245
246
PushdownGenerator
TestGenerator12
();
247
248
PushdownGenerator
TestGenerator13
();
249
250
PushdownGenerator
TestGenerator14
();
251
252
PushdownGenerator
TestGenerator15
();
253
254
PushdownGenerator
TestGenerator16
();
255
256
PushdownGenerator
TestGenerator17
();
257
258
PushdownGenerator
TestGenerator18
();
259
260
PushdownGenerator
TestGenerator19
();
261
262
PushdownGenerator
TestGenerator20
();
263
264
PushdownGenerator
TestGenerator21
();
265
266
PushdownGenerator
TestGenerator22
();
267
268
PushdownGenerator
TestGenerator23
();
269
270
PushdownGenerator
TestGenerator24
();
271
272
PushdownGenerator
TestGenerator25
();
273
274
/**
275
*
276
<Generator>
277
Generator
278
279
%
280
% Statistics for Generator
281
%
282
% States: 3
283
% Init/Marked: 1/1
284
% Events: 3
285
% Transitions: 5
286
% StateSymbols: 3
287
% Attrib. E/S/T: 2/0/0
288
%
289
290
<Alphabet>
291
a +C+ b c +C+
292
</Alphabet>
293
294
<States>
295
s1 s2 s3
296
</States>
297
298
<TransRel>
299
s1 a s2
300
s1 b s3
301
s1 c s3
302
s2 b s1
303
s3 a s2
304
</TransRel>
305
306
<InitStates>
307
s1
308
</InitStates>
309
310
<MarkedStates>
311
s3
312
</MarkedStates>
313
314
315
</Generator>
316
317
*
318
* @return
319
* the populated test system
320
*/
321
System
TestSystem1
();
322
323
System
TestSystem2
();
324
325
System
TestSystem3
();
326
327
System
TestSystem4
();
328
329
System
TestSystem5
();
330
331
/**
332
* build a test grammer based on the generator from TestGenerator()
333
*
334
* start symbol: (3, 2)
335
* nonterminals: (1, 2, 2), (2, 3, 3), (3, 2), (4, 3), (5, 3, 1)
336
* terminals: a, b
337
* grammar productions:
338
* (1, 2, 2) --> (2, 3, 3)
339
* (1, 2, 2) --> (5, 3, 1)
340
* (3, 2) --> (4, 3)b
341
* (4, 3) --> a(1, 2, 2)b
342
* (5, 3, 1) --> b
343
*
344
* @return
345
* the populated test grammar
346
*/
347
Grammar
TestGrammar1
();
348
349
/**
350
* build a test grammer based on the generator from TestGenerator()
351
*
352
* start symbol: (4, 3)
353
* nonterminals: (1, 2, 2), (2, 3, 3), (3, 2), (4, 3), (5, 3, 1)
354
* terminals: a, b
355
* grammar productions:
356
* (1, 2, 2) --> (2, 3, 3)
357
* (1, 2, 2) --> (5, 3, 1)
358
* (4, 3) --> a(1, 2, 2)b
359
* (5, 3, 1) --> b
360
* @return
361
* the populated test grammar
362
*/
363
Grammar
TestGrammar2
();
364
Grammar
TestGrammar3
();
365
Grammar
TestGrammar4
();
366
Grammar
TestGrammar5
();
367
Grammar
TestGrammar6
();
368
Grammar
TestGrammar7
();
369
Grammar
TestGrammar8
();
370
Grammar
TestGrammar9
();
371
Grammar
TestGrammar10
();
372
Grammar
TestGrammar11
();
373
374
/**
375
* write to console to indicate start of test
376
*
377
* @param name
378
* name of the test
379
*/
380
void
TestStart
(std::string name);
381
382
/**
383
* write to console to indicate end of test
384
*
385
* @param name
386
* name of the test
387
*/
388
void
TestEnd
(std::string name);
389
390
}
// namespace faudes
391
392
#endif
libFAUDES 2.26g
--- 2015.08.17 --- c++ api documentaion by
doxygen
>>
C++ API
Introduction
Sets
Generators
Functions
PlugIns
Tutorials
Classes
Files
Top of Page