mCRL2
Loading...
Searching...
No Matches
fbag1.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//
14
15#ifndef MCRL2_DATA_FBAG1_H
16#define MCRL2_DATA_FBAG1_H
17
18#include "functional" // std::function
25#include "mcrl2/data/standard.h"
27#include "mcrl2/data/bool.h"
28#include "mcrl2/data/pos1.h"
29#include "mcrl2/data/nat1.h"
30#include "mcrl2/data/fset1.h"
31
32namespace mcrl2 {
33
34 namespace data {
35
37 namespace sort_fbag {
38
42 inline
44 {
46 return fbag;
47 }
48
53 inline
54 bool is_fbag(const sort_expression& e)
55 {
56 if (is_container_sort(e))
57 {
59 }
60 return false;
61 }
62
63
66 inline
68 {
70 return empty_name;
71 }
72
76 inline
78 {
80 return empty;
81 }
82
86 inline
88 {
89 if (is_function_symbol(e))
90 {
91 return atermpp::down_cast<function_symbol>(e).name() == empty_name();
92 }
93 return false;
94 }
95
98 inline
100 {
102 return insert_name;
103 }
104
108 inline
110 {
112 return insert;
113 }
114
118 inline
120 {
121 if (is_function_symbol(e))
122 {
123 return atermpp::down_cast<function_symbol>(e).name() == insert_name();
124 }
125 return false;
126 }
127
134 inline
136 {
137 return sort_fbag::insert(s)(arg0, arg1, arg2);
138 }
139
146 inline
148 {
149 make_application(result, sort_fbag::insert(s),arg0, arg1, arg2);
150 }
151
156 inline
158 {
159 return is_application(e) && is_insert_function_symbol(atermpp::down_cast<application>(e).head());
160 }
164 inline
166 {
168 result.push_back(sort_fbag::empty(s));
169 result.push_back(sort_fbag::insert(s));
170
171 return result;
172 }
176 inline
178 {
180 result.push_back(sort_fbag::empty(s));
181 result.push_back(sort_fbag::insert(s));
182
183 return result;
184 }
185 // 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
186 typedef std::map<function_symbol,std::pair<std::function<void(data_expression&, const data_expression&)>, std::string> > implementation_map;
190 inline
192 {
193 implementation_map result;
194 static_cast< void >(s); // suppress unused variable warnings
195 return result;
196 }
197
200 inline
202 {
204 return cons_name;
205 }
206
210 inline
212 {
214 return cons_;
215 }
216
220 inline
222 {
223 if (is_function_symbol(e))
224 {
225 return atermpp::down_cast<function_symbol>(e).name() == cons_name();
226 }
227 return false;
228 }
229
236 inline
238 {
239 return sort_fbag::cons_(s)(arg0, arg1, arg2);
240 }
241
248 inline
250 {
251 make_application(result, sort_fbag::cons_(s),arg0, arg1, arg2);
252 }
253
258 inline
260 {
261 return is_application(e) && is_cons_function_symbol(atermpp::down_cast<application>(e).head());
262 }
263
266 inline
268 {
270 return cinsert_name;
271 }
272
276 inline
278 {
280 return cinsert;
281 }
282
286 inline
288 {
289 if (is_function_symbol(e))
290 {
291 return atermpp::down_cast<function_symbol>(e).name() == cinsert_name();
292 }
293 return false;
294 }
295
302 inline
304 {
305 return sort_fbag::cinsert(s)(arg0, arg1, arg2);
306 }
307
314 inline
316 {
317 make_application(result, sort_fbag::cinsert(s),arg0, arg1, arg2);
318 }
319
324 inline
326 {
327 return is_application(e) && is_cinsert_function_symbol(atermpp::down_cast<application>(e).head());
328 }
329
332 inline
334 {
336 return count_name;
337 }
338
342 inline
344 {
346 return count;
347 }
348
352 inline
354 {
355 if (is_function_symbol(e))
356 {
357 return atermpp::down_cast<function_symbol>(e).name() == count_name();
358 }
359 return false;
360 }
361
367 inline
369 {
370 return sort_fbag::count(s)(arg0, arg1);
371 }
372
378 inline
380 {
381 make_application(result, sort_fbag::count(s),arg0, arg1);
382 }
383
388 inline
390 {
391 return is_application(e) && is_count_function_symbol(atermpp::down_cast<application>(e).head());
392 }
393
396 inline
398 {
400 return in_name;
401 }
402
406 inline
408 {
410 return in;
411 }
412
416 inline
418 {
419 if (is_function_symbol(e))
420 {
421 return atermpp::down_cast<function_symbol>(e).name() == in_name();
422 }
423 return false;
424 }
425
431 inline
433 {
434 return sort_fbag::in(s)(arg0, arg1);
435 }
436
442 inline
443 void make_in(data_expression& result, const sort_expression& s, const data_expression& arg0, const data_expression& arg1)
444 {
445 make_application(result, sort_fbag::in(s),arg0, arg1);
446 }
447
452 inline
454 {
455 return is_application(e) && is_in_function_symbol(atermpp::down_cast<application>(e).head());
456 }
457
460 inline
462 {
464 return fset2fbag_name;
465 }
466
470 inline
472 {
474 return fset2fbag;
475 }
476
480 inline
482 {
483 if (is_function_symbol(e))
484 {
485 return atermpp::down_cast<function_symbol>(e).name() == fset2fbag_name();
486 }
487 return false;
488 }
489
494 inline
496 {
497 return sort_fbag::fset2fbag(s)(arg0);
498 }
499
504 inline
506 {
507 make_application(result, sort_fbag::fset2fbag(s),arg0);
508 }
509
514 inline
516 {
517 return is_application(e) && is_fset2fbag_function_symbol(atermpp::down_cast<application>(e).head());
518 }
519
522 inline
524 {
526 return union_name;
527 }
528
532 inline
534 {
536 return union_;
537 }
538
542 inline
544 {
545 if (is_function_symbol(e))
546 {
547 return atermpp::down_cast<function_symbol>(e).name() == union_name();
548 }
549 return false;
550 }
551
557 inline
559 {
560 return sort_fbag::union_(s)(arg0, arg1);
561 }
562
568 inline
570 {
571 make_application(result, sort_fbag::union_(s),arg0, arg1);
572 }
573
578 inline
580 {
581 return is_application(e) && is_union_function_symbol(atermpp::down_cast<application>(e).head());
582 }
583
586 inline
588 {
590 return intersection_name;
591 }
592
596 inline
598 {
600 return intersection;
601 }
602
606 inline
608 {
609 if (is_function_symbol(e))
610 {
611 return atermpp::down_cast<function_symbol>(e).name() == intersection_name();
612 }
613 return false;
614 }
615
621 inline
623 {
624 return sort_fbag::intersection(s)(arg0, arg1);
625 }
626
632 inline
634 {
636 }
637
642 inline
644 {
645 return is_application(e) && is_intersection_function_symbol(atermpp::down_cast<application>(e).head());
646 }
647
650 inline
652 {
654 return difference_name;
655 }
656
660 inline
662 {
664 return difference;
665 }
666
670 inline
672 {
673 if (is_function_symbol(e))
674 {
675 return atermpp::down_cast<function_symbol>(e).name() == difference_name();
676 }
677 return false;
678 }
679
685 inline
687 {
688 return sort_fbag::difference(s)(arg0, arg1);
689 }
690
696 inline
698 {
700 }
701
706 inline
708 {
709 return is_application(e) && is_difference_function_symbol(atermpp::down_cast<application>(e).head());
710 }
711
714 inline
716 {
718 return count_all_name;
719 }
720
724 inline
726 {
728 return count_all;
729 }
730
734 inline
736 {
737 if (is_function_symbol(e))
738 {
739 return atermpp::down_cast<function_symbol>(e).name() == count_all_name();
740 }
741 return false;
742 }
743
748 inline
750 {
751 return sort_fbag::count_all(s)(arg0);
752 }
753
758 inline
760 {
761 make_application(result, sort_fbag::count_all(s),arg0);
762 }
763
768 inline
770 {
771 return is_application(e) && is_count_all_function_symbol(atermpp::down_cast<application>(e).head());
772 }
776 inline
778 {
780 result.push_back(sort_fbag::cons_(s));
781 result.push_back(sort_fbag::cinsert(s));
782 result.push_back(sort_fbag::count(s));
783 result.push_back(sort_fbag::in(s));
784 result.push_back(sort_fbag::fset2fbag(s));
785 result.push_back(sort_fbag::union_(s));
786 result.push_back(sort_fbag::intersection(s));
787 result.push_back(sort_fbag::difference(s));
788 result.push_back(sort_fbag::count_all(s));
789 return result;
790 }
791
795 inline
797 {
800 {
801 result.push_back(f);
802 }
803 return result;
804 }
805
809 inline
811 {
813 result.push_back(sort_fbag::cons_(s));
814 result.push_back(sort_fbag::cinsert(s));
815 result.push_back(sort_fbag::count(s));
816 result.push_back(sort_fbag::in(s));
817 result.push_back(sort_fbag::fset2fbag(s));
818 result.push_back(sort_fbag::union_(s));
819 result.push_back(sort_fbag::intersection(s));
820 result.push_back(sort_fbag::difference(s));
821 result.push_back(sort_fbag::count_all(s));
822 return result;
823 }
824
825
826 // 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
827 typedef std::map<function_symbol,std::pair<std::function<void(data_expression&, const data_expression&)>, std::string> > implementation_map;
831 inline
833 {
834 implementation_map result;
835 static_cast< void >(s); // suppress unused variable warnings
836 return result;
837 }
843 inline
845 {
847 return atermpp::down_cast<application>(e)[0];
848 }
849
855 inline
857 {
859 return atermpp::down_cast<application>(e)[1];
860 }
861
867 inline
869 {
871 return atermpp::down_cast<application>(e)[2];
872 }
873
879 inline
881 {
883 return atermpp::down_cast<application>(e)[0];
884 }
885
891 inline
893 {
895 return atermpp::down_cast<application>(e)[1];
896 }
897
903 inline
905 {
907 return atermpp::down_cast<application>(e)[0];
908 }
909
913 inline
915 {
916 variable vd("d",s);
917 variable ve("e",s);
918 variable vp("p",sort_pos::pos());
919 variable vq("q",sort_pos::pos());
920 variable vb("b",fbag(s));
921 variable vc("c",fbag(s));
922 variable vs("s",sort_fset::fset(s));
923
925 result.push_back(data_equation(variable_list({vb, vd, vp}), equal_to(cons_(s, vd, vp, vb), empty(s)), sort_bool::false_()));
926 result.push_back(data_equation(variable_list({vb, vd, vp}), equal_to(empty(s), cons_(s, vd, vp, vb)), sort_bool::false_()));
927 result.push_back(data_equation(variable_list({vb, vc, vd, ve, vp, vq}), equal_to(cons_(s, vd, vp, vb), cons_(s, ve, vq, vc)), sort_bool::and_(equal_to(vp, vq), sort_bool::and_(equal_to(vd, ve), equal_to(vb, vc)))));
928 result.push_back(data_equation(variable_list({vb, vd, vp}), less_equal(cons_(s, vd, vp, vb), empty(s)), sort_bool::false_()));
929 result.push_back(data_equation(variable_list({vb, vd, vp}), less_equal(empty(s), cons_(s, vd, vp, vb)), sort_bool::true_()));
930 result.push_back(data_equation(variable_list({vb, vc, vd, ve, vp, vq}), less_equal(cons_(s, vd, vp, vb), cons_(s, ve, vq, vc)), if_(less(vd, ve), sort_bool::false_(), if_(equal_to(vd, ve), sort_bool::and_(less_equal(vp, vq), less_equal(vb, vc)), less_equal(cons_(s, vd, vp, vb), vc)))));
931 result.push_back(data_equation(variable_list({vb, vd, vp}), less(cons_(s, vd, vp, vb), empty(s)), sort_bool::false_()));
932 result.push_back(data_equation(variable_list({vb, vd, vp}), less(empty(s), cons_(s, vd, vp, vb)), sort_bool::true_()));
933 result.push_back(data_equation(variable_list({vb, vc, vd, ve, vp, vq}), less(cons_(s, vd, vp, vb), cons_(s, ve, vq, vc)), if_(less(vd, ve), sort_bool::false_(), if_(equal_to(vd, ve), sort_bool::or_(sort_bool::and_(equal_to(vp, vq), less(vb, vc)), sort_bool::and_(less(vp, vq), less_equal(vb, vc))), less_equal(cons_(s, vd, vp, vb), vc)))));
934 result.push_back(data_equation(variable_list({vd, vp}), insert(s, vd, vp, empty(s)), cons_(s, vd, vp, empty(s))));
935 result.push_back(data_equation(variable_list({vb, vd, vp, vq}), insert(s, vd, vp, cons_(s, vd, vq, vb)), cons_(s, vd, sort_pos::add_with_carry(sort_bool::false_(), vp, vq), vb)));
936 result.push_back(data_equation(variable_list({vb, vd, ve, vp, vq}), less(vd, ve), insert(s, vd, vp, cons_(s, ve, vq, vb)), cons_(s, vd, vp, cons_(s, ve, vq, vb))));
937 result.push_back(data_equation(variable_list({vb, vd, ve, vp, vq}), less(ve, vd), insert(s, vd, vp, cons_(s, ve, vq, vb)), cons_(s, ve, vq, insert(s, vd, vp, vb))));
938 result.push_back(data_equation(variable_list({vb, vd}), cinsert(s, vd, sort_nat::c0(), vb), vb));
939 result.push_back(data_equation(variable_list({vb, vd, vp}), cinsert(s, vd, sort_nat::cnat(vp), vb), insert(s, vd, vp, vb)));
940 result.push_back(data_equation(variable_list({vd}), count(s, vd, empty(s)), sort_nat::c0()));
941 result.push_back(data_equation(variable_list({vb, vd, vp}), count(s, vd, cons_(s, vd, vp, vb)), sort_nat::cnat(vp)));
942 result.push_back(data_equation(variable_list({vb, vd, ve, vp}), less(vd, ve), count(s, vd, cons_(s, ve, vp, vb)), sort_nat::c0()));
943 result.push_back(data_equation(variable_list({vb, vd, ve, vp}), less(ve, vd), count(s, vd, cons_(s, ve, vp, vb)), count(s, vd, vb)));
944 result.push_back(data_equation(variable_list({vb, vd}), in(s, vd, vb), greater(count(s, vd, vb), sort_nat::c0())));
945 result.push_back(data_equation(variable_list(), fset2fbag(s, sort_fset::empty(s)), empty(s)));
946 result.push_back(data_equation(variable_list({vd, vs}), fset2fbag(s, sort_fset::cons_(s, vd, vs)), cinsert(s, vd, sort_nat::cnat(sort_pos::c1()), fset2fbag(s, vs))));
947 result.push_back(data_equation(variable_list({vb}), difference(s, vb, empty(s)), vb));
948 result.push_back(data_equation(variable_list({vc}), difference(s, empty(s), vc), empty(s)));
949 result.push_back(data_equation(variable_list({vb, vc, vd, vp}), difference(s, cons_(s, vd, vp, vb), cons_(s, vd, vp, vc)), difference(s, vb, vc)));
950 result.push_back(data_equation(variable_list({vb, vc, vd, vp, vq}), less(vp, vq), difference(s, cons_(s, vd, vp, vb), cons_(s, vd, vq, vc)), difference(s, vb, vc)));
951 result.push_back(data_equation(variable_list({vb, vc, vd, vp, vq}), less(vq, vp), difference(s, cons_(s, vd, vp, vb), cons_(s, vd, vq, vc)), cons_(s, vd, sort_nat::nat2pos(sort_nat::gte_subtract_with_borrow(sort_bool::false_(), vp, vq)), difference(s, vb, vc))));
952 result.push_back(data_equation(variable_list({vb, vc, vd, ve, vp, vq}), less(vd, ve), difference(s, cons_(s, vd, vp, vb), cons_(s, ve, vq, vc)), cons_(s, vd, vp, difference(s, vb, cons_(s, ve, vq, vc)))));
953 result.push_back(data_equation(variable_list({vb, vc, vd, ve, vp, vq}), less(ve, vd), difference(s, cons_(s, vd, vp, vb), cons_(s, ve, vq, vc)), difference(s, cons_(s, vd, vp, vb), vc)));
954 result.push_back(data_equation(variable_list({vb}), union_(s, vb, empty(s)), vb));
955 result.push_back(data_equation(variable_list({vc}), union_(s, empty(s), vc), vc));
956 result.push_back(data_equation(variable_list({vb, vc, vd, vp, vq}), union_(s, cons_(s, vd, vp, vb), cons_(s, vd, vq, vc)), cons_(s, vd, sort_pos::add_with_carry(sort_bool::false_(), vp, vq), union_(s, vb, vc))));
957 result.push_back(data_equation(variable_list({vb, vc, vd, ve, vp, vq}), less(vd, ve), union_(s, cons_(s, vd, vp, vb), cons_(s, ve, vq, vc)), cons_(s, vd, vp, union_(s, vb, cons_(s, ve, vq, vc)))));
958 result.push_back(data_equation(variable_list({vb, vc, vd, ve, vp, vq}), less(ve, vd), union_(s, cons_(s, vd, vp, vb), cons_(s, ve, vq, vc)), cons_(s, ve, vq, union_(s, cons_(s, vd, vp, vb), vc))));
959 result.push_back(data_equation(variable_list({vb}), intersection(s, vb, empty(s)), empty(s)));
960 result.push_back(data_equation(variable_list({vc}), intersection(s, empty(s), vc), empty(s)));
961 result.push_back(data_equation(variable_list({vb, vc, vd, vp, vq}), intersection(s, cons_(s, vd, vp, vb), cons_(s, vd, vq, vc)), cons_(s, vd, sort_nat::minimum(vp, vq), intersection(s, vb, vc))));
962 result.push_back(data_equation(variable_list({vb, vc, vd, ve, vp, vq}), less(vd, ve), intersection(s, cons_(s, vd, vp, vb), cons_(s, ve, vq, vc)), intersection(s, vb, cons_(s, ve, vq, vc))));
963 result.push_back(data_equation(variable_list({vb, vc, vd, ve, vp, vq}), less(ve, vd), intersection(s, cons_(s, vd, vp, vb), cons_(s, ve, vq, vc)), intersection(s, cons_(s, vd, vp, vb), vc)));
964 result.push_back(data_equation(variable_list(), count_all(s, empty(s)), sort_nat::c0()));
965 result.push_back(data_equation(variable_list({vd, vp}), count_all(s, cons_(s, vd, vp, empty(s))), sort_nat::cnat(vp)));
966 result.push_back(data_equation(variable_list({vb, vd, ve, vp, vq}), count_all(s, cons_(s, vd, vp, cons_(s, ve, vq, vb))), sort_nat::cnat(sort_pos::add_with_carry(sort_bool::false_(), vp, sort_nat::nat2pos(count_all(s, cons_(s, ve, vq, vb)))))));
967 return result;
968 }
969
970 } // namespace sort_fbag
971
972 } // namespace data
973
974} // namespace mcrl2
975
976#endif // MCRL2_DATA_FBAG1_H
The class application.
The class basic_sort.
The standard sort bool_.
Term containing a string.
An application of a data expression to a number of arguments.
\brief A container sort
const container_type & container_name() const
\brief A data equation
\brief Container type for finite bags
\brief A function symbol
\brief A sort expression
\brief A data variable
Definition variable.h:28
The class container_sort.
The class function symbol.
The class data_equation.
Exception classes for use in libraries and tools.
The class function_sort.
atermpp::aterm_string identifier_string
String type of the LPS library. Identifier strings are represented internally as ATerms.
const basic_sort & bool_()
Constructor for sort expression Bool.
Definition bool.h:44
const function_symbol & and_()
Constructor for function symbol &&.
Definition bool.h:235
const function_symbol & false_()
Constructor for function symbol false.
Definition bool.h:109
const function_symbol & or_()
Constructor for function symbol ||.
Definition bool.h:299
const function_symbol & true_()
Constructor for function symbol true.
Definition bool.h:77
bool is_empty_function_symbol(const atermpp::aterm &e)
Recogniser for function {:}.
Definition fbag1.h:87
void make_count(data_expression &result, const sort_expression &s, const data_expression &arg0, const data_expression &arg1)
Make an application of function symbol count.
Definition fbag1.h:379
const core::identifier_string & count_all_name()
Generate identifier #.
Definition fbag1.h:715
function_symbol_vector fbag_generate_constructors_and_functions_code(const sort_expression &s)
Give all system defined mappings and constructors for fbag.
Definition fbag1.h:796
const core::identifier_string & fset2fbag_name()
Generate identifier @fset2fbag.
Definition fbag1.h:461
container_sort fbag(const sort_expression &s)
Constructor for sort expression FBag(S)
Definition fbag1.h:43
bool is_in_function_symbol(const atermpp::aterm &e)
Recogniser for function in.
Definition fbag1.h:417
bool is_difference_function_symbol(const atermpp::aterm &e)
Recogniser for function -.
Definition fbag1.h:671
const core::identifier_string & count_name()
Generate identifier count.
Definition fbag1.h:333
const core::identifier_string & cinsert_name()
Generate identifier @fbag_cinsert.
Definition fbag1.h:267
bool is_union_application(const atermpp::aterm &e)
Recogniser for application of +.
Definition fbag1.h:579
function_symbol intersection(const sort_expression &s)
Constructor for function symbol *.
Definition fbag1.h:597
const data_expression & arg3(const data_expression &e)
Function for projecting out argument. arg3 from an application.
Definition fbag1.h:868
function_symbol union_(const sort_expression &s)
Constructor for function symbol +.
Definition fbag1.h:533
const data_expression & arg(const data_expression &e)
Function for projecting out argument. arg from an application.
Definition fbag1.h:904
bool is_cinsert_function_symbol(const atermpp::aterm &e)
Recogniser for function @fbag_cinsert.
Definition fbag1.h:287
function_symbol cons_(const sort_expression &s)
Constructor for function symbol @fbag_cons.
Definition fbag1.h:211
bool is_insert_function_symbol(const atermpp::aterm &e)
Recogniser for function @fbag_insert.
Definition fbag1.h:119
bool is_intersection_application(const atermpp::aterm &e)
Recogniser for application of *.
Definition fbag1.h:643
function_symbol count_all(const sort_expression &s)
Constructor for function symbol #.
Definition fbag1.h:725
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 fbag1.h:633
bool is_cons_function_symbol(const atermpp::aterm &e)
Recogniser for function @fbag_cons.
Definition fbag1.h:221
function_symbol insert(const sort_expression &s)
Constructor for function symbol @fbag_insert.
Definition fbag1.h:109
void make_fset2fbag(data_expression &result, const sort_expression &s, const data_expression &arg0)
Make an application of function symbol @fset2fbag.
Definition fbag1.h:505
void make_cons_(data_expression &result, const sort_expression &s, const data_expression &arg0, const data_expression &arg1, const data_expression &arg2)
Make an application of function symbol @fbag_cons.
Definition fbag1.h:249
const core::identifier_string & cons_name()
Generate identifier @fbag_cons.
Definition fbag1.h:201
bool is_fset2fbag_function_symbol(const atermpp::aterm &e)
Recogniser for function @fset2fbag.
Definition fbag1.h:481
bool is_in_application(const atermpp::aterm &e)
Recogniser for application of in.
Definition fbag1.h:453
const core::identifier_string & empty_name()
Generate identifier {:}.
Definition fbag1.h:67
const core::identifier_string & difference_name()
Generate identifier -.
Definition fbag1.h:651
bool is_difference_application(const atermpp::aterm &e)
Recogniser for application of -.
Definition fbag1.h:707
bool is_count_application(const atermpp::aterm &e)
Recogniser for application of count.
Definition fbag1.h:389
bool is_cons_application(const atermpp::aterm &e)
Recogniser for application of @fbag_cons.
Definition fbag1.h:259
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 fbag1.h:443
const data_expression & left(const data_expression &e)
Function for projecting out argument. left from an application.
Definition fbag1.h:880
const data_expression & arg2(const data_expression &e)
Function for projecting out argument. arg2 from an application.
Definition fbag1.h:856
void make_count_all(data_expression &result, const sort_expression &s, const data_expression &arg0)
Make an application of function symbol #.
Definition fbag1.h:759
bool is_count_function_symbol(const atermpp::aterm &e)
Recogniser for function count.
Definition fbag1.h:353
bool is_intersection_function_symbol(const atermpp::aterm &e)
Recogniser for function *.
Definition fbag1.h:607
implementation_map fbag_cpp_implementable_constructors(const sort_expression &s)
Give all system defined constructors which have an implementation in C++ and not in rewrite rules for...
Definition fbag1.h:191
const core::identifier_string & intersection_name()
Generate identifier *.
Definition fbag1.h:587
const data_expression & right(const data_expression &e)
Function for projecting out argument. right from an application.
Definition fbag1.h:892
function_symbol in(const sort_expression &s)
Constructor for function symbol in.
Definition fbag1.h:407
function_symbol_vector fbag_generate_constructors_code(const sort_expression &s)
Give all system defined constructors for fbag.
Definition fbag1.h:165
bool is_count_all_application(const atermpp::aterm &e)
Recogniser for application of #.
Definition fbag1.h:769
function_symbol count(const sort_expression &s)
Constructor for function symbol count.
Definition fbag1.h:343
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 fbag1.h:569
implementation_map fbag_cpp_implementable_mappings(const sort_expression &s)
Give all system defined mappings that are to be implemented in C++ code for fbag.
Definition fbag1.h:832
bool is_fbag(const sort_expression &e)
Recogniser for sort expression FBag(s)
Definition fbag1.h:54
void make_cinsert(data_expression &result, const sort_expression &s, const data_expression &arg0, const data_expression &arg1, const data_expression &arg2)
Make an application of function symbol @fbag_cinsert.
Definition fbag1.h:315
function_symbol empty(const sort_expression &s)
Constructor for function symbol {:}.
Definition fbag1.h:77
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 fbag1.h:697
function_symbol cinsert(const sort_expression &s)
Constructor for function symbol @fbag_cinsert.
Definition fbag1.h:277
bool is_cinsert_application(const atermpp::aterm &e)
Recogniser for application of @fbag_cinsert.
Definition fbag1.h:325
void make_insert(data_expression &result, const sort_expression &s, const data_expression &arg0, const data_expression &arg1, const data_expression &arg2)
Make an application of function symbol @fbag_insert.
Definition fbag1.h:147
bool is_fset2fbag_application(const atermpp::aterm &e)
Recogniser for application of @fset2fbag.
Definition fbag1.h:515
bool is_count_all_function_symbol(const atermpp::aterm &e)
Recogniser for function #.
Definition fbag1.h:735
function_symbol_vector fbag_mCRL2_usable_mappings(const sort_expression &s)
Give all system defined mappings that can be used in mCRL2 specs for fbag.
Definition fbag1.h:810
function_symbol fset2fbag(const sort_expression &s)
Constructor for function symbol @fset2fbag.
Definition fbag1.h:471
const core::identifier_string & union_name()
Generate identifier +.
Definition fbag1.h:523
function_symbol difference(const sort_expression &s)
Constructor for function symbol -.
Definition fbag1.h:661
function_symbol_vector fbag_generate_functions_code(const sort_expression &s)
Give all system defined mappings for fbag.
Definition fbag1.h:777
bool is_insert_application(const atermpp::aterm &e)
Recogniser for application of @fbag_insert.
Definition fbag1.h:157
const core::identifier_string & insert_name()
Generate identifier @fbag_insert.
Definition fbag1.h:99
std::map< function_symbol, std::pair< std::function< void(data_expression &, const data_expression &)>, std::string > > implementation_map
Definition fbag1.h:186
data_equation_vector fbag_generate_equations_code(const sort_expression &s)
Give all system defined equations for fbag.
Definition fbag1.h:914
bool is_union_function_symbol(const atermpp::aterm &e)
Recogniser for function +.
Definition fbag1.h:543
const data_expression & arg1(const data_expression &e)
Function for projecting out argument. arg1 from an application.
Definition fbag1.h:844
function_symbol_vector fbag_mCRL2_usable_constructors(const sort_expression &s)
Give all defined constructors which can be used in mCRL2 specs for fbag.
Definition fbag1.h:177
const core::identifier_string & in_name()
Generate identifier in.
Definition fbag1.h:397
function_symbol cons_(const sort_expression &s)
Constructor for function symbol @fset_cons.
Definition fset1.h:207
function_symbol empty(const sort_expression &s)
Constructor for function symbol {}.
Definition fset1.h:75
container_sort fset(const sort_expression &s)
Constructor for sort expression FSet(S)
Definition fset1.h:41
const function_symbol & c0()
Constructor for function symbol @c0.
Definition nat1.h:108
const function_symbol & gte_subtract_with_borrow()
Constructor for function symbol @gtesubtb.
Definition nat1.h:921
const function_symbol & cnat()
Constructor for function symbol @cNat.
Definition nat1.h:140
const basic_sort & nat()
Constructor for sort expression Nat.
Definition nat1.h:46
function_symbol minimum(const sort_expression &s0, const sort_expression &s1)
Definition nat1.h:507
const function_symbol & nat2pos()
Constructor for function symbol Nat2Pos.
Definition nat1.h:362
const function_symbol & c1()
Constructor for function symbol @c1.
Definition pos1.h:78
const function_symbol & add_with_carry()
Constructor for function symbol @addc.
Definition pos1.h:522
const basic_sort & pos()
Constructor for sort expression Pos.
Definition pos1.h:45
function_symbol less_equal(const sort_expression &s)
Constructor for function symbol <=.
Definition standard.h:277
function_symbol less(const sort_expression &s)
Constructor for function symbol <.
Definition standard.h:240
std::vector< data_equation > data_equation_vector
\brief vector of data_equations
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.
atermpp::term_list< variable > variable_list
\brief list of variables
function_symbol equal_to(const sort_expression &s)
Constructor for function symbol ==.
Definition standard.h:126
bool is_application(const atermpp::aterm &x)
Returns true if the term t is an application.
std::vector< function_symbol > function_symbol_vector
\brief vector of function_symbols
function_symbol if_(const sort_expression &s)
Constructor for function symbol if.
Definition standard.h:200
void make_application(atermpp::aterm &result)
Make function for an application.
function_symbol greater(const sort_expression &s)
Constructor for function symbol >
Definition standard.h:314
A class that takes a linear process specification and checks all tau-summands of that LPS for conflue...
Definition indexed_set.h:72
Standard functions that are available for all sorts.