15#ifndef MCRL2_DATA_INT1_H
16#define MCRL2_DATA_INT1_H
94 return atermpp::down_cast<function_symbol>(e) ==
cint();
156 return atermpp::down_cast<function_symbol>(e) ==
cneg();
250 return atermpp::down_cast<function_symbol>(e) ==
nat2int();
312 return atermpp::down_cast<function_symbol>(e) ==
int2nat();
374 return atermpp::down_cast<function_symbol>(e) ==
pos2int();
436 return atermpp::down_cast<function_symbol>(e) ==
int2pos();
501 else if (s0 ==
int_() && s1 ==
int_())
503 target_sort =
int_();
523 throw mcrl2::runtime_error(
"Cannot compute target sort for maximum with domain sorts " +
pp(s0) +
", " +
pp(s1) +
". ");
592 target_sort =
int_();
604 throw mcrl2::runtime_error(
"Cannot compute target sort for minimum with domain sorts " +
pp(s0) +
", " +
pp(s1) +
". ");
684 return atermpp::down_cast<function_symbol>(e) ==
abs();
797 target_sort =
int_();
876 target_sort =
int_();
878 else if (s0 ==
int_())
880 target_sort =
int_();
955 target_sort =
int_();
975 throw mcrl2::runtime_error(
"Cannot compute target sort for plus with domain sorts " +
pp(s0) +
", " +
pp(s1) +
". ");
1108 target_sort =
int_();
1120 throw mcrl2::runtime_error(
"Cannot compute target sort for times with domain sorts " +
pp(s0) +
", " +
pp(s1) +
". ");
1189 target_sort =
int_();
1197 throw mcrl2::runtime_error(
"Cannot compute target sort for div with domain sorts " +
pp(s0) +
", " +
pp(s1) +
". ");
1330 target_sort =
int_();
1342 throw mcrl2::runtime_error(
"Cannot compute target sort for exp with domain sorts " +
pp(s0) +
", " +
pp(s1) +
". ");
1436 result.push_back(f);
1495 return atermpp::down_cast<application>(e)[0];
1507 return atermpp::down_cast<application>(e)[0];
1519 return atermpp::down_cast<application>(e)[1];
Term containing a string.
size_type size() const
Returns the number of arguments of this term.
An application of a data expression to a number of arguments.
sort_expression sort() const
Returns the sort of the data expression.
const core::identifier_string & name() const
const sort_expression & sort() const
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 & not_()
Constructor for function symbol !.
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.
const function_symbol & monus()
Constructor for function symbol @monus.
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.
const function_symbol & even()
Constructor for function symbol @even.
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 <=.
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.
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.