12#ifndef MCRL2_MODAL_FORMULA_BUILDER_H
13#define MCRL2_MODAL_FORMULA_BUILDER_H
15#include "mcrl2/lps/builder.h"
16#include "mcrl2/modal_formula/state_formula_specification.h"
25template <
typename Derived>
34 static_cast<Derived&>(*
this).enter(x);
36 static_cast<Derived&>(*
this).leave(x);
42template <
template <
class>
class Builder,
class Derived>
56 static_cast<Derived&>(*
this).enter(x);
58 static_cast<Derived&>(*
this).leave(x);
67 static_cast<Derived&>(*
this).enter(x);
69 static_cast<Derived&>(*
this).leave(x);
77 static_cast<Derived&>(*
this).enter(x);
79 static_cast<Derived&>(*
this).leave(x);
86 static_cast<Derived&>(*
this).enter(x);
88 static_cast<Derived&>(*
this).leave(x);
95 static_cast<Derived&>(*
this).enter(x);
97 static_cast<Derived&>(*
this).leave(x);
104 static_cast<Derived&>(*
this).enter(x);
106 static_cast<Derived&>(*
this).leave(x);
113 static_cast<Derived&>(*
this).enter(x);
115 static_cast<Derived&>(*
this).leave(x);
122 static_cast<Derived&>(*
this).enter(x);
124 static_cast<Derived&>(*
this).leave(x);
131 static_cast<Derived&>(*
this).enter(x);
133 static_cast<Derived&>(*
this).leave(x);
140 static_cast<Derived&>(*
this).enter(x);
142 static_cast<Derived&>(*
this).leave(x);
149 static_cast<Derived&>(*
this).enter(x);
202 static_cast<Derived&>(*
this).leave(x);
208template <
typename Derived>
215template <
template <
class>
class Builder,
class Derived>
229 static_cast<Derived&>(*
this).enter(x);
231 static_cast<Derived&>(*
this).leave(x);
240 static_cast<Derived&>(*
this).enter(x);
242 static_cast<Derived&>(*
this).leave(x);
250 static_cast<Derived&>(*
this).enter(x);
252 static_cast<Derived&>(*
this).leave(x);
259 static_cast<Derived&>(*
this).enter(x);
261 static_cast<Derived&>(*
this).leave(x);
268 static_cast<Derived&>(*
this).enter(x);
270 static_cast<Derived&>(*
this).leave(x);
277 static_cast<Derived&>(*
this).enter(x);
279 static_cast<Derived&>(*
this).leave(x);
286 static_cast<Derived&>(*
this).enter(x);
288 static_cast<Derived&>(*
this).leave(x);
295 static_cast<Derived&>(*
this).enter(x);
297 static_cast<Derived&>(*
this).leave(x);
304 static_cast<Derived&>(*
this).enter(x);
306 static_cast<Derived&>(*
this).leave(x);
313 static_cast<Derived&>(*
this).enter(x);
315 static_cast<Derived&>(*
this).leave(x);
322 static_cast<Derived&>(*
this).enter(x);
375 static_cast<Derived&>(*
this).leave(x);
381template <
typename Derived>
388template <
template <
class>
class Builder,
class Derived>
402 static_cast<Derived&>(*
this).enter(x);
404 static_cast<Derived&>(*
this).leave(x);
413 static_cast<Derived&>(*
this).enter(x);
415 static_cast<Derived&>(*
this).leave(x);
423 static_cast<Derived&>(*
this).enter(x);
425 static_cast<Derived&>(*
this).leave(x);
432 static_cast<Derived&>(*
this).enter(x);
434 static_cast<Derived&>(*
this).leave(x);
441 static_cast<Derived&>(*
this).enter(x);
443 static_cast<Derived&>(*
this).leave(x);
450 static_cast<Derived&>(*
this).enter(x);
452 static_cast<Derived&>(*
this).leave(x);
459 static_cast<Derived&>(*
this).enter(x);
461 static_cast<Derived&>(*
this).leave(x);
468 static_cast<Derived&>(*
this).enter(x);
470 static_cast<Derived&>(*
this).leave(x);
477 static_cast<Derived&>(*
this).enter(x);
479 static_cast<Derived&>(*
this).leave(x);
486 static_cast<Derived&>(*
this).enter(x);
488 static_cast<Derived&>(*
this).leave(x);
495 static_cast<Derived&>(*
this).enter(x);
548 static_cast<Derived&>(*
this).leave(x);
554template <
typename Derived>
561template <
template <
class>
class Builder,
class Derived>
575 static_cast<Derived&>(*
this).enter(x);
577 static_cast<Derived&>(*
this).leave(x);
586 static_cast<Derived&>(*
this).enter(x);
588 static_cast<Derived&>(*
this).leave(x);
596 static_cast<Derived&>(*
this).enter(x);
598 static_cast<Derived&>(*
this).leave(x);
605 static_cast<Derived&>(*
this).enter(x);
607 static_cast<Derived&>(*
this).leave(x);
614 static_cast<Derived&>(*
this).enter(x);
616 static_cast<Derived&>(*
this).leave(x);
623 static_cast<Derived&>(*
this).enter(x);
625 static_cast<Derived&>(*
this).leave(x);
632 static_cast<Derived&>(*
this).enter(x);
634 static_cast<Derived&>(*
this).leave(x);
641 static_cast<Derived&>(*
this).enter(x);
643 static_cast<Derived&>(*
this).leave(x);
650 static_cast<Derived&>(*
this).enter(x);
652 static_cast<Derived&>(*
this).leave(x);
660 static_cast<Derived&>(*
this).enter(x);
662 static_cast<Derived&>(*
this).leave(x);
670 static_cast<Derived&>(*
this).enter(x);
723 static_cast<Derived&>(*
this).leave(x);
729template <
typename Derived>
741template <
typename Derived>
751 static_cast<Derived&>(*
this).enter(x);
753 static_cast<Derived&>(*
this).leave(x);
761 static_cast<Derived&>(*
this).enter(x);
763 static_cast<Derived&>(*
this).leave(x);
769template <
template <
class>
class Builder,
class Derived>
782 static_cast<Derived&>(*
this).enter(x);
784 static_cast<Derived&>(*
this).leave(x);
791 static_cast<Derived&>(*
this).enter(x);
793 static_cast<Derived&>(*
this).leave(x);
800 static_cast<Derived&>(*
this).enter(x);
802 static_cast<Derived&>(*
this).leave(x);
809 static_cast<Derived&>(*
this).enter(x);
811 static_cast<Derived&>(*
this).leave(x);
818 static_cast<Derived&>(*
this).enter(x);
820 static_cast<Derived&>(*
this).leave(x);
827 static_cast<Derived&>(*
this).enter(x);
856 static_cast<Derived&>(*
this).leave(x);
862template <
typename Derived>
869template <
template <
class>
class Builder,
class Derived>
882 static_cast<Derived&>(*
this).enter(x);
884 static_cast<Derived&>(*
this).leave(x);
891 static_cast<Derived&>(*
this).enter(x);
893 static_cast<Derived&>(*
this).leave(x);
900 static_cast<Derived&>(*
this).enter(x);
902 static_cast<Derived&>(*
this).leave(x);
909 static_cast<Derived&>(*
this).enter(x);
911 static_cast<Derived&>(*
this).leave(x);
918 static_cast<Derived&>(*
this).enter(x);
920 static_cast<Derived&>(*
this).leave(x);
927 static_cast<Derived&>(*
this).enter(x);
956 static_cast<Derived&>(*
this).leave(x);
962template <
typename Derived>
969template <
template <
class>
class Builder,
class Derived>
982 static_cast<Derived&>(*
this).enter(x);
984 static_cast<Derived&>(*
this).leave(x);
991 static_cast<Derived&>(*
this).enter(x);
993 static_cast<Derived&>(*
this).leave(x);
1000 static_cast<Derived&>(*
this).enter(x);
1002 static_cast<Derived&>(*
this).leave(x);
1009 static_cast<Derived&>(*
this).enter(x);
1011 static_cast<Derived&>(*
this).leave(x);
1018 static_cast<Derived&>(*
this).enter(x);
1020 static_cast<Derived&>(*
this).leave(x);
1027 static_cast<Derived&>(*
this).enter(x);
1056 static_cast<Derived&>(*
this).leave(x);
1062template <
typename Derived>
1069template <
template <
class>
class Builder,
class Derived>
1075 using super::update;
1082 static_cast<Derived&>(*
this).enter(x);
1084 static_cast<Derived&>(*
this).leave(x);
1091 static_cast<Derived&>(*
this).enter(x);
1093 static_cast<Derived&>(*
this).leave(x);
1100 static_cast<Derived&>(*
this).enter(x);
1102 static_cast<Derived&>(*
this).leave(x);
1109 static_cast<Derived&>(*
this).enter(x);
1111 static_cast<Derived&>(*
this).leave(x);
1118 static_cast<Derived&>(*
this).enter(x);
1120 static_cast<Derived&>(*
this).leave(x);
1127 static_cast<Derived&>(*
this).enter(x);
1156 static_cast<Derived&>(*
this).leave(x);
1162template <
typename Derived>
1174template <
typename Derived>
1183 static_cast<Derived&>(*
this).enter(x);
1185 static_cast<Derived&>(*
this).leave(x);
1192template <
template <
class>
class Builder,
class Derived>
1198 using super::update;
1206 static_cast<Derived&>(*
this).enter(x);
1208 static_cast<Derived&>(*
this).leave(x);
1217 static_cast<Derived&>(*
this).enter(x);
1219 static_cast<Derived&>(*
this).leave(x);
1227 static_cast<Derived&>(*
this).enter(x);
1229 static_cast<Derived&>(*
this).leave(x);
1236 static_cast<Derived&>(*
this).enter(x);
1238 static_cast<Derived&>(*
this).leave(x);
1245 static_cast<Derived&>(*
this).enter(x);
1247 static_cast<Derived&>(*
this).leave(x);
1254 static_cast<Derived&>(*
this).enter(x);
1256 static_cast<Derived&>(*
this).leave(x);
1263 static_cast<Derived&>(*
this).enter(x);
1265 static_cast<Derived&>(*
this).leave(x);
1272 static_cast<Derived&>(*
this).enter(x);
1274 static_cast<Derived&>(*
this).leave(x);
1281 static_cast<Derived&>(*
this).enter(x);
1283 static_cast<Derived&>(*
this).leave(x);
1290 static_cast<Derived&>(*
this).enter(x);
1292 static_cast<Derived&>(*
this).leave(x);
1299 static_cast<Derived&>(*
this).enter(x);
1301 static_cast<Derived&>(*
this).leave(x);
1308 static_cast<Derived&>(*
this).enter(x);
1310 static_cast<Derived&>(*
this).leave(x);
1317 static_cast<Derived&>(*
this).enter(x);
1319 static_cast<Derived&>(*
this).leave(x);
1326 static_cast<Derived&>(*
this).enter(x);
1328 static_cast<Derived&>(*
this).leave(x);
1335 static_cast<Derived&>(*
this).enter(x);
1337 static_cast<Derived&>(*
this).leave(x);
1344 static_cast<Derived&>(*
this).enter(x);
1346 static_cast<Derived&>(*
this).leave(x);
1353 static_cast<Derived&>(*
this).enter(x);
1355 static_cast<Derived&>(*
this).leave(x);
1363 static_cast<Derived&>(*
this).enter(x);
1365 static_cast<Derived&>(*
this).leave(x);
1373 static_cast<Derived&>(*
this).enter(x);
1375 static_cast<Derived&>(*
this).leave(x);
1383 static_cast<Derived&>(*
this).enter(x);
1385 static_cast<Derived&>(*
this).leave(x);
1393 static_cast<Derived&>(*
this).enter(x);
1395 static_cast<Derived&>(*
this).leave(x);
1402 static_cast<Derived&>(*
this).enter(x);
1404 static_cast<Derived&>(*
this).leave(x);
1411 static_cast<Derived&>(*
this).enter(x);
1413 static_cast<Derived&>(*
this).leave(x);
1420 static_cast<Derived&>(*
this).enter(x);
1422 static_cast<Derived&>(*
this).leave(x);
1427 static_cast<Derived&>(*
this).enter(x);
1429 static_cast<Derived&>(*
this).apply(result_action_labels, x.action_labels());
1430 x.action_labels() = result_action_labels;
1432 static_cast<Derived&>(*
this).apply(result_formula, x
.formula());
1434 static_cast<Derived&>(*
this).leave(x);
1441 static_cast<Derived&>(*
this).enter(x);
1546 static_cast<Derived&>(*
this).leave(x);
1552template <
typename Derived>
1559template <
template <
class>
class Builder,
class Derived>
1565 using super::update;
1573 static_cast<Derived&>(*
this).enter(x);
1575 static_cast<Derived&>(*
this).leave(x);
1584 static_cast<Derived&>(*
this).enter(x);
1586 static_cast<Derived&>(*
this).leave(x);
1594 static_cast<Derived&>(*
this).enter(x);
1596 static_cast<Derived&>(*
this).leave(x);
1603 static_cast<Derived&>(*
this).enter(x);
1605 static_cast<Derived&>(*
this).leave(x);
1612 static_cast<Derived&>(*
this).enter(x);
1614 static_cast<Derived&>(*
this).leave(x);
1621 static_cast<Derived&>(*
this).enter(x);
1623 static_cast<Derived&>(*
this).leave(x);
1630 static_cast<Derived&>(*
this).enter(x);
1632 static_cast<Derived&>(*
this).leave(x);
1639 static_cast<Derived&>(*
this).enter(x);
1641 static_cast<Derived&>(*
this).leave(x);
1648 static_cast<Derived&>(*
this).enter(x);
1650 static_cast<Derived&>(*
this).leave(x);
1657 static_cast<Derived&>(*
this).enter(x);
1659 static_cast<Derived&>(*
this).leave(x);
1666 static_cast<Derived&>(*
this).enter(x);
1668 static_cast<Derived&>(*
this).leave(x);
1675 static_cast<Derived&>(*
this).enter(x);
1677 static_cast<Derived&>(*
this).leave(x);
1684 static_cast<Derived&>(*
this).enter(x);
1686 static_cast<Derived&>(*
this).leave(x);
1693 static_cast<Derived&>(*
this).enter(x);
1695 static_cast<Derived&>(*
this).leave(x);
1702 static_cast<Derived&>(*
this).enter(x);
1704 static_cast<Derived&>(*
this).leave(x);
1711 static_cast<Derived&>(*
this).enter(x);
1713 static_cast<Derived&>(*
this).leave(x);
1720 static_cast<Derived&>(*
this).enter(x);
1722 static_cast<Derived&>(*
this).leave(x);
1730 static_cast<Derived&>(*
this).enter(x);
1732 static_cast<Derived&>(*
this).leave(x);
1740 static_cast<Derived&>(*
this).enter(x);
1742 static_cast<Derived&>(*
this).leave(x);
1750 static_cast<Derived&>(*
this).enter(x);
1752 static_cast<Derived&>(*
this).leave(x);
1760 static_cast<Derived&>(*
this).enter(x);
1762 static_cast<Derived&>(*
this).leave(x);
1769 static_cast<Derived&>(*
this).enter(x);
1771 static_cast<Derived&>(*
this).leave(x);
1778 static_cast<Derived&>(*
this).enter(x);
1780 static_cast<Derived&>(*
this).leave(x);
1787 static_cast<Derived&>(*
this).enter(x);
1789 static_cast<Derived&>(*
this).leave(x);
1794 static_cast<Derived&>(*
this).enter(x);
1796 static_cast<Derived&>(*
this).apply(result_formula, x
.formula());
1798 static_cast<Derived&>(*
this).leave(x);
1805 static_cast<Derived&>(*
this).enter(x);
1910 static_cast<Derived&>(*
this).leave(x);
1916template <
typename Derived>
1923template <
template <
class>
class Builder,
class Derived>
1929 using super::update;
1937 static_cast<Derived&>(*
this).enter(x);
1939 static_cast<Derived&>(*
this).leave(x);
1948 static_cast<Derived&>(*
this).enter(x);
1950 static_cast<Derived&>(*
this).leave(x);
1958 static_cast<Derived&>(*
this).enter(x);
1960 static_cast<Derived&>(*
this).leave(x);
1967 static_cast<Derived&>(*
this).enter(x);
1969 static_cast<Derived&>(*
this).leave(x);
1976 static_cast<Derived&>(*
this).enter(x);
1978 static_cast<Derived&>(*
this).leave(x);
1985 static_cast<Derived&>(*
this).enter(x);
1987 static_cast<Derived&>(*
this).leave(x);
1994 static_cast<Derived&>(*
this).enter(x);
1996 static_cast<Derived&>(*
this).leave(x);
2003 static_cast<Derived&>(*
this).enter(x);
2005 static_cast<Derived&>(*
this).leave(x);
2012 static_cast<Derived&>(*
this).enter(x);
2014 static_cast<Derived&>(*
this).leave(x);
2021 static_cast<Derived&>(*
this).enter(x);
2023 static_cast<Derived&>(*
this).leave(x);
2030 static_cast<Derived&>(*
this).enter(x);
2032 static_cast<Derived&>(*
this).leave(x);
2039 static_cast<Derived&>(*
this).enter(x);
2041 static_cast<Derived&>(*
this).leave(x);
2048 static_cast<Derived&>(*
this).enter(x);
2050 static_cast<Derived&>(*
this).leave(x);
2057 static_cast<Derived&>(*
this).enter(x);
2059 static_cast<Derived&>(*
this).leave(x);
2066 static_cast<Derived&>(*
this).enter(x);
2068 static_cast<Derived&>(*
this).leave(x);
2075 static_cast<Derived&>(*
this).enter(x);
2077 static_cast<Derived&>(*
this).leave(x);
2084 static_cast<Derived&>(*
this).enter(x);
2086 static_cast<Derived&>(*
this).leave(x);
2094 static_cast<Derived&>(*
this).enter(x);
2096 static_cast<Derived&>(*
this).leave(x);
2104 static_cast<Derived&>(*
this).enter(x);
2106 static_cast<Derived&>(*
this).leave(x);
2114 static_cast<Derived&>(*
this).enter(x);
2116 static_cast<Derived&>(*
this).leave(x);
2124 static_cast<Derived&>(*
this).enter(x);
2126 static_cast<Derived&>(*
this).leave(x);
2133 static_cast<Derived&>(*
this).enter(x);
2135 static_cast<Derived&>(*
this).leave(x);
2142 static_cast<Derived&>(*
this).enter(x);
2144 static_cast<Derived&>(*
this).leave(x);
2151 static_cast<Derived&>(*
this).enter(x);
2153 static_cast<Derived&>(*
this).leave(x);
2158 static_cast<Derived&>(*
this).enter(x);
2160 static_cast<Derived&>(*
this).apply(result_formula, x
.formula());
2162 static_cast<Derived&>(*
this).leave(x);
2169 static_cast<Derived&>(*
this).enter(x);
2274 static_cast<Derived&>(*
this).leave(x);
2280template <
typename Derived>
2287template <
template <
class>
class Builder,
class Derived>
2293 using super::update;
2301 static_cast<Derived&>(*
this).enter(x);
2303 static_cast<Derived&>(*
this).leave(x);
2312 static_cast<Derived&>(*
this).enter(x);
2314 static_cast<Derived&>(*
this).leave(x);
2322 static_cast<Derived&>(*
this).enter(x);
2324 static_cast<Derived&>(*
this).leave(x);
2331 static_cast<Derived&>(*
this).enter(x);
2333 static_cast<Derived&>(*
this).leave(x);
2340 static_cast<Derived&>(*
this).enter(x);
2342 static_cast<Derived&>(*
this).leave(x);
2349 static_cast<Derived&>(*
this).enter(x);
2351 static_cast<Derived&>(*
this).leave(x);
2358 static_cast<Derived&>(*
this).enter(x);
2360 static_cast<Derived&>(*
this).leave(x);
2367 static_cast<Derived&>(*
this).enter(x);
2369 static_cast<Derived&>(*
this).leave(x);
2376 static_cast<Derived&>(*
this).enter(x);
2378 static_cast<Derived&>(*
this).leave(x);
2385 static_cast<Derived&>(*
this).enter(x);
2387 static_cast<Derived&>(*
this).leave(x);
2394 static_cast<Derived&>(*
this).enter(x);
2396 static_cast<Derived&>(*
this).leave(x);
2403 static_cast<Derived&>(*
this).enter(x);
2405 static_cast<Derived&>(*
this).leave(x);
2412 static_cast<Derived&>(*
this).enter(x);
2414 static_cast<Derived&>(*
this).leave(x);
2421 static_cast<Derived&>(*
this).enter(x);
2423 static_cast<Derived&>(*
this).leave(x);
2430 static_cast<Derived&>(*
this).enter(x);
2432 static_cast<Derived&>(*
this).leave(x);
2439 static_cast<Derived&>(*
this).enter(x);
2441 static_cast<Derived&>(*
this).leave(x);
2448 static_cast<Derived&>(*
this).enter(x);
2450 static_cast<Derived&>(*
this).leave(x);
2458 static_cast<Derived&>(*
this).enter(x);
2460 static_cast<Derived&>(*
this).leave(x);
2469 static_cast<Derived&>(*
this).enter(x);
2471 static_cast<Derived&>(*
this).leave(x);
2480 static_cast<Derived&>(*
this).enter(x);
2482 static_cast<Derived&>(*
this).leave(x);
2491 static_cast<Derived&>(*
this).enter(x);
2493 static_cast<Derived&>(*
this).leave(x);
2502 static_cast<Derived&>(*
this).enter(x);
2504 static_cast<Derived&>(*
this).leave(x);
2512 static_cast<Derived&>(*
this).enter(x);
2514 static_cast<Derived&>(*
this).leave(x);
2521 static_cast<Derived&>(*
this).enter(x);
2523 static_cast<Derived&>(*
this).leave(x);
2528 static_cast<Derived&>(*
this).enter(x);
2530 static_cast<Derived&>(*
this).apply(result_formula, x
.formula());
2532 static_cast<Derived&>(*
this).leave(x);
2539 static_cast<Derived&>(*
this).enter(x);
2644 static_cast<Derived&>(*
this).leave(x);
2650template <
typename Derived>
aterm_string(const aterm_string &t) noexcept=default
bool operator==(const unprotected_aterm_core &t) const
Comparison operator.
sort_expression sort() const
Returns the sort of the data expression.
data_specification()
Default constructor. Generate a data specification that contains only booleans and positive numbers.
\brief An untyped parameter
Linear process specification.
\brief An untyped multi action or data application
Standard exception class for reporting runtime errors.
D_ParserTables parser_tables_mcrl2
The main namespace for the aterm++ library.
void syntax_error_fn(struct D_Parser *ap)
Custom syntax error function that prints both the line number and the column.
D_ParseNode * ambiguity_fn(struct D_Parser *, int n, struct D_ParseNode **v)
Function for resolving parser ambiguities.
void warn_left_merge_merge(const parse_node &)
Prints a warning for each occurrence of 'x ||_ y || z' in the parse tree.
atermpp::aterm_string identifier_string
String type of the LPS library. Identifier strings are represented internally as ATerms.
void warn_and_or(const parse_node &)
Prints a warning for each occurrence of 'x && y || z' in the parse tree.
Namespace for system defined sort bool_.
const basic_sort & bool_()
Constructor for sort expression Bool.
application not_(const data_expression &arg0)
Application of function symbol !.
Namespace for system defined sort real_.
application negate(const data_expression &arg0)
Application of function symbol -.
Namespace for all data library functionality.
bool is_data_expression(const atermpp::aterm &x)
Test for a data_expression expression.
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
atermpp::term_list< assignment > assignment_list
\brief list of assignments
The main namespace for the LPS library.
The main namespace for the Process library.
atermpp::term_list< action_label > action_label_list
\brief list of action_labels
atermpp::term_list< action > action_list
\brief list of actions
bool is_untyped_multi_action(const atermpp::aterm &x)
expression builder that visits all sub expressions
Wrapper for D_Parser and its corresponding D_ParserTables.
parse_node parse(const std::string &text, unsigned int start_symbol_index=0, bool partial_parses=false)
Parses a string. N.B. The user is responsible for destruction of the returned value by calling destro...
parser(D_ParserTables &tables, D_AmbiguityFn ambiguity_fn=nullptr, D_SyntaxErrorFn syntax_error_fn=nullptr, std::size_t max_error_message_count=1)
unsigned int start_symbol_index(const std::string &name) const
expression traverser that visits all sub expressions
std::size_t operator()(const atermpp::detail::reference_aterm< T > &t) const