15#ifndef MCRL2_DATA_INT64_H
16#define MCRL2_DATA_INT64_H
19#include "mcrl2/utilities/exception.h"
20#include "mcrl2/data/basic_sort.h"
21#include "mcrl2/data/function_sort.h"
22#include "mcrl2/data/function_symbol.h"
23#include "mcrl2/data/application.h"
24#include "mcrl2/data/data_equation.h"
25#include "mcrl2/data/standard.h"
26#include "mcrl2/data/bool.h"
27#include "mcrl2/data/pos64.h"
28#include "mcrl2/data/nat64.h"
37 static core::identifier_string int_name = core::identifier_string(
"Int");
69 static core::identifier_string cint_name = core::identifier_string(
"@cInt");
91 return atermpp::down_cast<function_symbol>(e) == cint();
123 return is_application(e) && is_cint_function_symbol(atermpp::down_cast<application>(e).head());
131 static core::identifier_string cneg_name = core::identifier_string(
"@cNeg");
153 return atermpp::down_cast<function_symbol>(e) == cneg();
185 return is_application(e) && is_cneg_function_symbol(atermpp::down_cast<application>(e).head());
192 function_symbol_vector result;
193 result.push_back(sort_int::cint());
194 result.push_back(sort_int::cneg());
203 function_symbol_vector result;
204 result.push_back(sort_int::cint());
205 result.push_back(sort_int::cneg());
216 implementation_map result;
225 static core::identifier_string nat2int_name = core::identifier_string(
"Nat2Int");
247 return atermpp::down_cast<function_symbol>(e) == nat2int();
279 return is_application(e) && is_nat2int_function_symbol(atermpp::down_cast<application>(e).head());
287 static core::identifier_string int2nat_name = core::identifier_string(
"Int2Nat");
309 return atermpp::down_cast<function_symbol>(e) == int2nat();
341 return is_application(e) && is_int2nat_function_symbol(atermpp::down_cast<application>(e).head());
349 static core::identifier_string pos2int_name = core::identifier_string(
"Pos2Int");
371 return atermpp::down_cast<function_symbol>(e) == pos2int();
403 return is_application(e) && is_pos2int_function_symbol(atermpp::down_cast<application>(e).head());
411 static core::identifier_string int2pos_name = core::identifier_string(
"Int2Pos");
433 return atermpp::down_cast<function_symbol>(e) == int2pos();
465 return is_application(e) && is_int2pos_function_symbol(atermpp::down_cast<application>(e).head());
473 static core::identifier_string maximum_name = core::identifier_string(
"max");
520 throw mcrl2::runtime_error(
"Cannot compute target sort for maximum with domain sorts " + pp(s0) +
", " + pp(s1) +
". ");
536 return f.name() == maximum_name() && atermpp::down_cast<function_sort>(f.sort()).domain().size() == 2 && (f == maximum(sort_pos::pos(), int_()) || f == maximum(int_(), sort_pos::pos()) || f == maximum(sort_nat::nat(), int_()) || f == maximum(int_(), sort_nat::nat()) || f == maximum(int_(), int_()) || f == maximum(sort_pos::pos(), sort_nat::nat()) || f == maximum(sort_nat::nat(), sort_pos::pos()) || f == maximum(sort_nat::nat(), sort_nat::nat()) || f == maximum(sort_pos::pos(), sort_pos::pos()));
570 return is_application(e) && is_maximum_function_symbol(atermpp::down_cast<application>(e).head());
578 static core::identifier_string minimum_name = core::identifier_string(
"min");
601 throw mcrl2::runtime_error(
"Cannot compute target sort for minimum with domain sorts " + pp(s0) +
", " + pp(s1) +
". ");
617 return f.name() == minimum_name() && atermpp::down_cast<function_sort>(f.sort()).domain().size() == 2 && (f == minimum(int_(), int_()) || f == minimum(sort_nat::nat(), sort_nat::nat()) || f == minimum(sort_pos::pos(), sort_pos::pos()));
651 return is_application(e) && is_minimum_function_symbol(atermpp::down_cast<application>(e).head());
659 static core::identifier_string abs_name = core::identifier_string(
"abs");
681 return atermpp::down_cast<function_symbol>(e) == abs();
713 return is_application(e) && is_abs_function_symbol(atermpp::down_cast<application>(e).head());
721 static core::identifier_string negate_name = core::identifier_string(
"-");
743 return f.name() == negate_name() && atermpp::down_cast<function_sort>(f.sort()).domain().size() == 1 && (f == negate(sort_pos::pos()) || f == negate(sort_nat::nat()) || f == negate(int_()));
775 return is_application(e) && is_negate_function_symbol(atermpp::down_cast<application>(e).head());
783 static core::identifier_string succ_name = core::identifier_string(
"succ");
806 throw mcrl2::runtime_error(
"Cannot compute target sort for succ with domain sorts " + pp(s0) +
". ");
822 return f.name() == succ_name() && atermpp::down_cast<function_sort>(f.sort()).domain().size() == 1 && (f == succ(int_()) || f == succ(sort_nat::nat()) || f == succ(sort_pos::pos()));
854 return is_application(e) && is_succ_function_symbol(atermpp::down_cast<application>(e).head());
862 static core::identifier_string pred_name = core::identifier_string(
"pred");
885 throw mcrl2::runtime_error(
"Cannot compute target sort for pred with domain sorts " + pp(s0) +
". ");
901 return f.name() == pred_name() && atermpp::down_cast<function_sort>(f.sort()).domain().size() == 1 && (f == pred(sort_nat::nat()) || f == pred(int_()) || f == pred(sort_pos::pos()));
933 return is_application(e) && is_pred_function_symbol(atermpp::down_cast<application>(e).head());
941 static core::identifier_string plus_name = core::identifier_string(
"+");
972 throw mcrl2::runtime_error(
"Cannot compute target sort for plus with domain sorts " + pp(s0) +
", " + pp(s1) +
". ");
988 return f.name() == plus_name() && atermpp::down_cast<function_sort>(f.sort()).domain().size() == 2 && (f == plus(int_(), int_()) || f == plus(sort_pos::pos(), sort_nat::nat()) || f == plus(sort_nat::nat(), sort_pos::pos()) || f == plus(sort_nat::nat(), sort_nat::nat()) || f == plus(sort_pos::pos(), sort_pos::pos()));
1022 return is_application(e) && is_plus_function_symbol(atermpp::down_cast<application>(e).head());
1030 static core::identifier_string minus_name = core::identifier_string(
"-");
1052 return f.name() == minus_name() && atermpp::down_cast<function_sort>(f.sort()).domain().size() == 2 && (f == minus(sort_pos::pos(), sort_pos::pos()) || f == minus(sort_nat::nat(), sort_nat::nat()) || f == minus(int_(), int_()));
1086 return is_application(e) && is_minus_function_symbol(atermpp::down_cast<application>(e).head());
1094 static core::identifier_string times_name = core::identifier_string(
"*");
1117 throw mcrl2::runtime_error(
"Cannot compute target sort for times with domain sorts " + pp(s0) +
", " + pp(s1) +
". ");
1133 return f.name() == times_name() && atermpp::down_cast<function_sort>(f.sort()).domain().size() == 2 && (f == times(int_(), int_()) || f == times(sort_nat::nat(), sort_nat::nat()) || f == times(sort_pos::pos(), sort_pos::pos()));
1167 return is_application(e) && is_times_function_symbol(atermpp::down_cast<application>(e).head());
1175 static core::identifier_string div_name = core::identifier_string(
"div");
1194 throw mcrl2::runtime_error(
"Cannot compute target sort for div with domain sorts " + pp(s0) +
", " + pp(s1) +
". ");
1210 return f.name() == div_name() && atermpp::down_cast<function_sort>(f.sort()).domain().size() == 2 && (f == div(int_(), sort_pos::pos()) || f == div(sort_nat::nat(), sort_pos::pos()));
1244 return is_application(e) && is_div_function_symbol(atermpp::down_cast<application>(e).head());
1252 static core::identifier_string mod_name = core::identifier_string(
"mod");
1274 return f.name() == mod_name() && atermpp::down_cast<function_sort>(f.sort()).domain().size() == 2 && (f == mod(int_(), sort_pos::pos()) || f == mod(sort_nat::nat(), sort_pos::pos()));
1308 return is_application(e) && is_mod_function_symbol(atermpp::down_cast<application>(e).head());
1316 static core::identifier_string exp_name = core::identifier_string(
"exp");
1339 throw mcrl2::runtime_error(
"Cannot compute target sort for exp with domain sorts " + pp(s0) +
", " + pp(s1) +
". ");
1355 return f.name() == exp_name() && atermpp::down_cast<function_sort>(f.sort()).domain().size() == 2 && (f == exp(int_(), sort_nat::nat()) || f == exp(sort_pos::pos(), sort_nat::nat()) || f == exp(sort_nat::nat(), sort_nat::nat()));
1389 return is_application(e) && is_exp_function_symbol(atermpp::down_cast<application>(e).head());
1396 function_symbol_vector result;
1397 result.push_back(sort_int::nat2int());
1398 result.push_back(sort_int::int2nat());
1399 result.push_back(sort_int::pos2int());
1400 result.push_back(sort_int::int2pos());
1401 result.push_back(sort_int::maximum(sort_pos::pos(), int_()));
1402 result.push_back(sort_int::maximum(int_(), sort_pos::pos()));
1403 result.push_back(sort_int::maximum(sort_nat::nat(), int_()));
1404 result.push_back(sort_int::maximum(int_(), sort_nat::nat()));
1405 result.push_back(sort_int::maximum(int_(), int_()));
1406 result.push_back(sort_int::minimum(int_(), int_()));
1407 result.push_back(sort_int::abs());
1408 result.push_back(sort_int::negate(sort_pos::pos()));
1409 result.push_back(sort_int::negate(sort_nat::nat()));
1410 result.push_back(sort_int::negate(int_()));
1411 result.push_back(sort_int::succ(int_()));
1412 result.push_back(sort_int::pred(sort_nat::nat()));
1413 result.push_back(sort_int::pred(int_()));
1414 result.push_back(sort_int::plus(int_(), int_()));
1415 result.push_back(sort_int::minus(sort_pos::pos(), sort_pos::pos()));
1416 result.push_back(sort_int::minus(sort_nat::nat(), sort_nat::nat()));
1417 result.push_back(sort_int::minus(int_(), int_()));
1418 result.push_back(sort_int::times(int_(), int_()));
1419 result.push_back(sort_int::div(int_(), sort_pos::pos()));
1420 result.push_back(sort_int::mod(int_(), sort_pos::pos()));
1421 result.push_back(sort_int::exp(int_(), sort_nat::nat()));
1430 function_symbol_vector result=int_generate_functions_code();
1431 for(
const function_symbol& f: int_generate_constructors_code())
1433 result.push_back(f);
1443 function_symbol_vector result;
1444 result.push_back(sort_int::nat2int());
1445 result.push_back(sort_int::int2nat());
1446 result.push_back(sort_int::pos2int());
1447 result.push_back(sort_int::int2pos());
1448 result.push_back(sort_int::maximum(sort_pos::pos(), int_()));
1449 result.push_back(sort_int::maximum(int_(), sort_pos::pos()));
1450 result.push_back(sort_int::maximum(sort_nat::nat(), int_()));
1451 result.push_back(sort_int::maximum(int_(), sort_nat::nat()));
1452 result.push_back(sort_int::maximum(int_(), int_()));
1453 result.push_back(sort_int::minimum(int_(), int_()));
1454 result.push_back(sort_int::abs());
1455 result.push_back(sort_int::negate(sort_pos::pos()));
1456 result.push_back(sort_int::negate(sort_nat::nat()));
1457 result.push_back(sort_int::negate(int_()));
1458 result.push_back(sort_int::succ(int_()));
1459 result.push_back(sort_int::pred(sort_nat::nat()));
1460 result.push_back(sort_int::pred(int_()));
1461 result.push_back(sort_int::plus(int_(), int_()));
1462 result.push_back(sort_int::minus(sort_pos::pos(), sort_pos::pos()));
1463 result.push_back(sort_int::minus(sort_nat::nat(), sort_nat::nat()));
1464 result.push_back(sort_int::minus(int_(), int_()));
1465 result.push_back(sort_int::times(int_(), int_()));
1466 result.push_back(sort_int::div(int_(), sort_pos::pos()));
1467 result.push_back(sort_int::mod(int_(), sort_pos::pos()));
1468 result.push_back(sort_int::exp(int_(), sort_nat::nat()));
1480 implementation_map result;
1492 return atermpp::down_cast<application>(e)[0];
1504 return atermpp::down_cast<application>(e)[0];
1516 return atermpp::down_cast<application>(e)[1];
1532 data_equation_vector result;
1533 result.emplace_back(variable_list({vm, vn}), equal_to(cint(vm), cint(vn)), equal_to(vm, vn));
1534 result.emplace_back(variable_list({vn, vp}), equal_to(cint(vn), cneg(vp)), sort_bool::false_());
1535 result.emplace_back(variable_list({vn, vp}), equal_to(cneg(vp), cint(vn)), sort_bool::false_());
1536 result.emplace_back(variable_list({vp, vq}), equal_to(cneg(vp), cneg(vq)), equal_to(vp, vq));
1537 result.emplace_back(variable_list({vm, vn}), less(cint(vm), cint(vn)), less(vm, vn));
1538 result.emplace_back(variable_list({vn, vp}), less(cint(vn), cneg(vp)), sort_bool::false_());
1539 result.emplace_back(variable_list({vn, vp}), less(cneg(vp), cint(vn)), sort_bool::true_());
1540 result.emplace_back(variable_list({vp, vq}), less(cneg(vp), cneg(vq)), less(vq, vp));
1541 result.emplace_back(variable_list({vx, vy}), less_total(vx, vy), less(vx, vy));
1542 result.emplace_back(variable_list({vm, vn}), less_equal(cint(vm), cint(vn)), less_equal(vm, vn));
1543 result.emplace_back(variable_list({vn, vp}), less_equal(cint(vn), cneg(vp)), sort_bool::false_());
1544 result.emplace_back(variable_list({vn, vp}), less_equal(cneg(vp), cint(vn)), sort_bool::true_());
1545 result.emplace_back(variable_list({vp, vq}), less_equal(cneg(vp), cneg(vq)), less_equal(vq, vp));
1546 result.emplace_back(variable_list({vn}), nat2int(vn), cint(vn));
1547 result.emplace_back(variable_list({vn}), int2nat(cint(vn)), vn);
1548 result.emplace_back(variable_list({vp}), pos2int(vp), cint(sort_nat::pos2nat(vp)));
1549 result.emplace_back(variable_list({vn}), int2pos(cint(vn)), sort_nat::nat2pos(vn));
1550 result.emplace_back(variable_list({vn, vp}), maximum(vp, cint(vn)), maximum(vp, vn));
1551 result.emplace_back(variable_list({vp, vq}), maximum(vp, cneg(vq)), vp);
1552 result.emplace_back(variable_list({vn, vp}), maximum(cint(vn), vp), maximum(vn, vp));
1553 result.emplace_back(variable_list({vp, vq}), maximum(cneg(vq), vp), vp);
1554 result.emplace_back(variable_list({vm, vn}), maximum(vm, cint(vn)), if_(less_equal(vm, vn), vn, vm));
1555 result.emplace_back(variable_list({vn, vp}), maximum(vn, cneg(vp)), vn);
1556 result.emplace_back(variable_list({vm, vn}), maximum(cint(vm), vn), if_(less_equal(vm, vn), vn, vm));
1557 result.emplace_back(variable_list({vn, vp}), maximum(cneg(vp), vn), vn);
1558 result.emplace_back(variable_list({vx, vy}), maximum(vx, vy), if_(less_equal(vx, vy), vy, vx));
1559 result.emplace_back(variable_list({vx, vy}), minimum(vx, vy), if_(less_equal(vx, vy), vx, vy));
1560 result.emplace_back(variable_list({vn}), abs(cint(vn)), vn);
1561 result.emplace_back(variable_list({vp}), abs(cneg(vp)), sort_nat::pos2nat(vp));
1562 result.emplace_back(variable_list({vp}), negate(vp), cneg(vp));
1563 result.emplace_back(variable_list(), negate(sort_nat::c0()), cint(sort_nat::c0()));
1564 result.emplace_back(variable_list({vn}), sort_nat::equals_zero(vn), negate(vn), cint(sort_nat::most_significant_digit_nat(sort_machine_word::zero_word())));
1565 result.emplace_back(variable_list({vn}), sort_nat::not_equals_zero(vn), negate(vn), cneg(sort_nat::nat2pos(vn)));
1566 result.emplace_back(variable_list({vn}), negate(cint(vn)), negate(vn));
1567 result.emplace_back(variable_list({vp}), negate(cneg(vp)), cint(sort_nat::pos2nat(vp)));
1568 result.emplace_back(variable_list({vn}), succ(cint(vn)), cint(sort_nat::succ_nat(vn)));
1569 result.emplace_back(variable_list({vp}), succ(cneg(vp)), negate(pred(vp)));
1570 result.emplace_back(variable_list({vn}), pred(vn), if_(sort_nat::equals_zero(vn), cneg(sort_pos::most_significant_digit(sort_machine_word::one_word())), cint(sort_nat::natpred(vn))));
1571 result.emplace_back(variable_list({vn}), pred(cint(vn)), pred(vn));
1572 result.emplace_back(variable_list({vp}), pred(cneg(vp)), cneg(succ(vp)));
1573 result.emplace_back(variable_list({vm, vn}), plus(cint(vm), cint(vn)), cint(plus(vm, vn)));
1574 result.emplace_back(variable_list({vn, vp}), plus(cint(vn), cneg(vp)), minus(vn, sort_nat::pos2nat(vp)));
1575 result.emplace_back(variable_list({vn, vp}), plus(cneg(vp), cint(vn)), minus(vn, sort_nat::pos2nat(vp)));
1576 result.emplace_back(variable_list({vp, vq}), plus(cneg(vp), cneg(vq)), cneg(plus(vp, vq)));
1577 result.emplace_back(variable_list({vp, vq}), less_equal(vq, vp), minus(vp, vq), cint(sort_nat::monus(sort_nat::pos2nat(vp), sort_nat::pos2nat(vq))));
1578 result.emplace_back(variable_list({vp, vq}), less(vp, vq), minus(vp, vq), negate(sort_nat::monus(sort_nat::pos2nat(vq), sort_nat::pos2nat(vp))));
1579 result.emplace_back(variable_list({vm, vn}), less_equal(vn, vm), minus(vm, vn), cint(sort_nat::monus(vm, vn)));
1580 result.emplace_back(variable_list({vm, vn}), less(vm, vn), minus(vm, vn), negate(sort_nat::monus(vn, vm)));
1581 result.emplace_back(variable_list({vx, vy}), minus(vx, vy), plus(vx, negate(vy)));
1582 result.emplace_back(variable_list({vm, vn}), times(cint(vm), cint(vn)), cint(times(vm, vn)));
1583 result.emplace_back(variable_list({vn, vp}), times(cint(vn), cneg(vp)), negate(times(sort_nat::pos2nat(vp), vn)));
1584 result.emplace_back(variable_list({vn, vp}), times(cneg(vp), cint(vn)), negate(times(sort_nat::pos2nat(vp), vn)));
1585 result.emplace_back(variable_list({vp, vq}), times(cneg(vp), cneg(vq)), cint(sort_nat::pos2nat(times(vp, vq))));
1586 result.emplace_back(variable_list({vn, vp}), div(cint(vn), vp), cint(div(vn, vp)));
1587 result.emplace_back(variable_list({vp, vq}), div(cneg(vp), vq), cneg(succ(div(pred(vp), vq))));
1588 result.emplace_back(variable_list({vn, vp}), mod(cint(vn), vp), mod(vn, vp));
1589 result.emplace_back(variable_list({vp, vq}), mod(cneg(vp), vq), int2nat(minus(vq, succ(mod(pred(vp), vq)))));
1590 result.emplace_back(variable_list({vm, vn}), exp(cint(vm), vn), cint(exp(vm, vn)));
1591 result.emplace_back(variable_list({vn, vp}), exp(cneg(vp), vn), if_(sort_nat::is_odd(vn), cneg(exp(vp, vn)), cint(sort_nat::pos2nat(exp(vp, vn)))));
A unordered_map class in which aterms can be stored.
basic_sort(const core::identifier_string &name)
\brief Constructor Z14.
basic_sort(const atermpp::aterm &term)
application operator()(const data_expression &e1, const data_expression &e2) const
Apply a data expression to two data expressions.
sort_expression sort() const
Returns the sort of the data expression.
application operator()(const data_expression &e) const
Apply a data expression to a data expression.
function_symbol(const core::identifier_string &name, const sort_expression &sort)
Constructor.
sort_expression & operator=(const sort_expression &) noexcept=default
sort_expression(const sort_expression &) noexcept=default
Move semantics.
Namespace for system defined sort bool_.
const basic_sort & bool_()
Constructor for sort expression Bool.
Namespace for system defined sort int_.
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.
application cint(const data_expression &arg0)
Application of function symbol @cInt.
application abs(const data_expression &arg0)
Application of function symbol abs.
application nat2int(const data_expression &arg0)
Application of function symbol Nat2Int.
application succ(const data_expression &arg0)
Application of function symbol succ.
application cneg(const data_expression &arg0)
Application of function symbol @cNeg.
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 -.
application negate(const data_expression &arg0)
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.
application int2nat(const data_expression &arg0)
Application of function symbol Int2Nat.
function_symbol pred(const sort_expression &s0)
application plus(const data_expression &arg0, const data_expression &arg1)
Application of function symbol +.
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.
application maximum(const data_expression &arg0, const data_expression &arg1)
Application of function symbol max.
application times(const data_expression &arg0, const data_expression &arg1)
Application of function symbol *.
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.
application div(const data_expression &arg0, const data_expression &arg1)
Application of function symbol div.
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_.
application minus(const data_expression &arg0, const data_expression &arg1)
Application of function symbol -.
function_symbol plus(const sort_expression &s0, const sort_expression &s1)
application minimum(const data_expression &arg0, const data_expression &arg1)
Application of function symbol min.
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_.
application int2pos(const data_expression &arg0)
Application of function symbol Int2Pos.
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.
application mod(const data_expression &arg0, const data_expression &arg1)
Application of function symbol mod.
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_.
application pos2int(const data_expression &arg0)
Application of function symbol Pos2Int.
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.
application exp(const data_expression &arg0, const data_expression &arg1)
Application of function symbol exp.
bool is_div_function_symbol(const atermpp::aterm &e)
Recogniser for function div.
application pred(const data_expression &arg0)
Application of function symbol pred.
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.
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.
Namespace for system defined sort nat.
const basic_sort & nat()
Constructor for sort expression Nat.
Namespace for system defined sort pos.
const basic_sort & pos()
Constructor for sort expression Pos.
function_sort make_function_sort_(const sort_expression &dom1, const sort_expression &codomain)
Convenience constructor for function sort with domain size 1.
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.
function_sort make_function_sort_(const sort_expression &dom1, const sort_expression &dom2, const sort_expression &codomain)
Convenience constructor for function sort with domain size 2.