mCRL2
Loading...
Searching...
No Matches
process_expression.h
Go to the documentation of this file.
1// Author(s): Wieger Wesselink
2// Copyright: see the accompanying file COPYING or copy at
3// https://github.com/mCRL2org/mCRL2/blob/master/COPYING
4//
5// Distributed under the Boost Software License, Version 1.0.
6// (See accompanying file LICENSE_1_0.txt or copy at
7// http://www.boost.org/LICENSE_1_0.txt)
8//
11
12#ifndef MCRL2_PROCESS_PROCESS_EXPRESSION_H
13#define MCRL2_PROCESS_PROCESS_EXPRESSION_H
14
21
22namespace mcrl2
23{
24
25namespace process
26{
27
28//--- start generated classes ---//
31{
32 public:
35 : atermpp::aterm_appl(core::detail::default_values::ProcExpr)
36 {}
37
40 explicit process_expression(const atermpp::aterm& term)
41 : atermpp::aterm_appl(term)
42 {
44 }
45
48 : atermpp::aterm_appl(x)
49 {}
50
52 process_expression(const process_expression&) noexcept = default;
54 process_expression& operator=(const process_expression&) noexcept = default;
55 process_expression& operator=(process_expression&&) noexcept = default;
56};
57
60
63
64// prototypes
65inline bool is_action(const atermpp::aterm_appl& x);
66inline bool is_process_instance(const atermpp::aterm_appl& x);
67inline bool is_process_instance_assignment(const atermpp::aterm_appl& x);
68inline bool is_delta(const atermpp::aterm_appl& x);
69inline bool is_tau(const atermpp::aterm_appl& x);
70inline bool is_sum(const atermpp::aterm_appl& x);
71inline bool is_block(const atermpp::aterm_appl& x);
72inline bool is_hide(const atermpp::aterm_appl& x);
73inline bool is_rename(const atermpp::aterm_appl& x);
74inline bool is_comm(const atermpp::aterm_appl& x);
75inline bool is_allow(const atermpp::aterm_appl& x);
76inline bool is_sync(const atermpp::aterm_appl& x);
77inline bool is_at(const atermpp::aterm_appl& x);
78inline bool is_seq(const atermpp::aterm_appl& x);
79inline bool is_if_then(const atermpp::aterm_appl& x);
80inline bool is_if_then_else(const atermpp::aterm_appl& x);
81inline bool is_bounded_init(const atermpp::aterm_appl& x);
82inline bool is_merge(const atermpp::aterm_appl& x);
83inline bool is_left_merge(const atermpp::aterm_appl& x);
84inline bool is_choice(const atermpp::aterm_appl& x);
85inline bool is_stochastic_operator(const atermpp::aterm_appl& x);
86inline bool is_untyped_process_assignment(const atermpp::aterm_appl& x);
87
91inline
92bool is_process_expression(const atermpp::aterm_appl& x)
93{
99 process::is_tau(x) ||
100 process::is_sum(x) ||
102 process::is_hide(x) ||
104 process::is_comm(x) ||
106 process::is_sync(x) ||
107 process::is_at(x) ||
108 process::is_seq(x) ||
117}
118
119// prototype declaration
120std::string pp(const process_expression& x);
121
126inline
127std::ostream& operator<<(std::ostream& out, const process_expression& x)
128{
129 return out << process::pp(x);
130}
131
134{
135 t1.swap(t2);
136}
137
138
141{
142 public:
145 : process_expression(core::detail::default_values::Action)
146 {}
147
150 explicit action(const atermpp::aterm& term)
151 : process_expression(term)
152 {
153 assert(core::detail::check_term_Action(*this));
154 }
155
157 action(const action_label& label, const data::data_expression_list& arguments)
158 : process_expression(atermpp::aterm_appl(core::detail::function_symbol_Action(), label, arguments))
159 {}
160
162 action(const action&) noexcept = default;
163 action(action&&) noexcept = default;
164 action& operator=(const action&) noexcept = default;
165 action& operator=(action&&) noexcept = default;
166
167 const action_label& label() const
168 {
169 return atermpp::down_cast<action_label>((*this)[0]);
170 }
171
173 {
174 return atermpp::down_cast<data::data_expression_list>((*this)[1]);
175 }
176};
177
180template <class... ARGUMENTS>
181inline void make_action(atermpp::aterm_appl& t, const ARGUMENTS&... args)
182{
184}
185
188
190typedef std::vector<action> action_vector;
191
195inline
197{
199}
200
201// prototype declaration
202std::string pp(const action& x);
203
208inline
209std::ostream& operator<<(std::ostream& out, const action& x)
210{
211 return out << process::pp(x);
212}
213
215inline void swap(action& t1, action& t2)
216{
217 t1.swap(t2);
218}
219
220
223{
224 public:
227 : process_expression(core::detail::default_values::Process)
228 {}
229
232 explicit process_instance(const atermpp::aterm& term)
233 : process_expression(term)
234 {
235 assert(core::detail::check_term_Process(*this));
236 }
237
239 process_instance(const process_identifier& identifier, const data::data_expression_list& actual_parameters)
240 : process_expression(atermpp::aterm_appl(core::detail::function_symbol_Process(), identifier, actual_parameters))
241 {}
242
244 process_instance(const process_instance&) noexcept = default;
245 process_instance(process_instance&&) noexcept = default;
246 process_instance& operator=(const process_instance&) noexcept = default;
247 process_instance& operator=(process_instance&&) noexcept = default;
248
249 const process_identifier& identifier() const
250 {
251 return atermpp::down_cast<process_identifier>((*this)[0]);
252 }
253
255 {
256 return atermpp::down_cast<data::data_expression_list>((*this)[1]);
257 }
258};
259
262template <class... ARGUMENTS>
263inline void make_process_instance(atermpp::aterm_appl& t, const ARGUMENTS&... args)
264{
266}
267
271inline
273{
275}
276
277// prototype declaration
278std::string pp(const process_instance& x);
279
284inline
285std::ostream& operator<<(std::ostream& out, const process_instance& x)
286{
287 return out << process::pp(x);
288}
289
292{
293 t1.swap(t2);
294}
295
296
299{
300 public:
303 : process_expression(core::detail::default_values::ProcessAssignment)
304 {}
305
309 : process_expression(term)
310 {
311 assert(core::detail::check_term_ProcessAssignment(*this));
312 }
313
316 : process_expression(atermpp::aterm_appl(core::detail::function_symbol_ProcessAssignment(), identifier, assignments))
317 {}
318
322 process_instance_assignment& operator=(const process_instance_assignment&) noexcept = default;
324
325 const process_identifier& identifier() const
326 {
327 return atermpp::down_cast<process_identifier>((*this)[0]);
328 }
329
331 {
332 return atermpp::down_cast<data::assignment_list>((*this)[1]);
333 }
334};
335
338template <class... ARGUMENTS>
339inline void make_process_instance_assignment(atermpp::aterm_appl& t, const ARGUMENTS&... args)
340{
342}
343
347inline
349{
351}
352
353// prototype declaration
354std::string pp(const process_instance_assignment& x);
355
360inline
361std::ostream& operator<<(std::ostream& out, const process_instance_assignment& x)
362{
363 return out << process::pp(x);
364}
365
368{
369 t1.swap(t2);
370}
371
372
375{
376 public:
379 : process_expression(core::detail::default_values::Delta)
380 {}
381
384 explicit delta(const atermpp::aterm& term)
385 : process_expression(term)
386 {
387 assert(core::detail::check_term_Delta(*this));
388 }
389
391 delta(const delta&) noexcept = default;
392 delta(delta&&) noexcept = default;
393 delta& operator=(const delta&) noexcept = default;
394 delta& operator=(delta&&) noexcept = default;
395};
396
400inline
401bool is_delta(const atermpp::aterm_appl& x)
402{
403 return x.function() == core::detail::function_symbols::Delta;
404}
405
406// prototype declaration
407std::string pp(const delta& x);
408
413inline
414std::ostream& operator<<(std::ostream& out, const delta& x)
415{
416 return out << process::pp(x);
417}
418
420inline void swap(delta& t1, delta& t2)
421{
422 t1.swap(t2);
423}
424
425
428{
429 public:
432 : process_expression(core::detail::default_values::Tau)
433 {}
434
437 explicit tau(const atermpp::aterm& term)
438 : process_expression(term)
439 {
440 assert(core::detail::check_term_Tau(*this));
441 }
442
444 tau(const tau&) noexcept = default;
445 tau(tau&&) noexcept = default;
446 tau& operator=(const tau&) noexcept = default;
447 tau& operator=(tau&&) noexcept = default;
448};
449
453inline
454bool is_tau(const atermpp::aterm_appl& x)
455{
456 return x.function() == core::detail::function_symbols::Tau;
457}
458
459// prototype declaration
460std::string pp(const tau& x);
461
466inline
467std::ostream& operator<<(std::ostream& out, const tau& x)
468{
469 return out << process::pp(x);
470}
471
473inline void swap(tau& t1, tau& t2)
474{
475 t1.swap(t2);
476}
477
478
481{
482 public:
485 : process_expression(core::detail::default_values::Sum)
486 {}
487
490 explicit sum(const atermpp::aterm& term)
491 : process_expression(term)
492 {
493 assert(core::detail::check_term_Sum(*this));
494 }
495
497 sum(const data::variable_list& variables, const process_expression& operand)
498 : process_expression(atermpp::aterm_appl(core::detail::function_symbol_Sum(), variables, operand))
499 {}
500
502 sum(const sum&) noexcept = default;
503 sum(sum&&) noexcept = default;
504 sum& operator=(const sum&) noexcept = default;
505 sum& operator=(sum&&) noexcept = default;
506
507 const data::variable_list& variables() const
508 {
509 return atermpp::down_cast<data::variable_list>((*this)[0]);
510 }
511
513 {
514 return atermpp::down_cast<process_expression>((*this)[1]);
515 }
516};
517
520template <class... ARGUMENTS>
521inline void make_sum(atermpp::aterm_appl& t, const ARGUMENTS&... args)
522{
523 atermpp::make_term_appl(t, core::detail::function_symbol_Sum(), args...);
524}
525
529inline
530bool is_sum(const atermpp::aterm_appl& x)
531{
532 return x.function() == core::detail::function_symbols::Sum;
533}
534
535// prototype declaration
536std::string pp(const sum& x);
537
542inline
543std::ostream& operator<<(std::ostream& out, const sum& x)
544{
545 return out << process::pp(x);
546}
547
549inline void swap(sum& t1, sum& t2)
550{
551 t1.swap(t2);
552}
553
554
557{
558 public:
561 : process_expression(core::detail::default_values::Block)
562 {}
563
566 explicit block(const atermpp::aterm& term)
567 : process_expression(term)
568 {
569 assert(core::detail::check_term_Block(*this));
570 }
571
573 block(const core::identifier_string_list& block_set, const process_expression& operand)
574 : process_expression(atermpp::aterm_appl(core::detail::function_symbol_Block(), block_set, operand))
575 {}
576
578 block(const block&) noexcept = default;
579 block(block&&) noexcept = default;
580 block& operator=(const block&) noexcept = default;
581 block& operator=(block&&) noexcept = default;
582
583 const core::identifier_string_list& block_set() const
584 {
585 return atermpp::down_cast<core::identifier_string_list>((*this)[0]);
586 }
587
589 {
590 return atermpp::down_cast<process_expression>((*this)[1]);
591 }
592};
593
596template <class... ARGUMENTS>
597inline void make_block(atermpp::aterm_appl& t, const ARGUMENTS&... args)
598{
599 atermpp::make_term_appl(t, core::detail::function_symbol_Block(), args...);
600}
601
605inline
607{
608 return x.function() == core::detail::function_symbols::Block;
609}
610
611// prototype declaration
612std::string pp(const block& x);
613
618inline
619std::ostream& operator<<(std::ostream& out, const block& x)
620{
621 return out << process::pp(x);
622}
623
625inline void swap(block& t1, block& t2)
626{
627 t1.swap(t2);
628}
629
630
633{
634 public:
637 : process_expression(core::detail::default_values::Hide)
638 {}
639
642 explicit hide(const atermpp::aterm& term)
643 : process_expression(term)
644 {
645 assert(core::detail::check_term_Hide(*this));
646 }
647
649 hide(const core::identifier_string_list& hide_set, const process_expression& operand)
650 : process_expression(atermpp::aterm_appl(core::detail::function_symbol_Hide(), hide_set, operand))
651 {}
652
654 hide(const hide&) noexcept = default;
655 hide(hide&&) noexcept = default;
656 hide& operator=(const hide&) noexcept = default;
657 hide& operator=(hide&&) noexcept = default;
658
659 const core::identifier_string_list& hide_set() const
660 {
661 return atermpp::down_cast<core::identifier_string_list>((*this)[0]);
662 }
663
665 {
666 return atermpp::down_cast<process_expression>((*this)[1]);
667 }
668};
669
672template <class... ARGUMENTS>
673inline void make_hide(atermpp::aterm_appl& t, const ARGUMENTS&... args)
674{
675 atermpp::make_term_appl(t, core::detail::function_symbol_Hide(), args...);
676}
677
681inline
683{
684 return x.function() == core::detail::function_symbols::Hide;
685}
686
687// prototype declaration
688std::string pp(const hide& x);
689
694inline
695std::ostream& operator<<(std::ostream& out, const hide& x)
696{
697 return out << process::pp(x);
698}
699
701inline void swap(hide& t1, hide& t2)
702{
703 t1.swap(t2);
704}
705
706
709{
710 public:
713 : process_expression(core::detail::default_values::Rename)
714 {}
715
718 explicit rename(const atermpp::aterm& term)
719 : process_expression(term)
720 {
721 assert(core::detail::check_term_Rename(*this));
722 }
723
725 rename(const rename_expression_list& rename_set, const process_expression& operand)
726 : process_expression(atermpp::aterm_appl(core::detail::function_symbol_Rename(), rename_set, operand))
727 {}
728
730 rename(const rename&) noexcept = default;
731 rename(rename&&) noexcept = default;
732 rename& operator=(const rename&) noexcept = default;
733 rename& operator=(rename&&) noexcept = default;
734
735 const rename_expression_list& rename_set() const
736 {
737 return atermpp::down_cast<rename_expression_list>((*this)[0]);
738 }
739
741 {
742 return atermpp::down_cast<process_expression>((*this)[1]);
743 }
744};
745
748template <class... ARGUMENTS>
749inline void make_rename(atermpp::aterm_appl& t, const ARGUMENTS&... args)
750{
751 atermpp::make_term_appl(t, core::detail::function_symbol_Rename(), args...);
752}
753
757inline
759{
760 return x.function() == core::detail::function_symbols::Rename;
761}
762
763// prototype declaration
764std::string pp(const rename& x);
765
770inline
771std::ostream& operator<<(std::ostream& out, const rename& x)
772{
773 return out << process::pp(x);
774}
775
777inline void swap(rename& t1, rename& t2)
778{
779 t1.swap(t2);
780}
781
782
785{
786 public:
789 : process_expression(core::detail::default_values::Comm)
790 {}
791
794 explicit comm(const atermpp::aterm& term)
795 : process_expression(term)
796 {
797 assert(core::detail::check_term_Comm(*this));
798 }
799
802 : process_expression(atermpp::aterm_appl(core::detail::function_symbol_Comm(), comm_set, operand))
803 {}
804
806 comm(const comm&) noexcept = default;
807 comm(comm&&) noexcept = default;
808 comm& operator=(const comm&) noexcept = default;
809 comm& operator=(comm&&) noexcept = default;
810
811 const communication_expression_list& comm_set() const
812 {
813 return atermpp::down_cast<communication_expression_list>((*this)[0]);
814 }
815
817 {
818 return atermpp::down_cast<process_expression>((*this)[1]);
819 }
820};
821
824template <class... ARGUMENTS>
825inline void make_comm(atermpp::aterm_appl& t, const ARGUMENTS&... args)
826{
827 atermpp::make_term_appl(t, core::detail::function_symbol_Comm(), args...);
828}
829
833inline
835{
836 return x.function() == core::detail::function_symbols::Comm;
837}
838
839// prototype declaration
840std::string pp(const comm& x);
841
846inline
847std::ostream& operator<<(std::ostream& out, const comm& x)
848{
849 return out << process::pp(x);
850}
851
853inline void swap(comm& t1, comm& t2)
854{
855 t1.swap(t2);
856}
857
858
861{
862 public:
865 : process_expression(core::detail::default_values::Allow)
866 {}
867
870 explicit allow(const atermpp::aterm& term)
871 : process_expression(term)
872 {
873 assert(core::detail::check_term_Allow(*this));
874 }
875
878 : process_expression(atermpp::aterm_appl(core::detail::function_symbol_Allow(), allow_set, operand))
879 {}
880
882 allow(const allow&) noexcept = default;
883 allow(allow&&) noexcept = default;
884 allow& operator=(const allow&) noexcept = default;
885 allow& operator=(allow&&) noexcept = default;
886
888 {
889 return atermpp::down_cast<action_name_multiset_list>((*this)[0]);
890 }
891
893 {
894 return atermpp::down_cast<process_expression>((*this)[1]);
895 }
896};
897
900template <class... ARGUMENTS>
901inline void make_allow(atermpp::aterm_appl& t, const ARGUMENTS&... args)
902{
903 atermpp::make_term_appl(t, core::detail::function_symbol_Allow(), args...);
904}
905
909inline
911{
912 return x.function() == core::detail::function_symbols::Allow;
913}
914
915// prototype declaration
916std::string pp(const allow& x);
917
922inline
923std::ostream& operator<<(std::ostream& out, const allow& x)
924{
925 return out << process::pp(x);
926}
927
929inline void swap(allow& t1, allow& t2)
930{
931 t1.swap(t2);
932}
933
934
937{
938 public:
941 : process_expression(core::detail::default_values::Sync)
942 {}
943
946 explicit sync(const atermpp::aterm& term)
947 : process_expression(term)
948 {
949 assert(core::detail::check_term_Sync(*this));
950 }
951
953 sync(const process_expression& left, const process_expression& right)
954 : process_expression(atermpp::aterm_appl(core::detail::function_symbol_Sync(), left, right))
955 {}
956
958 sync(const sync&) noexcept = default;
959 sync(sync&&) noexcept = default;
960 sync& operator=(const sync&) noexcept = default;
961 sync& operator=(sync&&) noexcept = default;
962
963 const process_expression& left() const
964 {
965 return atermpp::down_cast<process_expression>((*this)[0]);
966 }
967
969 {
970 return atermpp::down_cast<process_expression>((*this)[1]);
971 }
972};
973
976template <class... ARGUMENTS>
977inline void make_sync(atermpp::aterm_appl& t, const ARGUMENTS&... args)
978{
979 atermpp::make_term_appl(t, core::detail::function_symbol_Sync(), args...);
980}
981
985inline
987{
988 return x.function() == core::detail::function_symbols::Sync;
989}
990
991// prototype declaration
992std::string pp(const sync& x);
993
998inline
999std::ostream& operator<<(std::ostream& out, const sync& x)
1000{
1001 return out << process::pp(x);
1002}
1003
1005inline void swap(sync& t1, sync& t2)
1006{
1007 t1.swap(t2);
1008}
1009
1010
1013{
1014 public:
1017 : process_expression(core::detail::default_values::AtTime)
1018 {}
1019
1022 explicit at(const atermpp::aterm& term)
1023 : process_expression(term)
1024 {
1025 assert(core::detail::check_term_AtTime(*this));
1026 }
1027
1029 at(const process_expression& operand, const data::data_expression& time_stamp)
1030 : process_expression(atermpp::aterm_appl(core::detail::function_symbol_AtTime(), operand, time_stamp))
1031 {}
1032
1034 at(const at&) noexcept = default;
1035 at(at&&) noexcept = default;
1036 at& operator=(const at&) noexcept = default;
1037 at& operator=(at&&) noexcept = default;
1038
1039 const process_expression& operand() const
1040 {
1041 return atermpp::down_cast<process_expression>((*this)[0]);
1042 }
1043
1045 {
1046 return atermpp::down_cast<data::data_expression>((*this)[1]);
1047 }
1048};
1049
1052template <class... ARGUMENTS>
1053inline void make_at(atermpp::aterm_appl& t, const ARGUMENTS&... args)
1054{
1055 atermpp::make_term_appl(t, core::detail::function_symbol_AtTime(), args...);
1056}
1057
1061inline
1062bool is_at(const atermpp::aterm_appl& x)
1063{
1064 return x.function() == core::detail::function_symbols::AtTime;
1065}
1066
1067// prototype declaration
1068std::string pp(const at& x);
1069
1074inline
1075std::ostream& operator<<(std::ostream& out, const at& x)
1076{
1077 return out << process::pp(x);
1078}
1079
1081inline void swap(at& t1, at& t2)
1082{
1083 t1.swap(t2);
1084}
1085
1086
1089{
1090 public:
1093 : process_expression(core::detail::default_values::Seq)
1094 {}
1095
1098 explicit seq(const atermpp::aterm& term)
1099 : process_expression(term)
1100 {
1101 assert(core::detail::check_term_Seq(*this));
1102 }
1103
1105 seq(const process_expression& left, const process_expression& right)
1106 : process_expression(atermpp::aterm_appl(core::detail::function_symbol_Seq(), left, right))
1107 {}
1108
1110 seq(const seq&) noexcept = default;
1111 seq(seq&&) noexcept = default;
1112 seq& operator=(const seq&) noexcept = default;
1113 seq& operator=(seq&&) noexcept = default;
1114
1115 const process_expression& left() const
1116 {
1117 return atermpp::down_cast<process_expression>((*this)[0]);
1118 }
1119
1121 {
1122 return atermpp::down_cast<process_expression>((*this)[1]);
1123 }
1124};
1125
1128template <class... ARGUMENTS>
1129inline void make_seq(atermpp::aterm_appl& t, const ARGUMENTS&... args)
1130{
1131 atermpp::make_term_appl(t, core::detail::function_symbol_Seq(), args...);
1132}
1133
1137inline
1138bool is_seq(const atermpp::aterm_appl& x)
1139{
1140 return x.function() == core::detail::function_symbols::Seq;
1141}
1142
1143// prototype declaration
1144std::string pp(const seq& x);
1145
1150inline
1151std::ostream& operator<<(std::ostream& out, const seq& x)
1152{
1153 return out << process::pp(x);
1154}
1155
1157inline void swap(seq& t1, seq& t2)
1158{
1159 t1.swap(t2);
1160}
1161
1162
1165{
1166 public:
1169 : process_expression(core::detail::default_values::IfThen)
1170 {}
1171
1174 explicit if_then(const atermpp::aterm& term)
1175 : process_expression(term)
1176 {
1177 assert(core::detail::check_term_IfThen(*this));
1178 }
1179
1181 if_then(const data::data_expression& condition, const process_expression& then_case)
1182 : process_expression(atermpp::aterm_appl(core::detail::function_symbol_IfThen(), condition, then_case))
1183 {}
1184
1186 if_then(const if_then&) noexcept = default;
1187 if_then(if_then&&) noexcept = default;
1188 if_then& operator=(const if_then&) noexcept = default;
1189 if_then& operator=(if_then&&) noexcept = default;
1190
1191 const data::data_expression& condition() const
1192 {
1193 return atermpp::down_cast<data::data_expression>((*this)[0]);
1194 }
1195
1197 {
1198 return atermpp::down_cast<process_expression>((*this)[1]);
1199 }
1200};
1201
1204template <class... ARGUMENTS>
1205inline void make_if_then(atermpp::aterm_appl& t, const ARGUMENTS&... args)
1206{
1207 atermpp::make_term_appl(t, core::detail::function_symbol_IfThen(), args...);
1208}
1209
1213inline
1215{
1216 return x.function() == core::detail::function_symbols::IfThen;
1217}
1218
1219// prototype declaration
1220std::string pp(const if_then& x);
1221
1226inline
1227std::ostream& operator<<(std::ostream& out, const if_then& x)
1228{
1229 return out << process::pp(x);
1230}
1231
1233inline void swap(if_then& t1, if_then& t2)
1234{
1235 t1.swap(t2);
1236}
1237
1238
1241{
1242 public:
1245 : process_expression(core::detail::default_values::IfThenElse)
1246 {}
1247
1250 explicit if_then_else(const atermpp::aterm& term)
1251 : process_expression(term)
1252 {
1253 assert(core::detail::check_term_IfThenElse(*this));
1254 }
1255
1257 if_then_else(const data::data_expression& condition, const process_expression& then_case, const process_expression& else_case)
1258 : process_expression(atermpp::aterm_appl(core::detail::function_symbol_IfThenElse(), condition, then_case, else_case))
1259 {}
1260
1262 if_then_else(const if_then_else&) noexcept = default;
1263 if_then_else(if_then_else&&) noexcept = default;
1264 if_then_else& operator=(const if_then_else&) noexcept = default;
1265 if_then_else& operator=(if_then_else&&) noexcept = default;
1266
1267 const data::data_expression& condition() const
1268 {
1269 return atermpp::down_cast<data::data_expression>((*this)[0]);
1270 }
1271
1273 {
1274 return atermpp::down_cast<process_expression>((*this)[1]);
1275 }
1276
1278 {
1279 return atermpp::down_cast<process_expression>((*this)[2]);
1280 }
1281};
1282
1285template <class... ARGUMENTS>
1286inline void make_if_then_else(atermpp::aterm_appl& t, const ARGUMENTS&... args)
1287{
1288 atermpp::make_term_appl(t, core::detail::function_symbol_IfThenElse(), args...);
1289}
1290
1294inline
1296{
1297 return x.function() == core::detail::function_symbols::IfThenElse;
1298}
1299
1300// prototype declaration
1301std::string pp(const if_then_else& x);
1302
1307inline
1308std::ostream& operator<<(std::ostream& out, const if_then_else& x)
1309{
1310 return out << process::pp(x);
1311}
1312
1314inline void swap(if_then_else& t1, if_then_else& t2)
1315{
1316 t1.swap(t2);
1317}
1318
1319
1322{
1323 public:
1326 : process_expression(core::detail::default_values::BInit)
1327 {}
1328
1331 explicit bounded_init(const atermpp::aterm& term)
1332 : process_expression(term)
1333 {
1334 assert(core::detail::check_term_BInit(*this));
1335 }
1336
1339 : process_expression(atermpp::aterm_appl(core::detail::function_symbol_BInit(), left, right))
1340 {}
1341
1343 bounded_init(const bounded_init&) noexcept = default;
1344 bounded_init(bounded_init&&) noexcept = default;
1345 bounded_init& operator=(const bounded_init&) noexcept = default;
1346 bounded_init& operator=(bounded_init&&) noexcept = default;
1347
1348 const process_expression& left() const
1349 {
1350 return atermpp::down_cast<process_expression>((*this)[0]);
1351 }
1352
1354 {
1355 return atermpp::down_cast<process_expression>((*this)[1]);
1356 }
1357};
1358
1361template <class... ARGUMENTS>
1362inline void make_bounded_init(atermpp::aterm_appl& t, const ARGUMENTS&... args)
1363{
1364 atermpp::make_term_appl(t, core::detail::function_symbol_BInit(), args...);
1365}
1366
1370inline
1372{
1373 return x.function() == core::detail::function_symbols::BInit;
1374}
1375
1376// prototype declaration
1377std::string pp(const bounded_init& x);
1378
1383inline
1384std::ostream& operator<<(std::ostream& out, const bounded_init& x)
1385{
1386 return out << process::pp(x);
1387}
1388
1390inline void swap(bounded_init& t1, bounded_init& t2)
1391{
1392 t1.swap(t2);
1393}
1394
1395
1398{
1399 public:
1402 : process_expression(core::detail::default_values::Merge)
1403 {}
1404
1407 explicit merge(const atermpp::aterm& term)
1408 : process_expression(term)
1409 {
1410 assert(core::detail::check_term_Merge(*this));
1411 }
1412
1415 : process_expression(atermpp::aterm_appl(core::detail::function_symbol_Merge(), left, right))
1416 {}
1417
1419 merge(const merge&) noexcept = default;
1420 merge(merge&&) noexcept = default;
1421 merge& operator=(const merge&) noexcept = default;
1422 merge& operator=(merge&&) noexcept = default;
1423
1424 const process_expression& left() const
1425 {
1426 return atermpp::down_cast<process_expression>((*this)[0]);
1427 }
1428
1430 {
1431 return atermpp::down_cast<process_expression>((*this)[1]);
1432 }
1433};
1434
1437template <class... ARGUMENTS>
1438inline void make_merge(atermpp::aterm_appl& t, const ARGUMENTS&... args)
1439{
1440 atermpp::make_term_appl(t, core::detail::function_symbol_Merge(), args...);
1441}
1442
1446inline
1448{
1449 return x.function() == core::detail::function_symbols::Merge;
1450}
1451
1452// prototype declaration
1453std::string pp(const merge& x);
1454
1459inline
1460std::ostream& operator<<(std::ostream& out, const merge& x)
1461{
1462 return out << process::pp(x);
1463}
1464
1466inline void swap(merge& t1, merge& t2)
1467{
1468 t1.swap(t2);
1469}
1470
1471
1474{
1475 public:
1478 : process_expression(core::detail::default_values::LMerge)
1479 {}
1480
1483 explicit left_merge(const atermpp::aterm& term)
1484 : process_expression(term)
1485 {
1486 assert(core::detail::check_term_LMerge(*this));
1487 }
1488
1491 : process_expression(atermpp::aterm_appl(core::detail::function_symbol_LMerge(), left, right))
1492 {}
1493
1495 left_merge(const left_merge&) noexcept = default;
1496 left_merge(left_merge&&) noexcept = default;
1497 left_merge& operator=(const left_merge&) noexcept = default;
1498 left_merge& operator=(left_merge&&) noexcept = default;
1499
1500 const process_expression& left() const
1501 {
1502 return atermpp::down_cast<process_expression>((*this)[0]);
1503 }
1504
1506 {
1507 return atermpp::down_cast<process_expression>((*this)[1]);
1508 }
1509};
1510
1513template <class... ARGUMENTS>
1514inline void make_left_merge(atermpp::aterm_appl& t, const ARGUMENTS&... args)
1515{
1516 atermpp::make_term_appl(t, core::detail::function_symbol_LMerge(), args...);
1517}
1518
1522inline
1524{
1525 return x.function() == core::detail::function_symbols::LMerge;
1526}
1527
1528// prototype declaration
1529std::string pp(const left_merge& x);
1530
1535inline
1536std::ostream& operator<<(std::ostream& out, const left_merge& x)
1537{
1538 return out << process::pp(x);
1539}
1540
1542inline void swap(left_merge& t1, left_merge& t2)
1543{
1544 t1.swap(t2);
1545}
1546
1547
1550{
1551 public:
1554 : process_expression(core::detail::default_values::Choice)
1555 {}
1556
1559 explicit choice(const atermpp::aterm& term)
1560 : process_expression(term)
1561 {
1562 assert(core::detail::check_term_Choice(*this));
1563 }
1564
1567 : process_expression(atermpp::aterm_appl(core::detail::function_symbol_Choice(), left, right))
1568 {}
1569
1571 choice(const choice&) noexcept = default;
1572 choice(choice&&) noexcept = default;
1573 choice& operator=(const choice&) noexcept = default;
1574 choice& operator=(choice&&) noexcept = default;
1575
1576 const process_expression& left() const
1577 {
1578 return atermpp::down_cast<process_expression>((*this)[0]);
1579 }
1580
1582 {
1583 return atermpp::down_cast<process_expression>((*this)[1]);
1584 }
1585};
1586
1589template <class... ARGUMENTS>
1590inline void make_choice(atermpp::aterm_appl& t, const ARGUMENTS&... args)
1591{
1592 atermpp::make_term_appl(t, core::detail::function_symbol_Choice(), args...);
1593}
1594
1598inline
1600{
1601 return x.function() == core::detail::function_symbols::Choice;
1602}
1603
1604// prototype declaration
1605std::string pp(const choice& x);
1606
1611inline
1612std::ostream& operator<<(std::ostream& out, const choice& x)
1613{
1614 return out << process::pp(x);
1615}
1616
1618inline void swap(choice& t1, choice& t2)
1619{
1620 t1.swap(t2);
1621}
1622
1623
1626{
1627 public:
1630 : process_expression(core::detail::default_values::StochasticOperator)
1631 {}
1632
1636 : process_expression(term)
1637 {
1638 assert(core::detail::check_term_StochasticOperator(*this));
1639 }
1640
1642 stochastic_operator(const data::variable_list& variables, const data::data_expression& distribution, const process_expression& operand)
1643 : process_expression(atermpp::aterm_appl(core::detail::function_symbol_StochasticOperator(), variables, distribution, operand))
1644 {}
1645
1647 stochastic_operator(const stochastic_operator&) noexcept = default;
1649 stochastic_operator& operator=(const stochastic_operator&) noexcept = default;
1650 stochastic_operator& operator=(stochastic_operator&&) noexcept = default;
1651
1652 const data::variable_list& variables() const
1653 {
1654 return atermpp::down_cast<data::variable_list>((*this)[0]);
1655 }
1656
1658 {
1659 return atermpp::down_cast<data::data_expression>((*this)[1]);
1660 }
1661
1663 {
1664 return atermpp::down_cast<process_expression>((*this)[2]);
1665 }
1666};
1667
1670template <class... ARGUMENTS>
1671inline void make_stochastic_operator(atermpp::aterm_appl& t, const ARGUMENTS&... args)
1672{
1673 atermpp::make_term_appl(t, core::detail::function_symbol_StochasticOperator(), args...);
1674}
1675
1679inline
1681{
1682 return x.function() == core::detail::function_symbols::StochasticOperator;
1683}
1684
1685// prototype declaration
1686std::string pp(const stochastic_operator& x);
1687
1692inline
1693std::ostream& operator<<(std::ostream& out, const stochastic_operator& x)
1694{
1695 return out << process::pp(x);
1696}
1697
1700{
1701 t1.swap(t2);
1702}
1703
1704
1707{
1708 public:
1711 : process_expression(core::detail::default_values::UntypedProcessAssignment)
1712 {}
1713
1717 : process_expression(term)
1718 {
1719 assert(core::detail::check_term_UntypedProcessAssignment(*this));
1720 }
1721
1724 : process_expression(atermpp::aterm_appl(core::detail::function_symbol_UntypedProcessAssignment(), name, assignments))
1725 {}
1726
1729 : process_expression(atermpp::aterm_appl(core::detail::function_symbol_UntypedProcessAssignment(), core::identifier_string(name), assignments))
1730 {}
1731
1735 untyped_process_assignment& operator=(const untyped_process_assignment&) noexcept = default;
1737
1738 const core::identifier_string& name() const
1739 {
1740 return atermpp::down_cast<core::identifier_string>((*this)[0]);
1741 }
1742
1744 {
1745 return atermpp::down_cast<data::untyped_identifier_assignment_list>((*this)[1]);
1746 }
1747};
1748
1751template <class... ARGUMENTS>
1752inline void make_untyped_process_assignment(atermpp::aterm_appl& t, const ARGUMENTS&... args)
1753{
1754 atermpp::make_term_appl(t, core::detail::function_symbol_UntypedProcessAssignment(), args...);
1755}
1756
1760inline
1762{
1763 return x.function() == core::detail::function_symbols::UntypedProcessAssignment;
1764}
1765
1766// prototype declaration
1767std::string pp(const untyped_process_assignment& x);
1768
1773inline
1774std::ostream& operator<<(std::ostream& out, const untyped_process_assignment& x)
1775{
1776 return out << process::pp(x);
1777}
1778
1781{
1782 t1.swap(t2);
1783}
1784//--- end generated classes ---//
1785
1786// template function overloads
1787std::string pp(const process_expression_list& x);
1788std::string pp(const process_expression_vector& x);
1789std::set<data::sort_expression> find_sort_expressions(const process::process_expression& x);
1790std::string pp(const action_list& x);
1791std::string pp(const action_vector& x);
1792action normalize_sorts(const action& x, const data::sort_specification& sortspec);
1793action translate_user_notation(const action& x);
1794process::process_expression translate_user_notation(const process::process_expression& x);
1795std::set<data::variable> find_all_variables(const action& x);
1796std::set<data::variable> find_free_variables(const action& x);
1797
1803inline
1804bool equal_signatures(const action& a, const action& b)
1805{
1806 if (a.label() != b.label())
1807 {
1808 return false;
1809 }
1810
1811 const data::data_expression_list& a_args = a.arguments();
1812 const data::data_expression_list& b_args = b.arguments();
1813
1814 if (a_args.size() != b_args.size())
1815 {
1816 return false;
1817 }
1818
1819 return std::equal(a_args.begin(), a_args.end(), b_args.begin(), [](const data::data_expression& x, const data::data_expression& y) { return x.sort() == y.sort(); });
1820}
1821
1822} // namespace process
1823
1824} // namespace mcrl2
1825
1826namespace std
1827{
1828
1830template <>
1831struct hash<mcrl2::process::action>
1832{
1833 std::size_t operator()(const mcrl2::process::action& t) const
1834 {
1835 return std::hash<atermpp::aterm>()(t);
1836 }
1837
1838};
1839
1840
1841} // namespace std
1842
1843#endif // MCRL2_PROCESS_PROCESS_EXPRESSION_H
void swap(StaticGraph &a, StaticGraph &b)
Definition Graph.h:297
The class action_label.
The class assignment.
Term containing a string.
The aterm base class that provides protection of the underlying shared terms.
Definition aterm.h:186
const function_symbol & function() const
Returns the function symbol belonging to an aterm_appl.
Definition aterm_appl.h:174
A list of aterm objects.
Definition aterm_list.h:23
size_type size() const
Returns the size of the term_list.
Definition aterm_list.h:255
const_iterator end() const
Returns a const_iterator pointing to the end of the term_list.
Definition aterm_list.h:281
const_iterator begin() const
Returns a const_iterator pointing to the beginning of the term_list.
Definition aterm_list.h:274
void swap(unprotected_aterm &t) noexcept
Swaps this term with its argument.
Definition aterm.h:156
\brief An action label
action(const action_label &label, const data::data_expression_list &arguments)
\brief Constructor.
action()
\brief Default constructor.
action(const atermpp::aterm &term)
action(action &&) noexcept=default
const data::data_expression_list & arguments() const
action(const action &) noexcept=default
Move semantics.
const action_label & label() const
\brief The allow operator
allow(const allow &) noexcept=default
Move semantics.
allow()
\brief Default constructor.
allow(const atermpp::aterm &term)
const process_expression & operand() const
allow(const action_name_multiset_list &allow_set, const process_expression &operand)
\brief Constructor.
allow(allow &&) noexcept=default
\brief The at operator
at(at &&) noexcept=default
at(const atermpp::aterm &term)
at(const at &) noexcept=default
Move semantics.
at()
\brief Default constructor.
at(const process_expression &operand, const data::data_expression &time_stamp)
\brief Constructor.
const data::data_expression & time_stamp() const
\brief The block operator
const process_expression & operand() const
block(block &&) noexcept=default
block(const block &) noexcept=default
Move semantics.
block(const atermpp::aterm &term)
block()
\brief Default constructor.
block(const core::identifier_string_list &block_set, const process_expression &operand)
\brief Constructor.
\brief The bounded initialization
bounded_init(const bounded_init &) noexcept=default
Move semantics.
const process_expression & right() const
bounded_init(bounded_init &&) noexcept=default
bounded_init(const process_expression &left, const process_expression &right)
\brief Constructor.
bounded_init(const atermpp::aterm &term)
bounded_init()
\brief Default constructor.
\brief The choice operator
choice(const atermpp::aterm &term)
choice(const choice &) noexcept=default
Move semantics.
choice()
\brief Default constructor.
choice(const process_expression &left, const process_expression &right)
\brief Constructor.
choice(choice &&) noexcept=default
const process_expression & right() const
\brief The communication operator
comm(const atermpp::aterm &term)
comm(comm &&) noexcept=default
comm(const comm &) noexcept=default
Move semantics.
comm(const communication_expression_list &comm_set, const process_expression &operand)
\brief Constructor.
const process_expression & operand() const
comm()
\brief Default constructor.
\brief The value delta
delta()
\brief Default constructor.
delta(const atermpp::aterm &term)
delta(delta &&) noexcept=default
delta(const delta &) noexcept=default
Move semantics.
\brief The hide operator
hide(hide &&) noexcept=default
hide(const atermpp::aterm &term)
hide(const core::identifier_string_list &hide_set, const process_expression &operand)
\brief Constructor.
const process_expression & operand() const
hide(const hide &) noexcept=default
Move semantics.
hide()
\brief Default constructor.
\brief The if-then-else operator
const process_expression & else_case() const
if_then_else(if_then_else &&) noexcept=default
const process_expression & then_case() const
if_then_else(const atermpp::aterm &term)
if_then_else()
\brief Default constructor.
if_then_else(const if_then_else &) noexcept=default
Move semantics.
if_then_else(const data::data_expression &condition, const process_expression &then_case, const process_expression &else_case)
\brief Constructor.
\brief The if-then operator
const process_expression & then_case() const
if_then(const data::data_expression &condition, const process_expression &then_case)
\brief Constructor.
if_then(const atermpp::aterm &term)
if_then(const if_then &) noexcept=default
Move semantics.
if_then(if_then &&) noexcept=default
if_then()
\brief Default constructor.
\brief The left merge operator
left_merge(left_merge &&) noexcept=default
const process_expression & right() const
left_merge(const atermpp::aterm &term)
left_merge(const left_merge &) noexcept=default
Move semantics.
left_merge(const process_expression &left, const process_expression &right)
\brief Constructor.
left_merge()
\brief Default constructor.
\brief The merge operator
merge(const atermpp::aterm &term)
const process_expression & right() const
merge(const merge &) noexcept=default
Move semantics.
merge(const process_expression &left, const process_expression &right)
\brief Constructor.
merge(merge &&) noexcept=default
merge()
\brief Default constructor.
\brief A process expression
process_expression(const process_expression &) noexcept=default
Move semantics.
process_expression()
\brief Default constructor.
process_expression(const data::untyped_data_parameter &x)
\brief Constructor.
process_expression(process_expression &&) noexcept=default
process_expression(const atermpp::aterm &term)
\brief A process identifier
process_instance_assignment(const process_instance_assignment &) noexcept=default
Move semantics.
process_instance_assignment()
\brief Default constructor.
process_instance_assignment(const process_identifier &identifier, const data::assignment_list &assignments)
\brief Constructor.
process_instance_assignment(process_instance_assignment &&) noexcept=default
const data::assignment_list & assignments() const
process_instance_assignment(const atermpp::aterm &term)
const data::data_expression_list & actual_parameters() const
process_instance(const process_identifier &identifier, const data::data_expression_list &actual_parameters)
\brief Constructor.
process_instance(process_instance &&) noexcept=default
process_instance()
\brief Default constructor.
process_instance(const atermpp::aterm &term)
process_instance(const process_instance &) noexcept=default
Move semantics.
\brief The rename operator
rename(const atermpp::aterm &term)
rename(const rename &) noexcept=default
Move semantics.
rename()
\brief Default constructor.
const process_expression & operand() const
rename(rename &&) noexcept=default
rename(const rename_expression_list &rename_set, const process_expression &operand)
\brief Constructor.
\brief The sequential composition
const process_expression & right() const
seq(const atermpp::aterm &term)
seq()
\brief Default constructor.
seq(seq &&) noexcept=default
seq(const seq &) noexcept=default
Move semantics.
seq(const process_expression &left, const process_expression &right)
\brief Constructor.
\brief The distribution operator
const data::data_expression & distribution() const
stochastic_operator()
\brief Default constructor.
stochastic_operator(const atermpp::aterm &term)
stochastic_operator(stochastic_operator &&) noexcept=default
stochastic_operator(const stochastic_operator &) noexcept=default
Move semantics.
const process_expression & operand() const
stochastic_operator(const data::variable_list &variables, const data::data_expression &distribution, const process_expression &operand)
\brief Constructor.
\brief The sum operator
const process_expression & operand() const
sum(const data::variable_list &variables, const process_expression &operand)
\brief Constructor.
sum(const atermpp::aterm &term)
sum()
\brief Default constructor.
sum(sum &&) noexcept=default
sum(const sum &) noexcept=default
Move semantics.
\brief The synchronization operator
sync(sync &&) noexcept=default
sync(const sync &) noexcept=default
Move semantics.
sync()
\brief Default constructor.
sync(const process_expression &left, const process_expression &right)
\brief Constructor.
const process_expression & right() const
sync(const atermpp::aterm &term)
\brief The value tau
tau(const tau &) noexcept=default
Move semantics.
tau()
\brief Default constructor.
tau(const atermpp::aterm &term)
tau(tau &&) noexcept=default
\brief An untyped process assginment
const data::untyped_identifier_assignment_list & assignments() const
untyped_process_assignment(const core::identifier_string &name, const data::untyped_identifier_assignment_list &assignments)
\brief Constructor.
untyped_process_assignment(const atermpp::aterm &term)
untyped_process_assignment()
\brief Default constructor.
untyped_process_assignment(const std::string &name, const data::untyped_identifier_assignment_list &assignments)
\brief Constructor.
untyped_process_assignment(untyped_process_assignment &&) noexcept=default
untyped_process_assignment(const untyped_process_assignment &) noexcept=default
Move semantics.
add your file description here.
The main namespace for the aterm++ library.
Definition algorithm.h:21
void make_term_appl(Term &target, const function_symbol &sym, ForwardIterator begin, ForwardIterator end)
Constructor an aterm_appl in a variable based on a function symbol and an forward iterator providing ...
Definition aterm_appl.h:239
const atermpp::function_symbol & function_symbol_Action()
const atermpp::function_symbol & function_symbol_Process()
bool check_rule_ProcExpr(const Term &t)
const atermpp::function_symbol & function_symbol_ProcessAssignment()
bool is_untyped_data_parameter(const atermpp::aterm_appl &x)
bool is_allow(const atermpp::aterm_appl &x)
bool is_delta(const atermpp::aterm_appl &x)
void make_rename(atermpp::aterm_appl &t, const ARGUMENTS &... args)
std::vector< process_expression > process_expression_vector
\brief vector of process_expressions
void make_merge(atermpp::aterm_appl &t, const ARGUMENTS &... args)
bool is_bounded_init(const atermpp::aterm_appl &x)
void swap(action_label &t1, action_label &t2)
\brief swap overload
bool is_at(const atermpp::aterm_appl &x)
bool is_seq(const atermpp::aterm_appl &x)
void make_process_instance(atermpp::aterm_appl &t, const ARGUMENTS &... args)
void make_if_then_else(atermpp::aterm_appl &t, const ARGUMENTS &... args)
bool is_action(const atermpp::aterm_appl &x)
bool is_hide(const atermpp::aterm_appl &x)
void make_process_instance_assignment(atermpp::aterm_appl &t, const ARGUMENTS &... args)
void make_if_then(atermpp::aterm_appl &t, const ARGUMENTS &... args)
void make_hide(atermpp::aterm_appl &t, const ARGUMENTS &... args)
bool is_choice(const atermpp::aterm_appl &x)
bool is_untyped_process_assignment(const atermpp::aterm_appl &x)
bool is_merge(const atermpp::aterm_appl &x)
void make_untyped_process_assignment(atermpp::aterm_appl &t, const ARGUMENTS &... args)
bool is_stochastic_operator(const atermpp::aterm_appl &x)
bool is_tau(const atermpp::aterm_appl &x)
bool is_process_instance_assignment(const atermpp::aterm_appl &x)
void make_block(atermpp::aterm_appl &t, const ARGUMENTS &... args)
void make_bounded_init(atermpp::aterm_appl &t, const ARGUMENTS &... args)
void make_stochastic_operator(atermpp::aterm_appl &t, const ARGUMENTS &... args)
bool is_process_expression(const atermpp::aterm_appl &x)
std::vector< action > action_vector
\brief vector of actions
void make_action(atermpp::aterm_appl &t, const ARGUMENTS &... args)
bool is_if_then(const atermpp::aterm_appl &x)
void make_choice(atermpp::aterm_appl &t, const ARGUMENTS &... args)
std::string pp(const action_label &x)
Definition process.cpp:36
atermpp::term_list< action > action_list
\brief list of actions
void make_allow(atermpp::aterm_appl &t, const ARGUMENTS &... args)
bool is_block(const atermpp::aterm_appl &x)
void make_sync(atermpp::aterm_appl &t, const ARGUMENTS &... args)
void make_comm(atermpp::aterm_appl &t, const ARGUMENTS &... args)
bool is_sync(const atermpp::aterm_appl &x)
bool is_sum(const atermpp::aterm_appl &x)
std::ostream & operator<<(std::ostream &out, const action_label &x)
bool is_process_instance(const atermpp::aterm_appl &x)
bool is_comm(const atermpp::aterm_appl &x)
bool is_if_then_else(const atermpp::aterm_appl &x)
bool is_left_merge(const atermpp::aterm_appl &x)
bool is_rename(const atermpp::aterm_appl &x)
void make_left_merge(atermpp::aterm_appl &t, const ARGUMENTS &... args)
bool equal_signatures(const action &a, const action &b)
Compares the signatures of two actions.
A class that takes a linear process specification and checks all tau-summands of that LPS for conflue...
Definition indexed_set.h:72
STL namespace.
add your file description here.
add your file description here.
static const atermpp::function_symbol ProcessAssignment
static const atermpp::function_symbol Action
static const atermpp::function_symbol Process
Represents the set AI*. If the attribute A_includes_subsets is true, also subsets of the elements are...
Definition allow_set.h:29
std::size_t operator()(const mcrl2::process::action &t) const
#define hash(l, r, m)
Definition tree_set.cpp:23
add your file description here.