15#ifndef MCRL2_DATA_FSET64_H
16#define MCRL2_DATA_FSET64_H
41 container_sort
fset(
const sort_expression& s)
43 container_sort
fset(fset_container(), s);
52 bool is_fset(
const sort_expression& e)
56 return container_sort(e).container_name() == fset_container();
89 return atermpp::down_cast<function_symbol>(e).name() ==
empty_name();
121 return atermpp::down_cast<function_symbol>(e).name() ==
insert_name();
132 application
insert(
const sort_expression& s,
const data_expression& arg0,
const data_expression&
arg1)
143 void make_insert(data_expression& result,
const sort_expression& s,
const data_expression& arg0,
const data_expression&
arg1)
190 static_cast< void >(s);
221 return atermpp::down_cast<function_symbol>(e).name() ==
cons_name();
232 application
cons_(
const sort_expression& s,
const data_expression& arg0,
const data_expression&
arg1)
243 void make_cons_(data_expression& result,
const sort_expression& s,
const data_expression& arg0,
const data_expression&
arg1)
285 return atermpp::down_cast<function_symbol>(e).name() ==
cinsert_name();
297 application
cinsert(
const sort_expression& s,
const data_expression& arg0,
const data_expression&
arg1,
const data_expression&
arg2)
309 void make_cinsert(data_expression& result,
const sort_expression& s,
const data_expression& arg0,
const data_expression&
arg1,
const data_expression&
arg2)
351 return atermpp::down_cast<function_symbol>(e).name() ==
in_name();
362 application
in(
const sort_expression& s,
const data_expression& arg0,
const data_expression&
arg1)
373 void make_in(data_expression& result,
const sort_expression& s,
const data_expression& arg0,
const data_expression&
arg1)
415 return atermpp::down_cast<function_symbol>(e).name() ==
difference_name();
426 application
difference(
const sort_expression& s,
const data_expression& arg0,
const data_expression&
arg1)
437 void make_difference(data_expression& result,
const sort_expression& s,
const data_expression& arg0,
const data_expression&
arg1)
479 return atermpp::down_cast<function_symbol>(e).name() ==
union_name();
490 application
union_(
const sort_expression& s,
const data_expression& arg0,
const data_expression&
arg1)
501 void make_union_(data_expression& result,
const sort_expression& s,
const data_expression& arg0,
const data_expression&
arg1)
554 application
intersection(
const sort_expression& s,
const data_expression& arg0,
const data_expression&
arg1)
565 void make_intersection(data_expression& result,
const sort_expression& s,
const data_expression& arg0,
const data_expression&
arg1)
607 return atermpp::down_cast<function_symbol>(e).name() ==
count_name();
617 application
count(
const sort_expression& s,
const data_expression& arg0)
627 void make_count(data_expression& result,
const sort_expression& s,
const data_expression& arg0)
699 static_cast< void >(s);
708 const data_expression&
left(
const data_expression& e)
711 return atermpp::down_cast<application>(e)[0];
720 const data_expression&
right(
const data_expression& e)
723 return atermpp::down_cast<application>(e)[1];
732 const data_expression&
arg1(
const data_expression& e)
735 return atermpp::down_cast<application>(e)[0];
744 const data_expression&
arg2(
const data_expression& e)
747 return atermpp::down_cast<application>(e)[1];
756 const data_expression&
arg3(
const data_expression& e)
759 return atermpp::down_cast<application>(e)[2];
768 const data_expression&
arg(
const data_expression& e)
771 return atermpp::down_cast<application>(e)[0];
784 variable vs(
"s",
fset(s));
785 variable vt(
"t",
fset(s));
790 result.push_back(data_equation(
variable_list({vd, ve, vs, vt}),
equal_to(
cons_(s, vd, vs),
cons_(s, ve, vt)),
sort_bool::and_(
equal_to(vd, ve),
equal_to(vs, vt))));
793 result.push_back(data_equation(
variable_list({vd, ve, vs, vt}),
less_equal(
cons_(s, vd, vs),
cons_(s, ve, vt)),
if_(
less(vd, ve),
sort_bool::false_(),
if_(
equal_to(vd, ve),
less_equal(vs, vt),
less_equal(
cons_(s, vd, vs), vt)))));
796 result.push_back(data_equation(
variable_list({vd, ve, vs, vt}),
less(
cons_(s, vd, vs),
cons_(s, ve, vt)),
if_(
less(vd, ve),
sort_bool::false_(),
if_(
equal_to(vd, ve),
less(vs, vt),
less_equal(
cons_(s, vd, vs), vt)))));
799 result.push_back(data_equation(
variable_list({vd, ve, vs}),
less(vd, ve),
insert(s, vd,
cons_(s, ve, vs)),
cons_(s, vd,
cons_(s, ve, vs))));
800 result.push_back(data_equation(
variable_list({vd, ve, vs}),
less(ve, vd),
insert(s, vd,
cons_(s, ve, vs)),
cons_(s, ve,
insert(s, vd, vs))));
804 result.push_back(data_equation(
variable_list({vd, ve, vs}),
in(s, vd,
cons_(s, ve, vs)),
sort_bool::or_(
equal_to(vd, ve),
in(s, vd, vs))));
805 result.push_back(data_equation(
variable_list({vd, ve, vs}),
in(s, vd,
insert(s, ve, vs)),
sort_bool::or_(
equal_to(vd, ve),
in(s, vd, vs))));
808 result.push_back(data_equation(
variable_list({vd, vs, vt}),
difference(s,
cons_(s, vd, vs),
cons_(s, vd, vt)),
difference(s, vs, vt)));
809 result.push_back(data_equation(
variable_list({vd, ve, vs, vt}),
less(vd, ve),
difference(s,
cons_(s, vd, vs),
cons_(s, ve, vt)),
cons_(s, vd,
difference(s, vs,
cons_(s, ve, vt)))));
810 result.push_back(data_equation(
variable_list({vd, ve, vs, vt}),
less(ve, vd),
difference(s,
cons_(s, vd, vs),
cons_(s, ve, vt)),
difference(s,
cons_(s, vd, vs), vt)));
813 result.push_back(data_equation(
variable_list({vd, vs, vt}),
union_(s,
cons_(s, vd, vs),
cons_(s, vd, vt)),
cons_(s, vd,
union_(s, vs, vt))));
814 result.push_back(data_equation(
variable_list({vd, ve, vs, vt}),
less(vd, ve),
union_(s,
cons_(s, vd, vs),
cons_(s, ve, vt)),
cons_(s, vd,
union_(s, vs,
cons_(s, ve, vt)))));
815 result.push_back(data_equation(
variable_list({vd, ve, vs, vt}),
less(ve, vd),
union_(s,
cons_(s, vd, vs),
cons_(s, ve, vt)),
cons_(s, ve,
union_(s,
cons_(s, vd, vs), vt))));
818 result.push_back(data_equation(
variable_list({vd, vs, vt}),
intersection(s,
cons_(s, vd, vs),
cons_(s, vd, vt)),
cons_(s, vd,
intersection(s, vs, vt))));
819 result.push_back(data_equation(
variable_list({vd, ve, vs, vt}),
less(vd, ve),
intersection(s,
cons_(s, vd, vs),
cons_(s, ve, vt)),
intersection(s, vs,
cons_(s, ve, vt))));
820 result.push_back(data_equation(
variable_list({vd, ve, vs, vt}),
less(ve, vd),
intersection(s,
cons_(s, vd, vs),
cons_(s, ve, vt)),
intersection(s,
cons_(s, vd, vs), vt)));
The class container_sort.
The class function symbol.
Exception classes for use in libraries and tools.
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.
const function_symbol & and_()
Constructor for function symbol &&.
const function_symbol & false_()
Constructor for function symbol false.
const function_symbol & or_()
Constructor for function symbol ||.
const function_symbol & not_()
Constructor for function symbol !.
const function_symbol & true_()
Constructor for function symbol true.
function_symbol insert(const sort_expression &s)
Constructor for function symbol @fset_insert.
bool is_fset(const sort_expression &e)
Recogniser for sort expression FSet(s)
function_symbol_vector fset_mCRL2_usable_mappings(const sort_expression &s)
Give all system defined mappings that can be used in mCRL2 specs for fset.
void make_union_(data_expression &result, const sort_expression &s, const data_expression &arg0, const data_expression &arg1)
Make an application of function symbol +.
bool is_empty_function_symbol(const atermpp::aterm &e)
Recogniser for function {}.
bool is_in_application(const atermpp::aterm &e)
Recogniser for application of in.
bool is_cinsert_function_symbol(const atermpp::aterm &e)
Recogniser for function @fset_cinsert.
bool is_count_function_symbol(const atermpp::aterm &e)
Recogniser for function #.
function_symbol_vector fset_generate_constructors_and_functions_code(const sort_expression &s)
Give all system defined mappings and constructors for fset.
function_symbol cinsert(const sort_expression &s)
Constructor for function symbol @fset_cinsert.
function_symbol_vector fset_mCRL2_usable_constructors(const sort_expression &s)
Give all defined constructors which can be used in mCRL2 specs for fset.
bool is_cons_function_symbol(const atermpp::aterm &e)
Recogniser for function @fset_cons.
function_symbol_vector fset_generate_constructors_code(const sort_expression &s)
Give all system defined constructors for fset.
const core::identifier_string & empty_name()
Generate identifier {}.
const core::identifier_string & intersection_name()
Generate identifier *.
implementation_map fset_cpp_implementable_constructors(const sort_expression &s)
Give all system defined constructors which have an implementation in C++ and not in rewrite rules for...
bool is_insert_function_symbol(const atermpp::aterm &e)
Recogniser for function @fset_insert.
function_symbol_vector fset_generate_functions_code(const sort_expression &s)
Give all system defined mappings for fset.
bool is_difference_function_symbol(const atermpp::aterm &e)
Recogniser for function -.
function_symbol cons_(const sort_expression &s)
Constructor for function symbol @fset_cons.
void make_intersection(data_expression &result, const sort_expression &s, const data_expression &arg0, const data_expression &arg1)
Make an application of function symbol *.
implementation_map fset_cpp_implementable_mappings(const sort_expression &s)
Give all system defined mappings that are to be implemented in C++ code for fset.
function_symbol empty(const sort_expression &s)
Constructor for function symbol {}.
const core::identifier_string & difference_name()
Generate identifier -.
bool is_union_function_symbol(const atermpp::aterm &e)
Recogniser for function +.
void make_difference(data_expression &result, const sort_expression &s, const data_expression &arg0, const data_expression &arg1)
Make an application of function symbol -.
function_symbol intersection(const sort_expression &s)
Constructor for function symbol *.
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 @fset_cinsert.
const data_expression & right(const data_expression &e)
Function for projecting out argument. right from an application.
function_symbol difference(const sort_expression &s)
Constructor for function symbol -.
void make_insert(data_expression &result, const sort_expression &s, const data_expression &arg0, const data_expression &arg1)
Make an application of function symbol @fset_insert.
std::map< function_symbol, std::pair< std::function< void(data_expression &, const data_expression &)>, std::string > > implementation_map
bool is_intersection_function_symbol(const atermpp::aterm &e)
Recogniser for function *.
const core::identifier_string & cinsert_name()
Generate identifier @fset_cinsert.
bool is_in_function_symbol(const atermpp::aterm &e)
Recogniser for function in.
void make_count(data_expression &result, const sort_expression &s, const data_expression &arg0)
Make an application of function symbol #.
const data_expression & left(const data_expression &e)
Function for projecting out argument. left from an application.
function_symbol in(const sort_expression &s)
Constructor for function symbol in.
bool is_difference_application(const atermpp::aterm &e)
Recogniser for application of -.
const core::identifier_string & count_name()
Generate identifier #.
const data_expression & arg2(const data_expression &e)
Function for projecting out argument. arg2 from an application.
data_equation_vector fset_generate_equations_code(const sort_expression &s)
Give all system defined equations for fset.
const core::identifier_string & union_name()
Generate identifier +.
const data_expression & arg1(const data_expression &e)
Function for projecting out argument. arg1 from an application.
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.
const data_expression & arg3(const data_expression &e)
Function for projecting out argument. arg3 from an application.
bool is_count_application(const atermpp::aterm &e)
Recogniser for application of #.
function_symbol count(const sort_expression &s)
Constructor for function symbol #.
bool is_cons_application(const atermpp::aterm &e)
Recogniser for application of @fset_cons.
bool is_intersection_application(const atermpp::aterm &e)
Recogniser for application of *.
const core::identifier_string & insert_name()
Generate identifier @fset_insert.
void make_cons_(data_expression &result, const sort_expression &s, const data_expression &arg0, const data_expression &arg1)
Make an application of function symbol @fset_cons.
container_sort fset(const sort_expression &s)
Constructor for sort expression FSet(S)
const core::identifier_string & cons_name()
Generate identifier @fset_cons.
const data_expression & arg(const data_expression &e)
Function for projecting out argument. arg from an application.
function_symbol union_(const sort_expression &s)
Constructor for function symbol +.
const core::identifier_string & in_name()
Generate identifier in.
bool is_cinsert_application(const atermpp::aterm &e)
Recogniser for application of @fset_cinsert.
bool is_union_application(const atermpp::aterm &e)
Recogniser for application of +.
bool is_insert_application(const atermpp::aterm &e)
Recogniser for application of @fset_insert.
function_symbol head(const sort_expression &s)
Constructor for function symbol head.
const function_symbol & c0()
Constructor for function symbol @c0.
const basic_sort & nat()
Constructor for sort expression Nat.
const function_symbol & succ_nat()
Constructor for function symbol @succ_nat.
function_symbol less_equal(const sort_expression &s)
Constructor for function symbol <=.
function_symbol not_equal_to(const sort_expression &s)
Constructor for function symbol !=.
function_symbol less(const sort_expression &s)
Constructor for function symbol <.
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 ==.
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.
void make_application(atermpp::aterm &result)
Make function for an application.
A class that takes a linear process specification and checks all tau-summands of that LPS for conflue...
Standard functions that are available for all sorts.