15#ifndef MCRL2_DATA_FBAG1_H
16#define MCRL2_DATA_FBAG1_H
91 return atermpp::down_cast<function_symbol>(e).name() ==
empty_name();
123 return atermpp::down_cast<function_symbol>(e).name() ==
insert_name();
194 static_cast< void >(s);
225 return atermpp::down_cast<function_symbol>(e).name() ==
cons_name();
291 return atermpp::down_cast<function_symbol>(e).name() ==
cinsert_name();
357 return atermpp::down_cast<function_symbol>(e).name() ==
count_name();
421 return atermpp::down_cast<function_symbol>(e).name() ==
in_name();
485 return atermpp::down_cast<function_symbol>(e).name() ==
fset2fbag_name();
547 return atermpp::down_cast<function_symbol>(e).name() ==
union_name();
675 return atermpp::down_cast<function_symbol>(e).name() ==
difference_name();
739 return atermpp::down_cast<function_symbol>(e).name() ==
count_all_name();
835 static_cast< void >(s);
847 return atermpp::down_cast<application>(e)[0];
859 return atermpp::down_cast<application>(e)[1];
871 return atermpp::down_cast<application>(e)[2];
883 return atermpp::down_cast<application>(e)[0];
895 return atermpp::down_cast<application>(e)[1];
907 return atermpp::down_cast<application>(e)[0];
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)))));
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)))));
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)))));
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))));
939 result.push_back(
data_equation(
variable_list({vb, vd, vp}),
cinsert(s, vd,
sort_nat::cnat(vp), vb),
insert(s, vd, vp, vb)));
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)));
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))));
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)));
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))));
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)));
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)))))));
Term containing a string.
An application of a data expression to a number of arguments.
const container_type & container_name() const
\brief Container type for finite bags
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 & true_()
Constructor for function symbol true.
bool is_empty_function_symbol(const atermpp::aterm &e)
Recogniser for function {:}.
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.
const core::identifier_string & count_all_name()
Generate identifier #.
function_symbol_vector fbag_generate_constructors_and_functions_code(const sort_expression &s)
Give all system defined mappings and constructors for fbag.
const core::identifier_string & fset2fbag_name()
Generate identifier @fset2fbag.
container_sort fbag(const sort_expression &s)
Constructor for sort expression FBag(S)
bool is_in_function_symbol(const atermpp::aterm &e)
Recogniser for function in.
bool is_difference_function_symbol(const atermpp::aterm &e)
Recogniser for function -.
const core::identifier_string & count_name()
Generate identifier count.
const core::identifier_string & cinsert_name()
Generate identifier @fbag_cinsert.
bool is_union_application(const atermpp::aterm &e)
Recogniser for application of +.
function_symbol intersection(const sort_expression &s)
Constructor for function symbol *.
const data_expression & arg3(const data_expression &e)
Function for projecting out argument. arg3 from an application.
function_symbol union_(const sort_expression &s)
Constructor for function symbol +.
const data_expression & arg(const data_expression &e)
Function for projecting out argument. arg from an application.
bool is_cinsert_function_symbol(const atermpp::aterm &e)
Recogniser for function @fbag_cinsert.
function_symbol cons_(const sort_expression &s)
Constructor for function symbol @fbag_cons.
bool is_insert_function_symbol(const atermpp::aterm &e)
Recogniser for function @fbag_insert.
bool is_intersection_application(const atermpp::aterm &e)
Recogniser for application of *.
function_symbol count_all(const sort_expression &s)
Constructor for function symbol #.
void make_intersection(data_expression &result, const sort_expression &s, const data_expression &arg0, const data_expression &arg1)
Make an application of function symbol *.
bool is_cons_function_symbol(const atermpp::aterm &e)
Recogniser for function @fbag_cons.
function_symbol insert(const sort_expression &s)
Constructor for function symbol @fbag_insert.
void make_fset2fbag(data_expression &result, const sort_expression &s, const data_expression &arg0)
Make an application of function symbol @fset2fbag.
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.
const core::identifier_string & cons_name()
Generate identifier @fbag_cons.
bool is_fset2fbag_function_symbol(const atermpp::aterm &e)
Recogniser for function @fset2fbag.
bool is_in_application(const atermpp::aterm &e)
Recogniser for application of in.
const core::identifier_string & empty_name()
Generate identifier {:}.
const core::identifier_string & difference_name()
Generate identifier -.
bool is_difference_application(const atermpp::aterm &e)
Recogniser for application of -.
bool is_count_application(const atermpp::aterm &e)
Recogniser for application of count.
bool is_cons_application(const atermpp::aterm &e)
Recogniser for application of @fbag_cons.
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 & left(const data_expression &e)
Function for projecting out argument. left from an application.
const data_expression & arg2(const data_expression &e)
Function for projecting out argument. arg2 from an application.
void make_count_all(data_expression &result, const sort_expression &s, const data_expression &arg0)
Make an application of function symbol #.
bool is_count_function_symbol(const atermpp::aterm &e)
Recogniser for function count.
bool is_intersection_function_symbol(const atermpp::aterm &e)
Recogniser for function *.
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...
const core::identifier_string & intersection_name()
Generate identifier *.
const data_expression & right(const data_expression &e)
Function for projecting out argument. right from an application.
function_symbol in(const sort_expression &s)
Constructor for function symbol in.
function_symbol_vector fbag_generate_constructors_code(const sort_expression &s)
Give all system defined constructors for fbag.
bool is_count_all_application(const atermpp::aterm &e)
Recogniser for application of #.
function_symbol count(const sort_expression &s)
Constructor for function symbol count.
void make_union_(data_expression &result, const sort_expression &s, const data_expression &arg0, const data_expression &arg1)
Make an application of function symbol +.
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.
bool is_fbag(const sort_expression &e)
Recogniser for sort expression FBag(s)
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.
function_symbol empty(const sort_expression &s)
Constructor for function symbol {:}.
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 cinsert(const sort_expression &s)
Constructor for function symbol @fbag_cinsert.
bool is_cinsert_application(const atermpp::aterm &e)
Recogniser for application of @fbag_cinsert.
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.
bool is_fset2fbag_application(const atermpp::aterm &e)
Recogniser for application of @fset2fbag.
bool is_count_all_function_symbol(const atermpp::aterm &e)
Recogniser for function #.
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.
function_symbol fset2fbag(const sort_expression &s)
Constructor for function symbol @fset2fbag.
const core::identifier_string & union_name()
Generate identifier +.
function_symbol difference(const sort_expression &s)
Constructor for function symbol -.
function_symbol_vector fbag_generate_functions_code(const sort_expression &s)
Give all system defined mappings for fbag.
bool is_insert_application(const atermpp::aterm &e)
Recogniser for application of @fbag_insert.
const core::identifier_string & insert_name()
Generate identifier @fbag_insert.
std::map< function_symbol, std::pair< std::function< void(data_expression &, const data_expression &)>, std::string > > implementation_map
data_equation_vector fbag_generate_equations_code(const sort_expression &s)
Give all system defined equations for fbag.
bool is_union_function_symbol(const atermpp::aterm &e)
Recogniser for function +.
const data_expression & arg1(const data_expression &e)
Function for projecting out argument. arg1 from an application.
function_symbol_vector fbag_mCRL2_usable_constructors(const sort_expression &s)
Give all defined constructors which can be used in mCRL2 specs for fbag.
const core::identifier_string & in_name()
Generate identifier in.
function_symbol cons_(const sort_expression &s)
Constructor for function symbol @fset_cons.
function_symbol empty(const sort_expression &s)
Constructor for function symbol {}.
container_sort fset(const sort_expression &s)
Constructor for sort expression FSet(S)
const function_symbol & c0()
Constructor for function symbol @c0.
const function_symbol & gte_subtract_with_borrow()
Constructor for function symbol @gtesubtb.
const function_symbol & cnat()
Constructor for function symbol @cNat.
const basic_sort & nat()
Constructor for sort expression Nat.
function_symbol minimum(const sort_expression &s0, const sort_expression &s1)
const function_symbol & nat2pos()
Constructor for function symbol Nat2Pos.
const function_symbol & c1()
Constructor for function symbol @c1.
const function_symbol & add_with_carry()
Constructor for function symbol @addc.
const basic_sort & pos()
Constructor for sort expression Pos.
function_symbol less_equal(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.
function_symbol greater(const sort_expression &s)
Constructor for function symbol >
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.