15#ifndef MCRL2_DATA_NAT64_H
16#define MCRL2_DATA_NAT64_H
47 const basic_sort&
nat()
57 bool is_nat(
const sort_expression& e)
61 return basic_sort(e) ==
nat();
109 const function_symbol&
c0()
123 return atermpp::down_cast<function_symbol>(e) ==
c0();
155 return atermpp::down_cast<function_symbol>(e) ==
succ_nat();
217 return atermpp::down_cast<function_symbol>(e) ==
nnpair();
278 typedef std::map<function_symbol,std::pair<std::function<void(data_expression&,
const data_expression&)>, std::string> >
implementation_map;
374 throw mcrl2::runtime_error(
"Cannot compute target sort for concat_digit with domain sorts " +
pp(s0) +
", " +
pp(s1) +
". ");
454 return atermpp::down_cast<function_symbol>(e) ==
equals_zero();
626 const function_symbol&
pos2nat()
640 return atermpp::down_cast<function_symbol>(e) ==
pos2nat();
650 application
pos2nat(
const data_expression& arg0)
660 void make_pos2nat(data_expression& result,
const data_expression& arg0)
702 return atermpp::down_cast<function_symbol>(e) ==
nat2pos();
712 application
nat2pos(
const data_expression& arg0)
722 void make_nat2pos(data_expression& result,
const data_expression& arg0)
774 application
succ(
const data_expression& arg0)
784 void make_succ(data_expression& result,
const data_expression& arg0)
821 else if (s0 ==
nat() && s1 ==
nat())
831 throw mcrl2::runtime_error(
"Cannot compute target sort for maximum with domain sorts " +
pp(s0) +
", " +
pp(s1) +
". ");
858 application
maximum(
const data_expression& arg0,
const data_expression&
arg1)
869 void make_maximum(data_expression& result,
const data_expression& arg0,
const data_expression&
arg1)
898 if (s0 ==
nat() && s1 ==
nat())
908 throw mcrl2::runtime_error(
"Cannot compute target sort for minimum with domain sorts " +
pp(s0) +
", " +
pp(s1) +
". ");
935 application
minimum(
const data_expression& arg0,
const data_expression&
arg1)
946 void make_minimum(data_expression& result,
const data_expression& arg0,
const data_expression&
arg1)
988 return atermpp::down_cast<function_symbol>(e) ==
pred();
998 application
pred(
const data_expression& arg0)
1008 void make_pred(data_expression& result,
const data_expression& arg0)
1050 return atermpp::down_cast<function_symbol>(e) ==
pred_whr();
1096 function_symbol
plus(
const sort_expression& s0,
const sort_expression& s1)
1098 sort_expression target_sort;
1107 else if (s0 ==
nat() && s1 ==
nat())
1117 throw mcrl2::runtime_error(
"Cannot compute target sort for plus with domain sorts " +
pp(s0) +
", " +
pp(s1) +
". ");
1144 application
plus(
const data_expression& arg0,
const data_expression&
arg1)
1155 void make_plus(data_expression& result,
const data_expression& arg0,
const data_expression&
arg1)
1184 if (s0 ==
nat() && s1 ==
nat())
1186 target_sort =
nat();
1194 throw mcrl2::runtime_error(
"Cannot compute target sort for add_with_carry with domain sorts " +
pp(s0) +
", " +
pp(s1) +
". ");
1322 function_symbol
times(
const sort_expression& s0,
const sort_expression& s1)
1324 sort_expression target_sort;
1325 if (s0 ==
nat() && s1 ==
nat())
1327 target_sort =
nat();
1335 throw mcrl2::runtime_error(
"Cannot compute target sort for times with domain sorts " +
pp(s0) +
", " +
pp(s1) +
". ");
1362 application
times(
const data_expression& arg0,
const data_expression&
arg1)
1373 void make_times(data_expression& result,
const data_expression& arg0,
const data_expression&
arg1)
1402 if (s0 ==
nat() && s1 ==
nat())
1404 target_sort =
nat();
1412 throw mcrl2::runtime_error(
"Cannot compute target sort for times_ordered with domain sorts " +
pp(s0) +
", " +
pp(s1) +
". ");
1481 target_sort =
nat();
1489 throw mcrl2::runtime_error(
"Cannot compute target sort for times_overflow with domain sorts " +
pp(s0) +
", " +
pp(s1) +
", " +
pp(s2) +
". ");
1557 const function_symbol&
div()
1571 return atermpp::down_cast<function_symbol>(e) ==
div();
1582 application
div(
const data_expression& arg0,
const data_expression&
arg1)
1593 void make_div(data_expression& result,
const data_expression& arg0,
const data_expression&
arg1)
1635 return atermpp::down_cast<function_symbol>(e) ==
mod();
1646 application
mod(
const data_expression& arg0,
const data_expression&
arg1)
1657 void make_mod(data_expression& result,
const data_expression& arg0,
const data_expression&
arg1)
1690 else if (s0 ==
nat() && s1 ==
nat())
1696 throw mcrl2::runtime_error(
"Cannot compute target sort for exp with domain sorts " +
pp(s0) +
", " +
pp(s1) +
". ");
1723 application
exp(
const data_expression& arg0,
const data_expression&
arg1)
1734 void make_exp(data_expression& result,
const data_expression& arg0,
const data_expression&
arg1)
1776 return atermpp::down_cast<function_symbol>(e) ==
sqrt();
1786 application
sqrt(
const data_expression& arg0)
1796 void make_sqrt(data_expression& result,
const data_expression& arg0)
1838 return atermpp::down_cast<function_symbol>(e) ==
natpred();
1900 return atermpp::down_cast<function_symbol>(e) ==
is_odd();
1962 return atermpp::down_cast<function_symbol>(e) ==
div2();
2010 const function_symbol&
monus()
2024 return atermpp::down_cast<function_symbol>(e) ==
monus();
2035 application
monus(
const data_expression& arg0,
const data_expression&
arg1)
2046 void make_monus(data_expression& result,
const data_expression& arg0,
const data_expression&
arg1)
2088 return atermpp::down_cast<function_symbol>(e) ==
monus_whr();
2158 return atermpp::down_cast<function_symbol>(e) ==
exp_aux3p();
2224 return atermpp::down_cast<function_symbol>(e) ==
exp_aux4p();
2292 return atermpp::down_cast<function_symbol>(e) ==
exp_aux3n();
2358 return atermpp::down_cast<function_symbol>(e) ==
exp_aux4n();
2426 return atermpp::down_cast<function_symbol>(e) ==
exp_auxtruep();
2492 return atermpp::down_cast<function_symbol>(e) ==
exp_auxtruen();
2558 return atermpp::down_cast<function_symbol>(e) ==
exp_auxfalsep();
2624 return atermpp::down_cast<function_symbol>(e) ==
exp_auxfalsen();
2690 return atermpp::down_cast<function_symbol>(e) ==
div_bold();
2754 return atermpp::down_cast<function_symbol>(e) ==
div_bold_whr();
2826 return atermpp::down_cast<function_symbol>(e) ==
div_whr1();
2894 return atermpp::down_cast<function_symbol>(e) ==
div_whr2();
2964 return atermpp::down_cast<function_symbol>(e) ==
mod_whr1();
3032 return atermpp::down_cast<function_symbol>(e) ==
divmod_aux();
3510 return atermpp::down_cast<function_symbol>(e) ==
msd();
3572 return atermpp::down_cast<function_symbol>(e) ==
swap_zero();
3583 application
swap_zero(
const data_expression& arg0,
const data_expression&
arg1)
3594 void make_swap_zero(data_expression& result,
const data_expression& arg0,
const data_expression&
arg1)
3636 return atermpp::down_cast<function_symbol>(e) ==
swap_zero_add();
3649 application
swap_zero_add(
const data_expression& arg0,
const data_expression&
arg1,
const data_expression&
arg2,
const data_expression&
arg3)
3662 void make_swap_zero_add(data_expression& result,
const data_expression& arg0,
const data_expression&
arg1,
const data_expression&
arg2,
const data_expression&
arg3)
3704 return atermpp::down_cast<function_symbol>(e) ==
swap_zero_min();
3717 application
swap_zero_min(
const data_expression& arg0,
const data_expression&
arg1,
const data_expression&
arg2,
const data_expression&
arg3)
3730 void make_swap_zero_min(data_expression& result,
const data_expression& arg0,
const data_expression&
arg1,
const data_expression&
arg2,
const data_expression&
arg3)
3785 application
swap_zero_monus(
const data_expression& arg0,
const data_expression&
arg1,
const data_expression&
arg2,
const data_expression&
arg3)
3798 void make_swap_zero_monus(data_expression& result,
const data_expression& arg0,
const data_expression&
arg1,
const data_expression&
arg2,
const data_expression&
arg3)
3840 return atermpp::down_cast<function_symbol>(e) ==
sqrt_whr1();
3908 return atermpp::down_cast<function_symbol>(e) ==
sqrt_whr2();
3978 return atermpp::down_cast<function_symbol>(e) ==
sqrt_pair();
4040 return atermpp::down_cast<function_symbol>(e) ==
sqrt_pair_whr1();
4108 return atermpp::down_cast<function_symbol>(e) ==
sqrt_pair_whr2();
4178 return atermpp::down_cast<function_symbol>(e) ==
sqrt_pair_whr3();
4244 return atermpp::down_cast<function_symbol>(e) ==
sqrt_pair_whr4();
4316 return atermpp::down_cast<function_symbol>(e) ==
sqrt_pair_whr5();
4386 return atermpp::down_cast<function_symbol>(e) ==
sqrt_pair_whr6();
4438 const function_symbol&
first()
4452 return atermpp::down_cast<function_symbol>(e) ==
first();
4462 application
first(
const data_expression& arg0)
4472 void make_first(data_expression& result,
const data_expression& arg0)
4514 return atermpp::down_cast<function_symbol>(e) ==
last();
4524 application
last(
const data_expression& arg0)
4534 void make_last(data_expression& result,
const data_expression& arg0)
4633 result.push_back(f);
4732 const data_expression&
arg(
const data_expression& e)
4735 return atermpp::down_cast<application>(e)[0];
4744 const data_expression&
arg1(
const data_expression& e)
4747 return atermpp::down_cast<application>(e)[0];
4756 const data_expression&
arg2(
const data_expression& e)
4759 return atermpp::down_cast<application>(e)[1];
4768 const data_expression&
left(
const data_expression& e)
4771 return atermpp::down_cast<application>(e)[0];
4780 const data_expression&
right(
const data_expression& e)
4783 return atermpp::down_cast<application>(e)[1];
4792 const data_expression&
arg3(
const data_expression& e)
4795 return atermpp::down_cast<application>(e)[2];
4804 const data_expression&
arg4(
const data_expression& e)
4807 return atermpp::down_cast<application>(e)[3];
4819 return atermpp::down_cast<application>(e)[4];
4831 return atermpp::down_cast<application>(e)[5];
4884 result.push_back(data_equation(
variable_list({vn1, vn2, vw1, vw2}),
equal_to(
concat_digit(vn1, vw1),
concat_digit(vn2, vw2)),
sort_bool::and_(
sort_machine_word::equal_word(vw1, vw2),
equal_to(vn1, vn2))));
4890 result.push_back(data_equation(
variable_list({vn1, vn2, vw1, vw2}),
less(
concat_digit(vn1, vw1),
concat_digit(vn2, vw2)),
if_(
sort_machine_word::less_word(vw1, vw2),
less_equal(vn1, vn2),
less(vn1, vn2))));
4897 result.push_back(data_equation(
variable_list({vn1, vn2, vw1, vw2}),
less_equal(
concat_digit(vn1, vw1),
concat_digit(vn2, vw2)),
if_(
sort_machine_word::less_equal_word(vw1, vw2),
less_equal(vn1, vn2),
less(vn1, vn2))));
4914 result.push_back(data_equation(
variable_list({vw1, vw2}),
plus(
most_significant_digit_nat(vw1),
sort_pos::most_significant_digit(vw2)),
if_(
sort_machine_word::add_overflow_word(vw1, vw2),
concat_digit(
sort_pos::most_significant_digit(
sort_machine_word::one_word()),
sort_machine_word::add_word(vw1, vw2)),
sort_pos::most_significant_digit(
sort_machine_word::add_word(vw1, vw2)))));
4915 result.push_back(data_equation(
variable_list({vn1, vw1, vw2}),
plus(
concat_digit(vn1, vw1),
sort_pos::most_significant_digit(vw2)),
if_(
sort_machine_word::add_overflow_word(vw1, vw2),
concat_digit(
succ(vn1),
sort_machine_word::add_word(vw1, vw2)),
concat_digit(
nat2pos(vn1),
sort_machine_word::add_word(vw1, vw2)))));
4916 result.push_back(data_equation(
variable_list({vp, vw1, vw2}),
plus(
most_significant_digit_nat(vw1),
concat_digit(vp, vw2)),
if_(
sort_machine_word::add_overflow_word(vw1, vw2),
concat_digit(
sort_pos::succpos(vp),
sort_machine_word::add_word(vw1, vw2)),
concat_digit(vp,
sort_machine_word::add_word(vw1, vw2)))));
4917 result.push_back(data_equation(
variable_list({vn1, vp, vw1, vw2}),
plus(
concat_digit(vn1, vw1),
concat_digit(vp, vw2)),
if_(
sort_machine_word::add_overflow_word(vw1, vw2),
concat_digit(
plus(
succ(vn1), vp),
sort_machine_word::add_word(vw1, vw2)),
concat_digit(
plus(vn1, vp),
sort_machine_word::add_word(vw1, vw2)))));
4918 result.push_back(data_equation(
variable_list({vw1, vw2}),
plus(
most_significant_digit_nat(vw1),
most_significant_digit_nat(vw2)),
if_(
sort_machine_word::add_overflow_word(vw1, vw2),
concat_digit(
most_significant_digit_nat(
sort_machine_word::one_word()),
sort_machine_word::add_word(vw1, vw2)),
most_significant_digit_nat(
sort_machine_word::add_word(vw1, vw2)))));
4919 result.push_back(data_equation(
variable_list({vw1, vw2}),
add_with_carry(
most_significant_digit_nat(vw1),
most_significant_digit_nat(vw2)),
if_(
sort_machine_word::add_with_carry_overflow_word(vw1, vw2),
concat_digit(
most_significant_digit_nat(
sort_machine_word::one_word()),
sort_machine_word::add_with_carry_word(vw1, vw2)),
most_significant_digit_nat(
sort_machine_word::add_with_carry_word(vw1, vw2)))));
4920 result.push_back(data_equation(
variable_list({vn1, vw1, vw2}),
plus(
concat_digit(vn1, vw1),
most_significant_digit_nat(vw2)),
if_(
sort_machine_word::add_overflow_word(vw1, vw2),
concat_digit(
succ_nat(vn1),
sort_machine_word::add_word(vw1, vw2)),
concat_digit(vn1,
sort_machine_word::add_word(vw1, vw2)))));
4921 result.push_back(data_equation(
variable_list({vn1, vw1, vw2}),
add_with_carry(
concat_digit(vn1, vw1),
most_significant_digit_nat(vw2)),
if_(
sort_machine_word::add_with_carry_overflow_word(vw1, vw2),
concat_digit(
succ_nat(vn1),
sort_machine_word::add_with_carry_word(vw1, vw2)),
concat_digit(vn1,
sort_machine_word::add_with_carry_word(vw1, vw2)))));
4922 result.push_back(data_equation(
variable_list({vn2, vw1, vw2}),
plus(
most_significant_digit_nat(vw1),
concat_digit(vn2, vw2)),
if_(
sort_machine_word::add_overflow_word(vw1, vw2),
concat_digit(
succ_nat(vn2),
sort_machine_word::add_word(vw1, vw2)),
concat_digit(vn2,
sort_machine_word::add_word(vw1, vw2)))));
4923 result.push_back(data_equation(
variable_list({vn2, vw1, vw2}),
add_with_carry(
most_significant_digit_nat(vw1),
concat_digit(vn2, vw2)),
if_(
sort_machine_word::add_with_carry_overflow_word(vw1, vw2),
concat_digit(
succ_nat(vn2),
sort_machine_word::add_with_carry_word(vw1, vw2)),
concat_digit(vn2,
sort_machine_word::add_with_carry_word(vw1, vw2)))));
4924 result.push_back(data_equation(
variable_list({vn1, vn2, vw1, vw2}),
plus(
concat_digit(vn1, vw1),
concat_digit(vn2, vw2)),
if_(
sort_machine_word::add_overflow_word(vw1, vw2),
concat_digit(
add_with_carry(vn1, vn2),
sort_machine_word::add_word(vw1, vw2)),
concat_digit(
plus(vn1, vn2),
sort_machine_word::add_word(vw1, vw2)))));
4925 result.push_back(data_equation(
variable_list({vn1, vn2, vw1, vw2}),
add_with_carry(
concat_digit(vn1, vw1),
concat_digit(vn2, vw2)),
if_(
sort_machine_word::add_with_carry_overflow_word(vw1, vw2),
concat_digit(
add_with_carry(vn1, vn2),
sort_machine_word::add_with_carry_word(vw1, vw2)),
concat_digit(
plus(vn1, vn2),
sort_machine_word::add_with_carry_word(vw1, vw2)))));
4934 result.push_back(data_equation(
variable_list({vn, vw}),
natpred(
concat_digit(vn, vw)),
if_(
sort_machine_word::equals_zero_word(vw),
if_(
equals_one(vn),
most_significant_digit_nat(
sort_machine_word::max_word()),
concat_digit(
natpred(vn),
sort_machine_word::max_word())),
concat_digit(vn,
sort_machine_word::pred_word(vw)))));
4937 result.push_back(data_equation(
variable_list({vn1, vw1, vw2}),
monus(
concat_digit(vn1, vw1),
most_significant_digit_nat(vw2)),
if_(
sort_machine_word::less_word(vw1, vw2),
if_(
equals_one(vn1),
most_significant_digit_nat(
sort_machine_word::minus_word(vw1, vw2)),
concat_digit(
natpred(vn1),
sort_machine_word::minus_word(vw1, vw2))),
concat_digit(vn1,
sort_machine_word::minus_word(vw1, vw2)))));
4939 result.push_back(data_equation(
variable_list({vn1, vn2, vw1, vw2}),
monus(
concat_digit(vn1, vw1),
concat_digit(vn2, vw2)),
monus_whr(vn1, vw1, vn2, vw2,
monus(vn1, vn2))));
4940 result.push_back(data_equation(
variable_list({vdiff, vn1, vn2, vw1, vw2}),
monus_whr(vn1, vw1, vn2, vw2, vdiff),
if_(
sort_machine_word::less_word(vw1, vw2),
if_(
equals_zero(vdiff),
most_significant_digit_nat(
sort_machine_word::zero_word()),
if_(
equals_one(vdiff),
most_significant_digit_nat(
sort_machine_word::minus_word(vw1, vw2)),
concat_digit(
natpred(vdiff),
sort_machine_word::minus_word(vw1, vw2)))),
if_(
equals_zero(vdiff),
most_significant_digit_nat(
sort_machine_word::minus_word(vw1, vw2)),
concat_digit(vdiff,
sort_machine_word::minus_word(vw1, vw2))))));
4941 result.push_back(data_equation(
variable_list({vw1, vw2}),
times(
most_significant_digit_nat(vw1),
most_significant_digit_nat(vw2)),
if_(
sort_machine_word::equals_zero_word(
sort_machine_word::times_overflow_word(vw1, vw2)),
most_significant_digit_nat(
sort_machine_word::times_word(vw1, vw2)),
concat_digit(
most_significant_digit_nat(
sort_machine_word::times_overflow_word(vw1, vw2)),
sort_machine_word::times_word(vw1, vw2)))));
4942 result.push_back(data_equation(
variable_list({vn2, vw1, vw2}),
times(
most_significant_digit_nat(vw1),
concat_digit(vn2, vw2)),
if_(
sort_machine_word::equals_zero_word(vw1),
most_significant_digit_nat(
sort_machine_word::zero_word()),
concat_digit(
times_overflow(vn2, vw1,
sort_machine_word::times_overflow_word(vw1, vw2)),
sort_machine_word::times_word(vw1, vw2)))));
4943 result.push_back(data_equation(
variable_list({vn1, vw1, vw2}),
times(
concat_digit(vn1, vw1),
most_significant_digit_nat(vw2)),
if_(
sort_machine_word::equals_zero_word(vw2),
most_significant_digit_nat(
sort_machine_word::zero_word()),
concat_digit(
times_overflow(vn1, vw2,
sort_machine_word::times_overflow_word(vw1, vw2)),
sort_machine_word::times_word(vw1, vw2)))));
4944 result.push_back(data_equation(
variable_list({vn1, vn2, vw1, vw2}),
times(
concat_digit(vn1, vw1),
concat_digit(vn2, vw2)),
if_(
less(vn1, vn2),
times_ordered(
concat_digit(vn1, vw1),
concat_digit(vn2, vw2)),
times_ordered(
concat_digit(vn2, vw2),
concat_digit(vn1, vw1)))));
4945 result.push_back(data_equation(
variable_list({vn2, vw1, vw2}),
times_ordered(
most_significant_digit_nat(vw1),
concat_digit(vn2, vw2)),
concat_digit(
times_overflow(vn2, vw1,
sort_machine_word::times_overflow_word(vw1, vw2)),
sort_machine_word::times_word(vw1, vw2))));
4946 result.push_back(data_equation(
variable_list({vn1, vn2, vw1}),
times_ordered(
concat_digit(vn1, vw1), vn2),
plus(
concat_digit(
times_ordered(vn1, vn2),
sort_machine_word::zero_word()),
times_overflow(vn2, vw1,
sort_machine_word::zero_word()))));
4947 result.push_back(data_equation(
variable_list({voverflow, vw1, vw2}),
times_overflow(
most_significant_digit_nat(vw1), vw2, voverflow),
if_(
sort_machine_word::equals_zero_word(
sort_machine_word::times_with_carry_overflow_word(vw1, vw2, voverflow)),
most_significant_digit_nat(
sort_machine_word::times_with_carry_word(vw1, vw2, voverflow)),
concat_digit(
most_significant_digit_nat(
sort_machine_word::times_with_carry_overflow_word(vw1, vw2, voverflow)),
sort_machine_word::times_with_carry_word(vw1, vw2, voverflow)))));
4948 result.push_back(data_equation(
variable_list({vn1, voverflow, vw1, vw2}),
times_overflow(
concat_digit(vn1, vw1), vw2, voverflow),
if_(
sort_machine_word::equals_zero_word(vw2),
most_significant_digit_nat(voverflow),
concat_digit(
times_overflow(vn1, vw2,
sort_machine_word::times_with_carry_overflow_word(vw1, vw2, voverflow)),
sort_machine_word::times_with_carry_word(vw1, vw2, voverflow)))));
4957 result.push_back(data_equation(
variable_list({vn, vw}),
exp_aux3n(
sort_bool::true_(), vn, vw),
if_(
sort_machine_word::equals_one_word(vw), vn,
times(vn,
exp_aux3n(
sort_machine_word::rightmost_bit(
sort_machine_word::shift_right(
sort_bool::false_(), vw)),
times(vn, vn),
sort_machine_word::shift_right(
sort_bool::false_(), vw))))));
4958 result.push_back(data_equation(
variable_list({vn, vw}),
exp_aux3n(
sort_bool::false_(), vn, vw),
if_(
sort_machine_word::equals_zero_word(vw),
most_significant_digit_nat(
sort_machine_word::one_word()),
exp_aux3n(
sort_machine_word::rightmost_bit(
sort_machine_word::shift_right(
sort_bool::false_(), vw)),
times(vn, vn),
sort_machine_word::shift_right(
sort_bool::false_(), vw)))));
4959 result.push_back(data_equation(
variable_list({vn, vn1, vw}),
exp_aux4n(
sort_bool::true_(), vn, vn1, vw),
exp_auxtruen(vn,
div2(vn1),
sort_machine_word::shift_right(
is_odd(vn1), vw))));
4960 result.push_back(data_equation(
variable_list({vn, vshift_n1, vshift_w}),
exp_auxtruen(vn, vshift_n1, vshift_w),
if_(
equals_zero(vshift_n1),
times(vn,
exp_aux3n(
sort_machine_word::rightmost_bit(vshift_w),
times(vn, vn), vshift_w)),
times(vn,
exp_aux4n(
sort_machine_word::rightmost_bit(vshift_w),
times(vn, vn), vshift_n1, vshift_w)))));
4961 result.push_back(data_equation(
variable_list({vn, vn1, vw}),
exp_aux4n(
sort_bool::false_(), vn, vn1, vw),
exp_auxfalsen(vn,
div2(vn1),
sort_machine_word::shift_right(
is_odd(vn1), vw))));
4962 result.push_back(data_equation(
variable_list({vn, vshift_n1, vshift_w}),
exp_auxfalsen(vn, vshift_n1, vshift_w),
if_(
equals_zero(vshift_n1),
exp_aux3n(
sort_machine_word::rightmost_bit(vshift_w),
times(vn, vn), vshift_w),
exp_aux4n(
sort_machine_word::rightmost_bit(vshift_w),
times(vn, vn), vshift_n1, vshift_w))));
4965 result.push_back(data_equation(
variable_list({vp, vw}),
exp_aux3p(
sort_bool::true_(), vp, vw),
if_(
sort_machine_word::equals_one_word(vw), vp,
times(vp,
exp_aux3p(
sort_machine_word::rightmost_bit(
sort_machine_word::shift_right(
sort_bool::false_(), vw)),
times(vp, vp),
sort_machine_word::shift_right(
sort_bool::false_(), vw))))));
4966 result.push_back(data_equation(
variable_list({vp, vw}),
exp_aux3p(
sort_bool::false_(), vp, vw),
if_(
sort_machine_word::equals_zero_word(vw),
sort_pos::most_significant_digit(
sort_machine_word::one_word()),
exp_aux3p(
sort_machine_word::rightmost_bit(
sort_machine_word::shift_right(
sort_bool::false_(), vw)),
times(vp, vp),
sort_machine_word::shift_right(
sort_bool::false_(), vw)))));
4967 result.push_back(data_equation(
variable_list({vn1, vp, vw}),
exp_aux4p(
sort_bool::true_(), vp, vn1, vw),
exp_auxtruep(vp,
div2(vn1),
sort_machine_word::shift_right(
is_odd(vn1), vw))));
4968 result.push_back(data_equation(
variable_list({vp, vshift_n1, vshift_w}),
exp_auxtruep(vp, vshift_n1, vshift_w),
if_(
equals_zero(vshift_n1),
times(vp,
exp_aux3p(
sort_machine_word::rightmost_bit(vshift_w),
times(vp, vp), vshift_w)),
times(vp,
exp_aux4p(
sort_machine_word::rightmost_bit(vshift_w),
times(vp, vp), vshift_n1, vshift_w)))));
4969 result.push_back(data_equation(
variable_list({vn1, vp, vw}),
exp_aux4p(
sort_bool::false_(), vp, vn1, vw),
exp_auxfalsep(vp,
div2(vn1),
sort_machine_word::shift_right(
is_odd(vn1), vw))));
4970 result.push_back(data_equation(
variable_list({vp, vshift_n1, vshift_w}),
exp_auxfalsep(vp, vshift_n1, vshift_w),
if_(
equals_zero(vshift_n1),
exp_aux3p(
sort_machine_word::rightmost_bit(vshift_w),
times(vp, vp), vshift_w),
exp_aux4p(
sort_machine_word::rightmost_bit(vshift_w),
times(vp, vp), vshift_n1, vshift_w))));
4975 result.push_back(data_equation(
variable_list({vn, vw1, vw2}),
div(
concat_digit(vn, vw1),
sort_pos::most_significant_digit(vw2)),
div_whr1(vn, vw1, vw2,
divmod_aux(vn,
sort_pos::most_significant_digit(vw2)))));
4976 result.push_back(data_equation(
variable_list({vn, vpair_, vw1, vw2}),
div_whr1(vn, vw1, vw2, vpair_),
if_(
less(vn,
most_significant_digit_nat(vw2)),
most_significant_digit_nat(
div_bold(
concat_digit(vn, vw1),
sort_pos::most_significant_digit(vw2))),
if_(
equals_zero(
first(vpair_)),
most_significant_digit_nat(
div_bold(
if_(
equals_zero(
last(vpair_)),
most_significant_digit_nat(vw1),
concat_digit(
last(vpair_), vw1)),
sort_pos::most_significant_digit(vw2))),
concat_digit(
first(vpair_),
div_bold(
if_(
equals_zero(
last(vpair_)),
most_significant_digit_nat(vw1),
concat_digit(
last(vpair_), vw1)),
sort_pos::most_significant_digit(vw2)))))));
4978 result.push_back(data_equation(
variable_list({vn, vp, vw1, vw2}),
div(
concat_digit(vn, vw1),
concat_digit(vp, vw2)),
if_(
less(vn,
pos2nat(
concat_digit(vp, vw2))),
most_significant_digit_nat(
div_bold(
concat_digit(vn, vw1),
concat_digit(vp, vw2))),
div_whr2(vn, vw1, vp, vw2,
divmod_aux(vn,
concat_digit(vp, vw2))))));
4979 result.push_back(data_equation(
variable_list({vn, vp, vpair_, vw1, vw2}),
div_whr2(vn, vw1, vp, vw2, vpair_),
plus(
if_(
equals_zero(
first(vpair_)),
most_significant_digit_nat(
sort_machine_word::zero_word()),
concat_digit(
first(vpair_),
sort_machine_word::zero_word())),
most_significant_digit_nat(
div_bold(
if_(
equals_zero(
last(vpair_)),
most_significant_digit_nat(vw1),
concat_digit(
last(vpair_), vw1)),
concat_digit(vp, vw2))))));
4980 result.push_back(data_equation(
variable_list({vn, vp, vw1, vw2}),
mod(
concat_digit(vn, vw1),
concat_digit(vp, vw2)),
mod_whr1(vw1, vp, vw2,
mod(vn,
concat_digit(vp, vw2)))));
4981 result.push_back(data_equation(
variable_list({vm1, vp, vw1, vw2}),
mod_whr1(vw1, vp, vw2, vm1),
monus(
if_(
less(
most_significant_digit_nat(
sort_machine_word::zero_word()), vm1),
concat_digit(vm1, vw1),
most_significant_digit_nat(vw1)),
times(
concat_digit(
pos2nat(vp), vw2),
most_significant_digit_nat(
div_bold(
if_(
less(
most_significant_digit_nat(
sort_machine_word::zero_word()), vm1),
concat_digit(vm1, vw1),
most_significant_digit_nat(vw1)),
concat_digit(vp, vw2)))))));
4984 result.push_back(data_equation(
variable_list({vn, vw1, vw2}),
divmod_aux(
concat_digit(vn, vw1),
sort_pos::most_significant_digit(vw2)),
divmod_aux_whr1(vn, vw1, vw2,
divmod_aux(vn,