mCRL2
Loading...
Searching...
No Matches
builder.h
Go to the documentation of this file.
1// Author(s): Wieger Wesselink
2// Copyright: see the accompanying file COPYING or copy at
3// https://github.com/mCRL2org/mCRL2/blob/master/COPYING
4//
5// Distributed under the Boost Software License, Version 1.0.
6// (See accompanying file LICENSE_1_0.txt or copy at
7// http://www.boost.org/LICENSE_1_0.txt)
8//
9/// \file mcrl2/pbes/builder.h
10/// \brief add your file description here.
11
12#ifndef MCRL2_PBES_BUILDER_H
13#define MCRL2_PBES_BUILDER_H
14
15#include "mcrl2/data/builder.h"
16#include "mcrl2/pbes/pbes.h"
17
18namespace mcrl2
19{
20
21namespace pbes_system
22{
23
24/// \brief Builder class
25template <typename Derived>
27{
28 typedef core::builder<Derived> super;
29 using super::enter;
30 using super::leave;
31 using super::update;
32 using super::apply;
33
34 template <class T>
35 void apply(T& result, const data::data_expression& x)
36 {
37 result = x;
38 }
39};
40
41// Adds sort expression traversal to a builder
42//--- start generated add_sort_expressions code ---//
43template <template <class> class Builder, class Derived>
44struct add_sort_expressions: public Builder<Derived>
45{
46 typedef Builder<Derived> super;
47 using super::enter;
48 using super::leave;
49 using super::update;
50 using super::apply;
51
52 template <class T>
53 void apply(T& result, const pbes_system::propositional_variable& x)
54 {
55
56 static_cast<Derived&>(*this).enter(x);
57 pbes_system::make_propositional_variable(result, x.name(), [&](data::variable_list& result){ static_cast<Derived&>(*this).apply(result, x.parameters()); });
58 static_cast<Derived&>(*this).leave(x);
59 }
60
62 {
63 static_cast<Derived&>(*this).enter(x);
64 propositional_variable result_variable;
65 static_cast<Derived&>(*this).apply(result_variable, x.variable());
66 x.variable() = result_variable;
67 pbes_expression result_formula;
68 static_cast<Derived&>(*this).apply(result_formula, x.formula());
69 x.formula() = result_formula;
70 static_cast<Derived&>(*this).leave(x);
71 }
72
74 {
75 static_cast<Derived&>(*this).enter(x);
76 static_cast<Derived&>(*this).update(x.global_variables());
77 static_cast<Derived&>(*this).update(x.equations());
78 propositional_variable_instantiation result_initial_state;
79 static_cast<Derived&>(*this).apply(result_initial_state, x.initial_state());
80 x.initial_state() = result_initial_state;
81 static_cast<Derived&>(*this).leave(x);
82 }
83
84 template <class T>
86 {
87
88 static_cast<Derived&>(*this).enter(x);
89 pbes_system::make_propositional_variable_instantiation(result, x.name(), [&](data::data_expression_list& result){ static_cast<Derived&>(*this).apply(result, x.parameters()); });
90 static_cast<Derived&>(*this).leave(x);
91 }
92
93 template <class T>
94 void apply(T& result, const pbes_system::not_& x)
95 {
96
97 static_cast<Derived&>(*this).enter(x);
98 pbes_system::make_not_(result, [&](pbes_expression& result){ static_cast<Derived&>(*this).apply(result, x.operand()); });
99 static_cast<Derived&>(*this).leave(x);
100 }
101
102 template <class T>
103 void apply(T& result, const pbes_system::and_& x)
104 {
105
106 static_cast<Derived&>(*this).enter(x);
107 pbes_system::make_and_(result, [&](pbes_expression& result){ static_cast<Derived&>(*this).apply(result, x.left()); }, [&](pbes_expression& result){ static_cast<Derived&>(*this).apply(result, x.right()); });
108 static_cast<Derived&>(*this).leave(x);
109 }
110
111 template <class T>
112 void apply(T& result, const pbes_system::or_& x)
113 {
114
115 static_cast<Derived&>(*this).enter(x);
116 pbes_system::make_or_(result, [&](pbes_expression& result){ static_cast<Derived&>(*this).apply(result, x.left()); }, [&](pbes_expression& result){ static_cast<Derived&>(*this).apply(result, x.right()); });
117 static_cast<Derived&>(*this).leave(x);
118 }
119
120 template <class T>
121 void apply(T& result, const pbes_system::imp& x)
122 {
123
124 static_cast<Derived&>(*this).enter(x);
125 pbes_system::make_imp(result, [&](pbes_expression& result){ static_cast<Derived&>(*this).apply(result, x.left()); }, [&](pbes_expression& result){ static_cast<Derived&>(*this).apply(result, x.right()); });
126 static_cast<Derived&>(*this).leave(x);
127 }
128
129 template <class T>
130 void apply(T& result, const pbes_system::forall& x)
131 {
132
133 static_cast<Derived&>(*this).enter(x);
134 pbes_system::make_forall(result, [&](data::variable_list& result){ static_cast<Derived&>(*this).apply(result, x.variables()); }, [&](pbes_expression& result){ static_cast<Derived&>(*this).apply(result, x.body()); });
135 static_cast<Derived&>(*this).leave(x);
136 }
137
138 template <class T>
139 void apply(T& result, const pbes_system::exists& x)
140 {
141
142 static_cast<Derived&>(*this).enter(x);
143 pbes_system::make_exists(result, [&](data::variable_list& result){ static_cast<Derived&>(*this).apply(result, x.variables()); }, [&](pbes_expression& result){ static_cast<Derived&>(*this).apply(result, x.body()); });
144 static_cast<Derived&>(*this).leave(x);
145 }
146
147 template <class T>
148 void apply(T& result, const pbes_system::pbes_expression& x)
149 {
150
151 static_cast<Derived&>(*this).enter(x);
153 {
154 static_cast<Derived&>(*this).apply(result, atermpp::down_cast<data::data_expression>(x));
155 }
156 else if (data::is_variable(x))
157 {
158 static_cast<Derived&>(*this).apply(result, atermpp::down_cast<data::variable>(x));
159 }
161 {
162 static_cast<Derived&>(*this).apply(result, atermpp::down_cast<data::untyped_data_parameter>(x));
163 }
165 {
166 static_cast<Derived&>(*this).apply(result, atermpp::down_cast<pbes_system::propositional_variable_instantiation>(x));
167 }
168 else if (pbes_system::is_not(x))
169 {
170 static_cast<Derived&>(*this).apply(result, atermpp::down_cast<pbes_system::not_>(x));
171 }
172 else if (pbes_system::is_and(x))
173 {
174 static_cast<Derived&>(*this).apply(result, atermpp::down_cast<pbes_system::and_>(x));
175 }
176 else if (pbes_system::is_or(x))
177 {
178 static_cast<Derived&>(*this).apply(result, atermpp::down_cast<pbes_system::or_>(x));
179 }
180 else if (pbes_system::is_imp(x))
181 {
182 static_cast<Derived&>(*this).apply(result, atermpp::down_cast<pbes_system::imp>(x));
183 }
184 else if (pbes_system::is_forall(x))
185 {
186 static_cast<Derived&>(*this).apply(result, atermpp::down_cast<pbes_system::forall>(x));
187 }
188 else if (pbes_system::is_exists(x))
189 {
190 static_cast<Derived&>(*this).apply(result, atermpp::down_cast<pbes_system::exists>(x));
191 }
192 static_cast<Derived&>(*this).leave(x);
193 }
194
195};
196
197/// \\brief Builder class
198template <typename Derived>
200{
201};
202//--- end generated add_sort_expressions code ---//
203
204// Adds data expression traversal to a builder
205//--- start generated add_data_expressions code ---//
206template <template <class> class Builder, class Derived>
207struct add_data_expressions: public Builder<Derived>
208{
209 typedef Builder<Derived> super;
210 using super::enter;
211 using super::leave;
212 using super::update;
213 using super::apply;
214
216 {
217 static_cast<Derived&>(*this).enter(x);
218 pbes_expression result_formula;
219 static_cast<Derived&>(*this).apply(result_formula, x.formula());
220 x.formula() = result_formula;
221 static_cast<Derived&>(*this).leave(x);
222 }
223
225 {
226 static_cast<Derived&>(*this).enter(x);
227 static_cast<Derived&>(*this).update(x.equations());
228 propositional_variable_instantiation result_initial_state;
229 static_cast<Derived&>(*this).apply(result_initial_state, x.initial_state());
230 x.initial_state() = result_initial_state;
231 static_cast<Derived&>(*this).leave(x);
232 }
233
234 template <class T>
236 {
237
238 static_cast<Derived&>(*this).enter(x);
239 pbes_system::make_propositional_variable_instantiation(result, x.name(), [&](data::data_expression_list& result){ static_cast<Derived&>(*this).apply(result, x.parameters()); });
240 static_cast<Derived&>(*this).leave(x);
241 }
242
243 template <class T>
244 void apply(T& result, const pbes_system::not_& x)
245 {
246
247 static_cast<Derived&>(*this).enter(x);
248 pbes_system::make_not_(result, [&](pbes_expression& result){ static_cast<Derived&>(*this).apply(result, x.operand()); });
249 static_cast<Derived&>(*this).leave(x);
250 }
251
252 template <class T>
253 void apply(T& result, const pbes_system::and_& x)
254 {
255
256 static_cast<Derived&>(*this).enter(x);
257 pbes_system::make_and_(result, [&](pbes_expression& result){ static_cast<Derived&>(*this).apply(result, x.left()); }, [&](pbes_expression& result){ static_cast<Derived&>(*this).apply(result, x.right()); });
258 static_cast<Derived&>(*this).leave(x);
259 }
260
261 template <class T>
262 void apply(T& result, const pbes_system::or_& x)
263 {
264
265 static_cast<Derived&>(*this).enter(x);
266 pbes_system::make_or_(result, [&](pbes_expression& result){ static_cast<Derived&>(*this).apply(result, x.left()); }, [&](pbes_expression& result){ static_cast<Derived&>(*this).apply(result, x.right()); });
267 static_cast<Derived&>(*this).leave(x);
268 }
269
270 template <class T>
271 void apply(T& result, const pbes_system::imp& x)
272 {
273
274 static_cast<Derived&>(*this).enter(x);
275 pbes_system::make_imp(result, [&](pbes_expression& result){ static_cast<Derived&>(*this).apply(result, x.left()); }, [&](pbes_expression& result){ static_cast<Derived&>(*this).apply(result, x.right()); });
276 static_cast<Derived&>(*this).leave(x);
277 }
278
279 template <class T>
280 void apply(T& result, const pbes_system::forall& x)
281 {
282
283 static_cast<Derived&>(*this).enter(x);
284 pbes_system::make_forall(result, x.variables(), [&](pbes_expression& result){ static_cast<Derived&>(*this).apply(result, x.body()); });
285 static_cast<Derived&>(*this).leave(x);
286 }
287
288 template <class T>
289 void apply(T& result, const pbes_system::exists& x)
290 {
291
292 static_cast<Derived&>(*this).enter(x);
293 pbes_system::make_exists(result, x.variables(), [&](pbes_expression& result){ static_cast<Derived&>(*this).apply(result, x.body()); });
294 static_cast<Derived&>(*this).leave(x);
295 }
296
297 template <class T>
298 void apply(T& result, const pbes_system::pbes_expression& x)
299 {
300
301 static_cast<Derived&>(*this).enter(x);
303 {
304 static_cast<Derived&>(*this).apply(result, atermpp::down_cast<data::data_expression>(x));
305 }
306 else if (data::is_variable(x))
307 {
308 static_cast<Derived&>(*this).apply(result, atermpp::down_cast<data::variable>(x));
309 }
311 {
312 static_cast<Derived&>(*this).apply(result, atermpp::down_cast<data::untyped_data_parameter>(x));
313 }
315 {
316 static_cast<Derived&>(*this).apply(result, atermpp::down_cast<pbes_system::propositional_variable_instantiation>(x));
317 }
318 else if (pbes_system::is_not(x))
319 {
320 static_cast<Derived&>(*this).apply(result, atermpp::down_cast<pbes_system::not_>(x));
321 }
322 else if (pbes_system::is_and(x))
323 {
324 static_cast<Derived&>(*this).apply(result, atermpp::down_cast<pbes_system::and_>(x));
325 }
326 else if (pbes_system::is_or(x))
327 {
328 static_cast<Derived&>(*this).apply(result, atermpp::down_cast<pbes_system::or_>(x));
329 }
330 else if (pbes_system::is_imp(x))
331 {
332 static_cast<Derived&>(*this).apply(result, atermpp::down_cast<pbes_system::imp>(x));
333 }
334 else if (pbes_system::is_forall(x))
335 {
336 static_cast<Derived&>(*this).apply(result, atermpp::down_cast<pbes_system::forall>(x));
337 }
338 else if (pbes_system::is_exists(x))
339 {
340 static_cast<Derived&>(*this).apply(result, atermpp::down_cast<pbes_system::exists>(x));
341 }
342 static_cast<Derived&>(*this).leave(x);
343 }
344
345};
346
347/// \\brief Builder class
348template <typename Derived>
350{
351};
352//--- end generated add_data_expressions code ---//
353
354//--- start generated add_variables code ---//
355template <template <class> class Builder, class Derived>
356struct add_variables: public Builder<Derived>
357{
358 typedef Builder<Derived> super;
359 using super::enter;
360 using super::leave;
361 using super::update;
362 using super::apply;
363
364 template <class T>
365 void apply(T& result, const pbes_system::propositional_variable& x)
366 {
367
368 static_cast<Derived&>(*this).enter(x);
369 pbes_system::make_propositional_variable(result, x.name(), [&](data::variable_list& result){ static_cast<Derived&>(*this).apply(result, x.parameters()); });
370 static_cast<Derived&>(*this).leave(x);
371 }
372
374 {
375 static_cast<Derived&>(*this).enter(x);
376 propositional_variable result_variable;
377 static_cast<Derived&>(*this).apply(result_variable, x.variable());
378 x.variable() = result_variable;
379 pbes_expression result_formula;
380 static_cast<Derived&>(*this).apply(result_formula, x.formula());
381 x.formula() = result_formula;
382 static_cast<Derived&>(*this).leave(x);
383 }
384
386 {
387 static_cast<Derived&>(*this).enter(x);
388 static_cast<Derived&>(*this).update(x.global_variables());
389 static_cast<Derived&>(*this).update(x.equations());
390 propositional_variable_instantiation result_initial_state;
391 static_cast<Derived&>(*this).apply(result_initial_state, x.initial_state());
392 x.initial_state() = result_initial_state;
393 static_cast<Derived&>(*this).leave(x);
394 }
395
396 template <class T>
398 {
399
400 static_cast<Derived&>(*this).enter(x);
401 pbes_system::make_propositional_variable_instantiation(result, x.name(), [&](data::data_expression_list& result){ static_cast<Derived&>(*this).apply(result, x.parameters()); });
402 static_cast<Derived&>(*this).leave(x);
403 }
404
405 template <class T>
406 void apply(T& result, const pbes_system::not_& x)
407 {
408
409 static_cast<Derived&>(*this).enter(x);
410 pbes_system::make_not_(result, [&](pbes_expression& result){ static_cast<Derived&>(*this).apply(result, x.operand()); });
411 static_cast<Derived&>(*this).leave(x);
412 }
413
414 template <class T>
415 void apply(T& result, const pbes_system::and_& x)
416 {
417
418 static_cast<Derived&>(*this).enter(x);
419 pbes_system::make_and_(result, [&](pbes_expression& result){ static_cast<Derived&>(*this).apply(result, x.left()); }, [&](pbes_expression& result){ static_cast<Derived&>(*this).apply(result, x.right()); });
420 static_cast<Derived&>(*this).leave(x);
421 }
422
423 template <class T>
424 void apply(T& result, const pbes_system::or_& x)
425 {
426
427 static_cast<Derived&>(*this).enter(x);
428 pbes_system::make_or_(result, [&](pbes_expression& result){ static_cast<Derived&>(*this).apply(result, x.left()); }, [&](pbes_expression& result){ static_cast<Derived&>(*this).apply(result, x.right()); });
429 static_cast<Derived&>(*this).leave(x);
430 }
431
432 template <class T>
433 void apply(T& result, const pbes_system::imp& x)
434 {
435
436 static_cast<Derived&>(*this).enter(x);
437 pbes_system::make_imp(result, [&](pbes_expression& result){ static_cast<Derived&>(*this).apply(result, x.left()); }, [&](pbes_expression& result){ static_cast<Derived&>(*this).apply(result, x.right()); });
438 static_cast<Derived&>(*this).leave(x);
439 }
440
441 template <class T>
442 void apply(T& result, const pbes_system::forall& x)
443 {
444
445 static_cast<Derived&>(*this).enter(x);
446 pbes_system::make_forall(result, [&](data::variable_list& result){ static_cast<Derived&>(*this).apply(result, x.variables()); }, [&](pbes_expression& result){ static_cast<Derived&>(*this).apply(result, x.body()); });
447 static_cast<Derived&>(*this).leave(x);
448 }
449
450 template <class T>
451 void apply(T& result, const pbes_system::exists& x)
452 {
453
454 static_cast<Derived&>(*this).enter(x);
455 pbes_system::make_exists(result, [&](data::variable_list& result){ static_cast<Derived&>(*this).apply(result, x.variables()); }, [&](pbes_expression& result){ static_cast<Derived&>(*this).apply(result, x.body()); });
456 static_cast<Derived&>(*this).leave(x);
457 }
458
459 template <class T>
460 void apply(T& result, const pbes_system::pbes_expression& x)
461 {
462
463 static_cast<Derived&>(*this).enter(x);
465 {
466 static_cast<Derived&>(*this).apply(result, atermpp::down_cast<data::data_expression>(x));
467 }
468 else if (data::is_variable(x))
469 {
470 static_cast<Derived&>(*this).apply(result, atermpp::down_cast<data::variable>(x));
471 }
473 {
474 static_cast<Derived&>(*this).apply(result, atermpp::down_cast<data::untyped_data_parameter>(x));
475 }
477 {
478 static_cast<Derived&>(*this).apply(result, atermpp::down_cast<pbes_system::propositional_variable_instantiation>(x));
479 }
480 else if (pbes_system::is_not(x))
481 {
482 static_cast<Derived&>(*this).apply(result, atermpp::down_cast<pbes_system::not_>(x));
483 }
484 else if (pbes_system::is_and(x))
485 {
486 static_cast<Derived&>(*this).apply(result, atermpp::down_cast<pbes_system::and_>(x));
487 }
488 else if (pbes_system::is_or(x))
489 {
490 static_cast<Derived&>(*this).apply(result, atermpp::down_cast<pbes_system::or_>(x));
491 }
492 else if (pbes_system::is_imp(x))
493 {
494 static_cast<Derived&>(*this).apply(result, atermpp::down_cast<pbes_system::imp>(x));
495 }
496 else if (pbes_system::is_forall(x))
497 {
498 static_cast<Derived&>(*this).apply(result, atermpp::down_cast<pbes_system::forall>(x));
499 }
500 else if (pbes_system::is_exists(x))
501 {
502 static_cast<Derived&>(*this).apply(result, atermpp::down_cast<pbes_system::exists>(x));
503 }
504 static_cast<Derived&>(*this).leave(x);
505 }
506
507};
508
509/// \\brief Builder class
510template <typename Derived>
512{
513};
514//--- end generated add_variables code ---//
515
516// Adds pbes expression traversal to a builder
517//--- start generated add_pbes_expressions code ---//
518template <template <class> class Builder, class Derived>
519struct add_pbes_expressions: public Builder<Derived>
520{
521 typedef Builder<Derived> super;
522 using super::enter;
523 using super::leave;
524 using super::update;
525 using super::apply;
526
528 {
529 static_cast<Derived&>(*this).enter(x);
530 pbes_expression result_formula;
531 static_cast<Derived&>(*this).apply(result_formula, x.formula());
532 x.formula() = result_formula;
533 static_cast<Derived&>(*this).leave(x);
534 }
535
537 {
538 static_cast<Derived&>(*this).enter(x);
539 static_cast<Derived&>(*this).update(x.equations());
540 static_cast<Derived&>(*this).leave(x);
541 }
542
543 template <class T>
545 {
546
547 result = x;
548 static_cast<Derived&>(*this).enter(x);
549 // skip
550 static_cast<Derived&>(*this).leave(x);
551 result = x;
552 }
553
554 template <class T>
555 void apply(T& result, const pbes_system::not_& x)
556 {
557
558 static_cast<Derived&>(*this).enter(x);
559 pbes_system::make_not_(result, [&](pbes_expression& result){ static_cast<Derived&>(*this).apply(result, x.operand()); });
560 static_cast<Derived&>(*this).leave(x);
561 }
562
563 template <class T>
564 void apply(T& result, const pbes_system::and_& x)
565 {
566
567 static_cast<Derived&>(*this).enter(x);
568 pbes_system::make_and_(result, [&](pbes_expression& result){ static_cast<Derived&>(*this).apply(result, x.left()); }, [&](pbes_expression& result){ static_cast<Derived&>(*this).apply(result, x.right()); });
569 static_cast<Derived&>(*this).leave(x);
570 }
571
572 template <class T>
573 void apply(T& result, const pbes_system::or_& x)
574 {
575
576 static_cast<Derived&>(*this).enter(x);
577 pbes_system::make_or_(result, [&](pbes_expression& result){ static_cast<Derived&>(*this).apply(result, x.left()); }, [&](pbes_expression& result){ static_cast<Derived&>(*this).apply(result, x.right()); });
578 static_cast<Derived&>(*this).leave(x);
579 }
580
581 template <class T>
582 void apply(T& result, const pbes_system::imp& x)
583 {
584
585 static_cast<Derived&>(*this).enter(x);
586 pbes_system::make_imp(result, [&](pbes_expression& result){ static_cast<Derived&>(*this).apply(result, x.left()); }, [&](pbes_expression& result){ static_cast<Derived&>(*this).apply(result, x.right()); });
587 static_cast<Derived&>(*this).leave(x);
588 }
589
590 template <class T>
591 void apply(T& result, const pbes_system::forall& x)
592 {
593
594 static_cast<Derived&>(*this).enter(x);
595 pbes_system::make_forall(result, x.variables(), [&](pbes_expression& result){ static_cast<Derived&>(*this).apply(result, x.body()); });
596 static_cast<Derived&>(*this).leave(x);
597 }
598
599 template <class T>
600 void apply(T& result, const pbes_system::exists& x)
601 {
602
603 static_cast<Derived&>(*this).enter(x);
604 pbes_system::make_exists(result, x.variables(), [&](pbes_expression& result){ static_cast<Derived&>(*this).apply(result, x.body()); });
605 static_cast<Derived&>(*this).leave(x);
606 }
607
608 template <class T>
609 void apply(T& result, const pbes_system::pbes_expression& x)
610 {
611
612 static_cast<Derived&>(*this).enter(x);
614 {
615 static_cast<Derived&>(*this).apply(result, atermpp::down_cast<data::data_expression>(x));
616 }
617 else if (data::is_variable(x))
618 {
619 static_cast<Derived&>(*this).apply(result, atermpp::down_cast<data::variable>(x));
620 }
622 {
623 static_cast<Derived&>(*this).apply(result, atermpp::down_cast<data::untyped_data_parameter>(x));
624 }
626 {
627 static_cast<Derived&>(*this).apply(result, atermpp::down_cast<pbes_system::propositional_variable_instantiation>(x));
628 }
629 else if (pbes_system::is_not(x))
630 {
631 static_cast<Derived&>(*this).apply(result, atermpp::down_cast<pbes_system::not_>(x));
632 }
633 else if (pbes_system::is_and(x))
634 {
635 static_cast<Derived&>(*this).apply(result, atermpp::down_cast<pbes_system::and_>(x));
636 }
637 else if (pbes_system::is_or(x))
638 {
639 static_cast<Derived&>(*this).apply(result, atermpp::down_cast<pbes_system::or_>(x));
640 }
641 else if (pbes_system::is_imp(x))
642 {
643 static_cast<Derived&>(*this).apply(result, atermpp::down_cast<pbes_system::imp>(x));
644 }
645 else if (pbes_system::is_forall(x))
646 {
647 static_cast<Derived&>(*this).apply(result, atermpp::down_cast<pbes_system::forall>(x));
648 }
649 else if (pbes_system::is_exists(x))
650 {
651 static_cast<Derived&>(*this).apply(result, atermpp::down_cast<pbes_system::exists>(x));
652 }
653 static_cast<Derived&>(*this).leave(x);
654 }
655
656};
657
658/// \\brief Builder class
659template <typename Derived>
661{
662};
663//--- end generated add_pbes_expressions code ---//
664
665} // namespace pbes_system
666
667} // namespace mcrl2
668
669#endif // MCRL2_PBES_BUILDER_H
Term containing a string.
const aterm & operator[](const size_type i) const
Returns the i-th argument.
Definition aterm.h:187
const function_symbol & function() const
Returns the function symbol belonging to an aterm.
Definition aterm.h:144
aterm(const aterm &other) noexcept=default
This class has user-declared copy constructor so declare default copy and move operators.
aterm(const function_symbol &sym)
Constructor.
Definition aterm.h:128
bool operator==(const function_symbol &f) const
Equality test.
A list of aterm objects.
Definition aterm_list.h:24
void swap(unprotected_aterm_core &t) noexcept
Swaps this term with its argument.
Definition aterm_core.h:152
bool operator<(const unprotected_aterm_core &t) const
Comparison operator for two unprotected aterms.
Definition aterm_core.h:104
bool operator==(const unprotected_aterm_core &t) const
Comparison operator.
Definition aterm_core.h:83
An abstraction expression.
Definition abstraction.h:26
abstraction(const atermpp::aterm &term)
Constructor.
Definition abstraction.h:35
data_expression(const data_expression &) noexcept=default
Move semantics.
bool is_well_typed() const
Returns true if.
\brief A data variable
Definition variable.h:28
\brief The and operator for pbes expressions
and_(const pbes_expression &left, const pbes_expression &right)
\brief Constructor Z14.
and_(const and_ &) noexcept=default
Move semantics.
and_(and_ &&) noexcept=default
and_ & operator=(and_ &&) noexcept=default
and_(const atermpp::aterm &term)
and_ & operator=(const and_ &) noexcept=default
const pbes_expression & left() const
const pbes_expression & right() const
and_()
\brief Default constructor X3.
\brief The existential quantification operator for pbes expressions
exists(const atermpp::aterm &term)
exists & operator=(exists &&) noexcept=default
exists(exists &&) noexcept=default
exists(const data::variable_list &variables, const pbes_expression &body)
\brief Constructor Z14.
const data::variable_list & variables() const
exists()
\brief Default constructor X3.
exists(const exists &) noexcept=default
Move semantics.
const pbes_expression & body() const
exists & operator=(const exists &) noexcept=default
static fixpoint_symbol nu()
Returns the nu symbol.
fixpoint_symbol()
\brief Default constructor X3.
fixpoint_symbol & operator=(fixpoint_symbol &&) noexcept=default
fixpoint_symbol(const fixpoint_symbol &) noexcept=default
Move semantics.
bool is_nu() const
Returns true if the symbol is nu.
bool is_mu() const
Returns true if the symbol is mu.
fixpoint_symbol(fixpoint_symbol &&) noexcept=default
static fixpoint_symbol mu()
Returns the mu symbol.
fixpoint_symbol & operator=(const fixpoint_symbol &) noexcept=default
fixpoint_symbol(const atermpp::aterm &term)
\brief The universal quantification operator for pbes expressions
forall()
\brief Default constructor X3.
const pbes_expression & body() const
forall(const data::variable_list &variables, const pbes_expression &body)
\brief Constructor Z14.
forall(const atermpp::aterm &term)
const data::variable_list & variables() const
forall & operator=(const forall &) noexcept=default
forall & operator=(forall &&) noexcept=default
forall(const forall &) noexcept=default
Move semantics.
forall(forall &&) noexcept=default
\brief The implication operator for pbes expressions
imp & operator=(imp &&) noexcept=default
imp(const imp &) noexcept=default
Move semantics.
const pbes_expression & left() const
imp(imp &&) noexcept=default
imp(const atermpp::aterm &term)
imp()
\brief Default constructor X3.
imp(const pbes_expression &left, const pbes_expression &right)
\brief Constructor Z14.
const pbes_expression & right() const
imp & operator=(const imp &) noexcept=default
\brief The not operator for pbes expressions
not_()
\brief Default constructor X3.
not_(const pbes_expression &operand)
\brief Constructor Z14.
not_(const not_ &) noexcept=default
Move semantics.
const pbes_expression & operand() const
not_ & operator=(const not_ &) noexcept=default
not_(not_ &&) noexcept=default
not_(const atermpp::aterm &term)
not_ & operator=(not_ &&) noexcept=default
\brief The or operator for pbes expressions
const pbes_expression & left() const
or_(const or_ &) noexcept=default
Move semantics.
or_(const pbes_expression &left, const pbes_expression &right)
\brief Constructor Z14.
const pbes_expression & right() const
or_(or_ &&) noexcept=default
or_ & operator=(or_ &&) noexcept=default
or_ & operator=(const or_ &) noexcept=default
or_(const atermpp::aterm &term)
or_()
\brief Default constructor X3.
Algorithm class for the abstract algorithm.
Definition abstract.h:120
void run(pbes &p, const detail::pbes_parameter_map &parameter_map, bool value_true)
Runs the algorithm.
Definition abstract.h:126
const pbes_expression & formula() const
Returns the predicate formula on the right hand side of the equation.
fixpoint_symbol & symbol()
Returns the fixpoint symbol of the equation.
pbes_expression term_type
The expression type of the equation.
fixpoint_symbol symbol_type
The symbol type of the equation.
void swap(pbes_equation &other)
Swaps the contents.
propositional_variable variable_type
The variable type of the equation.
pbes_equation(const fixpoint_symbol &symbol, const propositional_variable &variable, const pbes_expression &expr)
Constructor.
bool is_solved() const
Returns true if the predicate formula on the right hand side contains no predicate variables.
Definition pbes.cpp:103
fixpoint_symbol m_symbol
The fixpoint symbol of the equation.
propositional_variable m_variable
The variable on the left hand side of the equation.
const fixpoint_symbol & symbol() const
Returns the fixpoint symbol of the equation.
bool operator<(const pbes_equation &other) const
A comparison operator on pbes equations. \detail The comparison is on the addresses of aterm objects ...
propositional_variable & variable()
Returns the pbes variable of the equation.
pbes_expression m_formula
The expression on the right hand side of the equation.
pbes_equation()=default
Constructor.
pbes_expression & formula()
Returns the predicate formula on the right hand side of the equation.
const propositional_variable & variable() const
Returns the pbes variable of the equation.
pbes_expression & operator=(pbes_expression &&) noexcept=default
pbes_expression & operator=(const pbes_expression &) noexcept=default
pbes_expression(const atermpp::aterm &term)
pbes_expression(const pbes_expression &) noexcept=default
Move semantics.
pbes_expression(const data::data_expression &x)
\brief Constructor Z6.
pbes_expression(const data::untyped_data_parameter &x)
\brief Constructor Z6.
pbes_expression(const data::variable &x)
\brief Constructor Z6.
pbes_expression()
\brief Default constructor X3.
pbes_expression(pbes_expression &&) noexcept=default
parameterized boolean equation system
Definition pbes.h:58
std::set< data::variable > & global_variables()
Returns the declared free variables of the pbes.
Definition pbes.h:185
bool is_closed() const
True if the pbes is closed.
Definition pbes.h:245
data::data_specification m_data
The data specification.
Definition pbes.h:64
pbes(const data::data_specification &data, const std::vector< pbes_equation > &equations, propositional_variable_instantiation initial_state)
Constructor.
Definition pbes.h:116
std::set< data::variable > m_global_variables
The set of global variables.
Definition pbes.h:70
std::set< propositional_variable > compute_declared_variables() const
Returns the predicate variables appearing in the left hand side of an equation.
Definition pbes.h:77
pbes_equation equation_type
Definition pbes.h:60
pbes(const data::data_specification &data, const std::set< data::variable > &global_variables, const std::vector< pbes_equation > &equations, propositional_variable_instantiation initial_state)
Constructor.
Definition pbes.h:134
const propositional_variable_instantiation & initial_state() const
Returns the initial state.
Definition pbes.h:192
std::set< propositional_variable > binding_variables() const
Returns the set of binding variables of the pbes. This is the set variables that occur on the left ha...
Definition pbes.h:207
std::set< propositional_variable > occurring_variables() const
Returns the set of occurring propositional variable declarations of the pbes, i.e....
Definition pbes.h:227
std::set< propositional_variable_instantiation > occurring_variable_instantiations() const
Returns the set of occurring propositional variable instantiations of the pbes. This is the set of va...
Definition pbes.cpp:108
const std::set< data::variable > & global_variables() const
Returns the declared free variables of the pbes.
Definition pbes.h:178
std::vector< pbes_equation > & equations()
Returns the equations.
Definition pbes.h:171
propositional_variable_instantiation & initial_state()
Returns the initial state.
Definition pbes.h:199
propositional_variable_instantiation m_initial_state
The initial state.
Definition pbes.h:73
pbes()=default
Constructor.
std::vector< pbes_equation > m_equations
The sequence of pbes equations.
Definition pbes.h:67
bool is_declared_in(Iter first, Iter last, const propositional_variable_instantiation &v, const data::data_specification &data_spec) const
Checks if the propositional variable instantiation v appears with the right type in the sequence of p...
Definition pbes.h:96
const std::vector< pbes_equation > & equations() const
Returns the equations.
Definition pbes.h:164
bool is_well_typed() const
Checks if the PBES is well typed.
Definition pbes.h:267
\brief A propositional variable instantiation
const data::data_expression_list & parameters() const
propositional_variable_instantiation(const propositional_variable_instantiation &) noexcept=default
Move semantics.
propositional_variable_instantiation(const std::string &name)
Constructor.
propositional_variable_instantiation(propositional_variable_instantiation &&) noexcept=default
propositional_variable_instantiation(const core::identifier_string &name, const data::data_expression_list &parameters)
Constructor.
propositional_variable_instantiation & operator=(propositional_variable_instantiation &&) noexcept=default
propositional_variable_instantiation(const core::identifier_string &name)
Constructor.
propositional_variable_instantiation & operator=(const propositional_variable_instantiation &) noexcept=default
propositional_variable_instantiation(const std::string &name, const data::data_expression_list &parameters)
Constructor.
propositional_variable_instantiation(const atermpp::aterm &term)
Constructor.
\brief A propositional variable declaration
const data::variable_list & parameters() const
propositional_variable(const std::string &name, const data::variable_list &parameters)
\brief Constructor Z1.
propositional_variable(const propositional_variable &) noexcept=default
Move semantics.
const core::identifier_string & name() const
propositional_variable & operator=(propositional_variable &&) noexcept=default
propositional_variable()
\brief Default constructor X3.
propositional_variable & operator=(const propositional_variable &) noexcept=default
propositional_variable(propositional_variable &&) noexcept=default
propositional_variable(const atermpp::aterm_string &name)
propositional_variable(const core::identifier_string &name, const data::variable_list &parameters)
\brief Constructor Z12.
Standard exception class for reporting runtime errors.
Definition exception.h:27
Simple timer to time the CPU time used by a piece of code.
void write_report(std::ostream &s)
Write the report to an output stream.
std::map< std::string, timing > m_timings
collection of timings
void start(const std::string &timing_name)
Start measurement with a hint.
std::string m_filename
name of the file to write timings to
void finish(const std::string &timing_name)
Finish a measurement with a hint.
void report()
Write all timing information that has been recorded.
execution_timer(const std::string &tool_name="", std::string const &filename="")
Constructor of a simple execution timer.
std::string m_tool_name
name of the tool we are timing
std::vector< std::string > m_extensions
const std::string & shortname() const
bool operator==(const file_format &other) const
bool operator<(const file_format &other) const
const std::string & description() const
The main namespace for the aterm++ library.
Definition algorithm.h:21
const atermpp::function_symbol & function_symbol_Mu()
const atermpp::function_symbol & function_symbol_PBESExists()
const atermpp::function_symbol & function_symbol_PBEqn()
const atermpp::function_symbol & function_symbol_Nu()
const atermpp::function_symbol & function_symbol_PropVarDecl()
const atermpp::function_symbol & function_symbol_PBESNot()
const atermpp::function_symbol & function_symbol_PBESAnd()
const atermpp::function_symbol & function_symbol_PBESOr()
const atermpp::function_symbol & function_symbol_PBESImp()
const atermpp::function_symbol & function_symbol_PBESForall()
const atermpp::function_symbol & function_symbol_PropVarInst()
atermpp::aterm_string identifier_string
String type of the LPS library. Identifier strings are represented internally as ATerms.
bool equal_sorts(const data::variable_list &v, const data::data_expression_list &w, const data::data_specification &data_spec)
Checks if the sorts of the variables/expressions in both lists are equal.
Definition equal_sorts.h:28
Namespace for system defined sort bool_.
Definition bool.h:32
bool is_false_function_symbol(const atermpp::aterm &e)
Recogniser for function false.
Definition bool.h:119
bool is_or_application(const atermpp::aterm &e)
Recogniser for application of ||.
Definition bool.h:345
const function_symbol & false_()
Constructor for function symbol false.
Definition bool.h:109
bool is_and_application(const atermpp::aterm &e)
Recogniser for application of &&.
Definition bool.h:281
bool is_true_function_symbol(const atermpp::aterm &e)
Recogniser for function true.
Definition bool.h:87
bool is_not_application(const atermpp::aterm &e)
Recogniser for application of !.
Definition bool.h:217
const function_symbol & true_()
Constructor for function symbol true.
Definition bool.h:77
Namespace for all data library functionality.
Definition data.cpp:22
bool is_data_expression(const atermpp::aterm &x)
Test for a data_expression expression.
bool is_abstraction(const atermpp::aterm &x)
Returns true if the term t is an abstraction.
const data_expression & false_()
Definition consistency.h:99
const data_expression & true_()
Definition consistency.h:92
rewrite_strategy
The strategy of the rewriter.
bool is_forall(const atermpp::aterm &x)
Returns true if the term t is a universal quantification.
atermpp::term_list< data_expression > data_expression_list
\brief list of data_expressions
bool is_untyped_data_parameter(const atermpp::aterm &x)
atermpp::term_list< variable > variable_list
\brief list of variables
bool is_exists(const atermpp::aterm &x)
Returns true if the term t is an existential quantification.
bool is_application(const atermpp::aterm &x)
Returns true if the term t is an application.
bool is_variable(const atermpp::aterm &x)
Returns true if the term t is a variable.
The namespace for accessor functions on pbes expressions.
pbes_expression data_left(const pbes_expression &x)
Returns the left hand side of an expression of type and, or or imp.
const pbes_expression & arg(const pbes_expression &t)
Returns the pbes expression argument of expressions of type not, exists and forall.
pbes_expression data_arg(const pbes_expression &t)
Returns the pbes expression argument of expressions of type not, exists and forall.
const pbes_expression & left(const pbes_expression &t)
Returns the left hand side of an expression of type and, or or imp.
const pbes_expression & right(const pbes_expression &t)
Returns the right hand side of an expression of type and, or or imp.
pbes_expression data_right(const pbes_expression &x)
Returns the left hand side of an expression of type and, or or imp.
const data::data_expression_list & param(const pbes_expression &t)
Returns the parameters of a propositional variable instantiation.
const core::identifier_string & name(const pbes_expression &t)
Returns the name of a propositional variable expression.
const data::variable_list & var(const pbes_expression &t)
Returns the variables of a quantification expression.
void normalize(pbes &x)
The function normalize brings (embedded) pbes expressions into positive normal form,...
std::map< core::identifier_string, std::vector< data::variable > > pbes_parameter_map
Data structure for storing the variables that should be expanded by the finite pbesinst algorithm.
pbes_parameter_map parse_pbes_parameter_map(const pbes &p, const std::string &text)
Parses parameter selection for finite pbesinst algorithm.
The main namespace for the PBES library.
bool is_pbes_exists(const pbes_expression &t)
Returns true if the term t is an existential quantification.
atermpp::term_list< pbes_expression > pbes_expression_list
\brief list of pbes_expressions
std::string pp(const pbes_system::forall &x)
Definition pbes.cpp:38
bool is_pbes_file_format(const utilities::file_format &format)
Definition io.h:29
bool is_universal_or(const pbes_expression &t)
Test for a disjunction.
void lps2pbes(const std::string &input_filename, const std::string &output_filename, const utilities::file_format &output_format, const std::string &formula_filename, bool timed, bool structured, bool unoptimized, bool preprocess_modal_operators, bool generate_counter_example, bool check_only)
Definition lps2pbes.h:42
std::set< data::variable > find_free_variables(const pbes_system::pbes_equation &x)
Definition pbes.cpp:56
atermpp::term_list< fixpoint_symbol > fixpoint_symbol_list
\brief list of fixpoint_symbols
std::string pp(const pbes_system::pbes_equation &x)
Definition pbes.cpp:43
bool is_data(const pbes_expression &t)
Returns true if the term t is a data expression.
std::string pp(const pbes_system::and_ &x)
Definition pbes.cpp:35
bool operator!=(const pbes_equation &x, const pbes_equation &y)
std::set< data::variable > find_free_variables(const pbes_system::pbes &x)
Definition pbes.cpp:54
std::string description(const absinthe_strategy strategy)
Prints an absinthe strategy.
void normalize_sorts(pbes_system::pbes_equation_vector &x, const data::sort_specification &sortspec)
Definition pbes.cpp:47
void swap(propositional_variable &t1, propositional_variable &t2)
\brief swap overload
std::istream & operator>>(std::istream &is, pbesinst_strategy &s)
std::istream & operator>>(std::istream &is, absinthe_strategy &strategy)
pbes_rewriter_type parse_pbes_rewriter_type(const std::string &type)
Parses a pbes rewriter type.
void pbesabstract(const std::string &input_filename, const std::string &output_filename, const utilities::file_format &input_format, const utilities::file_format &output_format, const std::string &parameter_selection, bool value_true)
void make_propositional_variable(atermpp::aterm &t, const ARGUMENTS &... args)
bool is_propositional_variable(const atermpp::aterm &x)
void swap(propositional_variable_instantiation &t1, propositional_variable_instantiation &t2)
\brief swap overload
pbes_system::pbes_expression normalize_sorts(const pbes_system::pbes_expression &x, const data::sort_specification &sortspec)
Definition pbes.cpp:49
pbes_rewriter_type
An enumerated type for the available pbes rewriters.
std::set< data::sort_expression > find_sort_expressions(const pbes_system::pbes &x)
Definition pbes.cpp:52
bool is_universal_and(const pbes_expression &t)
Test for a conjunction.
bool is_pbes_expression(const atermpp::aterm &x)
bool is_pbes_not(const pbes_expression &t)
Returns true if the term t is a not expression.
const pbes_expression & true_()
bool is_pbes_forall(const pbes_expression &t)
Returns true if the term t is a universal quantification.
pbes_expression make_exists_(const data::variable_list &l, const pbes_expression &p)
Make an existential quantification. It checks for an empty variable list, which is not allowed.
bool is_not(const atermpp::aterm &x)
std::string pp(const pbes_system::propositional_variable_instantiation_list &x)
Definition pbes.cpp:33
const utilities::file_format & pbes_format_internal_bes()
Definition io.h:46
void txt2pbes(const std::string &input_filename, const std::string &output_filename, const utilities::file_format &output_format, bool normalize)
Definition txt2pbes.h:21
std::string pp(const pbes_system::pbes_expression_list &x)
Definition pbes.cpp:29
std::string pp(const pbes_system::or_ &x)
Definition pbes.cpp:41
void optimized_not(pbes_expression &result, const pbes_expression &p)
Make a negation.
void make_and_(atermpp::aterm &t, const ARGUMENTS &... args)
std::set< pbes_system::propositional_variable_instantiation > find_propositional_variable_instantiations(const pbes_system::pbes_expression &x)
Definition pbes.cpp:58
std::vector< propositional_variable_instantiation > propositional_variable_instantiation_vector
\brief vector of propositional_variable_instantiations
void pbesstategraph(const std::string &input_filename, const std::string &output_filename, const utilities::file_format &input_format, const utilities::file_format &output_format, const pbesstategraph_options &options)
void lpsbisim2pbes(const std::string &input_filename1, const std::string &input_filename2, const std::string &output_filename, const utilities::file_format &output_format, bisimulation_type type, bool normalize)
const utilities::file_format & pbes_format_pgsolver()
Definition io.h:48
std::vector< fixpoint_symbol > fixpoint_symbol_vector
\brief vector of fixpoint_symbols
void make_not_(atermpp::aterm &t, const ARGUMENTS &... args)
std::string pp(const pbes_system::propositional_variable &x)
Definition pbes.cpp:45
std::vector< propositional_variable > propositional_variable_vector
\brief vector of propositional_variables
bool is_exists(const atermpp::aterm &x)
data::variable_list free_variables(const pbes_expression &x)
void swap(or_ &t1, or_ &t2)
\brief swap overload
bool operator==(const pbes_equation &x, const pbes_equation &y)
bool is_constant(const pbes_expression &x)
void complps2pbes(const std::string &input_filename, const std::string &output_filename, const utilities::file_format &output_format, const std::string &formula_filename)
void normalize_sorts(pbes_system::pbes &x, const data::sort_specification &)
Definition pbes.cpp:48
std::string pp(const pbes_system::propositional_variable_instantiation &x)
Definition pbes.cpp:46
atermpp::term_list< propositional_variable_instantiation > propositional_variable_instantiation_list
\brief list of propositional_variable_instantiations
pbesinst_strategy
pbesinst transformation strategies
void pbesrewr(const std::string &input_filename, const std::string &output_filename, const utilities::file_format &input_format, const utilities::file_format &output_format, data::rewrite_strategy rewrite_strategy, pbes_rewriter_type rewriter_type)
Definition pbesrewr.h:31
bool is_or(const atermpp::aterm &x)
std::istream & operator>>(std::istream &is, pbes_rewriter_type &t)
Stream operator for rewriter type.
const data::variable_list & quantifier_variables(const pbes_expression &x)
std::string pp(const pbes_system::fixpoint_symbol &x)
Definition pbes.cpp:37
bool is_well_typed_pbes(const std::set< data::sort_expression > &declared_sorts, const std::set< data::variable > &declared_global_variables, const std::set< data::variable > &occurring_global_variables, const std::set< propositional_variable > &declared_variables, const std::set< propositional_variable_instantiation > &occ, const propositional_variable_instantiation &init, const data::data_specification &data_spec)
Definition pbes.cpp:91
void swap(imp &t1, imp &t2)
\brief swap overload
void optimized_exists(pbes_expression &result, const data::variable_list &l, const pbes_expression &p)
Make an existential quantification If l is empty, p is returned.
void swap(and_ &t1, and_ &t2)
\brief swap overload
std::string pp(const pbes_system::pbes_equation_vector &x)
Definition pbes.cpp:28
void pbesinfo(const std::string &input_filename, const std::string &input_file_message, const utilities::file_format &file_format, bool opt_full)
Definition pbesinfo.h:22
std::set< data::function_symbol > find_function_symbols(const pbes_system::pbes &x)
Definition pbes.cpp:57
std::vector< pbes_equation > pbes_equation_vector
\brief vector of pbes_equations
bool has_propositional_variables(const pbes_expression &x)
void pbespareqelm(const std::string &input_filename, const std::string &output_filename, const utilities::file_format &input_format, const utilities::file_format &output_format, data::rewrite_strategy rewrite_strategy, pbes_rewriter_type rewriter_type, bool ignore_initial_state)
void pbespp(const std::string &input_filename, const std::string &output_filename, const utilities::file_format &input_format, core::print_format_type format, bool use_pfnf_printer)
Definition pbespp.h:22
void swap(exists &t1, exists &t2)
\brief swap overload
bool is_forall(const atermpp::aterm &x)
void pbesparelm(const std::string &input_filename, const std::string &output_filename, const utilities::file_format &input_format, const utilities::file_format &output_format)
Definition pbesparelm.h:22
void make_propositional_variable_instantiation(atermpp::aterm &t, const ARGUMENTS &... args)
pbesinst_strategy parse_pbesinst_strategy(const std::string &s)
Parse a pbesinst transformation strategy.
void make_or_(atermpp::aterm &t, const ARGUMENTS &... args)
atermpp::aterm pbes_to_aterm(const pbes &p)
Conversion to atermappl.
Definition io.cpp:328
bool is_universal_not(const pbes_expression &t)
Test for a conjunction.
std::string print_pbesinst_strategy(const pbesinst_strategy strategy)
Returns a string representation of a pbesinst transformation strategy.
std::string pp(const pbes_system::pbes_expression &x)
Definition pbes.cpp:44
std::istream & operator>>(std::istream &is, bisimulation_type &t)
bool operator==(const pbes &p1, const pbes &p2)
Equality operator on PBESs.
Definition pbes.h:325
bool is_well_typed(const pbes_equation &eqn)
Definition pbes.cpp:77
const std::vector< utilities::file_format > & pbes_file_formats()
Definition io.cpp:26
std::set< data::variable > find_free_variables(const pbes_system::pbes_expression &x)
Definition pbes.cpp:55
void save_bes_pgsolver(const pbes &bes, std::ostream &stream, bool maxpg)
Definition pgsolver.cpp:142
pbes_system::pbes_expression translate_user_notation(const pbes_system::pbes_expression &x)
Definition pbes.cpp:51
std::vector< pbes_expression > pbes_expression_vector
\brief vector of pbes_expressions
bool is_pbes_or(const pbes_expression &t)
Returns true if the term t is an or expression.
bool is_false(const pbes_expression &t)
Test for the value false.
void optimized_forall(pbes_expression &result, const data::variable_list &l, const pbes_expression &p)
Make a universal quantification If l is empty, p is returned.
bool is_pbes_imp(const pbes_expression &t)
Returns true if the term t is an imp expression.
std::string print_pbes_rewriter_type(const pbes_rewriter_type type)
Prints a pbes rewriter type.
std::string pp(const pbes_system::pbes &x)
Definition pbes.cpp:42
void optimized_or(pbes_expression &result, const pbes_expression &p, const pbes_expression &q)
Make a disjunction.
std::string print_absinthe_strategy(const absinthe_strategy strategy)
Prints an absinthe strategy.
atermpp::term_list< pbes_equation > pbes_equation_list
\brief list of pbes_equations
bool is_pbes_and(const pbes_expression &t)
Returns true if the term t is an and expression.
atermpp::aterm pbes_equation_to_aterm(const pbes_equation &eqn)
Conversion to atermaPpl.
void save_pbes(const pbes &pbes, std::ostream &stream, utilities::file_format format)
Save a PBES in the format specified.
Definition io.cpp:49
pbes_expression make_forall_(const data::variable_list &l, const pbes_expression &p)
Make a universal quantification. It checks for an empty variable list, which is not allowed.
bool search_variable(const pbes_system::pbes_expression &x, const data::variable &v)
Definition pbes.cpp:60
std::string pp(const pbes_system::imp &x)
Definition pbes.cpp:39
std::string print_bisimulation_type(const bisimulation_type t)
Returns a description of a bisimulation type.
void swap(forall &t1, forall &t2)
\brief swap overload
void swap(pbes_expression &t1, pbes_expression &t2)
\brief swap overload
std::set< data::variable > find_all_variables(const pbes_system::pbes &x)
Definition pbes.cpp:53
std::string pp(const pbes_system::exists &x)
Definition pbes.cpp:36
atermpp::term_list< propositional_variable > propositional_variable_list
\brief list of propositional_variables
void complete_data_specification(pbes &)
Adds all sorts that appear in the PBES p to the data specification of p.
Definition pbes.h:314
void swap(pbes_equation &t1, pbes_equation &t2)
\brief swap overload
bisimulation_type
An enumerated type for the available bisimulation types.
void swap(not_ &t1, not_ &t2)
\brief swap overload
const utilities::file_format & pbes_format_internal()
Definition io.h:42
void pbesconstelm(const std::string &input_filename, const std::string &output_filename, const utilities::file_format &input_format, const utilities::file_format &output_format, data::rewrite_strategy rewrite_strategy, pbes_rewriter_type rewriter_type, bool compute_conditions, bool remove_redundant_equations, bool check_quantifiers)
void make_exists(atermpp::aterm &t, const ARGUMENTS &... args)
std::set< core::identifier_string > find_identifiers(const pbes_system::pbes_expression &x)
Definition pbes.cpp:59
bool is_propositional_variable_instantiation(const atermpp::aterm &x)
const utilities::file_format & pbes_format_text()
Definition io.h:44
bool is_well_typed_equation(const pbes_equation &eqn, const std::set< data::sort_expression > &declared_sorts, const std::set< data::variable > &declared_global_variables, const data::data_specification &data_spec)
Definition pbes.cpp:82
void swap(fixpoint_symbol &t1, fixpoint_symbol &t2)
\brief swap overload
absinthe_strategy parse_absinthe_strategy(const std::string &strategy)
Parses an absinthe strategy.
bool is_and(const atermpp::aterm &x)
std::string description(const pbes_rewriter_type type)
Returns a description of a pbes rewriter.
void optimized_and(pbes_expression &result, const pbes_expression &p, const pbes_expression &q)
Make a conjunction.
std::string description(const pbesinst_strategy strategy)
Returns a string representation of a pbesinst transformation strategy.
void translate_user_notation(pbes_system::pbes &x)
Definition pbes.cpp:50
std::string description(const bisimulation_type t)
Returns a description of a bisimulation type.
bool is_imp(const atermpp::aterm &x)
void optimized_imp(pbes_expression &result, const pbes_expression &p, const pbes_expression &q)
Make an implication.
void make_imp(atermpp::aterm &t, const ARGUMENTS &... args)
void pbesabsinthe(const std::string &input_filename, const std::string &output_filename, const utilities::file_format &input_format, const utilities::file_format &output_format, const std::string &abstraction_file, absinthe_strategy strategy, bool print_used_function_symbols, bool enable_logging)
std::string pp(const pbes_system::not_ &x)
Definition pbes.cpp:40
bisimulation_type parse_bisimulation_type(const std::string &type)
Returns the string corresponding to a bisimulation type.
bool is_true(const pbes_expression &t)
Test for the value true.
std::string pp(const pbes_system::propositional_variable_list &x)
Definition pbes.cpp:31
const pbes_expression & false_()
void make_forall(atermpp::aterm &t, const ARGUMENTS &... args)
absinthe_strategy
The approximation strategies of the absinthe tool.
A class that takes a linear process specification and checks all tau-summands of that LPS for conflue...
expression builder that visits all sub expressions
Definition builder.h:42
static const atermpp::aterm PBESForall
static const atermpp::aterm PBExpr
static const atermpp::aterm PBESOr
static const atermpp::aterm PBESExists
static const atermpp::aterm PBESImp
static const atermpp::aterm PBESNot
static const atermpp::aterm FixPoint
static const atermpp::aterm PropVarInst
static const atermpp::aterm PropVarDecl
static const atermpp::aterm PBESAnd
static const atermpp::function_symbol PropVarDecl
static const atermpp::function_symbol PBESForall
static const atermpp::function_symbol PBESNot
static const atermpp::function_symbol PBESImp
static const atermpp::function_symbol PBESAnd
static const atermpp::function_symbol Nu
static const atermpp::function_symbol PropVarInst
static const atermpp::function_symbol Mu
static const atermpp::function_symbol PBESExists
static const atermpp::function_symbol PBESOr
static bool is_false(const term_type &t)
Test for the value false.
static void make_or_(term_type &result, const term_type &p, const term_type &q)
Make a disjunction.
static bool is_imp(const term_type &t)
Test for an implication.
static void make_exists(term_type &result, const variable_sequence_type &l, const term_type &p)
Make an existential quantification.
static bool is_data(const term_type &t)
Test for data term.
static term_type forall(const variable_sequence_type &l, const term_type &p)
Make a universal quantification.
static std::string pp(const term_type &t)
Pretty print function.
static term_type exists(const variable_sequence_type &l, const term_type &p)
Make an existential quantification.
static term_type or_(const term_type &p, const term_type &q)
Make a disjunction.
static const data_term_sequence_type & param(const term_type &t)
Returns the parameter list of a propositional variable instantiation.
static bool is_not(const term_type &t)
Test for a negation.
static void make_imp(term_type &result, const term_type &p, const term_type &q)
Make an implication.
static term_type join_and(FwdIt first, FwdIt last)
pbes_system::propositional_variable propositional_variable_decl_type
The propositional variable declaration type.
static bool is_and(const term_type &t)
Test for a conjunction.
static bool is_variable(const term_type &t)
Test if a term is a variable.
pbes_system::pbes_expression term_type
The term type.
static term_type not_(const term_type &p)
Make a negation.
static bool is_exists(const term_type &t)
Test for an existential quantification.
pbes_system::propositional_variable_instantiation propositional_variable_type
The propositional variable instantiation type.
static void make_and_(term_type &result, const term_type &p, const term_type &q)
Make a conjunction.
static term_type left(const term_type &t)
Returns the left argument of a term of type and, or or imp.
static const string_type & name(const term_type &t)
Returns the name of a propositional variable instantiation.
static term_type right(const term_type &t)
Returns the right argument of a term of type and, or or imp.
data::data_expression data_term_type
The data term type.
core::identifier_string string_type
The string type.
static term_type and_(const term_type &p, const term_type &q)
Make a conjunction.
static const variable_sequence_type & var(const term_type &t)
Returns the quantifier variables of a quantifier expression.
static const term_type & variable2term(const variable_type &v)
Conversion from variable to term.
static void make_forall(term_type &result, const variable_sequence_type &l, const term_type &p)
Make a universal quantification.
static void make_not_(term_type &result, const term_type &p)
Make a negation.
static const term_type & not_arg(const term_type &t)
Returns the argument of a term of type not.
data::variable_list variable_sequence_type
The variable sequence type.
static term_type imp(const term_type &p, const term_type &q)
Make an implication.
data::data_expression_list data_term_sequence_type
The data term sequence type.
static term_type join_or(FwdIt first, FwdIt last)
static bool is_forall(const term_type &t)
Test for an universal quantification.
static bool is_prop_var(const term_type &t)
Test for propositional variable instantiation.
static bool is_true(const term_type &t)
Test for the value true.
static bool is_or(const term_type &t)
Test for a disjunction.
Contains type information for terms.
Definition term_traits.h:24
void apply(T &result, const pbes_system::imp &x)
Definition builder.h:271
void apply(T &result, const pbes_system::forall &x)
Definition builder.h:280
void apply(T &result, const pbes_system::and_ &x)
Definition builder.h:253
void apply(T &result, const pbes_system::pbes_expression &x)
Definition builder.h:298
void apply(T &result, const pbes_system::or_ &x)
Definition builder.h:262
void update(pbes_system::pbes_equation &x)
Definition builder.h:215
void apply(T &result, const pbes_system::propositional_variable_instantiation &x)
Definition builder.h:235
void update(pbes_system::pbes &x)
Definition builder.h:224
void apply(T &result, const pbes_system::exists &x)
Definition builder.h:289
void apply(T &result, const pbes_system::not_ &x)
Definition builder.h:244
void update(pbes_system::pbes &x)
Definition builder.h:536
void apply(T &result, const pbes_system::pbes_expression &x)
Definition builder.h:609
void apply(T &result, const pbes_system::forall &x)
Definition builder.h:591
void update(pbes_system::pbes_equation &x)
Definition builder.h:527
void apply(T &result, const pbes_system::not_ &x)
Definition builder.h:555
void apply(T &result, const pbes_system::propositional_variable_instantiation &x)
Definition builder.h:544
void apply(T &result, const pbes_system::and_ &x)
Definition builder.h:564
void apply(T &result, const pbes_system::imp &x)
Definition builder.h:582
void apply(T &result, const pbes_system::exists &x)
Definition builder.h:600
void apply(T &result, const pbes_system::or_ &x)
Definition builder.h:573
void apply(T &result, const pbes_system::exists &x)
Definition builder.h:139
void apply(T &result, const pbes_system::and_ &x)
Definition builder.h:103
void apply(T &result, const pbes_system::or_ &x)
Definition builder.h:112
void apply(T &result, const pbes_system::forall &x)
Definition builder.h:130
void apply(T &result, const pbes_system::propositional_variable_instantiation &x)
Definition builder.h:85
void apply(T &result, const pbes_system::propositional_variable &x)
Definition builder.h:53
void apply(T &result, const pbes_system::imp &x)
Definition builder.h:121
void update(pbes_system::pbes_equation &x)
Definition builder.h:61
void update(pbes_system::pbes &x)
Definition builder.h:73
void apply(T &result, const pbes_system::pbes_expression &x)
Definition builder.h:148
void apply(T &result, const pbes_system::not_ &x)
Definition builder.h:94
void apply(T &result, const pbes_system::imp &x)
Definition builder.h:433
void update(pbes_system::pbes &x)
Definition builder.h:385
void apply(T &result, const pbes_system::pbes_expression &x)
Definition builder.h:460
void apply(T &result, const pbes_system::forall &x)
Definition builder.h:442
void apply(T &result, const pbes_system::propositional_variable &x)
Definition builder.h:365
void apply(T &result, const pbes_system::not_ &x)
Definition builder.h:406
void apply(T &result, const pbes_system::and_ &x)
Definition builder.h:415
void apply(T &result, const pbes_system::or_ &x)
Definition builder.h:424
void update(pbes_system::pbes_equation &x)
Definition builder.h:373
void apply(T &result, const pbes_system::exists &x)
Definition builder.h:451
void apply(T &result, const pbes_system::propositional_variable_instantiation &x)
Definition builder.h:397
Visitor that implements the pbes-abstract algorithm.
Definition abstract.h:30
bool is_bound(const data::variable &v) const
Returns true if the m_quantifier_stack contains a given data variable.
Definition abstract.h:44
pbes_abstract_builder(const std::vector< data::variable > &selected_variables, bool value_true)
Definition abstract.h:38
pbes_expression_builder< pbes_abstract_builder > super
Definition abstract.h:31
void apply(T &result, const data::data_expression &d)
Visit data_expression node.
Definition abstract.h:73
void apply(T &result, const exists &x)
Visit exists node.
Definition abstract.h:105
void apply(T &result, const forall &x)
Visit forall node.
Definition abstract.h:94
std::vector< data::variable_list > m_quantifier_stack
Definition abstract.h:34
const std::vector< data::variable > m_selected_variables
Definition abstract.h:35
void pop_variables()
Removes the last added sequence of variables from the quantifier stack.
Definition abstract.h:66
void push_variables(const data::variable_list &variables)
Adds a sequence of variables to the quantifier stack.
Definition abstract.h:60
void apply(T &result, const data::data_expression &x)
Definition builder.h:35
Pair of start and finish times.
std::chrono::steady_clock::time_point finish
std::chrono::steady_clock::time_point start
std::size_t operator()(const atermpp::aterm &t) const
Definition aterm.h:483
std::size_t operator()(const atermpp::detail::reference_aterm< T > &t) const
std::size_t operator()(const mcrl2::pbes_system::pbes_expression &x) const
std::size_t operator()(const mcrl2::pbes_system::propositional_variable_instantiation &x) const