15#ifndef MCRL2_DATA_INT64_H
16#define MCRL2_DATA_INT64_H
47 const basic_sort&
int_()
57 bool is_int(
const sort_expression& e)
61 return basic_sort(e) ==
int_();
94 return atermpp::down_cast<function_symbol>(e) ==
cint();
104 application
cint(
const data_expression& arg0)
114 void make_cint(data_expression& result,
const data_expression& arg0)
156 return atermpp::down_cast<function_symbol>(e) ==
cneg();
166 application
cneg(
const data_expression& arg0)
176 void make_cneg(data_expression& result,
const data_expression& arg0)
250 return atermpp::down_cast<function_symbol>(e) ==
nat2int();
260 application
nat2int(
const data_expression& arg0)
270 void make_nat2int(data_expression& result,
const data_expression& arg0)
312 return atermpp::down_cast<function_symbol>(e) ==
int2nat();
322 application
int2nat(
const data_expression& arg0)
332 void make_int2nat(data_expression& result,
const data_expression& arg0)
374 return atermpp::down_cast<function_symbol>(e) ==
pos2int();
384 application
pos2int(
const data_expression& arg0)
394 void make_pos2int(data_expression& result,
const data_expression& arg0)
436 return atermpp::down_cast<function_symbol>(e) ==
int2pos();
446 application
int2pos(
const data_expression& arg0)
456 void make_int2pos(data_expression& result,
const data_expression& arg0)
501 else if (s0 ==
int_() && s1 ==
int_())
523 throw mcrl2::runtime_error(
"Cannot compute target sort for maximum with domain sorts " +
pp(s0) +
", " +
pp(s1) +
". ");
550 application
maximum(
const data_expression& arg0,
const data_expression&
arg1)
561 void make_maximum(data_expression& result,
const data_expression& arg0,
const data_expression&
arg1)
604 throw mcrl2::runtime_error(
"Cannot compute target sort for minimum with domain sorts " +
pp(s0) +
", " +
pp(s1) +
". ");
631 application
minimum(
const data_expression& arg0,
const data_expression&
arg1)
642 void make_minimum(data_expression& result,
const data_expression& arg0,
const data_expression&
arg1)
684 return atermpp::down_cast<function_symbol>(e) ==
abs();
694 application
abs(
const data_expression& arg0)
704 void make_abs(data_expression& result,
const data_expression& arg0)
756 application
negate(
const data_expression& arg0)
766 void make_negate(data_expression& result,
const data_expression& arg0)
835 application
succ(
const data_expression& arg0)
845 void make_succ(data_expression& result,
const data_expression& arg0)
878 else if (s0 ==
int_())
914 application
pred(
const data_expression& arg0)
924 void make_pred(data_expression& result,
const data_expression& arg0)
975 throw mcrl2::runtime_error(
"Cannot compute target sort for plus with domain sorts " +
pp(s0) +
", " +
pp(s1) +
". ");
1002 application
plus(
const data_expression& arg0,
const data_expression&
arg1)
1013 void make_plus(data_expression& result,
const data_expression& arg0,
const data_expression&
arg1)
1066 application
minus(
const data_expression& arg0,
const data_expression&
arg1)
1077 void make_minus(data_expression& result,
const data_expression& arg0,
const data_expression&
arg1)
1120 throw mcrl2::runtime_error(
"Cannot compute target sort for times with domain sorts " +
pp(s0) +
", " +
pp(s1) +
". ");
1147 application
times(
const data_expression& arg0,
const data_expression&
arg1)
1158 void make_times(data_expression& result,
const data_expression& arg0,
const data_expression&
arg1)
1197 throw mcrl2::runtime_error(
"Cannot compute target sort for div with domain sorts " +
pp(s0) +
", " +
pp(s1) +
". ");
1224 application
div(
const data_expression& arg0,
const data_expression&
arg1)
1235 void make_div(data_expression& result,
const data_expression& arg0,
const data_expression&
arg1)
1288 application
mod(
const data_expression& arg0,
const data_expression&
arg1)
1299 void make_mod(data_expression& result,
const data_expression& arg0,
const data_expression&
arg1)
1342 throw mcrl2::runtime_error(
"Cannot compute target sort for exp with domain sorts " +
pp(s0) +
", " +
pp(s1) +
". ");
1369 application
exp(
const data_expression& arg0,
const data_expression&
arg1)
1380 void make_exp(data_expression& result,
const data_expression& arg0,
const data_expression&
arg1)
1436 result.push_back(f);
1492 const data_expression&
arg(
const data_expression& e)
1495 return atermpp::down_cast<application>(e)[0];
1504 const data_expression&
left(
const data_expression& e)
1507 return atermpp::down_cast<application>(e)[0];
1516 const data_expression&
right(
const data_expression& e)
1519 return atermpp::down_cast<application>(e)[1];
1532 variable vx(
"x",
int_());
1533 variable vy(
"y",
int_());
size_type size() const
Returns the number of arguments of this term.
sort_expression sort() const
Returns the sort of the data expression.
Standard exception class for reporting runtime errors.
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 & false_()
Constructor for function symbol false.
const function_symbol & true_()
Constructor for function symbol true.
bool is_minimum_application(const atermpp::aterm &e)
Recogniser for application of min.
const data_expression & right(const data_expression &e)
Function for projecting out argument. right from an application.
void make_minimum(data_expression &result, const data_expression &arg0, const data_expression &arg1)
Make an application of function symbol min.
const core::identifier_string & cint_name()
Generate identifier @cInt.
bool is_minus_function_symbol(const atermpp::aterm &e)
Recogniser for function -.
bool is_maximum_application(const atermpp::aterm &e)
Recogniser for application of max.
bool is_succ_function_symbol(const atermpp::aterm &e)
Recogniser for function succ.
const core::identifier_string & abs_name()
Generate identifier abs.
bool is_minimum_function_symbol(const atermpp::aterm &e)
Recogniser for function min.
bool is_int2pos_application(const atermpp::aterm &e)
Recogniser for application of Int2Pos.
const core::identifier_string & pred_name()
Generate identifier pred.
bool is_exp_function_symbol(const atermpp::aterm &e)
Recogniser for function exp.
bool is_int2pos_function_symbol(const atermpp::aterm &e)
Recogniser for function Int2Pos.
const function_symbol & pos2int()
Constructor for function symbol Pos2Int.
const core::identifier_string & nat2int_name()
Generate identifier Nat2Int.
const data_expression & arg(const data_expression &e)
Function for projecting out argument. arg from an application.
void make_minus(data_expression &result, const data_expression &arg0, const data_expression &arg1)
Make an application of function symbol -.
bool is_cneg_function_symbol(const atermpp::aterm &e)
Recogniser for function @cNeg.
const core::identifier_string & int2pos_name()
Generate identifier Int2Pos.
function_symbol maximum(const sort_expression &s0, const sort_expression &s1)
void make_cneg(data_expression &result, const data_expression &arg0)
Make an application of function symbol @cNeg.
function_symbol pred(const sort_expression &s0)
const core::identifier_string & cneg_name()
Generate identifier @cNeg.
const core::identifier_string & exp_name()
Generate identifier exp.
void make_exp(data_expression &result, const data_expression &arg0, const data_expression &arg1)
Make an application of function symbol exp.
const core::identifier_string & minimum_name()
Generate identifier min.
bool is_mod_application(const atermpp::aterm &e)
Recogniser for application of mod.
const core::identifier_string & int_name()
bool is_mod_function_symbol(const atermpp::aterm &e)
Recogniser for function mod.
function_symbol_vector int_mCRL2_usable_mappings()
Give all system defined mappings that can be used in mCRL2 specs for int_.
const core::identifier_string & pos2int_name()
Generate identifier Pos2Int.
const function_symbol & int2nat()
Constructor for function symbol Int2Nat.
bool is_int(const sort_expression &e)
Recogniser for sort expression Int.
function_symbol minus(const sort_expression &s0, const sort_expression &s1)
bool is_pred_application(const atermpp::aterm &e)
Recogniser for application of pred.
const function_symbol & nat2int()
Constructor for function symbol Nat2Int.
bool is_times_application(const atermpp::aterm &e)
Recogniser for application of *.
const core::identifier_string & maximum_name()
Generate identifier max.
bool is_int2nat_function_symbol(const atermpp::aterm &e)
Recogniser for function Int2Nat.
bool is_cneg_application(const atermpp::aterm &e)
Recogniser for application of @cNeg.
const core::identifier_string & succ_name()
Generate identifier succ.
const function_symbol & cneg()
Constructor for function symbol @cNeg.
void make_pos2int(data_expression &result, const data_expression &arg0)
Make an application of function symbol Pos2Int.
const function_symbol & abs()
Constructor for function symbol abs.
function_symbol exp(const sort_expression &s0, const sort_expression &s1)
bool is_cint_application(const atermpp::aterm &e)
Recogniser for application of @cInt.
bool is_times_function_symbol(const atermpp::aterm &e)
Recogniser for function *.
bool is_plus_application(const atermpp::aterm &e)
Recogniser for application of +.
const core::identifier_string & mod_name()
Generate identifier mod.
void make_plus(data_expression &result, const data_expression &arg0, const data_expression &arg1)
Make an application of function symbol +.
data_equation_vector int_generate_equations_code()
Give all system defined equations for int_.
function_symbol plus(const sort_expression &s0, const sort_expression &s1)
const function_symbol & int2pos()
Constructor for function symbol Int2Pos.
const core::identifier_string & plus_name()
Generate identifier +.
function_symbol_vector int_generate_constructors_and_functions_code()
Give all system defined mappings and constructors for int_.
void make_div(data_expression &result, const data_expression &arg0, const data_expression &arg1)
Make an application of function symbol div.
bool is_negate_application(const atermpp::aterm &e)
Recogniser for application of -.
function_symbol negate(const sort_expression &s0)
bool is_div_application(const atermpp::aterm &e)
Recogniser for application of div.
void make_mod(data_expression &result, const data_expression &arg0, const data_expression &arg1)
Make an application of function symbol mod.
bool is_pos2int_function_symbol(const atermpp::aterm &e)
Recogniser for function Pos2Int.
function_symbol_vector int_generate_constructors_code()
Give all system defined constructors for int_.
bool is_abs_application(const atermpp::aterm &e)
Recogniser for application of abs.
void make_maximum(data_expression &result, const data_expression &arg0, const data_expression &arg1)
Make an application of function symbol max.
function_symbol_vector int_mCRL2_usable_constructors()
Give all defined constructors which can be used in mCRL2 specs for int_.
function_symbol succ(const sort_expression &s0)
void make_negate(data_expression &result, const data_expression &arg0)
Make an application of function symbol -.
const core::identifier_string & negate_name()
Generate identifier -.
bool is_cint_function_symbol(const atermpp::aterm &e)
Recogniser for function @cInt.
void make_abs(data_expression &result, const data_expression &arg0)
Make an application of function symbol abs.
function_symbol_vector int_generate_functions_code()
Give all system defined mappings for int_.
implementation_map int_cpp_implementable_constructors()
Give all system defined constructors which have an implementation in C++ and not in rewrite rules for...
bool is_exp_application(const atermpp::aterm &e)
Recogniser for application of exp.
void make_nat2int(data_expression &result, const data_expression &arg0)
Make an application of function symbol Nat2Int.
const function_symbol & cint()
Constructor for function symbol @cInt.
implementation_map int_cpp_implementable_mappings()
Give all system defined mappings that are to be implemented in C++ code for int_.
bool is_nat2int_function_symbol(const atermpp::aterm &e)
Recogniser for function Nat2Int.
bool is_int2nat_application(const atermpp::aterm &e)
Recogniser for application of Int2Nat.
const core::identifier_string & minus_name()
Generate identifier -.
function_symbol mod(const sort_expression &s0, const sort_expression &s1)
const core::identifier_string & int2nat_name()
Generate identifier Int2Nat.
const core::identifier_string & div_name()
Generate identifier div.
bool is_maximum_function_symbol(const atermpp::aterm &e)
Recogniser for function max.
bool is_div_function_symbol(const atermpp::aterm &e)
Recogniser for function div.
bool is_negate_function_symbol(const atermpp::aterm &e)
Recogniser for function -.
void make_int2pos(data_expression &result, const data_expression &arg0)
Make an application of function symbol Int2Pos.
function_symbol times(const sort_expression &s0, const sort_expression &s1)
bool is_plus_function_symbol(const atermpp::aterm &e)
Recogniser for function +.
bool is_nat2int_application(const atermpp::aterm &e)
Recogniser for application of Nat2Int.
bool is_minus_application(const atermpp::aterm &e)
Recogniser for application of -.
void make_times(data_expression &result, const data_expression &arg0, const data_expression &arg1)
Make an application of function symbol *.
function_symbol minimum(const sort_expression &s0, const sort_expression &s1)
bool is_pred_function_symbol(const atermpp::aterm &e)
Recogniser for function pred.
function_symbol div(const sort_expression &s0, const sort_expression &s1)
void make_succ(data_expression &result, const data_expression &arg0)
Make an application of function symbol succ.
bool is_pos2int_application(const atermpp::aterm &e)
Recogniser for application of Pos2Int.
void make_pred(data_expression &result, const data_expression &arg0)
Make an application of function symbol pred.
std::map< function_symbol, std::pair< std::function< void(data_expression &, const data_expression &)>, std::string > > implementation_map
void make_cint(data_expression &result, const data_expression &arg0)
Make an application of function symbol @cInt.
void make_int2nat(data_expression &result, const data_expression &arg0)
Make an application of function symbol Int2Nat.
bool is_abs_function_symbol(const atermpp::aterm &e)
Recogniser for function abs.
const core::identifier_string & times_name()
Generate identifier *.
const data_expression & left(const data_expression &e)
Function for projecting out argument. left from an application.
bool is_succ_application(const atermpp::aterm &e)
Recogniser for application of succ.
const basic_sort & int_()
Constructor for sort expression Int.
function_symbol head(const sort_expression &s)
Constructor for function symbol head.
const function_symbol & one_word()
Constructor for function symbol @one_word.
const function_symbol & zero_word()
Constructor for function symbol @zero_word.
const function_symbol & monus()
Constructor for function symbol @monus.
const function_symbol & c0()
Constructor for function symbol @c0.
const basic_sort & nat()
Constructor for sort expression Nat.
const function_symbol & natpred()
Constructor for function symbol @natpred.
const function_symbol & is_odd()
Constructor for function symbol @is_odd.
const function_symbol & succ_nat()
Constructor for function symbol @succ_nat.
const function_symbol & nat2pos()
Constructor for function symbol Nat2Pos.
const function_symbol & most_significant_digit_nat()
Constructor for function symbol @most_significant_digitNat.
const function_symbol & equals_zero()
Constructor for function symbol @equals_zero.
const function_symbol & pos2nat()
Constructor for function symbol Pos2Nat.
const function_symbol & most_significant_digit()
Constructor for function symbol @most_significant_digit.
const basic_sort & pos()
Constructor for sort expression Pos.
function_symbol less_equal(const sort_expression &s)
Constructor for function symbol <=.
const data_expression & arg1(const data_expression &e)
Function for projecting out argument. arg1 from an application.
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.
std::string pp(const abstraction &x)
bool is_function_symbol(const atermpp::aterm &x)
Returns true if the term t is a function symbol.
bool is_basic_sort(const atermpp::aterm &x)
Returns true if the term t is a basic sort.
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.
data::sort_expression target_sort(const data::sort_expression &s)
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.