mCRL2
Loading...
Searching...
No Matches
set64.h
Go to the documentation of this file.
1// Author(s): Jeroen Keiren
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/data/set.h
10/// \brief The standard sort set_.
11///
12/// This file was generated from the data sort specification
13/// mcrl2/data/build/set.spec.
14
15#ifndef MCRL2_DATA_SET64_H
16#define MCRL2_DATA_SET64_H
17
18#include "functional" // std::function
19#include "mcrl2/utilities/exception.h"
20#include "mcrl2/data/basic_sort.h"
21#include "mcrl2/data/function_sort.h"
22#include "mcrl2/data/function_symbol.h"
23#include "mcrl2/data/application.h"
24#include "mcrl2/data/data_equation.h"
25#include "mcrl2/data/standard.h"
26#include "mcrl2/data/forall.h"
27#include "mcrl2/data/container_sort.h"
28#include "mcrl2/data/bool.h"
29#include "mcrl2/data/fset64.h"
30
31/// \brief Namespace for system defined sort set_.
32namespace mcrl2::data::sort_set
33{
34
35 /// \brief Constructor for sort expression Set(S)
36 /// \param s A sort expression
37 /// \return Sort expression set_(s)
38 inline
40 {
42 return set_;
43 }
44
45 /// \brief Recogniser for sort expression Set(s)
46 /// \param e A sort expression
47 /// \return true iff e is a container sort of which the name matches
48 /// set_
49 inline
50 bool is_set(const sort_expression& e)
51 {
53 {
55 }
56 return false;
57 }
58
59
60 /// \brief Generate identifier \@set.
61 /// \return Identifier \@set.
62 inline
63 const core::identifier_string& constructor_name()
64 {
65 static core::identifier_string constructor_name = core::identifier_string("@set");
66 return constructor_name;
67 }
68
69 /// \brief Constructor for function symbol \@set.
70 /// \param s A sort expression.
71 /// \return Function symbol constructor.
72 inline
74 {
76 return constructor;
77 }
78
79 /// \brief Recogniser for function \@set.
80 /// \param e A data expression.
81 /// \return true iff e is the function symbol matching \@set.
82 inline
84 {
86 {
87 return atermpp::down_cast<function_symbol>(e).name() == constructor_name();
88 }
89 return false;
90 }
91
92 /// \brief Application of function symbol \@set.
93 /// \param[in] s A sort expression.
94 /// \param[in] arg0 A data expression.
95 /// \param[in] arg1 A data expression.
96 /// \return Application of \@set to a number of arguments.
97 inline
98 application constructor(const sort_expression& s, const data_expression& arg0, const data_expression& arg1)
99 {
100 return sort_set::constructor(s)(arg0, arg1);
101 }
102
103 /// \brief Make an application of function symbol \@set.
104 /// \param[out] result The data expression where the \@set expression is put.
105 /// \param[in] s A sort expression.
106 /// \param[in] arg0 A data expression.
107 /// \param[in] arg1 A data expression.
108 inline
109 void make_constructor(data_expression& result, const sort_expression& s, const data_expression& arg0, const data_expression& arg1)
110 {
111 make_application(result, sort_set::constructor(s),arg0, arg1);
112 }
113
114 /// \brief Recogniser for application of \@set.
115 /// \param e A data expression.
116 /// \return true iff e is an application of function symbol constructor to a
117 /// number of arguments.
118 inline
120 {
121 return is_application(e) && is_constructor_function_symbol(atermpp::down_cast<application>(e).head());
122 }
123 /// \brief Give all system defined constructors for set_.
124 /// \param s A sort expression.
125 /// \return All system defined constructors for set_.
126 inline
128 {
129 function_symbol_vector result;
130 result.push_back(sort_set::constructor(s));
131
132 return result;
133 }
134 /// \brief Give all defined constructors which can be used in mCRL2 specs for set_.
135 /// \param s A sort expression.
136 /// \return All system defined constructors that can be used in an mCRL2 specification for set_.
137 inline
139 {
140 function_symbol_vector result;
141 result.push_back(sort_set::constructor(s));
142
143 return result;
144 }
145 // The typedef is the sort that maps a function symbol to an function that rewrites it as well as a string of a function that can be used to implement it
147 /// \brief Give all system defined constructors which have an implementation in C++ and not in rewrite rules for set_.
148 /// \param s A sort expression.
149 /// \return All system defined constructors that are to be implemented in C++ for set_.
150 inline
152 {
153 implementation_map result;
154 return result;
155 }
156
157 /// \brief Generate identifier \@setfset.
158 /// \return Identifier \@setfset.
159 inline
160 const core::identifier_string& set_fset_name()
161 {
162 static core::identifier_string set_fset_name = core::identifier_string("@setfset");
163 return set_fset_name;
164 }
165
166 /// \brief Constructor for function symbol \@setfset.
167 /// \param s A sort expression.
168 /// \return Function symbol set_fset.
169 inline
171 {
173 return set_fset;
174 }
175
176 /// \brief Recogniser for function \@setfset.
177 /// \param e A data expression.
178 /// \return true iff e is the function symbol matching \@setfset.
179 inline
181 {
183 {
184 return atermpp::down_cast<function_symbol>(e).name() == set_fset_name();
185 }
186 return false;
187 }
188
189 /// \brief Application of function symbol \@setfset.
190 /// \param[in] s A sort expression.
191 /// \param[in] arg0 A data expression.
192 /// \return Application of \@setfset to a number of arguments.
193 inline
194 application set_fset(const sort_expression& s, const data_expression& arg0)
195 {
196 return sort_set::set_fset(s)(arg0);
197 }
198
199 /// \brief Make an application of function symbol \@setfset.
200 /// \param[out] result The data expression where the \@setfset expression is put.
201 /// \param[in] s A sort expression.
202 /// \param[in] arg0 A data expression.
203 inline
204 void make_set_fset(data_expression& result, const sort_expression& s, const data_expression& arg0)
205 {
206 make_application(result, sort_set::set_fset(s),arg0);
207 }
208
209 /// \brief Recogniser for application of \@setfset.
210 /// \param e A data expression.
211 /// \return true iff e is an application of function symbol set_fset to a
212 /// number of arguments.
213 inline
215 {
216 return is_application(e) && is_set_fset_function_symbol(atermpp::down_cast<application>(e).head());
217 }
218
219 /// \brief Generate identifier \@setcomp.
220 /// \return Identifier \@setcomp.
221 inline
222 const core::identifier_string& set_comprehension_name()
223 {
224 static core::identifier_string set_comprehension_name = core::identifier_string("@setcomp");
225 return set_comprehension_name;
226 }
227
228 /// \brief Constructor for function symbol \@setcomp.
229 /// \param s A sort expression.
230 /// \return Function symbol set_comprehension.
231 inline
233 {
235 return set_comprehension;
236 }
237
238 /// \brief Recogniser for function \@setcomp.
239 /// \param e A data expression.
240 /// \return true iff e is the function symbol matching \@setcomp.
241 inline
243 {
245 {
246 return atermpp::down_cast<function_symbol>(e).name() == set_comprehension_name();
247 }
248 return false;
249 }
250
251 /// \brief Application of function symbol \@setcomp.
252 /// \param[in] s A sort expression.
253 /// \param[in] arg0 A data expression.
254 /// \return Application of \@setcomp to a number of arguments.
255 inline
256 application set_comprehension(const sort_expression& s, const data_expression& arg0)
257 {
259 }
260
261 /// \brief Make an application of function symbol \@setcomp.
262 /// \param[out] result The data expression where the \@setcomp expression is put.
263 /// \param[in] s A sort expression.
264 /// \param[in] arg0 A data expression.
265 inline
266 void make_set_comprehension(data_expression& result, const sort_expression& s, const data_expression& arg0)
267 {
268 make_application(result, sort_set::set_comprehension(s),arg0);
269 }
270
271 /// \brief Recogniser for application of \@setcomp.
272 /// \param e A data expression.
273 /// \return true iff e is an application of function symbol set_comprehension to a
274 /// number of arguments.
275 inline
277 {
278 return is_application(e) && is_set_comprehension_function_symbol(atermpp::down_cast<application>(e).head());
279 }
280
281 /// \brief Generate identifier in.
282 /// \return Identifier in.
283 inline
284 const core::identifier_string& in_name()
285 {
286 static core::identifier_string in_name = core::identifier_string("in");
287 return in_name;
288 }
289
290 // This function is not intended for public use and therefore not documented in Doxygen.
291 inline
293 {
296 return in;
297 }
298
299 /// \brief Recogniser for function in.
300 /// \param e A data expression.
301 /// \return true iff e is the function symbol matching in.
302 inline
303 bool is_in_function_symbol(const atermpp::aterm& e)
304 {
306 {
307 const function_symbol& f = atermpp::down_cast<function_symbol>(e);
308 return f.name() == in_name() && atermpp::down_cast<function_sort>(f.sort()).domain().size() == 2;
309 }
310 return false;
311 }
312
313 /// \brief Application of function symbol in.
314 /// \param[in] s A sort expression.
315 /// \param[in] arg0 A data expression.
316 /// \param[in] arg1 A data expression.
317 /// \return Application of in to a number of arguments.
318 inline
319 application in(const sort_expression& s, const data_expression& arg0, const data_expression& arg1)
320 {
321 return sort_set::in(s, arg0.sort(), arg1.sort())(arg0, arg1);
322 }
323
324 /// \brief Make an application of function symbol in.
325 /// \param[out] result The data expression where the in expression is put.
326 /// \param[in] s A sort expression.
327 /// \param[in] arg0 A data expression.
328 /// \param[in] arg1 A data expression.
329 inline
330 void make_in(data_expression& result, const sort_expression& s, const data_expression& arg0, const data_expression& arg1)
331 {
332 make_application(result, sort_set::in(s, arg0.sort(), arg1.sort()),arg0, arg1);
333 }
334
335 /// \brief Recogniser for application of in.
336 /// \param e A data expression.
337 /// \return true iff e is an application of function symbol in to a
338 /// number of arguments.
339 inline
340 bool is_in_application(const atermpp::aterm& e)
341 {
342 return is_application(e) && is_in_function_symbol(atermpp::down_cast<application>(e).head());
343 }
344
345 /// \brief Generate identifier !.
346 /// \return Identifier !.
347 inline
348 const core::identifier_string& complement_name()
349 {
350 static core::identifier_string complement_name = core::identifier_string("!");
351 return complement_name;
352 }
353
354 /// \brief Constructor for function symbol !.
355 /// \param s A sort expression.
356 /// \return Function symbol complement.
357 inline
359 {
361 return complement;
362 }
363
364 /// \brief Recogniser for function !.
365 /// \param e A data expression.
366 /// \return true iff e is the function symbol matching !.
367 inline
369 {
371 {
372 return atermpp::down_cast<function_symbol>(e).name() == complement_name();
373 }
374 return false;
375 }
376
377 /// \brief Application of function symbol !.
378 /// \param[in] s A sort expression.
379 /// \param[in] arg0 A data expression.
380 /// \return Application of ! to a number of arguments.
381 inline
382 application complement(const sort_expression& s, const data_expression& arg0)
383 {
384 return sort_set::complement(s)(arg0);
385 }
386
387 /// \brief Make an application of function symbol !.
388 /// \param[out] result The data expression where the ! expression is put.
389 /// \param[in] s A sort expression.
390 /// \param[in] arg0 A data expression.
391 inline
392 void make_complement(data_expression& result, const sort_expression& s, const data_expression& arg0)
393 {
394 make_application(result, sort_set::complement(s),arg0);
395 }
396
397 /// \brief Recogniser for application of !.
398 /// \param e A data expression.
399 /// \return true iff e is an application of function symbol complement to a
400 /// number of arguments.
401 inline
403 {
404 return is_application(e) && is_complement_function_symbol(atermpp::down_cast<application>(e).head());
405 }
406
407 /// \brief Generate identifier +.
408 /// \return Identifier +.
409 inline
410 const core::identifier_string& union_name()
411 {
412 static core::identifier_string union_name = core::identifier_string("+");
413 return union_name;
414 }
415
416 // This function is not intended for public use and therefore not documented in Doxygen.
417 inline
419 {
420 sort_expression target_sort;
421 if (s0 == set_(s) && s1 == set_(s))
422 {
423 target_sort = set_(s);
424 }
425 else if (s0 == sort_fset::fset(s) && s1 == sort_fset::fset(s))
426 {
427 target_sort = sort_fset::fset(s);
428 }
429 else
430 {
431 throw mcrl2::runtime_error("Cannot compute target sort for union_ with domain sorts " + pp(s0) + ", " + pp(s1) + ". ");
432 }
433
435 return union_;
436 }
437
438 /// \brief Recogniser for function +.
439 /// \param e A data expression.
440 /// \return true iff e is the function symbol matching +.
441 inline
443 {
445 {
446 const function_symbol& f = atermpp::down_cast<function_symbol>(e);
447 return f.name() == union_name() && atermpp::down_cast<function_sort>(f.sort()).domain().size() == 2;
448 }
449 return false;
450 }
451
452 /// \brief Application of function symbol +.
453 /// \param[in] s A sort expression.
454 /// \param[in] arg0 A data expression.
455 /// \param[in] arg1 A data expression.
456 /// \return Application of + to a number of arguments.
457 inline
458 application union_(const sort_expression& s, const data_expression& arg0, const data_expression& arg1)
459 {
460 return sort_set::union_(s, arg0.sort(), arg1.sort())(arg0, arg1);
461 }
462
463 /// \brief Make an application of function symbol +.
464 /// \param[out] result The data expression where the + expression is put.
465 /// \param[in] s A sort expression.
466 /// \param[in] arg0 A data expression.
467 /// \param[in] arg1 A data expression.
468 inline
469 void make_union(data_expression& result, const sort_expression& s, const data_expression& arg0, const data_expression& arg1)
470 {
471 make_application(result, sort_set::union_(s, arg0.sort(), arg1.sort()),arg0, arg1);
472 }
473
474 /// \brief Recogniser for application of +.
475 /// \param e A data expression.
476 /// \return true iff e is an application of function symbol union_ to a
477 /// number of arguments.
478 inline
479 bool is_union_application(const atermpp::aterm& e)
480 {
481 return is_application(e) && is_union_function_symbol(atermpp::down_cast<application>(e).head());
482 }
483
484 /// \brief Generate identifier *.
485 /// \return Identifier *.
486 inline
487 const core::identifier_string& intersection_name()
488 {
489 static core::identifier_string intersection_name = core::identifier_string("*");
490 return intersection_name;
491 }
492
493 // This function is not intended for public use and therefore not documented in Doxygen.
494 inline
496 {
497 sort_expression target_sort;
498 if (s0 == set_(s) && s1 == set_(s))
499 {
500 target_sort = set_(s);
501 }
502 else if (s0 == sort_fset::fset(s) && s1 == set_(s))
503 {
504 target_sort = sort_fset::fset(s);
505 }
506 else if (s0 == set_(s) && s1 == sort_fset::fset(s))
507 {
508 target_sort = sort_fset::fset(s);
509 }
510 else if (s0 == sort_fset::fset(s) && s1 == sort_fset::fset(s))
511 {
512 target_sort = sort_fset::fset(s);
513 }
514 else
515 {
516 throw mcrl2::runtime_error("Cannot compute target sort for intersection with domain sorts " + pp(s0) + ", " + pp(s1) + ". ");
517 }
518
520 return intersection;
521 }
522
523 /// \brief Recogniser for function *.
524 /// \param e A data expression.
525 /// \return true iff e is the function symbol matching *.
526 inline
528 {
530 {
531 const function_symbol& f = atermpp::down_cast<function_symbol>(e);
532 return f.name() == intersection_name() && atermpp::down_cast<function_sort>(f.sort()).domain().size() == 2;
533 }
534 return false;
535 }
536
537 /// \brief Application of function symbol *.
538 /// \param[in] s A sort expression.
539 /// \param[in] arg0 A data expression.
540 /// \param[in] arg1 A data expression.
541 /// \return Application of * to a number of arguments.
542 inline
543 application intersection(const sort_expression& s, const data_expression& arg0, const data_expression& arg1)
544 {
546 }
547
548 /// \brief Make an application of function symbol *.
549 /// \param[out] result The data expression where the * expression is put.
550 /// \param[in] s A sort expression.
551 /// \param[in] arg0 A data expression.
552 /// \param[in] arg1 A data expression.
553 inline
554 void make_intersection(data_expression& result, const sort_expression& s, const data_expression& arg0, const data_expression& arg1)
555 {
556 make_application(result, sort_set::intersection(s, arg0.sort(), arg1.sort()),arg0, arg1);
557 }
558
559 /// \brief Recogniser for application of *.
560 /// \param e A data expression.
561 /// \return true iff e is an application of function symbol intersection to a
562 /// number of arguments.
563 inline
565 {
566 return is_application(e) && is_intersection_function_symbol(atermpp::down_cast<application>(e).head());
567 }
568
569 /// \brief Generate identifier -.
570 /// \return Identifier -.
571 inline
572 const core::identifier_string& difference_name()
573 {
574 static core::identifier_string difference_name = core::identifier_string("-");
575 return difference_name;
576 }
577
578 // This function is not intended for public use and therefore not documented in Doxygen.
579 inline
581 {
582 sort_expression target_sort;
583 if (s0 == set_(s) && s1 == set_(s))
584 {
585 target_sort = set_(s);
586 }
587 else if (s0 == sort_fset::fset(s) && s1 == set_(s))
588 {
589 target_sort = sort_fset::fset(s);
590 }
591 else if (s0 == sort_fset::fset(s) && s1 == sort_fset::fset(s))
592 {
593 target_sort = sort_fset::fset(s);
594 }
595 else
596 {
597 throw mcrl2::runtime_error("Cannot compute target sort for difference with domain sorts " + pp(s0) + ", " + pp(s1) + ". ");
598 }
599
601 return difference;
602 }
603
604 /// \brief Recogniser for function -.
605 /// \param e A data expression.
606 /// \return true iff e is the function symbol matching -.
607 inline
609 {
611 {
612 const function_symbol& f = atermpp::down_cast<function_symbol>(e);
613 return f.name() == difference_name() && atermpp::down_cast<function_sort>(f.sort()).domain().size() == 2;
614 }
615 return false;
616 }
617
618 /// \brief Application of function symbol -.
619 /// \param[in] s A sort expression.
620 /// \param[in] arg0 A data expression.
621 /// \param[in] arg1 A data expression.
622 /// \return Application of - to a number of arguments.
623 inline
624 application difference(const sort_expression& s, const data_expression& arg0, const data_expression& arg1)
625 {
627 }
628
629 /// \brief Make an application of function symbol -.
630 /// \param[out] result The data expression where the - expression is put.
631 /// \param[in] s A sort expression.
632 /// \param[in] arg0 A data expression.
633 /// \param[in] arg1 A data expression.
634 inline
635 void make_difference(data_expression& result, const sort_expression& s, const data_expression& arg0, const data_expression& arg1)
636 {
637 make_application(result, sort_set::difference(s, arg0.sort(), arg1.sort()),arg0, arg1);
638 }
639
640 /// \brief Recogniser for application of -.
641 /// \param e A data expression.
642 /// \return true iff e is an application of function symbol difference to a
643 /// number of arguments.
644 inline
646 {
647 return is_application(e) && is_difference_function_symbol(atermpp::down_cast<application>(e).head());
648 }
649
650 /// \brief Generate identifier \@false_.
651 /// \return Identifier \@false_.
652 inline
653 const core::identifier_string& false_function_name()
654 {
655 static core::identifier_string false_function_name = core::identifier_string("@false_");
656 return false_function_name;
657 }
658
659 /// \brief Constructor for function symbol \@false_.
660 /// \param s A sort expression.
661 /// \return Function symbol false_function.
662 inline
664 {
666 return false_function;
667 }
668
669 /// \brief Recogniser for function \@false_.
670 /// \param e A data expression.
671 /// \return true iff e is the function symbol matching \@false_.
672 inline
674 {
676 {
677 return atermpp::down_cast<function_symbol>(e).name() == false_function_name();
678 }
679 return false;
680 }
681
682 /// \brief Application of function symbol \@false_.
683 /// \param[in] s A sort expression.
684 /// \param[in] arg0 A data expression.
685 /// \return Application of \@false_ to a number of arguments.
686 inline
687 application false_function(const sort_expression& s, const data_expression& arg0)
688 {
690 }
691
692 /// \brief Make an application of function symbol \@false_.
693 /// \param[out] result The data expression where the \@false_ expression is put.
694 /// \param[in] s A sort expression.
695 /// \param[in] arg0 A data expression.
696 inline
697 void make_false_function(data_expression& result, const sort_expression& s, const data_expression& arg0)
698 {
699 make_application(result, sort_set::false_function(s),arg0);
700 }
701
702 /// \brief Recogniser for application of \@false_.
703 /// \param e A data expression.
704 /// \return true iff e is an application of function symbol false_function to a
705 /// number of arguments.
706 inline
708 {
709 return is_application(e) && is_false_function_function_symbol(atermpp::down_cast<application>(e).head());
710 }
711
712 /// \brief Generate identifier \@true_.
713 /// \return Identifier \@true_.
714 inline
715 const core::identifier_string& true_function_name()
716 {
717 static core::identifier_string true_function_name = core::identifier_string("@true_");
718 return true_function_name;
719 }
720
721 /// \brief Constructor for function symbol \@true_.
722 /// \param s A sort expression.
723 /// \return Function symbol true_function.
724 inline
726 {
728 return true_function;
729 }
730
731 /// \brief Recogniser for function \@true_.
732 /// \param e A data expression.
733 /// \return true iff e is the function symbol matching \@true_.
734 inline
736 {
738 {
739 return atermpp::down_cast<function_symbol>(e).name() == true_function_name();
740 }
741 return false;
742 }
743
744 /// \brief Application of function symbol \@true_.
745 /// \param[in] s A sort expression.
746 /// \param[in] arg0 A data expression.
747 /// \return Application of \@true_ to a number of arguments.
748 inline
749 application true_function(const sort_expression& s, const data_expression& arg0)
750 {
751 return sort_set::true_function(s)(arg0);
752 }
753
754 /// \brief Make an application of function symbol \@true_.
755 /// \param[out] result The data expression where the \@true_ expression is put.
756 /// \param[in] s A sort expression.
757 /// \param[in] arg0 A data expression.
758 inline
759 void make_true_function(data_expression& result, const sort_expression& s, const data_expression& arg0)
760 {
761 make_application(result, sort_set::true_function(s),arg0);
762 }
763
764 /// \brief Recogniser for application of \@true_.
765 /// \param e A data expression.
766 /// \return true iff e is an application of function symbol true_function to a
767 /// number of arguments.
768 inline
770 {
771 return is_application(e) && is_true_function_function_symbol(atermpp::down_cast<application>(e).head());
772 }
773
774 /// \brief Generate identifier \@not_.
775 /// \return Identifier \@not_.
776 inline
777 const core::identifier_string& not_function_name()
778 {
779 static core::identifier_string not_function_name = core::identifier_string("@not_");
780 return not_function_name;
781 }
782
783 /// \brief Constructor for function symbol \@not_.
784 /// \param s A sort expression.
785 /// \return Function symbol not_function.
786 inline
788 {
790 return not_function;
791 }
792
793 /// \brief Recogniser for function \@not_.
794 /// \param e A data expression.
795 /// \return true iff e is the function symbol matching \@not_.
796 inline
798 {
800 {
801 return atermpp::down_cast<function_symbol>(e).name() == not_function_name();
802 }
803 return false;
804 }
805
806 /// \brief Application of function symbol \@not_.
807 /// \param[in] s A sort expression.
808 /// \param[in] arg0 A data expression.
809 /// \return Application of \@not_ to a number of arguments.
810 inline
811 application not_function(const sort_expression& s, const data_expression& arg0)
812 {
813 return sort_set::not_function(s)(arg0);
814 }
815
816 /// \brief Make an application of function symbol \@not_.
817 /// \param[out] result The data expression where the \@not_ expression is put.
818 /// \param[in] s A sort expression.
819 /// \param[in] arg0 A data expression.
820 inline
821 void make_not_function(data_expression& result, const sort_expression& s, const data_expression& arg0)
822 {
823 make_application(result, sort_set::not_function(s),arg0);
824 }
825
826 /// \brief Recogniser for application of \@not_.
827 /// \param e A data expression.
828 /// \return true iff e is an application of function symbol not_function to a
829 /// number of arguments.
830 inline
832 {
833 return is_application(e) && is_not_function_function_symbol(atermpp::down_cast<application>(e).head());
834 }
835
836 /// \brief Generate identifier \@and_.
837 /// \return Identifier \@and_.
838 inline
839 const core::identifier_string& and_function_name()
840 {
841 static core::identifier_string and_function_name = core::identifier_string("@and_");
842 return and_function_name;
843 }
844
845 /// \brief Constructor for function symbol \@and_.
846 /// \param s A sort expression.
847 /// \return Function symbol and_function.
848 inline
850 {
852 return and_function;
853 }
854
855 /// \brief Recogniser for function \@and_.
856 /// \param e A data expression.
857 /// \return true iff e is the function symbol matching \@and_.
858 inline
860 {
862 {
863 return atermpp::down_cast<function_symbol>(e).name() == and_function_name();
864 }
865 return false;
866 }
867
868 /// \brief Application of function symbol \@and_.
869 /// \param[in] s A sort expression.
870 /// \param[in] arg0 A data expression.
871 /// \param[in] arg1 A data expression.
872 /// \return Application of \@and_ to a number of arguments.
873 inline
874 application and_function(const sort_expression& s, const data_expression& arg0, const data_expression& arg1)
875 {
876 return sort_set::and_function(s)(arg0, arg1);
877 }
878
879 /// \brief Make an application of function symbol \@and_.
880 /// \param[out] result The data expression where the \@and_ expression is put.
881 /// \param[in] s A sort expression.
882 /// \param[in] arg0 A data expression.
883 /// \param[in] arg1 A data expression.
884 inline
885 void make_and_function(data_expression& result, const sort_expression& s, const data_expression& arg0, const data_expression& arg1)
886 {
887 make_application(result, sort_set::and_function(s),arg0, arg1);
888 }
889
890 /// \brief Recogniser for application of \@and_.
891 /// \param e A data expression.
892 /// \return true iff e is an application of function symbol and_function to a
893 /// number of arguments.
894 inline
896 {
897 return is_application(e) && is_and_function_function_symbol(atermpp::down_cast<application>(e).head());
898 }
899
900 /// \brief Generate identifier \@or_.
901 /// \return Identifier \@or_.
902 inline
903 const core::identifier_string& or_function_name()
904 {
905 static core::identifier_string or_function_name = core::identifier_string("@or_");
906 return or_function_name;
907 }
908
909 /// \brief Constructor for function symbol \@or_.
910 /// \param s A sort expression.
911 /// \return Function symbol or_function.
912 inline
914 {
916 return or_function;
917 }
918
919 /// \brief Recogniser for function \@or_.
920 /// \param e A data expression.
921 /// \return true iff e is the function symbol matching \@or_.
922 inline
924 {
926 {
927 return atermpp::down_cast<function_symbol>(e).name() == or_function_name();
928 }
929 return false;
930 }
931
932 /// \brief Application of function symbol \@or_.
933 /// \param[in] s A sort expression.
934 /// \param[in] arg0 A data expression.
935 /// \param[in] arg1 A data expression.
936 /// \return Application of \@or_ to a number of arguments.
937 inline
938 application or_function(const sort_expression& s, const data_expression& arg0, const data_expression& arg1)
939 {
940 return sort_set::or_function(s)(arg0, arg1);
941 }
942
943 /// \brief Make an application of function symbol \@or_.
944 /// \param[out] result The data expression where the \@or_ expression is put.
945 /// \param[in] s A sort expression.
946 /// \param[in] arg0 A data expression.
947 /// \param[in] arg1 A data expression.
948 inline
949 void make_or_function(data_expression& result, const sort_expression& s, const data_expression& arg0, const data_expression& arg1)
950 {
951 make_application(result, sort_set::or_function(s),arg0, arg1);
952 }
953
954 /// \brief Recogniser for application of \@or_.
955 /// \param e A data expression.
956 /// \return true iff e is an application of function symbol or_function to a
957 /// number of arguments.
958 inline
960 {
961 return is_application(e) && is_or_function_function_symbol(atermpp::down_cast<application>(e).head());
962 }
963
964 /// \brief Generate identifier \@fset_union.
965 /// \return Identifier \@fset_union.
966 inline
967 const core::identifier_string& fset_union_name()
968 {
969 static core::identifier_string fset_union_name = core::identifier_string("@fset_union");
970 return fset_union_name;
971 }
972
973 /// \brief Constructor for function symbol \@fset_union.
974 /// \param s A sort expression.
975 /// \return Function symbol fset_union.
976 inline
978 {
980 return fset_union;
981 }
982
983 /// \brief Recogniser for function \@fset_union.
984 /// \param e A data expression.
985 /// \return true iff e is the function symbol matching \@fset_union.
986 inline
988 {
990 {
991 return atermpp::down_cast<function_symbol>(e).name() == fset_union_name();
992 }
993 return false;
994 }
995
996 /// \brief Application of function symbol \@fset_union.
997 /// \param[in] s A sort expression.
998 /// \param[in] arg0 A data expression.
999 /// \param[in] arg1 A data expression.
1000 /// \param[in] arg2 A data expression.
1001 /// \param[in] arg3 A data expression.
1002 /// \return Application of \@fset_union to a number of arguments.
1003 inline
1004 application fset_union(const sort_expression& s, const data_expression& arg0, const data_expression& arg1, const data_expression& arg2, const data_expression& arg3)
1005 {
1006 return sort_set::fset_union(s)(arg0, arg1, arg2, arg3);
1007 }
1008
1009 /// \brief Make an application of function symbol \@fset_union.
1010 /// \param[out] result The data expression where the \@fset_union expression is put.
1011 /// \param[in] s A sort expression.
1012 /// \param[in] arg0 A data expression.
1013 /// \param[in] arg1 A data expression.
1014 /// \param[in] arg2 A data expression.
1015 /// \param[in] arg3 A data expression.
1016 inline
1017 void make_fset_union(data_expression& result, const sort_expression& s, const data_expression& arg0, const data_expression& arg1, const data_expression& arg2, const data_expression& arg3)
1018 {
1019 make_application(result, sort_set::fset_union(s),arg0, arg1, arg2, arg3);
1020 }
1021
1022 /// \brief Recogniser for application of \@fset_union.
1023 /// \param e A data expression.
1024 /// \return true iff e is an application of function symbol fset_union to a
1025 /// number of arguments.
1026 inline
1028 {
1029 return is_application(e) && is_fset_union_function_symbol(atermpp::down_cast<application>(e).head());
1030 }
1031
1032 /// \brief Generate identifier \@fset_inter.
1033 /// \return Identifier \@fset_inter.
1034 inline
1035 const core::identifier_string& fset_intersection_name()
1036 {
1037 static core::identifier_string fset_intersection_name = core::identifier_string("@fset_inter");
1038 return fset_intersection_name;
1039 }
1040
1041 /// \brief Constructor for function symbol \@fset_inter.
1042 /// \param s A sort expression.
1043 /// \return Function symbol fset_intersection.
1044 inline
1046 {
1048 return fset_intersection;
1049 }
1050
1051 /// \brief Recogniser for function \@fset_inter.
1052 /// \param e A data expression.
1053 /// \return true iff e is the function symbol matching \@fset_inter.
1054 inline
1056 {
1058 {
1059 return atermpp::down_cast<function_symbol>(e).name() == fset_intersection_name();
1060 }
1061 return false;
1062 }
1063
1064 /// \brief Application of function symbol \@fset_inter.
1065 /// \param[in] s A sort expression.
1066 /// \param[in] arg0 A data expression.
1067 /// \param[in] arg1 A data expression.
1068 /// \param[in] arg2 A data expression.
1069 /// \param[in] arg3 A data expression.
1070 /// \return Application of \@fset_inter to a number of arguments.
1071 inline
1072 application fset_intersection(const sort_expression& s, const data_expression& arg0, const data_expression& arg1, const data_expression& arg2, const data_expression& arg3)
1073 {
1074 return sort_set::fset_intersection(s)(arg0, arg1, arg2, arg3);
1075 }
1076
1077 /// \brief Make an application of function symbol \@fset_inter.
1078 /// \param[out] result The data expression where the \@fset_inter expression is put.
1079 /// \param[in] s A sort expression.
1080 /// \param[in] arg0 A data expression.
1081 /// \param[in] arg1 A data expression.
1082 /// \param[in] arg2 A data expression.
1083 /// \param[in] arg3 A data expression.
1084 inline
1085 void make_fset_intersection(data_expression& result, const sort_expression& s, const data_expression& arg0, const data_expression& arg1, const data_expression& arg2, const data_expression& arg3)
1086 {
1087 make_application(result, sort_set::fset_intersection(s),arg0, arg1, arg2, arg3);
1088 }
1089
1090 /// \brief Recogniser for application of \@fset_inter.
1091 /// \param e A data expression.
1092 /// \return true iff e is an application of function symbol fset_intersection to a
1093 /// number of arguments.
1094 inline
1096 {
1097 return is_application(e) && is_fset_intersection_function_symbol(atermpp::down_cast<application>(e).head());
1098 }
1099 /// \brief Give all system defined mappings for set_
1100 /// \param s A sort expression
1101 /// \return All system defined mappings for set_
1102 inline
1104 {
1105 function_symbol_vector result;
1106 result.push_back(sort_set::set_fset(s));
1107 result.push_back(sort_set::set_comprehension(s));
1108 result.push_back(sort_set::in(s, s, set_(s)));
1109 result.push_back(sort_set::complement(s));
1110 result.push_back(sort_set::union_(s, set_(s), set_(s)));
1111 result.push_back(sort_set::intersection(s, set_(s), set_(s)));
1112 result.push_back(sort_set::intersection(s, sort_fset::fset(s), set_(s)));
1113 result.push_back(sort_set::intersection(s, set_(s), sort_fset::fset(s)));
1114 result.push_back(sort_set::difference(s, set_(s), set_(s)));
1115 result.push_back(sort_set::difference(s, sort_fset::fset(s), set_(s)));
1116 result.push_back(sort_set::false_function(s));
1117 result.push_back(sort_set::true_function(s));
1118 result.push_back(sort_set::not_function(s));
1119 result.push_back(sort_set::and_function(s));
1120 result.push_back(sort_set::or_function(s));
1121 result.push_back(sort_set::fset_union(s));
1122 result.push_back(sort_set::fset_intersection(s));
1123 return result;
1124 }
1125
1126 /// \brief Give all system defined mappings and constructors for set_
1127 /// \param s A sort expression
1128 /// \return All system defined mappings for set_
1129 inline
1131 {
1132 function_symbol_vector result=set_generate_functions_code(s);
1133 for(const function_symbol& f: set_generate_constructors_code(s))
1134 {
1135 result.push_back(f);
1136 }
1137 return result;
1138 }
1139
1140 /// \brief Give all system defined mappings that can be used in mCRL2 specs for set_
1141 /// \param s A sort expression
1142 /// \return All system defined mappings for that can be used in mCRL2 specificationis set_
1143 inline
1145 {
1146 function_symbol_vector result;
1147 result.push_back(sort_set::set_fset(s));
1148 result.push_back(sort_set::set_comprehension(s));
1149 result.push_back(sort_set::in(s, s, set_(s)));
1150 result.push_back(sort_set::complement(s));
1151 result.push_back(sort_set::union_(s, set_(s), set_(s)));
1152 result.push_back(sort_set::intersection(s, set_(s), set_(s)));
1153 result.push_back(sort_set::intersection(s, sort_fset::fset(s), set_(s)));
1154 result.push_back(sort_set::intersection(s, set_(s), sort_fset::fset(s)));
1155 result.push_back(sort_set::difference(s, set_(s), set_(s)));
1156 result.push_back(sort_set::difference(s, sort_fset::fset(s), set_(s)));
1157 result.push_back(sort_set::false_function(s));
1158 result.push_back(sort_set::true_function(s));
1159 result.push_back(sort_set::not_function(s));
1160 result.push_back(sort_set::and_function(s));
1161 result.push_back(sort_set::or_function(s));
1162 result.push_back(sort_set::fset_union(s));
1163 result.push_back(sort_set::fset_intersection(s));
1164 return result;
1165 }
1166
1167
1168 // The typedef is the sort that maps a function symbol to an function that rewrites it as well as a string of a function that can be used to implement it
1170 /// \brief Give all system defined mappings that are to be implemented in C++ code for set_
1171 /// \param s A sort expression
1172 /// \return A mapping from C++ implementable function symbols to system defined mappings implemented in C++ code for set_
1173 inline
1175 {
1176 implementation_map result;
1177 return result;
1178 }
1179 ///\brief Function for projecting out argument.
1180 /// left from an application.
1181 /// \param e A data expression.
1182 /// \pre left is defined for e.
1183 /// \return The argument of e that corresponds to left.
1184 inline
1185 const data_expression& left(const data_expression& e)
1186 {
1188 return atermpp::down_cast<application>(e)[0];
1189 }
1190
1191 ///\brief Function for projecting out argument.
1192 /// right from an application.
1193 /// \param e A data expression.
1194 /// \pre right is defined for e.
1195 /// \return The argument of e that corresponds to right.
1196 inline
1197 const data_expression& right(const data_expression& e)
1198 {
1200 return atermpp::down_cast<application>(e)[1];
1201 }
1202
1203 ///\brief Function for projecting out argument.
1204 /// arg from an application.
1205 /// \param e A data expression.
1206 /// \pre arg is defined for e.
1207 /// \return The argument of e that corresponds to arg.
1208 inline
1209 const data_expression& arg(const data_expression& e)
1210 {
1212 return atermpp::down_cast<application>(e)[0];
1213 }
1214
1215 ///\brief Function for projecting out argument.
1216 /// arg1 from an application.
1217 /// \param e A data expression.
1218 /// \pre arg1 is defined for e.
1219 /// \return The argument of e that corresponds to arg1.
1220 inline
1221 const data_expression& arg1(const data_expression& e)
1222 {
1224 return atermpp::down_cast<application>(e)[0];
1225 }
1226
1227 ///\brief Function for projecting out argument.
1228 /// arg2 from an application.
1229 /// \param e A data expression.
1230 /// \pre arg2 is defined for e.
1231 /// \return The argument of e that corresponds to arg2.
1232 inline
1233 const data_expression& arg2(const data_expression& e)
1234 {
1236 return atermpp::down_cast<application>(e)[1];
1237 }
1238
1239 ///\brief Function for projecting out argument.
1240 /// arg3 from an application.
1241 /// \param e A data expression.
1242 /// \pre arg3 is defined for e.
1243 /// \return The argument of e that corresponds to arg3.
1244 inline
1245 const data_expression& arg3(const data_expression& e)
1246 {
1248 return atermpp::down_cast<application>(e)[2];
1249 }
1250
1251 ///\brief Function for projecting out argument.
1252 /// arg4 from an application.
1253 /// \param e A data expression.
1254 /// \pre arg4 is defined for e.
1255 /// \return The argument of e that corresponds to arg4.
1256 inline
1257 const data_expression& arg4(const data_expression& e)
1258 {
1260 return atermpp::down_cast<application>(e)[3];
1261 }
1262
1263 /// \brief Give all system defined equations for set_
1264 /// \param s A sort expression
1265 /// \return All system defined equations for sort set_
1266 inline
1268 {
1269 variable vd("d",s);
1270 variable ve("e",s);
1271 variable vs("s",sort_fset::fset(s));
1272 variable vt("t",sort_fset::fset(s));
1275 variable vx("x",set_(s));
1276 variable vy("y",set_(s));
1277 variable vc("c",s);
1278
1279 data_equation_vector result;
1280 result.emplace_back(variable_list({vs}), set_fset(s, vs), constructor(s, false_function(s), vs));
1281 result.emplace_back(variable_list({vf}), sort_set::set_comprehension(s, vf), constructor(s, vf, sort_fset::empty(s)));
1282 result.emplace_back(variable_list({ve, vf, vs}), in(s, ve, constructor(s, vf, vs)), not_equal_to(vf(ve), in(s, ve, vs)));
1283 result.emplace_back(variable_list({vf, vg, vs, vt}), equal_to(constructor(s, vf, vs), constructor(s, vg, vt)), forall(variable_list({vc}), equal_to(equal_to(vf(vc), vg(vc)), equal_to(in(s, vc, vs), in(s, vc, vt)))));
1284 result.emplace_back(variable_list({vx, vy}), less(vx, vy), sort_bool::and_(less_equal(vx, vy), not_equal_to(vx, vy)));
1285 result.emplace_back(variable_list({vx, vy}), less_equal(vx, vy), equal_to(intersection(s, vx, vy), vx));
1286 result.emplace_back(variable_list({vf, vg, vs, vt}), less_total(constructor(s, vf, vs), constructor(s, vg, vt)), sort_bool::or_(less_total(vs, vt), sort_bool::and_(equal_to(vs, vt), less_total(vf, vg))));
1287 result.emplace_back(variable_list({vf, vs}), complement(s, constructor(s, vf, vs)), constructor(s, not_function(s, vf), vs));
1288 result.emplace_back(variable_list({vx}), union_(s, vx, vx), vx);
1289 result.emplace_back(variable_list({vx, vy}), union_(s, vx, union_(s, vx, vy)), union_(s, vx, vy));
1290 result.emplace_back(variable_list({vx, vy}), union_(s, vx, union_(s, vy, vx)), union_(s, vy, vx));
1291 result.emplace_back(variable_list({vx, vy}), union_(s, union_(s, vx, vy), vx), union_(s, vx, vy));
1292 result.emplace_back(variable_list({vx, vy}), union_(s, union_(s, vy, vx), vx), union_(s, vy, vx));
1293 result.emplace_back(variable_list({vf, vg, vs, vt}), union_(s, constructor(s, vf, vs), constructor(s, vg, vt)), constructor(s, or_function(s, vf, vg), fset_union(s, vf, vg, vs, vt)));
1294 result.emplace_back(variable_list({vx}), intersection(s, vx, vx), vx);
1295 result.emplace_back(variable_list({vx, vy}), intersection(s, vx, intersection(s, vx, vy)), intersection(s, vx, vy));
1296 result.emplace_back(variable_list({vx, vy}), intersection(s, vx, intersection(s, vy, vx)), intersection(s, vy, vx));
1297 result.emplace_back(variable_list({vx, vy}), intersection(s, intersection(s, vx, vy), vx), intersection(s, vx, vy));
1298 result.emplace_back(variable_list({vx, vy}), intersection(s, intersection(s, vy, vx), vx), intersection(s, vy, vx));
1299 result.emplace_back(variable_list({vf, vg, vs, vt}), intersection(s, constructor(s, vf, vs), constructor(s, vg, vt)), constructor(s, and_function(s, vf, vg), fset_intersection(s, vf, vg, vs, vt)));
1300 result.emplace_back(variable_list({vx}), intersection(s, sort_fset::empty(s), vx), sort_fset::empty(s));
1301 result.emplace_back(variable_list({vd, vs, vx}), intersection(s, sort_fset::cons_(s, vd, vs), vx), if_(in(s, vd, vx), sort_fset::cons_(s, vd, intersection(s, vs, vx)), intersection(s, vs, vx)));
1302 result.emplace_back(variable_list({vs, vx}), intersection(s, vx, vs), intersection(s, vs, vx));
1303 result.emplace_back(variable_list({vx, vy}), difference(s, vx, vy), intersection(s, vx, complement(s, vy)));
1304 result.emplace_back(variable_list({vs, vx}), difference(s, vs, vx), intersection(s, vs, complement(s, vx)));
1305 result.emplace_back(variable_list({ve}), false_function(s, ve), sort_bool::false_());
1306 result.emplace_back(variable_list({ve}), true_function(s, ve), sort_bool::true_());
1307 result.emplace_back(variable_list(), equal_to(false_function(s), true_function(s)), sort_bool::false_());
1308 result.emplace_back(variable_list(), equal_to(true_function(s), false_function(s)), sort_bool::false_());
1309 result.emplace_back(variable_list({ve, vf}), not_function(s, vf)(ve), sort_bool::not_(vf(ve)));
1310 result.emplace_back(variable_list(), not_function(s, false_function(s)), true_function(s));
1311 result.emplace_back(variable_list(), not_function(s, true_function(s)), false_function(s));
1312 result.emplace_back(variable_list({ve, vf, vg}), and_function(s, vf, vg)(ve), sort_bool::and_(vf(ve), vg(ve)));
1313 result.emplace_back(variable_list({vf}), and_function(s, vf, vf), vf);
1314 result.emplace_back(variable_list({vf}), and_function(s, vf, false_function(s)), false_function(s));
1315 result.emplace_back(variable_list({vf}), and_function(s, false_function(s), vf), false_function(s));
1316 result.emplace_back(variable_list({vf}), and_function(s, vf, true_function(s)), vf);
1317 result.emplace_back(variable_list({vf}), and_function(s, true_function(s), vf), vf);
1318 result.emplace_back(variable_list({vf}), or_function(s, vf, vf), vf);
1319 result.emplace_back(variable_list({vf}), or_function(s, vf, false_function(s)), vf);
1320 result.emplace_back(variable_list({vf}), or_function(s, false_function(s), vf), vf);
1321 result.emplace_back(variable_list({vf}), or_function(s, vf, true_function(s)), true_function(s));
1322 result.emplace_back(variable_list({vf}), or_function(s, true_function(s), vf), true_function(s));
1323 result.emplace_back(variable_list({ve, vf, vg}), or_function(s, vf, vg)(ve), sort_bool::or_(vf(ve), vg(ve)));
1324 result.emplace_back(variable_list({vs, vt}), fset_union(s, false_function(s), false_function(s), vs, vt), union_(s, vs, vt));
1325 result.emplace_back(variable_list({vf, vg}), fset_union(s, vf, vg, sort_fset::empty(s), sort_fset::empty(s)), sort_fset::empty(s));
1326 result.emplace_back(variable_list({vd, vf, vg, vs}), fset_union(s, vf, vg, sort_fset::cons_(s, vd, vs), sort_fset::empty(s)), sort_fset::cinsert(s, vd, sort_bool::not_(vg(vd)), fset_union(s, vf, vg, vs, sort_fset::empty(s))));
1327 result.emplace_back(variable_list({ve, vf, vg, vt}), fset_union(s, vf, vg, sort_fset::empty(s), sort_fset::cons_(s, ve, vt)), sort_fset::cinsert(s, ve, sort_bool::not_(vf(ve)), fset_union(s, vf, vg, sort_fset::empty(s), vt)));
1328 result.emplace_back(variable_list({vd, vf, vg, vs, vt}), fset_union(s, vf, vg, sort_fset::cons_(s, vd, vs), sort_fset::cons_(s, vd, vt)), sort_fset::cinsert(s, vd, equal_to(vf(vd), vg(vd)), fset_union(s, vf, vg, vs, vt)));
1329 result.emplace_back(variable_list({vd, ve, vf, vg, vs, vt}), less_total(vd, ve), fset_union(s, vf, vg, sort_fset::cons_(s, vd, vs), sort_fset::cons_(s, ve, vt)), sort_fset::cinsert(s, vd, sort_bool::not_(vg(vd)), fset_union(s, vf, vg, vs, sort_fset::cons_(s, ve, vt))));
1330 result.emplace_back(variable_list({vd, ve, vf, vg, vs, vt}), less_total(ve, vd), fset_union(s, vf, vg, sort_fset::cons_(s, vd, vs), sort_fset::cons_(s, ve, vt)), sort_fset::cinsert(s, ve, sort_bool::not_(vf(ve)), fset_union(s, vf, vg, sort_fset::cons_(s, vd, vs), vt)));
1331 result.emplace_back(variable_list({vf, vg}), fset_intersection(s, vf, vg, sort_fset::empty(s), sort_fset::empty(s)), sort_fset::empty(s));
1332 result.emplace_back(variable_list({vd, vf, vg, vs}), fset_intersection(s, vf, vg, sort_fset::cons_(s, vd, vs), sort_fset::empty(s)), sort_fset::cinsert(s, vd, vg(vd), fset_intersection(s, vf, vg, vs, sort_fset::empty(s))));
1333 result.emplace_back(variable_list({ve, vf, vg, vt}), fset_intersection(s, vf, vg, sort_fset::empty(s), sort_fset::cons_(s, ve, vt)), sort_fset::cinsert(s, ve, vf(ve), fset_intersection(s, vf, vg, sort_fset::empty(s), vt)));
1334 result.emplace_back(variable_list({vd, vf, vg, vs, vt}), fset_intersection(s, vf, vg, sort_fset::cons_(s, vd, vs), sort_fset::cons_(s, vd, vt)), sort_fset::cinsert(s, vd, equal_to(vf(vd), vg(vd)), fset_intersection(s, vf, vg, vs, vt)));
1335 result.emplace_back(variable_list({vd, ve, vf, vg, vs, vt}), less_total(vd, ve), fset_intersection(s, vf, vg, sort_fset::cons_(s, vd, vs), sort_fset::cons_(s, ve, vt)), sort_fset::cinsert(s, vd, vg(vd), fset_intersection(s, vf, vg, vs, sort_fset::cons_(s, ve, vt))));
1336 result.emplace_back(variable_list({vd, ve, vf, vg, vs, vt}), less_total(ve, vd), fset_intersection(s, vf, vg, sort_fset::cons_(s, vd, vs), sort_fset::cons_(s, ve, vt)), sort_fset::cinsert(s, ve, vf(ve), fset_intersection(s, vf, vg, sort_fset::cons_(s, vd, vs), vt)));
1337 return result;
1338 }
1339
1340} // namespace mcrl2::data::sort_set
1341
1342#endif // MCRL2_DATA_SET64_H
A unordered_map class in which aterms can be stored.
\brief A container sort
container_sort(const container_type &container_name, const sort_expression &element_sort)
\brief Constructor Z14.
const container_type & container_name() const
container_sort(const atermpp::aterm &term)
application operator()(const data_expression &e1, const data_expression &e2, const data_expression &e3, const data_expression &e4) const
Apply a data expression to four data expressions.
application operator()(const data_expression &e1, const data_expression &e2) const
Apply a data expression to two data expressions.
sort_expression sort() const
Returns the sort of the data expression.
Definition data.cpp:107
application operator()(const data_expression &e) const
Apply a data expression to a data expression.
\brief A function symbol
function_symbol(const core::identifier_string &name, const sort_expression &sort)
Constructor.
\brief Container type for sets
set_container()
\brief Default constructor X3.
\brief A sort expression
sort_expression(const sort_expression &) noexcept=default
Move semantics.
sort_expression & operator=(sort_expression &&) noexcept=default
\brief A data variable
Definition variable.h:25
Namespace for system defined sort bool_.
Definition bool.h:29
const basic_sort & bool_()
Constructor for sort expression Bool.
Definition bool.h:41
Namespace for system defined sort fset.
Definition fset1.h:32
container_sort fset(const sort_expression &s)
Constructor for sort expression FSet(S)
Definition fset1.h:38
Namespace for system defined sort set_.
Definition set1.h:33
const core::identifier_string & fset_intersection_name()
Generate identifier @fset_inter.
Definition set1.h:1035
void make_in(data_expression &result, const sort_expression &s, const data_expression &arg0, const data_expression &arg1)
Make an application of function symbol in.
Definition set1.h:330
function_symbol true_function(const sort_expression &s)
Constructor for function symbol @true_.
Definition set1.h:725
const core::identifier_string & or_function_name()
Generate identifier @or_.
Definition set1.h:903
bool is_set_comprehension_application(const atermpp::aterm &e)
Recogniser for application of @setcomp.
Definition set1.h:276
const core::identifier_string & constructor_name()
Generate identifier @set.
Definition set1.h:63
implementation_map set_cpp_implementable_mappings(const sort_expression &)
Give all system defined mappings that are to be implemented in C++ code for set_.
Definition set1.h:1174
application fset_intersection(const sort_expression &s, const data_expression &arg0, const data_expression &arg1, const data_expression &arg2, const data_expression &arg3)
Application of function symbol @fset_inter.
Definition set1.h:1072
bool is_false_function_function_symbol(const atermpp::aterm &e)
Recogniser for function @false_.
Definition set1.h:673
bool is_difference_function_symbol(const atermpp::aterm &e)
Recogniser for function -.
Definition set1.h:608
bool is_not_function_application(const atermpp::aterm &e)
Recogniser for application of @not_.
Definition set1.h:831
bool is_and_function_application(const atermpp::aterm &e)
Recogniser for application of @and_.
Definition set1.h:895
void make_or_function(data_expression &result, const sort_expression &s, const data_expression &arg0, const data_expression &arg1)
Make an application of function symbol @or_.
Definition set1.h:949
function_symbol_vector set_generate_constructors_and_functions_code(const sort_expression &s)
Give all system defined mappings and constructors for set_.
Definition set1.h:1130
application or_function(const sort_expression &s, const data_expression &arg0, const data_expression &arg1)
Application of function symbol @or_.
Definition set1.h:938
bool is_fset_intersection_function_symbol(const atermpp::aterm &e)
Recogniser for function @fset_inter.
Definition set1.h:1055
bool is_set(const sort_expression &e)
Recogniser for sort expression Set(s)
Definition set1.h:50
function_symbol or_function(const sort_expression &s)
Constructor for function symbol @or_.
Definition set1.h:913
void make_complement(data_expression &result, const sort_expression &s, const data_expression &arg0)
Make an application of function symbol !.
Definition set1.h:392
bool is_union_application(const atermpp::aterm &e)
Recogniser for application of +.
Definition set1.h:479
const core::identifier_string & false_function_name()
Generate identifier @false_.
Definition set1.h:653
bool is_in_function_symbol(const atermpp::aterm &e)
Recogniser for function in.
Definition set1.h:303
const data_expression & arg4(const data_expression &e)
Function for projecting out argument. arg4 from an application.
Definition set1.h:1257
bool is_true_function_function_symbol(const atermpp::aterm &e)
Recogniser for function @true_.
Definition set1.h:735
bool is_complement_application(const atermpp::aterm &e)
Recogniser for application of !.
Definition set1.h:402
bool is_or_function_function_symbol(const atermpp::aterm &e)
Recogniser for function @or_.
Definition set1.h:923
function_symbol fset_intersection(const sort_expression &s)
Constructor for function symbol @fset_inter.
Definition set1.h:1045
const core::identifier_string & set_comprehension_name()
Generate identifier @setcomp.
Definition set1.h:222
void make_fset_union(data_expression &result, const sort_expression &s, const data_expression &arg0, const data_expression &arg1, const data_expression &arg2, const data_expression &arg3)
Make an application of function symbol @fset_union.
Definition set1.h:1017
bool is_fset_union_application(const atermpp::aterm &e)
Recogniser for application of @fset_union.
Definition set1.h:1027
bool is_false_function_application(const atermpp::aterm &e)
Recogniser for application of @false_.
Definition set1.h:707
const data_expression & left(const data_expression &e)
Function for projecting out argument. left from an application.
Definition set1.h:1185
bool is_not_function_function_symbol(const atermpp::aterm &e)
Recogniser for function @not_.
Definition set1.h:797
function_symbol and_function(const sort_expression &s)
Constructor for function symbol @and_.
Definition set1.h:849
bool is_set_comprehension_function_symbol(const atermpp::aterm &e)
Recogniser for function @setcomp.
Definition set1.h:242
bool is_in_application(const atermpp::aterm &e)
Recogniser for application of in.
Definition set1.h:340
const core::identifier_string & not_function_name()
Generate identifier @not_.
Definition set1.h:777
application not_function(const sort_expression &s, const data_expression &arg0)
Application of function symbol @not_.
Definition set1.h:811
const core::identifier_string & in_name()
Generate identifier in.
Definition set1.h:284
function_symbol_vector set_generate_constructors_code(const sort_expression &s)
Give all system defined constructors for set_.
Definition set1.h:127
bool is_fset_intersection_application(const atermpp::aterm &e)
Recogniser for application of @fset_inter.
Definition set1.h:1095
bool is_difference_application(const atermpp::aterm &e)
Recogniser for application of -.
Definition set1.h:645
function_symbol not_function(const sort_expression &s)
Constructor for function symbol @not_.
Definition set1.h:787
const data_expression & arg(const data_expression &e)
Function for projecting out argument. arg from an application.
Definition set1.h:1209
application union_(const sort_expression &s, const data_expression &arg0, const data_expression &arg1)
Application of function symbol +.
Definition set1.h:458
bool is_constructor_application(const atermpp::aterm &e)
Recogniser for application of @set.
Definition set1.h:119
const core::identifier_string & fset_union_name()
Generate identifier @fset_union.
Definition set1.h:967
bool is_set_fset_application(const atermpp::aterm &e)
Recogniser for application of @setfset.
Definition set1.h:214
void make_intersection(data_expression &result, const sort_expression &s, const data_expression &arg0, const data_expression &arg1)
Make an application of function symbol *.
Definition set1.h:554
application difference(const sort_expression &s, const data_expression &arg0, const data_expression &arg1)
Application of function symbol -.
Definition set1.h:624
application complement(const sort_expression &s, const data_expression &arg0)
Application of function symbol !.
Definition set1.h:382
const core::identifier_string & complement_name()
Generate identifier !.
Definition set1.h:348
function_symbol intersection(const sort_expression &s, const sort_expression &s0, const sort_expression &s1)
Definition set1.h:495
application set_fset(const sort_expression &s, const data_expression &arg0)
Application of function symbol @setfset.
Definition set1.h:194
const core::identifier_string & and_function_name()
Generate identifier @and_.
Definition set1.h:839
application intersection(const sort_expression &s, const data_expression &arg0, const data_expression &arg1)
Application of function symbol *.
Definition set1.h:543
bool is_fset_union_function_symbol(const atermpp::aterm &e)
Recogniser for function @fset_union.
Definition set1.h:987
const data_expression & arg2(const data_expression &e)
Function for projecting out argument. arg2 from an application.
Definition set1.h:1233
function_symbol fset_union(const sort_expression &s)
Constructor for function symbol @fset_union.
Definition set1.h:977
void make_and_function(data_expression &result, const sort_expression &s, const data_expression &arg0, const data_expression &arg1)
Make an application of function symbol @and_.
Definition set1.h:885
container_sort set_(const sort_expression &s)
Constructor for sort expression Set(S)
Definition set1.h:39
bool is_set_fset_function_symbol(const atermpp::aterm &e)
Recogniser for function @setfset.
Definition set1.h:180
application set_comprehension(const sort_expression &s, const data_expression &arg0)
Application of function symbol @setcomp.
Definition set1.h:256
const core::identifier_string & intersection_name()
Generate identifier *.
Definition set1.h:487
void make_fset_intersection(data_expression &result, const sort_expression &s, const data_expression &arg0, const data_expression &arg1, const data_expression &arg2, const data_expression &arg3)
Make an application of function symbol @fset_inter.
Definition set1.h:1085
function_symbol constructor(const sort_expression &s)
Constructor for function symbol @set.
Definition set1.h:73
const data_expression & arg3(const data_expression &e)
Function for projecting out argument. arg3 from an application.
Definition set1.h:1245
const data_expression & right(const data_expression &e)
Function for projecting out argument. right from an application.
Definition set1.h:1197
function_symbol false_function(const sort_expression &s)
Constructor for function symbol @false_.
Definition set1.h:663
void make_constructor(data_expression &result, const sort_expression &s, const data_expression &arg0, const data_expression &arg1)
Make an application of function symbol @set.
Definition set1.h:109
const core::identifier_string & set_fset_name()
Generate identifier @setfset.
Definition set1.h:160
const core::identifier_string & union_name()
Generate identifier +.
Definition set1.h:410
bool is_complement_function_symbol(const atermpp::aterm &e)
Recogniser for function !.
Definition set1.h:368
function_symbol in(const sort_expression &, const sort_expression &s0, const sort_expression &s1)
Definition set1.h:292
function_symbol union_(const sort_expression &s, const sort_expression &s0, const sort_expression &s1)
Definition set1.h:418
bool is_constructor_function_symbol(const atermpp::aterm &e)
Recogniser for function @set.
Definition set1.h:83
function_symbol_vector set_generate_functions_code(const sort_expression &s)
Give all system defined mappings for set_.
Definition set1.h:1103
application fset_union(const sort_expression &s, const data_expression &arg0, const data_expression &arg1, const data_expression &arg2, const data_expression &arg3)
Application of function symbol @fset_union.
Definition set1.h:1004
function_symbol_vector set_mCRL2_usable_constructors(const sort_expression &s)
Give all defined constructors which can be used in mCRL2 specs for set_.
Definition set1.h:138
const core::identifier_string & difference_name()
Generate identifier -.
Definition set1.h:572
void make_set_comprehension(data_expression &result, const sort_expression &s, const data_expression &arg0)
Make an application of function symbol @setcomp.
Definition set1.h:266
application true_function(const sort_expression &s, const data_expression &arg0)
Application of function symbol @true_.
Definition set1.h:749
void make_not_function(data_expression &result, const sort_expression &s, const data_expression &arg0)
Make an application of function symbol @not_.
Definition set1.h:821
bool is_or_function_application(const atermpp::aterm &e)
Recogniser for application of @or_.
Definition set1.h:959
const core::identifier_string & true_function_name()
Generate identifier @true_.
Definition set1.h:715
void make_false_function(data_expression &result, const sort_expression &s, const data_expression &arg0)
Make an application of function symbol @false_.
Definition set1.h:697
void make_true_function(data_expression &result, const sort_expression &s, const data_expression &arg0)
Make an application of function symbol @true_.
Definition set1.h:759
application false_function(const sort_expression &s, const data_expression &arg0)
Application of function symbol @false_.
Definition set1.h:687
function_symbol difference(const sort_expression &s, const sort_expression &s0, const sort_expression &s1)
Definition set1.h:580
bool is_union_function_symbol(const atermpp::aterm &e)
Recogniser for function +.
Definition set1.h:442
function_symbol complement(const sort_expression &s)
Constructor for function symbol !.
Definition set1.h:358
bool is_true_function_application(const atermpp::aterm &e)
Recogniser for application of @true_.
Definition set1.h:769
function_symbol set_fset(const sort_expression &s)
Constructor for function symbol @setfset.
Definition set1.h:170
void make_difference(data_expression &result, const sort_expression &s, const data_expression &arg0, const data_expression &arg1)
Make an application of function symbol -.
Definition set1.h:635
implementation_map set_cpp_implementable_constructors(const sort_expression &)
Give all system defined constructors which have an implementation in C++ and not in rewrite rules for...
Definition set1.h:151
function_symbol set_comprehension(const sort_expression &s)
Constructor for function symbol @setcomp.
Definition set1.h:232
application in(const sort_expression &s, const data_expression &arg0, const data_expression &arg1)
Application of function symbol in.
Definition set1.h:319
bool is_intersection_application(const atermpp::aterm &e)
Recogniser for application of *.
Definition set1.h:564
data_equation_vector set_generate_equations_code(const sort_expression &s)
Give all system defined equations for set_.
Definition set1.h:1267
application and_function(const sort_expression &s, const data_expression &arg0, const data_expression &arg1)
Application of function symbol @and_.
Definition set1.h:874
function_symbol_vector set_mCRL2_usable_mappings(const sort_expression &s)
Give all system defined mappings that can be used in mCRL2 specs for set_.
Definition set1.h:1144
bool is_and_function_function_symbol(const atermpp::aterm &e)
Recogniser for function @and_.
Definition set1.h:859
void make_set_fset(data_expression &result, const sort_expression &s, const data_expression &arg0)
Make an application of function symbol @setfset.
Definition set1.h:204
void make_union(data_expression &result, const sort_expression &s, const data_expression &arg0, const data_expression &arg1)
Make an application of function symbol +.
Definition set1.h:469
bool is_intersection_function_symbol(const atermpp::aterm &e)
Recogniser for function *.
Definition set1.h:527
application constructor(const sort_expression &s, const data_expression &arg0, const data_expression &arg1)
Application of function symbol @set.
Definition set1.h:98
const data_expression & arg1(const data_expression &e)
Function for projecting out argument. arg1 from an application.
Definition set1.h:1221
function_sort make_function_sort_(const sort_expression &dom1, const sort_expression &dom2, const sort_expression &dom3, const sort_expression &dom4, const sort_expression &codomain)
Convenience constructor for function sort with domain size 4.
function_sort make_function_sort_(const sort_expression &dom1, const sort_expression &codomain)
Convenience constructor for function sort with domain size 1.
bool is_container_sort(const atermpp::aterm &x)
Returns true if the term t is a container sort.
bool is_function_symbol(const atermpp::aterm &x)
Returns true if the term t is a function symbol.
function_sort make_function_sort_(const sort_expression &dom1, const sort_expression &dom2, const sort_expression &codomain)
Convenience constructor for function sort with domain size 2.