mCRL2
Loading...
Searching...
No Matches
machine_word.h
Go to the documentation of this file.
1// Author(s): Jeroen Keiren
2// Copyright: see the accompanying file COPYING or copy at
3// https://github.com/mCRL2org/mCRL2/blob/master/COPYING
4//
5// Distributed under the Boost Software License, Version 1.0.
6// (See accompanying file LICENSE_1_0.txt or copy at
7// http://www.boost.org/LICENSE_1_0.txt)
8//
14
15#ifndef MCRL2_DATA_MACHINE_WORD_H
16#define MCRL2_DATA_MACHINE_WORD_H
17
18#include "functional" // std::function
25#include "mcrl2/data/standard.h"
26#include "mcrl2/data/bool.h"
27
28namespace mcrl2 {
29
30 namespace data {
31
33 namespace sort_machine_word {
34
35 inline
37 {
39 return machine_word_name;
40 }
41
44 inline
46 {
48 return machine_word;
49 }
50
54 inline
56 {
57 if (is_basic_sort(e))
58 {
59 return basic_sort(e) == machine_word();
60 }
61 return false;
62 }
63
64
67 inline
69 {
71 return zero_word_name;
72 }
73
75
77 inline
79 {
81 return zero_word;
82 }
83
87 inline
89 {
90 if (is_function_symbol(e))
91 {
92 return atermpp::down_cast<function_symbol>(e) == zero_word();
93 }
94 return false;
95 }
96
99 inline
101
103 inline
105 {
106 static_cast< void >(a); // suppress unused variable warning.
107 assert(is_function_symbol(a));
108 // assert(a==zero_word());
110 }
111
112
115 inline
117 {
119 return succ_word_name;
120 }
121
123
125 inline
127 {
129 return succ_word;
130 }
131
135 inline
137 {
138 if (is_function_symbol(e))
139 {
140 return atermpp::down_cast<function_symbol>(e) == succ_word();
141 }
142 return false;
143 }
144
146
149 inline
151 {
152 return sort_machine_word::succ_word()(arg0);
153 }
154
157
159 inline
161 {
163 }
164
169 inline
171 {
172 return is_application(e) && is_succ_word_function_symbol(atermpp::down_cast<application>(e).head());
173 }
174
179 inline
181
182
184 inline
186 {
187 assert(is_application(a1));
188 const application& a=atermpp::down_cast<application>(a1);
189 // assert(a.head()==succ_word());
191 }
192
195 inline
197 {
199 result.push_back(sort_machine_word::zero_word());
200 result.push_back(sort_machine_word::succ_word());
201
202 return result;
203 }
206 inline
208 {
210 result.push_back(sort_machine_word::zero_word());
211 result.push_back(sort_machine_word::succ_word());
212
213 return result;
214 }
215 // The typedef is the sort that maps a function symbol to an function that rewrites it as well as a string of a function that can be used to implement it
216 typedef std::map<function_symbol,std::pair<std::function<void(data_expression&, const data_expression&)>, std::string> > implementation_map;
219 inline
221 {
222 implementation_map result;
223 result[sort_machine_word::zero_word()]=std::pair<std::function<void(data_expression&, const data_expression&)>, std::string>(sort_machine_word::zero_word_application,"sort_machine_word::zero_word_manual_implementation");
224 result[sort_machine_word::succ_word()]=std::pair<std::function<void(data_expression&, const data_expression&)>, std::string>(sort_machine_word::succ_word_application,"sort_machine_word::succ_word_manual_implementation");
225
226 return result;
227 }
228
231 inline
233 {
235 return one_word_name;
236 }
237
239
241 inline
243 {
245 return one_word;
246 }
247
251 inline
253 {
254 if (is_function_symbol(e))
255 {
256 return atermpp::down_cast<function_symbol>(e) == one_word();
257 }
258 return false;
259 }
260
263 inline
265
267 inline
269 {
270 static_cast< void >(a); // suppress unused variable warning.
271 assert(is_function_symbol(a));
272 // assert(a==one_word());
274 }
275
276
279 inline
281 {
283 return two_word_name;
284 }
285
287
289 inline
291 {
293 return two_word;
294 }
295
299 inline
301 {
302 if (is_function_symbol(e))
303 {
304 return atermpp::down_cast<function_symbol>(e) == two_word();
305 }
306 return false;
307 }
308
311 inline
313
315 inline
317 {
318 static_cast< void >(a); // suppress unused variable warning.
319 assert(is_function_symbol(a));
320 // assert(a==two_word());
322 }
323
324
327 inline
329 {
331 return three_word_name;
332 }
333
335
337 inline
339 {
341 return three_word;
342 }
343
347 inline
349 {
350 if (is_function_symbol(e))
351 {
352 return atermpp::down_cast<function_symbol>(e) == three_word();
353 }
354 return false;
355 }
356
359 inline
361
363 inline
365 {
366 static_cast< void >(a); // suppress unused variable warning.
367 assert(is_function_symbol(a));
368 // assert(a==three_word());
370 }
371
372
375 inline
377 {
379 return four_word_name;
380 }
381
383
385 inline
387 {
389 return four_word;
390 }
391
395 inline
397 {
398 if (is_function_symbol(e))
399 {
400 return atermpp::down_cast<function_symbol>(e) == four_word();
401 }
402 return false;
403 }
404
407 inline
409
411 inline
413 {
414 static_cast< void >(a); // suppress unused variable warning.
415 assert(is_function_symbol(a));
416 // assert(a==four_word());
418 }
419
420
423 inline
425 {
427 return max_word_name;
428 }
429
431
433 inline
435 {
437 return max_word;
438 }
439
443 inline
445 {
446 if (is_function_symbol(e))
447 {
448 return atermpp::down_cast<function_symbol>(e) == max_word();
449 }
450 return false;
451 }
452
455 inline
457
459 inline
461 {
462 static_cast< void >(a); // suppress unused variable warning.
463 assert(is_function_symbol(a));
464 // assert(a==max_word());
466 }
467
468
471 inline
473 {
476 }
477
479
481 inline
483 {
485 return equals_zero_word;
486 }
487
491 inline
493 {
494 if (is_function_symbol(e))
495 {
496 return atermpp::down_cast<function_symbol>(e) == equals_zero_word();
497 }
498 return false;
499 }
500
502
505 inline
507 {
509 }
510
513
515 inline
517 {
519 }
520
525 inline
527 {
528 return is_application(e) && is_equals_zero_word_function_symbol(atermpp::down_cast<application>(e).head());
529 }
530
535 inline
537
538
540 inline
542 {
543 assert(is_application(a1));
544 const application& a=atermpp::down_cast<application>(a1);
545 // assert(a.head()==equals_zero_word());
547 }
548
549
552 inline
554 {
557 }
558
560
562 inline
564 {
567 }
568
572 inline
574 {
575 if (is_function_symbol(e))
576 {
577 return atermpp::down_cast<function_symbol>(e) == not_equals_zero_word();
578 }
579 return false;
580 }
581
583
586 inline
588 {
590 }
591
594
596 inline
598 {
600 }
601
606 inline
608 {
609 return is_application(e) && is_not_equals_zero_word_function_symbol(atermpp::down_cast<application>(e).head());
610 }
611
616 inline
618
619
621 inline
623 {
624 assert(is_application(a1));
625 const application& a=atermpp::down_cast<application>(a1);
626 // assert(a.head()==not_equals_zero_word());
628 }
629
630
633 inline
635 {
638 }
639
641
643 inline
645 {
647 return equals_one_word;
648 }
649
653 inline
655 {
656 if (is_function_symbol(e))
657 {
658 return atermpp::down_cast<function_symbol>(e) == equals_one_word();
659 }
660 return false;
661 }
662
664
667 inline
669 {
671 }
672
675
677 inline
679 {
681 }
682
687 inline
689 {
690 return is_application(e) && is_equals_one_word_function_symbol(atermpp::down_cast<application>(e).head());
691 }
692
697 inline
699
700
702 inline
704 {
705 assert(is_application(a1));
706 const application& a=atermpp::down_cast<application>(a1);
707 // assert(a.head()==equals_one_word());
709 }
710
711
714 inline
716 {
719 }
720
722
724 inline
726 {
728 return equals_max_word;
729 }
730
734 inline
736 {
737 if (is_function_symbol(e))
738 {
739 return atermpp::down_cast<function_symbol>(e) == equals_max_word();
740 }
741 return false;
742 }
743
745
748 inline
750 {
752 }
753
756
758 inline
760 {
762 }
763
768 inline
770 {
771 return is_application(e) && is_equals_max_word_function_symbol(atermpp::down_cast<application>(e).head());
772 }
773
778 inline
780
781
783 inline
785 {
786 assert(is_application(a1));
787 const application& a=atermpp::down_cast<application>(a1);
788 // assert(a.head()==equals_max_word());
790 }
791
792
795 inline
797 {
799 return add_word_name;
800 }
801
803
805 inline
807 {
809 return add_word;
810 }
811
815 inline
817 {
818 if (is_function_symbol(e))
819 {
820 return atermpp::down_cast<function_symbol>(e) == add_word();
821 }
822 return false;
823 }
824
826
830 inline
832 {
833 return sort_machine_word::add_word()(arg0, arg1);
834 }
835
838
841 inline
843 {
845 }
846
851 inline
853 {
854 return is_application(e) && is_add_word_function_symbol(atermpp::down_cast<application>(e).head());
855 }
856
862 inline
864
865
867 inline
869 {
870 assert(is_application(a1));
871 const application& a=atermpp::down_cast<application>(a1);
872 // assert(a.head()==add_word());
873 add_word_manual_implementation(result, a[0], a[1]);
874 }
875
876
879 inline
881 {
884 }
885
887
889 inline
891 {
893 return add_with_carry_word;
894 }
895
899 inline
901 {
902 if (is_function_symbol(e))
903 {
904 return atermpp::down_cast<function_symbol>(e) == add_with_carry_word();
905 }
906 return false;
907 }
908
910
914 inline
916 {
918 }
919
922
925 inline
927 {
929 }
930
935 inline
937 {
938 return is_application(e) && is_add_with_carry_word_function_symbol(atermpp::down_cast<application>(e).head());
939 }
940
946 inline
948
949
951 inline
953 {
954 assert(is_application(a1));
955 const application& a=atermpp::down_cast<application>(a1);
956 // assert(a.head()==add_with_carry_word());
958 }
959
960
963 inline
965 {
968 }
969
971
973 inline
975 {
977 return add_overflow_word;
978 }
979
983 inline
985 {
986 if (is_function_symbol(e))
987 {
988 return atermpp::down_cast<function_symbol>(e) == add_overflow_word();
989 }
990 return false;
991 }
992
994
998 inline
1000 {
1002 }
1003
1006
1009 inline
1011 {
1013 }
1014
1019 inline
1021 {
1022 return is_application(e) && is_add_overflow_word_function_symbol(atermpp::down_cast<application>(e).head());
1023 }
1024
1030 inline
1032
1033
1035 inline
1037 {
1038 assert(is_application(a1));
1039 const application& a=atermpp::down_cast<application>(a1);
1040 // assert(a.head()==add_overflow_word());
1041 add_overflow_word_manual_implementation(result, a[0], a[1]);
1042 }
1043
1044
1047 inline
1049 {
1052 }
1053
1055
1057 inline
1059 {
1062 }
1063
1067 inline
1069 {
1070 if (is_function_symbol(e))
1071 {
1072 return atermpp::down_cast<function_symbol>(e) == add_with_carry_overflow_word();
1073 }
1074 return false;
1075 }
1076
1078
1082 inline
1084 {
1086 }
1087
1090
1093 inline
1095 {
1097 }
1098
1103 inline
1105 {
1106 return is_application(e) && is_add_with_carry_overflow_word_function_symbol(atermpp::down_cast<application>(e).head());
1107 }
1108
1114 inline
1116
1117
1119 inline
1121 {
1122 assert(is_application(a1));
1123 const application& a=atermpp::down_cast<application>(a1);
1124 // assert(a.head()==add_with_carry_overflow_word());
1126 }
1127
1128
1131 inline
1133 {
1135 return times_word_name;
1136 }
1137
1139
1141 inline
1143 {
1145 return times_word;
1146 }
1147
1151 inline
1153 {
1154 if (is_function_symbol(e))
1155 {
1156 return atermpp::down_cast<function_symbol>(e) == times_word();
1157 }
1158 return false;
1159 }
1160
1162
1166 inline
1168 {
1169 return sort_machine_word::times_word()(arg0, arg1);
1170 }
1171
1174
1177 inline
1179 {
1181 }
1182
1187 inline
1189 {
1190 return is_application(e) && is_times_word_function_symbol(atermpp::down_cast<application>(e).head());
1191 }
1192
1198 inline
1200
1201
1203 inline
1205 {
1206 assert(is_application(a1));
1207 const application& a=atermpp::down_cast<application>(a1);
1208 // assert(a.head()==times_word());
1209 times_word_manual_implementation(result, a[0], a[1]);
1210 }
1211
1212
1215 inline
1217 {
1220 }
1221
1223
1225 inline
1227 {
1229 return times_with_carry_word;
1230 }
1231
1235 inline
1237 {
1238 if (is_function_symbol(e))
1239 {
1240 return atermpp::down_cast<function_symbol>(e) == times_with_carry_word();
1241 }
1242 return false;
1243 }
1244
1246
1251 inline
1253 {
1255 }
1256
1259
1263 inline
1265 {
1267 }
1268
1273 inline
1275 {
1276 return is_application(e) && is_times_with_carry_word_function_symbol(atermpp::down_cast<application>(e).head());
1277 }
1278
1285 inline
1287
1288
1290 inline
1292 {
1293 assert(is_application(a1));
1294 const application& a=atermpp::down_cast<application>(a1);
1295 // assert(a.head()==times_with_carry_word());
1296 times_with_carry_word_manual_implementation(result, a[0], a[1], a[2]);
1297 }
1298
1299
1302 inline
1304 {
1307 }
1308
1310
1312 inline
1314 {
1316 return times_overflow_word;
1317 }
1318
1322 inline
1324 {
1325 if (is_function_symbol(e))
1326 {
1327 return atermpp::down_cast<function_symbol>(e) == times_overflow_word();
1328 }
1329 return false;
1330 }
1331
1333
1337 inline
1339 {
1341 }
1342
1345
1348 inline
1350 {
1352 }
1353
1358 inline
1360 {
1361 return is_application(e) && is_times_overflow_word_function_symbol(atermpp::down_cast<application>(e).head());
1362 }
1363
1369 inline
1371
1372
1374 inline
1376 {
1377 assert(is_application(a1));
1378 const application& a=atermpp::down_cast<application>(a1);
1379 // assert(a.head()==times_overflow_word());
1381 }
1382
1383
1386 inline
1388 {
1391 }
1392
1394
1396 inline
1398 {
1401 }
1402
1406 inline
1408 {
1409 if (is_function_symbol(e))
1410 {
1411 return atermpp::down_cast<function_symbol>(e) == times_with_carry_overflow_word();
1412 }
1413 return false;
1414 }
1415
1417
1422 inline
1424 {
1426 }
1427
1430
1434 inline
1436 {
1438 }
1439
1444 inline
1446 {
1447 return is_application(e) && is_times_with_carry_overflow_word_function_symbol(atermpp::down_cast<application>(e).head());
1448 }
1449
1456 inline
1458
1459
1461 inline
1463 {
1464 assert(is_application(a1));
1465 const application& a=atermpp::down_cast<application>(a1);
1466 // assert(a.head()==times_with_carry_overflow_word());
1468 }
1469
1470
1473 inline
1475 {
1477 return minus_word_name;
1478 }
1479
1481
1483 inline
1485 {
1487 return minus_word;
1488 }
1489
1493 inline
1495 {
1496 if (is_function_symbol(e))
1497 {
1498 return atermpp::down_cast<function_symbol>(e) == minus_word();
1499 }
1500 return false;
1501 }
1502
1504
1508 inline
1510 {
1511 return sort_machine_word::minus_word()(arg0, arg1);
1512 }
1513
1516
1519 inline
1521 {
1523 }
1524
1529 inline
1531 {
1532 return is_application(e) && is_minus_word_function_symbol(atermpp::down_cast<application>(e).head());
1533 }
1534
1540 inline
1542
1543
1545 inline
1547 {
1548 assert(is_application(a1));
1549 const application& a=atermpp::down_cast<application>(a1);
1550 // assert(a.head()==minus_word());
1551 minus_word_manual_implementation(result, a[0], a[1]);
1552 }
1553
1554
1557 inline
1559 {
1561 return monus_word_name;
1562 }
1563
1565
1567 inline
1569 {
1571 return monus_word;
1572 }
1573
1577 inline
1579 {
1580 if (is_function_symbol(e))
1581 {
1582 return atermpp::down_cast<function_symbol>(e) == monus_word();
1583 }
1584 return false;
1585 }
1586
1588
1592 inline
1594 {
1595 return sort_machine_word::monus_word()(arg0, arg1);
1596 }
1597
1600
1603 inline
1605 {
1607 }
1608
1613 inline
1615 {
1616 return is_application(e) && is_monus_word_function_symbol(atermpp::down_cast<application>(e).head());
1617 }
1618
1624 inline
1626
1627
1629 inline
1631 {
1632 assert(is_application(a1));
1633 const application& a=atermpp::down_cast<application>(a1);
1634 // assert(a.head()==monus_word());
1635 monus_word_manual_implementation(result, a[0], a[1]);
1636 }
1637
1638
1641 inline
1643 {
1645 return div_word_name;
1646 }
1647
1649
1651 inline
1653 {
1655 return div_word;
1656 }
1657
1661 inline
1663 {
1664 if (is_function_symbol(e))
1665 {
1666 return atermpp::down_cast<function_symbol>(e) == div_word();
1667 }
1668 return false;
1669 }
1670
1672
1676 inline
1678 {
1679 return sort_machine_word::div_word()(arg0, arg1);
1680 }
1681
1684
1687 inline
1689 {
1691 }
1692
1697 inline
1699 {
1700 return is_application(e) && is_div_word_function_symbol(atermpp::down_cast<application>(e).head());
1701 }
1702
1708 inline
1710
1711
1713 inline
1715 {
1716 assert(is_application(a1));
1717 const application& a=atermpp::down_cast<application>(a1);
1718 // assert(a.head()==div_word());
1719 div_word_manual_implementation(result, a[0], a[1]);
1720 }
1721
1722
1725 inline
1727 {
1729 return mod_word_name;
1730 }
1731
1733
1735 inline
1737 {
1739 return mod_word;
1740 }
1741
1745 inline
1747 {
1748 if (is_function_symbol(e))
1749 {
1750 return atermpp::down_cast<function_symbol>(e) == mod_word();
1751 }
1752 return false;
1753 }
1754
1756
1760 inline
1762 {
1763 return sort_machine_word::mod_word()(arg0, arg1);
1764 }
1765
1768
1771 inline
1773 {
1775 }
1776
1781 inline
1783 {
1784 return is_application(e) && is_mod_word_function_symbol(atermpp::down_cast<application>(e).head());
1785 }
1786
1792 inline
1794
1795
1797 inline
1799 {
1800 assert(is_application(a1));
1801 const application& a=atermpp::down_cast<application>(a1);
1802 // assert(a.head()==mod_word());
1803 mod_word_manual_implementation(result, a[0], a[1]);
1804 }
1805
1806
1809 inline
1811 {
1813 return sqrt_word_name;
1814 }
1815
1817
1819 inline
1821 {
1823 return sqrt_word;
1824 }
1825
1829 inline
1831 {
1832 if (is_function_symbol(e))
1833 {
1834 return atermpp::down_cast<function_symbol>(e) == sqrt_word();
1835 }
1836 return false;
1837 }
1838
1840
1843 inline
1845 {
1846 return sort_machine_word::sqrt_word()(arg0);
1847 }
1848
1851
1853 inline
1855 {
1857 }
1858
1863 inline
1865 {
1866 return is_application(e) && is_sqrt_word_function_symbol(atermpp::down_cast<application>(e).head());
1867 }
1868
1873 inline
1875
1876
1878 inline
1880 {
1881 assert(is_application(a1));
1882 const application& a=atermpp::down_cast<application>(a1);
1883 // assert(a.head()==sqrt_word());
1884 sqrt_word_manual_implementation(result, a[0]);
1885 }
1886
1887
1890 inline
1892 {
1894 return div_doubleword_name;
1895 }
1896
1898
1900 inline
1902 {
1904 return div_doubleword;
1905 }
1906
1910 inline
1912 {
1913 if (is_function_symbol(e))
1914 {
1915 return atermpp::down_cast<function_symbol>(e) == div_doubleword();
1916 }
1917 return false;
1918 }
1919
1921
1926 inline
1928 {
1930 }
1931
1934
1938 inline
1940 {
1942 }
1943
1948 inline
1950 {
1951 return is_application(e) && is_div_doubleword_function_symbol(atermpp::down_cast<application>(e).head());
1952 }
1953
1960 inline
1962
1963
1965 inline
1967 {
1968 assert(is_application(a1));
1969 const application& a=atermpp::down_cast<application>(a1);
1970 // assert(a.head()==div_doubleword());
1971 div_doubleword_manual_implementation(result, a[0], a[1], a[2]);
1972 }
1973
1974
1977 inline
1979 {
1982 }
1983
1985
1987 inline
1989 {
1991 return div_double_doubleword;
1992 }
1993
1997 inline
1999 {
2000 if (is_function_symbol(e))
2001 {
2002 return atermpp::down_cast<function_symbol>(e) == div_double_doubleword();
2003 }
2004 return false;
2005 }
2006
2008
2014 inline
2016 {
2018 }
2019
2022
2027 inline
2029 {
2031 }
2032
2037 inline
2039 {
2040 return is_application(e) && is_div_double_doubleword_function_symbol(atermpp::down_cast<application>(e).head());
2041 }
2042
2050 inline
2052
2053
2055 inline
2057 {
2058 assert(is_application(a1));
2059 const application& a=atermpp::down_cast<application>(a1);
2060 // assert(a.head()==div_double_doubleword());
2061 div_double_doubleword_manual_implementation(result, a[0], a[1], a[2], a[3]);
2062 }
2063
2064
2067 inline
2069 {
2072 }
2073
2075
2077 inline
2079 {
2081 return div_triple_doubleword;
2082 }
2083
2087 inline
2089 {
2090 if (is_function_symbol(e))
2091 {
2092 return atermpp::down_cast<function_symbol>(e) == div_triple_doubleword();
2093 }
2094 return false;
2095 }
2096
2098
2105 inline
2107 {
2109 }
2110
2113
2119 inline
2121 {
2123 }
2124
2129 inline
2131 {
2132 return is_application(e) && is_div_triple_doubleword_function_symbol(atermpp::down_cast<application>(e).head());
2133 }
2134
2143 inline
2145
2146
2148 inline
2150 {
2151 assert(is_application(a1));
2152 const application& a=atermpp::down_cast<application>(a1);
2153 // assert(a.head()==div_triple_doubleword());
2154 div_triple_doubleword_manual_implementation(result, a[0], a[1], a[2], a[3], a[4]);
2155 }
2156
2157
2160 inline
2162 {
2164 return mod_doubleword_name;
2165 }
2166
2168
2170 inline
2172 {
2174 return mod_doubleword;
2175 }
2176
2180 inline
2182 {
2183 if (is_function_symbol(e))
2184 {
2185 return atermpp::down_cast<function_symbol>(e) == mod_doubleword();
2186 }
2187 return false;
2188 }
2189
2191
2196 inline
2198 {
2200 }
2201
2204
2208 inline
2210 {
2212 }
2213
2218 inline
2220 {
2221 return is_application(e) && is_mod_doubleword_function_symbol(atermpp::down_cast<application>(e).head());
2222 }
2223
2230 inline
2232
2233
2235 inline
2237 {
2238 assert(is_application(a1));
2239 const application& a=atermpp::down_cast<application>(a1);
2240 // assert(a.head()==mod_doubleword());
2241 mod_doubleword_manual_implementation(result, a[0], a[1], a[2]);
2242 }
2243
2244
2247 inline
2249 {
2251 return sqrt_doubleword_name;
2252 }
2253
2255
2257 inline
2259 {
2261 return sqrt_doubleword;
2262 }
2263
2267 inline
2269 {
2270 if (is_function_symbol(e))
2271 {
2272 return atermpp::down_cast<function_symbol>(e) == sqrt_doubleword();
2273 }
2274 return false;
2275 }
2276
2278
2282 inline
2284 {
2286 }
2287
2290
2293 inline
2295 {
2297 }
2298
2303 inline
2305 {
2306 return is_application(e) && is_sqrt_doubleword_function_symbol(atermpp::down_cast<application>(e).head());
2307 }
2308
2314 inline
2316
2317
2319 inline
2321 {
2322 assert(is_application(a1));
2323 const application& a=atermpp::down_cast<application>(a1);
2324 // assert(a.head()==sqrt_doubleword());
2325 sqrt_doubleword_manual_implementation(result, a[0], a[1]);
2326 }
2327
2328
2331 inline
2333 {
2335 return sqrt_tripleword_name;
2336 }
2337
2339
2341 inline
2343 {
2345 return sqrt_tripleword;
2346 }
2347
2351 inline
2353 {
2354 if (is_function_symbol(e))
2355 {
2356 return atermpp::down_cast<function_symbol>(e) == sqrt_tripleword();
2357 }
2358 return false;
2359 }
2360
2362
2367 inline
2369 {
2371 }
2372
2375
2379 inline
2381 {
2383 }
2384
2389 inline
2391 {
2392 return is_application(e) && is_sqrt_tripleword_function_symbol(atermpp::down_cast<application>(e).head());
2393 }
2394
2401 inline
2403
2404
2406 inline
2408 {
2409 assert(is_application(a1));
2410 const application& a=atermpp::down_cast<application>(a1);
2411 // assert(a.head()==sqrt_tripleword());
2412 sqrt_tripleword_manual_implementation(result, a[0], a[1], a[2]);
2413 }
2414
2415
2418 inline
2420 {
2423 }
2424
2426
2428 inline
2430 {
2433 }
2434
2438 inline
2440 {
2441 if (is_function_symbol(e))
2442 {
2443 return atermpp::down_cast<function_symbol>(e) == sqrt_tripleword_overflow();
2444 }
2445 return false;
2446 }
2447
2449
2454 inline
2456 {
2458 }
2459
2462
2466 inline
2468 {
2470 }
2471
2476 inline
2478 {
2479 return is_application(e) && is_sqrt_tripleword_overflow_function_symbol(atermpp::down_cast<application>(e).head());
2480 }
2481
2488 inline
2490
2491
2493 inline
2495 {
2496 assert(is_application(a1));
2497 const application& a=atermpp::down_cast<application>(a1);
2498 // assert(a.head()==sqrt_tripleword_overflow());
2499 sqrt_tripleword_overflow_manual_implementation(result, a[0], a[1], a[2]);
2500 }
2501
2502
2505 inline
2507 {
2510 }
2511
2513
2515 inline
2517 {
2519 return sqrt_quadrupleword;
2520 }
2521
2525 inline
2527 {
2528 if (is_function_symbol(e))
2529 {
2530 return atermpp::down_cast<function_symbol>(e) == sqrt_quadrupleword();
2531 }
2532 return false;
2533 }
2534
2536
2542 inline
2544 {
2546 }
2547
2550
2555 inline
2557 {
2559 }
2560
2565 inline
2567 {
2568 return is_application(e) && is_sqrt_quadrupleword_function_symbol(atermpp::down_cast<application>(e).head());
2569 }
2570
2578 inline
2580
2581
2583 inline
2585 {
2586 assert(is_application(a1));
2587 const application& a=atermpp::down_cast<application>(a1);
2588 // assert(a.head()==sqrt_quadrupleword());
2589 sqrt_quadrupleword_manual_implementation(result, a[0], a[1], a[2], a[3]);
2590 }
2591
2592
2595 inline
2597 {
2600 }
2601
2603
2605 inline
2607 {
2610 }
2611
2615 inline
2617 {
2618 if (is_function_symbol(e))
2619 {
2620 return atermpp::down_cast<function_symbol>(e) == sqrt_quadrupleword_overflow();
2621 }
2622 return false;
2623 }
2624
2626
2632 inline
2634 {
2636 }
2637
2640
2645 inline
2647 {
2649 }
2650
2655 inline
2657 {
2658 return is_application(e) && is_sqrt_quadrupleword_overflow_function_symbol(atermpp::down_cast<application>(e).head());
2659 }
2660
2668 inline
2670
2671
2673 inline
2675 {
2676 assert(is_application(a1));
2677 const application& a=atermpp::down_cast<application>(a1);
2678 // assert(a.head()==sqrt_quadrupleword_overflow());
2679 sqrt_quadrupleword_overflow_manual_implementation(result, a[0], a[1], a[2], a[3]);
2680 }
2681
2682
2685 inline
2687 {
2689 return pred_word_name;
2690 }
2691
2693
2695 inline
2697 {
2699 return pred_word;
2700 }
2701
2705 inline
2707 {
2708 if (is_function_symbol(e))
2709 {
2710 return atermpp::down_cast<function_symbol>(e) == pred_word();
2711 }
2712 return false;
2713 }
2714
2716
2719 inline
2721 {
2722 return sort_machine_word::pred_word()(arg0);
2723 }
2724
2727
2729 inline
2731 {
2733 }
2734
2739 inline
2741 {
2742 return is_application(e) && is_pred_word_function_symbol(atermpp::down_cast<application>(e).head());
2743 }
2744
2749 inline
2751
2752
2754 inline
2756 {
2757 assert(is_application(a1));
2758 const application& a=atermpp::down_cast<application>(a1);
2759 // assert(a.head()==pred_word());
2760 pred_word_manual_implementation(result, a[0]);
2761 }
2762
2763
2766 inline
2768 {
2770 return equal_word_name;
2771 }
2772
2774
2776 inline
2778 {
2780 return equal_word;
2781 }
2782
2786 inline
2788 {
2789 if (is_function_symbol(e))
2790 {
2791 return atermpp::down_cast<function_symbol>(e) == equal_word();
2792 }
2793 return false;
2794 }
2795
2797
2801 inline
2803 {
2804 return sort_machine_word::equal_word()(arg0, arg1);
2805 }
2806
2809
2812 inline
2814 {
2816 }
2817
2822 inline
2824 {
2825 return is_application(e) && is_equal_word_function_symbol(atermpp::down_cast<application>(e).head());
2826 }
2827
2833 inline
2835
2836
2838 inline
2840 {
2841 assert(is_application(a1));
2842 const application& a=atermpp::down_cast<application>(a1);
2843 // assert(a.head()==equal_word());
2844 equal_word_manual_implementation(result, a[0], a[1]);
2845 }
2846
2847
2850 inline
2852 {
2854 return not_equal_word_name;
2855 }
2856
2858
2860 inline
2862 {
2864 return not_equal_word;
2865 }
2866
2870 inline
2872 {
2873 if (is_function_symbol(e))
2874 {
2875 return atermpp::down_cast<function_symbol>(e) == not_equal_word();
2876 }
2877 return false;
2878 }
2879
2881
2885 inline
2887 {
2889 }
2890
2893
2896 inline
2898 {
2900 }
2901
2906 inline
2908 {
2909 return is_application(e) && is_not_equal_word_function_symbol(atermpp::down_cast<application>(e).head());
2910 }
2911
2917 inline
2919
2920
2922 inline
2924 {
2925 assert(is_application(a1));
2926 const application& a=atermpp::down_cast<application>(a1);
2927 // assert(a.head()==not_equal_word());
2928 not_equal_word_manual_implementation(result, a[0], a[1]);
2929 }
2930
2931
2934 inline
2936 {
2938 return less_word_name;
2939 }
2940
2942
2944 inline
2946 {
2948 return less_word;
2949 }
2950
2954 inline
2956 {
2957 if (is_function_symbol(e))
2958 {
2959 return atermpp::down_cast<function_symbol>(e) == less_word();
2960 }
2961 return false;
2962 }
2963
2965
2969 inline
2971 {
2972 return sort_machine_word::less_word()(arg0, arg1);
2973 }
2974
2977
2980 inline
2982 {
2984 }
2985
2990 inline
2992 {
2993 return is_application(e) && is_less_word_function_symbol(atermpp::down_cast<application>(e).head());
2994 }
2995
3001 inline
3003
3004
3006 inline
3008 {
3009 assert(is_application(a1));
3010 const application& a=atermpp::down_cast<application>(a1);
3011 // assert(a.head()==less_word());
3012 less_word_manual_implementation(result, a[0], a[1]);
3013 }
3014
3015
3018 inline
3020 {
3022 return less_equal_word_name;
3023 }
3024
3026
3028 inline
3030 {
3032 return less_equal_word;
3033 }
3034
3038 inline
3040 {
3041 if (is_function_symbol(e))
3042 {
3043 return atermpp::down_cast<function_symbol>(e) == less_equal_word();
3044 }
3045 return false;
3046 }
3047
3049
3053 inline
3055 {
3057 }
3058
3061
3064 inline
3066 {
3068 }
3069
3074 inline
3076 {
3077 return is_application(e) && is_less_equal_word_function_symbol(atermpp::down_cast<application>(e).head());
3078 }
3079
3085 inline
3087
3088
3090 inline
3092 {
3093 assert(is_application(a1));
3094 const application& a=atermpp::down_cast<application>(a1);
3095 // assert(a.head()==less_equal_word());
3096 less_equal_word_manual_implementation(result, a[0], a[1]);
3097 }
3098
3099
3102 inline
3104 {
3106 return greater_word_name;
3107 }
3108
3110
3112 inline
3114 {
3116 return greater_word;
3117 }
3118
3122 inline
3124 {
3125 if (is_function_symbol(e))
3126 {
3127 return atermpp::down_cast<function_symbol>(e) == greater_word();
3128 }
3129 return false;
3130 }
3131
3133
3137 inline
3139 {
3140 return sort_machine_word::greater_word()(arg0, arg1);
3141 }
3142
3145
3148 inline
3150 {
3152 }
3153
3158 inline
3160 {
3161 return is_application(e) && is_greater_word_function_symbol(atermpp::down_cast<application>(e).head());
3162 }
3163
3169 inline
3171
3172
3174 inline
3176 {
3177 assert(is_application(a1));
3178 const application& a=atermpp::down_cast<application>(a1);
3179 // assert(a.head()==greater_word());
3180 greater_word_manual_implementation(result, a[0], a[1]);
3181 }
3182
3183
3186 inline
3188 {
3191 }
3192
3194
3196 inline
3198 {
3200 return greater_equal_word;
3201 }
3202
3206 inline
3208 {
3209 if (is_function_symbol(e))
3210 {
3211 return atermpp::down_cast<function_symbol>(e) == greater_equal_word();
3212 }
3213 return false;
3214 }
3215
3217
3221 inline
3223 {
3225 }
3226
3229
3232 inline
3234 {
3236 }
3237
3242 inline
3244 {
3245 return is_application(e) && is_greater_equal_word_function_symbol(atermpp::down_cast<application>(e).head());
3246 }
3247
3253 inline
3255
3256
3258 inline
3260 {
3261 assert(is_application(a1));
3262 const application& a=atermpp::down_cast<application>(a1);
3263 // assert(a.head()==greater_equal_word());
3264 greater_equal_word_manual_implementation(result, a[0], a[1]);
3265 }
3266
3267
3270 inline
3272 {
3274 return rightmost_bit_name;
3275 }
3276
3278
3280 inline
3282 {
3284 return rightmost_bit;
3285 }
3286
3290 inline
3292 {
3293 if (is_function_symbol(e))
3294 {
3295 return atermpp::down_cast<function_symbol>(e) == rightmost_bit();
3296 }
3297 return false;
3298 }
3299
3301
3304 inline
3306 {
3307 return sort_machine_word::rightmost_bit()(arg0);
3308 }
3309
3312
3314 inline
3316 {
3318 }
3319
3324 inline
3326 {
3327 return is_application(e) && is_rightmost_bit_function_symbol(atermpp::down_cast<application>(e).head());
3328 }
3329
3334 inline
3336
3337
3339 inline
3341 {
3342 assert(is_application(a1));
3343 const application& a=atermpp::down_cast<application>(a1);
3344 // assert(a.head()==rightmost_bit());
3346 }
3347
3348
3351 inline
3353 {
3355 return shift_right_name;
3356 }
3357
3359
3361 inline
3363 {
3365 return shift_right;
3366 }
3367
3371 inline
3373 {
3374 if (is_function_symbol(e))
3375 {
3376 return atermpp::down_cast<function_symbol>(e) == shift_right();
3377 }
3378 return false;
3379 }
3380
3382
3386 inline
3388 {
3389 return sort_machine_word::shift_right()(arg0, arg1);
3390 }
3391
3394
3397 inline
3399 {
3401 }
3402
3407 inline
3409 {
3410 return is_application(e) && is_shift_right_function_symbol(atermpp::down_cast<application>(e).head());
3411 }
3412
3418 inline
3420
3421
3423 inline
3425 {
3426 assert(is_application(a1));
3427 const application& a=atermpp::down_cast<application>(a1);
3428 // assert(a.head()==shift_right());
3429 shift_right_manual_implementation(result, a[0], a[1]);
3430 }
3431
3434 inline
3436 {
3438 result.push_back(sort_machine_word::one_word());
3439 result.push_back(sort_machine_word::two_word());
3440 result.push_back(sort_machine_word::three_word());
3441 result.push_back(sort_machine_word::four_word());
3442 result.push_back(sort_machine_word::max_word());
3443 result.push_back(sort_machine_word::equals_zero_word());
3444 result.push_back(sort_machine_word::not_equals_zero_word());
3445 result.push_back(sort_machine_word::equals_one_word());
3446 result.push_back(sort_machine_word::equals_max_word());
3447 result.push_back(sort_machine_word::add_word());
3448 result.push_back(sort_machine_word::add_with_carry_word());
3449 result.push_back(sort_machine_word::add_overflow_word());
3451 result.push_back(sort_machine_word::times_word());
3452 result.push_back(sort_machine_word::times_with_carry_word());
3453 result.push_back(sort_machine_word::times_overflow_word());
3455 result.push_back(sort_machine_word::minus_word());
3456 result.push_back(sort_machine_word::monus_word());
3457 result.push_back(sort_machine_word::div_word());
3458 result.push_back(sort_machine_word::mod_word());
3459 result.push_back(sort_machine_word::sqrt_word());
3460 result.push_back(sort_machine_word::div_doubleword());
3461 result.push_back(sort_machine_word::div_double_doubleword());
3462 result.push_back(sort_machine_word::div_triple_doubleword());
3463 result.push_back(sort_machine_word::mod_doubleword());
3464 result.push_back(sort_machine_word::sqrt_doubleword());
3465 result.push_back(sort_machine_word::sqrt_tripleword());
3467 result.push_back(sort_machine_word::sqrt_quadrupleword());
3469 result.push_back(sort_machine_word::pred_word());
3470 result.push_back(sort_machine_word::equal_word());
3471 result.push_back(sort_machine_word::not_equal_word());
3472 result.push_back(sort_machine_word::less_word());
3473 result.push_back(sort_machine_word::less_equal_word());
3474 result.push_back(sort_machine_word::greater_word());
3475 result.push_back(sort_machine_word::greater_equal_word());
3476 result.push_back(sort_machine_word::rightmost_bit());
3477 result.push_back(sort_machine_word::shift_right());
3478 return result;
3479 }
3480
3483 inline
3485 {
3488 {
3489 result.push_back(f);
3490 }
3491 return result;
3492 }
3493
3496 inline
3498 {
3500 result.push_back(sort_machine_word::one_word());
3501 result.push_back(sort_machine_word::two_word());
3502 result.push_back(sort_machine_word::three_word());
3503 result.push_back(sort_machine_word::four_word());
3504 result.push_back(sort_machine_word::max_word());
3505 result.push_back(sort_machine_word::equals_zero_word());
3506 result.push_back(sort_machine_word::not_equals_zero_word());
3507 result.push_back(sort_machine_word::equals_one_word());
3508 result.push_back(sort_machine_word::equals_max_word());
3509 result.push_back(sort_machine_word::add_word());
3510 result.push_back(sort_machine_word::add_with_carry_word());
3511 result.push_back(sort_machine_word::add_overflow_word());
3513 result.push_back(sort_machine_word::times_word());
3514 result.push_back(sort_machine_word::times_with_carry_word());
3515 result.push_back(sort_machine_word::times_overflow_word());
3517 result.push_back(sort_machine_word::minus_word());
3518 result.push_back(sort_machine_word::monus_word());
3519 result.push_back(sort_machine_word::div_word());
3520 result.push_back(sort_machine_word::mod_word());
3521 result.push_back(sort_machine_word::sqrt_word());
3522 result.push_back(sort_machine_word::div_doubleword());
3523 result.push_back(sort_machine_word::div_double_doubleword());
3524 result.push_back(sort_machine_word::div_triple_doubleword());
3525 result.push_back(sort_machine_word::mod_doubleword());
3526 result.push_back(sort_machine_word::sqrt_doubleword());
3527 result.push_back(sort_machine_word::sqrt_tripleword());
3529 result.push_back(sort_machine_word::sqrt_quadrupleword());
3531 result.push_back(sort_machine_word::pred_word());
3532 result.push_back(sort_machine_word::equal_word());
3533 result.push_back(sort_machine_word::not_equal_word());
3534 result.push_back(sort_machine_word::less_word());
3535 result.push_back(sort_machine_word::less_equal_word());
3536 result.push_back(sort_machine_word::greater_word());
3537 result.push_back(sort_machine_word::greater_equal_word());
3538 result.push_back(sort_machine_word::rightmost_bit());
3539 result.push_back(sort_machine_word::shift_right());
3540 return result;
3541 }
3542
3543
3544 // The typedef is the sort that maps a function symbol to an function that rewrites it as well as a string of a function that can be used to implement it
3545 typedef std::map<function_symbol,std::pair<std::function<void(data_expression&, const data_expression&)>, std::string> > implementation_map;
3548 inline
3550 {
3551 implementation_map result;
3552 result[sort_machine_word::one_word()]=std::pair<std::function<void(data_expression&, const data_expression&)>, std::string>(sort_machine_word::one_word_application,"sort_machine_word::one_word_manual_implementation");
3553 result[sort_machine_word::two_word()]=std::pair<std::function<void(data_expression&, const data_expression&)>, std::string>(sort_machine_word::two_word_application,"sort_machine_word::two_word_manual_implementation");
3554 result[sort_machine_word::three_word()]=std::pair<std::function<void(data_expression&, const data_expression&)>, std::string>(sort_machine_word::three_word_application,"sort_machine_word::three_word_manual_implementation");
3555 result[sort_machine_word::four_word()]=std::pair<std::function<void(data_expression&, const data_expression&)>, std::string>(sort_machine_word::four_word_application,"sort_machine_word::four_word_manual_implementation");
3556 result[sort_machine_word::max_word()]=std::pair<std::function<void(data_expression&, const data_expression&)>, std::string>(sort_machine_word::max_word_application,"sort_machine_word::max_word_manual_implementation");
3557 result[sort_machine_word::equals_zero_word()]=std::pair<std::function<void(data_expression&, const data_expression&)>, std::string>(sort_machine_word::equals_zero_word_application,"sort_machine_word::equals_zero_word_manual_implementation");
3558 result[sort_machine_word::not_equals_zero_word()]=std::pair<std::function<void(data_expression&, const data_expression&)>, std::string>(sort_machine_word::not_equals_zero_word_application,"sort_machine_word::not_equals_zero_word_manual_implementation");
3559 result[sort_machine_word::equals_one_word()]=std::pair<std::function<void(data_expression&, const data_expression&)>, std::string>(sort_machine_word::equals_one_word_application,"sort_machine_word::equals_one_word_manual_implementation");
3560 result[sort_machine_word::equals_max_word()]=std::pair<std::function<void(data_expression&, const data_expression&)>, std::string>(sort_machine_word::equals_max_word_application,"sort_machine_word::equals_max_word_manual_implementation");
3561 result[sort_machine_word::add_word()]=std::pair<std::function<void(data_expression&, const data_expression&)>, std::string>(sort_machine_word::add_word_application,"sort_machine_word::add_word_manual_implementation");
3562 result[sort_machine_word::add_with_carry_word()]=std::pair<std::function<void(data_expression&, const data_expression&)>, std::string>(sort_machine_word::add_with_carry_word_application,"sort_machine_word::add_with_carry_word_manual_implementation");
3563 result[sort_machine_word::add_overflow_word()]=std::pair<std::function<void(data_expression&, const data_expression&)>, std::string>(sort_machine_word::add_overflow_word_application,"sort_machine_word::add_overflow_word_manual_implementation");
3564 result[sort_machine_word::add_with_carry_overflow_word()]=std::pair<std::function<void(data_expression&, const data_expression&)>, std::string>(sort_machine_word::add_with_carry_overflow_word_application,"sort_machine_word::add_with_carry_overflow_word_manual_implementation");
3565 result[sort_machine_word::times_word()]=std::pair<std::function<void(data_expression&, const data_expression&)>, std::string>(sort_machine_word::times_word_application,"sort_machine_word::times_word_manual_implementation");
3566 result[sort_machine_word::times_with_carry_word()]=std::pair<std::function<void(data_expression&, const data_expression&)>, std::string>(sort_machine_word::times_with_carry_word_application,"sort_machine_word::times_with_carry_word_manual_implementation");
3567 result[sort_machine_word::times_overflow_word()]=std::pair<std::function<void(data_expression&, const data_expression&)>, std::string>(sort_machine_word::times_overflow_word_application,"sort_machine_word::times_overflow_word_manual_implementation");
3568 result[sort_machine_word::times_with_carry_overflow_word()]=std::pair<std::function<void(data_expression&, const data_expression&)>, std::string>(sort_machine_word::times_with_carry_overflow_word_application,"sort_machine_word::times_with_carry_overflow_word_manual_implementation");
3569 result[sort_machine_word::minus_word()]=std::pair<std::function<void(data_expression&, const data_expression&)>, std::string>(sort_machine_word::minus_word_application,"sort_machine_word::minus_word_manual_implementation");
3570 result[sort_machine_word::monus_word()]=std::pair<std::function<void(data_expression&, const data_expression&)>, std::string>(sort_machine_word::monus_word_application,"sort_machine_word::monus_word_manual_implementation");
3571 result[sort_machine_word::div_word()]=std::pair<std::function<void(data_expression&, const data_expression&)>, std::string>(sort_machine_word::div_word_application,"sort_machine_word::div_word_manual_implementation");
3572 result[sort_machine_word::mod_word()]=std::pair<std::function<void(data_expression&, const data_expression&)>, std::string>(sort_machine_word::mod_word_application,"sort_machine_word::mod_word_manual_implementation");
3573 result[sort_machine_word::sqrt_word()]=std::pair<std::function<void(data_expression&, const data_expression&)>, std::string>(sort_machine_word::sqrt_word_application,"sort_machine_word::sqrt_word_manual_implementation");
3574 result[sort_machine_word::div_doubleword()]=std::pair<std::function<void(data_expression&, const data_expression&)>, std::string>(sort_machine_word::div_doubleword_application,"sort_machine_word::div_doubleword_manual_implementation");
3575 result[sort_machine_word::div_double_doubleword()]=std::pair<std::function<void(data_expression&, const data_expression&)>, std::string>(sort_machine_word::div_double_doubleword_application,"sort_machine_word::div_double_doubleword_manual_implementation");
3576 result[sort_machine_word::div_triple_doubleword()]=std::pair<std::function<void(data_expression&, const data_expression&)>, std::string>(sort_machine_word::div_triple_doubleword_application,"sort_machine_word::div_triple_doubleword_manual_implementation");
3577 result[sort_machine_word::mod_doubleword()]=std::pair<std::function<void(data_expression&, const data_expression&)>, std::string>(sort_machine_word::mod_doubleword_application,"sort_machine_word::mod_doubleword_manual_implementation");
3578 result[sort_machine_word::sqrt_doubleword()]=std::pair<std::function<void(data_expression&, const data_expression&)>, std::string>(sort_machine_word::sqrt_doubleword_application,"sort_machine_word::sqrt_doubleword_manual_implementation");
3579 result[sort_machine_word::sqrt_tripleword()]=std::pair<std::function<void(data_expression&, const data_expression&)>, std::string>(sort_machine_word::sqrt_tripleword_application,"sort_machine_word::sqrt_tripleword_manual_implementation");
3580 result[sort_machine_word::sqrt_tripleword_overflow()]=std::pair<std::function<void(data_expression&, const data_expression&)>, std::string>(sort_machine_word::sqrt_tripleword_overflow_application,"sort_machine_word::sqrt_tripleword_overflow_manual_implementation");
3581 result[sort_machine_word::sqrt_quadrupleword()]=std::pair<std::function<void(data_expression&, const data_expression&)>, std::string>(sort_machine_word::sqrt_quadrupleword_application,"sort_machine_word::sqrt_quadrupleword_manual_implementation");
3582 result[sort_machine_word::sqrt_quadrupleword_overflow()]=std::pair<std::function<void(data_expression&, const data_expression&)>, std::string>(sort_machine_word::sqrt_quadrupleword_overflow_application,"sort_machine_word::sqrt_quadrupleword_overflow_manual_implementation");
3583 result[sort_machine_word::pred_word()]=std::pair<std::function<void(data_expression&, const data_expression&)>, std::string>(sort_machine_word::pred_word_application,"sort_machine_word::pred_word_manual_implementation");
3584 result[sort_machine_word::equal_word()]=std::pair<std::function<void(data_expression&, const data_expression&)>, std::string>(sort_machine_word::equal_word_application,"sort_machine_word::equal_word_manual_implementation");
3585 result[sort_machine_word::not_equal_word()]=std::pair<std::function<void(data_expression&, const data_expression&)>, std::string>(sort_machine_word::not_equal_word_application,"sort_machine_word::not_equal_word_manual_implementation");
3586 result[sort_machine_word::less_word()]=std::pair<std::function<void(data_expression&, const data_expression&)>, std::string>(sort_machine_word::less_word_application,"sort_machine_word::less_word_manual_implementation");
3587 result[sort_machine_word::less_equal_word()]=std::pair<std::function<void(data_expression&, const data_expression&)>, std::string>(sort_machine_word::less_equal_word_application,"sort_machine_word::less_equal_word_manual_implementation");
3588 result[sort_machine_word::greater_word()]=std::pair<std::function<void(data_expression&, const data_expression&)>, std::string>(sort_machine_word::greater_word_application,"sort_machine_word::greater_word_manual_implementation");
3589 result[sort_machine_word::greater_equal_word()]=std::pair<std::function<void(data_expression&, const data_expression&)>, std::string>(sort_machine_word::greater_equal_word_application,"sort_machine_word::greater_equal_word_manual_implementation");
3590 result[sort_machine_word::rightmost_bit()]=std::pair<std::function<void(data_expression&, const data_expression&)>, std::string>(sort_machine_word::rightmost_bit_application,"sort_machine_word::rightmost_bit_manual_implementation");
3591 result[sort_machine_word::shift_right()]=std::pair<std::function<void(data_expression&, const data_expression&)>, std::string>(sort_machine_word::shift_right_application,"sort_machine_word::shift_right_manual_implementation");
3592 return result;
3593 }
3599 inline
3601 {
3603 return atermpp::down_cast<application>(e)[0];
3604 }
3605
3611 inline
3613 {
3615 return atermpp::down_cast<application>(e)[0];
3616 }
3617
3623 inline
3625 {
3627 return atermpp::down_cast<application>(e)[1];
3628 }
3629
3635 inline
3637 {
3639 return atermpp::down_cast<application>(e)[0];
3640 }
3641
3647 inline
3649 {
3651 return atermpp::down_cast<application>(e)[1];
3652 }
3653
3659 inline
3661 {
3663 return atermpp::down_cast<application>(e)[2];
3664 }
3665
3671 inline
3673 {
3675 return atermpp::down_cast<application>(e)[3];
3676 }
3677
3683 inline
3685 {
3687 return atermpp::down_cast<application>(e)[4];
3688 }
3689
3692 inline
3694 {
3695 variable vw1("w1",machine_word());
3696 variable vw2("w2",machine_word());
3697
3698 data_equation_vector result;
3699 result.push_back(data_equation(variable_list({vw1, vw2}), equal_to(vw1, vw2), equal_word(vw1, vw2)));
3700 result.push_back(data_equation(variable_list({vw1, vw2}), less(vw1, vw2), less_word(vw1, vw2)));
3701 result.push_back(data_equation(variable_list({vw1, vw2}), less_equal(vw1, vw2), less_equal_word(vw1, vw2)));
3702 return result;
3703 }
3704
3705 } // namespace sort_machine_word
3706
3707 } // namespace data
3708
3709} // namespace mcrl2
3710
3711#include "mcrl2/data/detail/machine_word.h" // This file contains the manual implementations of rewrite functions.
3712#endif // MCRL2_DATA_MACHINE_WORD_H
The class application.
The class basic_sort.
The standard sort bool_.
Term containing a string.
An application of a data expression to a number of arguments.
\brief A basic sort
Definition basic_sort.h:26
\brief A data equation
\brief A function symbol
\brief A sort expression
\brief A data variable
Definition variable.h:28
The class function symbol.
The class data_equation.
Exception classes for use in libraries and tools.
The class function_sort.
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.
Definition bool.h:44
void make_add_word(data_expression &result, const data_expression &arg0, const data_expression &arg1)
Make an application of function symbol @add_word.
void equals_max_word_application(data_expression &result, const data_expression &a1)
Application of a function that is user defined instead of by rewrite rules. It does not have sort par...
void max_word_application(data_expression &result, const data_expression &a)
Application of a function that is user defined instead of by rewrite rules. It does not have sort par...
void make_not_equals_zero_word(data_expression &result, const data_expression &arg0)
Make an application of function symbol @not_equals_zero_word.
bool is_equals_zero_word_function_symbol(const atermpp::aterm &e)
Recogniser for function @equals_zero_word.
void sqrt_quadrupleword_application(data_expression &result, const data_expression &a1)
Application of a function that is user defined instead of by rewrite rules. It does not have sort par...
bool is_zero_word_function_symbol(const atermpp::aterm &e)
Recogniser for function @zero_word.
const function_symbol & sqrt_word()
Constructor for function symbol @sqrt_word.
const core::identifier_string & equal_word_name()
Generate identifier @equal.
bool is_mod_doubleword_function_symbol(const atermpp::aterm &e)
Recogniser for function @mod_doubleword.
const core::identifier_string & sqrt_doubleword_name()
Generate identifier @sqrt_doubleword.
bool is_add_word_application(const atermpp::aterm &e)
Recogniser for application of @add_word.
void times_with_carry_overflow_word_manual_implementation(data_expression &result, const data_expression &e1, const data_expression &e2, const data_expression &e3)
The result of multiplying two words and adding a third divided by the maximal representable machine w...
void succ_word_application(data_expression &result, const data_expression &a1)
Application of a function that is user defined instead of by rewrite rules. It does not have sort par...
void sqrt_tripleword_manual_implementation(data_expression &result, const data_expression &e1, const data_expression &e2, const data_expression &e3)
Calculates the least significant word of the square root of base*(base*e1+e2)+e3.
bool is_equal_word_function_symbol(const atermpp::aterm &e)
Recogniser for function @equal.
void sqrt_tripleword_overflow_application(data_expression &result, const data_expression &a1)
Application of a function that is user defined instead of by rewrite rules. It does not have sort par...
implementation_map machine_word_cpp_implementable_mappings()
Give all system defined mappings that are to be implemented in C++ code for machine_word.
void pred_word_manual_implementation(data_expression &result, const data_expression &e)
The predecessor function on a machine numbers, that wraps around.
bool is_div_doubleword_application(const atermpp::aterm &e)
Recogniser for application of @div_doubleword.
void make_mod_doubleword(data_expression &result, const data_expression &arg0, const data_expression &arg1, const data_expression &arg2)
Make an application of function symbol @mod_doubleword.
bool is_div_word_function_symbol(const atermpp::aterm &e)
Recogniser for function @div_word.
void equals_one_word_application(data_expression &result, const data_expression &a1)
Application of a function that is user defined instead of by rewrite rules. It does not have sort par...
void add_word_manual_implementation(data_expression &result, const data_expression &e1, const data_expression &e2)
The result of adding two words modulo the maximal representable machine word plus 1.
void make_rightmost_bit(data_expression &result, const data_expression &arg0)
Make an application of function symbol @rightmost_bit.
void two_word_manual_implementation(data_expression &result)
The machine number representing 2.
bool is_not_equals_zero_word_function_symbol(const atermpp::aterm &e)
Recogniser for function @not_equals_zero_word.
void equals_zero_word_application(data_expression &result, const data_expression &a1)
Application of a function that is user defined instead of by rewrite rules. It does not have sort par...
bool is_equals_one_word_function_symbol(const atermpp::aterm &e)
Recogniser for function @equals_one_word.
bool is_equals_one_word_application(const atermpp::aterm &e)
Recogniser for application of @equals_one_word.
const function_symbol & add_word()
Constructor for function symbol @add_word.
const core::identifier_string & minus_word_name()
Generate identifier @minus_word.
void make_div_doubleword(data_expression &result, const data_expression &arg0, const data_expression &arg1, const data_expression &arg2)
Make an application of function symbol @div_doubleword.
void make_add_overflow_word(data_expression &result, const data_expression &arg0, const data_expression &arg1)
Make an application of function symbol @add_overflow_word.
const core::identifier_string & one_word_name()
Generate identifier @one_word.
const function_symbol & not_equal_word()
Constructor for function symbol @not_equal.
void shift_right_manual_implementation(data_expression &result, const data_expression &e1, const data_expression &e2)
The machine word shifted one position to the right.
function_symbol_vector machine_word_mCRL2_usable_mappings()
Give all system defined mappings that can be used in mCRL2 specs for machine_word.
const function_symbol & div_double_doubleword()
Constructor for function symbol @div_double_doubleword.
void make_succ_word(data_expression &result, const data_expression &arg0)
Make an application of function symbol @succ_word.
bool is_equal_word_application(const atermpp::aterm &e)
Recogniser for application of @equal.
const core::identifier_string & sqrt_quadrupleword_overflow_name()
Generate identifier @sqrt_quadrupleword_overflow.
const core::identifier_string & less_word_name()
Generate identifier @less.
bool is_max_word_function_symbol(const atermpp::aterm &e)
Recogniser for function @max_word.
bool is_succ_word_application(const atermpp::aterm &e)
Recogniser for application of @succ_word.
bool is_times_with_carry_word_function_symbol(const atermpp::aterm &e)
Recogniser for function @times_with_carry_word.
void mod_doubleword_application(data_expression &result, const data_expression &a1)
Application of a function that is user defined instead of by rewrite rules. It does not have sort par...
const core::identifier_string & rightmost_bit_name()
Generate identifier @rightmost_bit.
const core::identifier_string & div_word_name()
Generate identifier @div_word.
const core::identifier_string & sqrt_quadrupleword_name()
Generate identifier @sqrt_quadrupleword.
bool is_add_with_carry_overflow_word_function_symbol(const atermpp::aterm &e)
Recogniser for function @add_with_carry_overflow_word.
void times_word_manual_implementation(data_expression &result, const data_expression &e1, const data_expression &e2)
The result of multiplying two words modulo the maximal representable machine word plus 1.
bool is_sqrt_doubleword_function_symbol(const atermpp::aterm &e)
Recogniser for function @sqrt_doubleword.
void make_times_with_carry_overflow_word(data_expression &result, const data_expression &arg0, const data_expression &arg1, const data_expression &arg2)
Make an application of function symbol @times_with_carry_overflow_word.
bool is_greater_equal_word_function_symbol(const atermpp::aterm &e)
Recogniser for function @greater_equal.
void make_equals_zero_word(data_expression &result, const data_expression &arg0)
Make an application of function symbol @equals_zero_word.
bool is_four_word_function_symbol(const atermpp::aterm &e)
Recogniser for function @four_word.
bool is_not_equal_word_application(const atermpp::aterm &e)
Recogniser for application of @not_equal.
const function_symbol & div_word()
Constructor for function symbol @div_word.
void equals_zero_word_manual_implementation(data_expression &result, const data_expression &e)
Checks whether the argument is equal to 0.
void make_monus_word(data_expression &result, const data_expression &arg0, const data_expression &arg1)
Make an application of function symbol @monus_word.
bool is_sqrt_quadrupleword_overflow_function_symbol(const atermpp::aterm &e)
Recogniser for function @sqrt_quadrupleword_overflow.
bool is_mod_doubleword_application(const atermpp::aterm &e)
Recogniser for application of @mod_doubleword.
bool is_add_with_carry_overflow_word_application(const atermpp::aterm &e)
Recogniser for application of @add_with_carry_overflow_word.
void div_triple_doubleword_manual_implementation(data_expression &result, const data_expression &e1, const data_expression &e2, const data_expression &e3, const data_expression &e4, const data_expression &e5)
Calculates (base*(base*e1 + e2)+e3) div (base*e4 + e5).
const function_symbol & pred_word()
Constructor for function symbol @pred_word.
const core::identifier_string & zero_word_name()
Generate identifier @zero_word.
void not_equal_word_application(data_expression &result, const data_expression &a1)
Application of a function that is user defined instead of by rewrite rules. It does not have sort par...
bool is_greater_equal_word_application(const atermpp::aterm &e)
Recogniser for application of @greater_equal.
const function_symbol & equals_max_word()
Constructor for function symbol @equals_max_word.
const core::identifier_string & equals_max_word_name()
Generate identifier @equals_max_word.
const function_symbol & greater_word()
Constructor for function symbol @greater.
const core::identifier_string & equals_zero_word_name()
Generate identifier @equals_zero_word.
const core::identifier_string & greater_equal_word_name()
Generate identifier @greater_equal.
void times_overflow_word_application(data_expression &result, const data_expression &a1)
Application of a function that is user defined instead of by rewrite rules. It does not have sort par...
const core::identifier_string & add_word_name()
Generate identifier @add_word.
const function_symbol & equals_one_word()
Constructor for function symbol @equals_one_word.
function_symbol_vector machine_word_generate_functions_code()
Give all system defined mappings for machine_word.
void zero_word_manual_implementation(data_expression &result)
The machine number representing 0.
const function_symbol & mod_word()
Constructor for function symbol @mod_word.
const function_symbol & div_doubleword()
Constructor for function symbol @div_doubleword.
const function_symbol & succ_word()
Constructor for function symbol @succ_word.
const core::identifier_string & pred_word_name()
Generate identifier @pred_word.
bool is_shift_right_application(const atermpp::aterm &e)
Recogniser for application of @shift_right.
bool is_greater_word_function_symbol(const atermpp::aterm &e)
Recogniser for function @greater.
bool is_sqrt_doubleword_application(const atermpp::aterm &e)
Recogniser for application of @sqrt_doubleword.
const core::identifier_string & less_equal_word_name()
Generate identifier @less_equal.
bool is_times_overflow_word_function_symbol(const atermpp::aterm &e)
Recogniser for function @times_overflow_word.
void times_with_carry_word_manual_implementation(data_expression &result, const data_expression &e1, const data_expression &e2, const data_expression &e3)
The result of multiplying two words and adding the third modulo the maximal representable machine wor...
bool is_div_triple_doubleword_function_symbol(const atermpp::aterm &e)
Recogniser for function @div_triple_doubleword.
bool is_div_double_doubleword_application(const atermpp::aterm &e)
Recogniser for application of @div_double_doubleword.
const function_symbol & sqrt_quadrupleword_overflow()
Constructor for function symbol @sqrt_quadrupleword_overflow.
const function_symbol & less_word()
Constructor for function symbol @less.
bool is_less_word_application(const atermpp::aterm &e)
Recogniser for application of @less.
const core::identifier_string & monus_word_name()
Generate identifier @monus_word.
bool is_div_doubleword_function_symbol(const atermpp::aterm &e)
Recogniser for function @div_doubleword.
void make_less_word(data_expression &result, const data_expression &arg0, const data_expression &arg1)
Make an application of function symbol @less.
const basic_sort & machine_word()
Constructor for sort expression @word.
bool is_two_word_function_symbol(const atermpp::aterm &e)
Recogniser for function @two_word.
void make_sqrt_quadrupleword(data_expression &result, const data_expression &arg0, const data_expression &arg1, const data_expression &arg2, const data_expression &arg3)
Make an application of function symbol @sqrt_quadrupleword.
void three_word_manual_implementation(data_expression &result)
The machine number representing 3.
const core::identifier_string & sqrt_word_name()
Generate identifier @sqrt_word.
bool is_minus_word_function_symbol(const atermpp::aterm &e)
Recogniser for function @minus_word.
const function_symbol & add_with_carry_word()
Constructor for function symbol @add_with_carry_word.
void make_greater_equal_word(data_expression &result, const data_expression &arg0, const data_expression &arg1)
Make an application of function symbol @greater_equal.
void times_overflow_word_manual_implementation(data_expression &result, const data_expression &e1, const data_expression &e2)
The result of multiplying two words divided by the maximal representable machine word plus 1.
const function_symbol & four_word()
Constructor for function symbol @four_word.
void make_sqrt_quadrupleword_overflow(data_expression &result, const data_expression &arg0, const data_expression &arg1, const data_expression &arg2, const data_expression &arg3)
Make an application of function symbol @sqrt_quadrupleword_overflow.
void sqrt_quadrupleword_manual_implementation(data_expression &result, const data_expression &e1, const data_expression &e2, const data_expression &e3, const data_expression &e4)
Calculates the least significant word of the square root of base*(base*(base*e1+e2)+e3)+e4.
bool is_times_with_carry_overflow_word_function_symbol(const atermpp::aterm &e)
Recogniser for function @times_with_carry_overflow_word.
const function_symbol & monus_word()
Constructor for function symbol @monus_word.
void make_add_with_carry_word(data_expression &result, const data_expression &arg0, const data_expression &arg1)
Make an application of function symbol @add_with_carry_word.
bool is_sqrt_word_function_symbol(const atermpp::aterm &e)
Recogniser for function @sqrt_word.
bool is_succ_word_function_symbol(const atermpp::aterm &e)
Recogniser for function @succ_word.
void add_overflow_word_application(data_expression &result, const data_expression &a1)
Application of a function that is user defined instead of by rewrite rules. It does not have sort par...
const core::identifier_string & div_triple_doubleword_name()
Generate identifier @div_triple_doubleword.
void sqrt_tripleword_application(data_expression &result, const data_expression &a1)
Application of a function that is user defined instead of by rewrite rules. It does not have sort par...
void make_add_with_carry_overflow_word(data_expression &result, const data_expression &arg0, const data_expression &arg1)
Make an application of function symbol @add_with_carry_overflow_word.
function_symbol_vector machine_word_generate_constructors_code()
Give all system defined constructors for machine_word.
bool is_add_with_carry_word_application(const atermpp::aterm &e)
Recogniser for application of @add_with_carry_word.
void one_word_application(data_expression &result, const data_expression &a)
Application of a function that is user defined instead of by rewrite rules. It does not have sort par...
void mod_word_application(data_expression &result, const data_expression &a1)
Application of a function that is user defined instead of by rewrite rules. It does not have sort par...
void not_equal_word_manual_implementation(data_expression &result, const data_expression &e1, const data_expression &e2)
The non equality function on two machine words.
const core::identifier_string & three_word_name()
Generate identifier @three_word.
void equal_word_application(data_expression &result, const data_expression &a1)
Application of a function that is user defined instead of by rewrite rules. It does not have sort par...
const core::identifier_string & mod_word_name()
Generate identifier @mod_word.
const data_expression & arg3(const data_expression &e)
Function for projecting out argument. arg3 from an application.
const core::identifier_string & sqrt_tripleword_name()
Generate identifier @sqrt_tripleword.
void make_div_double_doubleword(data_expression &result, const data_expression &arg0, const data_expression &arg1, const data_expression &arg2, const data_expression &arg3)
Make an application of function symbol @div_double_doubleword.
void make_sqrt_tripleword_overflow(data_expression &result, const data_expression &arg0, const data_expression &arg1, const data_expression &arg2)
Make an application of function symbol @sqrt_tripleword_overflow.
void make_minus_word(data_expression &result, const data_expression &arg0, const data_expression &arg1)
Make an application of function symbol @minus_word.
const function_symbol & sqrt_tripleword_overflow()
Constructor for function symbol @sqrt_tripleword_overflow.
const core::identifier_string & mod_doubleword_name()
Generate identifier @mod_doubleword.
const function_symbol & sqrt_quadrupleword()
Constructor for function symbol @sqrt_quadrupleword.
void shift_right_application(data_expression &result, const data_expression &a1)
Application of a function that is user defined instead of by rewrite rules. It does not have sort par...
void div_triple_doubleword_application(data_expression &result, const data_expression &a1)
Application of a function that is user defined instead of by rewrite rules. It does not have sort par...
void less_equal_word_manual_implementation(data_expression &result, const data_expression &e1, const data_expression &e2)
The less than or equal function on two machine words.
const function_symbol & equals_zero_word()
Constructor for function symbol @equals_zero_word.
const function_symbol & minus_word()
Constructor for function symbol @minus_word.
void div_double_doubleword_application(data_expression &result, const data_expression &a1)
Application of a function that is user defined instead of by rewrite rules. It does not have sort par...
bool is_three_word_function_symbol(const atermpp::aterm &e)
Recogniser for function @three_word.
void monus_word_application(data_expression &result, const data_expression &a1)
Application of a function that is user defined instead of by rewrite rules. It does not have sort par...
const data_expression & arg1(const data_expression &e)
Function for projecting out argument. arg1 from an application.
bool is_sqrt_quadrupleword_application(const atermpp::aterm &e)
Recogniser for application of @sqrt_quadrupleword.
bool is_one_word_function_symbol(const atermpp::aterm &e)
Recogniser for function @one_word.
const data_expression & arg4(const data_expression &e)
Function for projecting out argument. arg4 from an application.
void three_word_application(data_expression &result, const data_expression &a)
Application of a function that is user defined instead of by rewrite rules. It does not have sort par...
const data_expression & arg5(const data_expression &e)
Function for projecting out argument. arg5 from an application.
bool is_sqrt_tripleword_overflow_function_symbol(const atermpp::aterm &e)
Recogniser for function @sqrt_tripleword_overflow.
const function_symbol & one_word()
Constructor for function symbol @one_word.
void make_times_word(data_expression &result, const data_expression &arg0, const data_expression &arg1)
Make an application of function symbol @times_word.
const core::identifier_string & greater_word_name()
Generate identifier @greater.
const core::identifier_string & two_word_name()
Generate identifier @two_word.
const function_symbol & max_word()
Constructor for function symbol @max_word.
bool is_monus_word_function_symbol(const atermpp::aterm &e)
Recogniser for function @monus_word.
const function_symbol & greater_equal_word()
Constructor for function symbol @greater_equal.
bool is_pred_word_function_symbol(const atermpp::aterm &e)
Recogniser for function @pred_word.
const function_symbol & add_with_carry_overflow_word()
Constructor for function symbol @add_with_carry_overflow_word.
const function_symbol & times_with_carry_word()
Constructor for function symbol @times_with_carry_word.
void sqrt_tripleword_overflow_manual_implementation(data_expression &result, const data_expression &e1, const data_expression &e2, const data_expression &e3)
Calculates the most significant word of the square root of base*(base*e1+e2)+e3.
bool is_add_word_function_symbol(const atermpp::aterm &e)
Recogniser for function @add_word.
void sqrt_word_application(data_expression &result, const data_expression &a1)
Application of a function that is user defined instead of by rewrite rules. It does not have sort par...
const core::identifier_string & times_word_name()
Generate identifier @times_word.
void make_shift_right(data_expression &result, const data_expression &arg0, const data_expression &arg1)
Make an application of function symbol @shift_right.
void add_with_carry_overflow_word_application(data_expression &result, const data_expression &a1)
Application of a function that is user defined instead of by rewrite rules. It does not have sort par...
void make_div_word(data_expression &result, const data_expression &arg0, const data_expression &arg1)
Make an application of function symbol @div_word.
bool is_monus_word_application(const atermpp::aterm &e)
Recogniser for application of @monus_word.
void make_greater_word(data_expression &result, const data_expression &arg0, const data_expression &arg1)
Make an application of function symbol @greater.
void sqrt_doubleword_manual_implementation(data_expression &result, const data_expression &e1, const data_expression &e2)
The square root of base*e1+e2 rounded down.
const core::identifier_string & times_overflow_word_name()
Generate identifier @times_overflow_word.
void not_equals_zero_word_application(data_expression &result, const data_expression &a1)
Application of a function that is user defined instead of by rewrite rules. It does not have sort par...
bool is_shift_right_function_symbol(const atermpp::aterm &e)
Recogniser for function @shift_right.
void make_equals_one_word(data_expression &result, const data_expression &arg0)
Make an application of function symbol @equals_one_word.
void make_less_equal_word(data_expression &result, const data_expression &arg0, const data_expression &arg1)
Make an application of function symbol @less_equal.
void four_word_application(data_expression &result, const data_expression &a)
Application of a function that is user defined instead of by rewrite rules. It does not have sort par...
const function_symbol & three_word()
Constructor for function symbol @three_word.
void greater_equal_word_manual_implementation(data_expression &result, const data_expression &e1, const data_expression &e2)
The greater than or equal function on two machine words.
bool is_less_equal_word_application(const atermpp::aterm &e)
Recogniser for application of @less_equal.
void greater_word_application(data_expression &result, const data_expression &a1)
Application of a function that is user defined instead of by rewrite rules. It does not have sort par...
const function_symbol & times_with_carry_overflow_word()
Constructor for function symbol @times_with_carry_overflow_word.
void less_word_application(data_expression &result, const data_expression &a1)
Application of a function that is user defined instead of by rewrite rules. It does not have sort par...
void make_sqrt_word(data_expression &result, const data_expression &arg0)
Make an application of function symbol @sqrt_word.
const data_expression & right(const data_expression &e)
Function for projecting out argument. right from an application.
bool is_div_word_application(const atermpp::aterm &e)
Recogniser for application of @div_word.
const core::identifier_string & add_with_carry_overflow_word_name()
Generate identifier @add_with_carry_overflow_word.
void div_double_doubleword_manual_implementation(data_expression &result, const data_expression &e1, const data_expression &e2, const data_expression &e3, const data_expression &e4)
Calculates (base*e1 + e2) div (base*e3 + e4).
const function_symbol & div_triple_doubleword()
Constructor for function symbol @div_triple_doubleword.
bool is_not_equal_word_function_symbol(const atermpp::aterm &e)
Recogniser for function @not_equal.
void make_div_triple_doubleword(data_expression &result, const data_expression &arg0, const data_expression &arg1, const data_expression &arg2, const data_expression &arg3, const data_expression &arg4)
Make an application of function symbol @div_triple_doubleword.
void equals_one_word_manual_implementation(data_expression &result, const data_expression &e)
Checks whether the argument is equal to 1.
bool is_sqrt_quadrupleword_function_symbol(const atermpp::aterm &e)
Recogniser for function @sqrt_quadrupleword.
void make_times_overflow_word(data_expression &result, const data_expression &arg0, const data_expression &arg1)
Make an application of function symbol @times_overflow_word.
const function_symbol & times_overflow_word()
Constructor for function symbol @times_overflow_word.
bool is_times_with_carry_overflow_word_application(const atermpp::aterm &e)
Recogniser for application of @times_with_carry_overflow_word.
void sqrt_quadrupleword_overflow_application(data_expression &result, const data_expression &a1)
Application of a function that is user defined instead of by rewrite rules. It does not have sort par...
void times_with_carry_overflow_word_application(data_expression &result, const data_expression &a1)
Application of a function that is user defined instead of by rewrite rules. It does not have sort par...
void div_doubleword_manual_implementation(data_expression &result, const data_expression &e1, const data_expression &e2, const data_expression &e3)
Calculates (base*e1 + e2) div e3.
void mod_word_manual_implementation(data_expression &result, const data_expression &e1, const data_expression &e2)
Calculates e1 modulo e2.
const core::identifier_string & times_with_carry_word_name()
Generate identifier @times_with_carry_word.
const function_symbol & zero_word()
Constructor for function symbol @zero_word.
void greater_equal_word_application(data_expression &result, const data_expression &a1)
Application of a function that is user defined instead of by rewrite rules. It does not have sort par...
void sqrt_quadrupleword_overflow_manual_implementation(data_expression &result, const data_expression &e1, const data_expression &e2, const data_expression &e3, const data_expression &e4)
Calculates the most significant word of the square root of base*(base*(base*e1+e2)+e3)+e4.
void rightmost_bit_application(data_expression &result, const data_expression &a1)
Application of a function that is user defined instead of by rewrite rules. It does not have sort par...
const core::identifier_string & succ_word_name()
Generate identifier @succ_word.
void times_with_carry_word_application(data_expression &result, const data_expression &a1)
Application of a function that is user defined instead of by rewrite rules. It does not have sort par...
bool is_less_equal_word_function_symbol(const atermpp::aterm &e)
Recogniser for function @less_equal.
bool is_times_overflow_word_application(const atermpp::aterm &e)
Recogniser for application of @times_overflow_word.
bool is_sqrt_tripleword_function_symbol(const atermpp::aterm &e)
Recogniser for function @sqrt_tripleword.
void not_equals_zero_word_manual_implementation(data_expression &result, const data_expression &e)
Checks whether the argument is not equal to 0.
void less_word_manual_implementation(data_expression &result, const data_expression &e1, const data_expression &e2)
The less than function on two machine words.
const core::identifier_string & not_equals_zero_word_name()
Generate identifier @not_equals_zero_word.
const core::identifier_string & add_with_carry_word_name()
Generate identifier @add_with_carry_word.
void minus_word_application(data_expression &result, const data_expression &a1)
Application of a function that is user defined instead of by rewrite rules. It does not have sort par...
bool is_times_word_application(const atermpp::aterm &e)
Recogniser for application of @times_word.
bool is_not_equals_zero_word_application(const atermpp::aterm &e)
Recogniser for application of @not_equals_zero_word.
void make_pred_word(data_expression &result, const data_expression &arg0)
Make an application of function symbol @pred_word.
const core::identifier_string & add_overflow_word_name()
Generate identifier @add_overflow_word.
void make_equal_word(data_expression &result, const data_expression &arg0, const data_expression &arg1)
Make an application of function symbol @equal.
bool is_add_overflow_word_function_symbol(const atermpp::aterm &e)
Recogniser for function @add_overflow_word.
bool is_rightmost_bit_application(const atermpp::aterm &e)
Recogniser for application of @rightmost_bit.
bool is_sqrt_quadrupleword_overflow_application(const atermpp::aterm &e)
Recogniser for application of @sqrt_quadrupleword_overflow.
const core::identifier_string & div_doubleword_name()
Generate identifier @div_doubleword.
bool is_add_with_carry_word_function_symbol(const atermpp::aterm &e)
Recogniser for function @add_with_carry_word.
void max_word_manual_implementation(data_expression &result)
The largest representable machine number.
bool is_less_word_function_symbol(const atermpp::aterm &e)
Recogniser for function @less.
const function_symbol & not_equals_zero_word()
Constructor for function symbol @not_equals_zero_word.
const function_symbol & equal_word()
Constructor for function symbol @equal.
bool is_machine_word(const sort_expression &e)
Recogniser for sort expression @word.
const core::identifier_string & not_equal_word_name()
Generate identifier @not_equal.
const function_symbol & mod_doubleword()
Constructor for function symbol @mod_doubleword.
void add_with_carry_word_manual_implementation(data_expression &result, const data_expression &e1, const data_expression &e2)
The result of adding two words plus 1 modulo the maximal representable machine word plus 1.
const function_symbol & sqrt_tripleword()
Constructor for function symbol @sqrt_tripleword.
void make_times_with_carry_word(data_expression &result, const data_expression &arg0, const data_expression &arg1, const data_expression &arg2)
Make an application of function symbol @times_with_carry_word.
std::map< function_symbol, std::pair< std::function< void(data_expression &, const data_expression &)>, std::string > > implementation_map
bool is_times_word_function_symbol(const atermpp::aterm &e)
Recogniser for function @times_word.
void times_word_application(data_expression &result, const data_expression &a1)
Application of a function that is user defined instead of by rewrite rules. It does not have sort par...
const function_symbol & rightmost_bit()
Constructor for function symbol @rightmost_bit.
void sqrt_doubleword_application(data_expression &result, const data_expression &a1)
Application of a function that is user defined instead of by rewrite rules. It does not have sort par...
const core::identifier_string & sqrt_tripleword_overflow_name()
Generate identifier @sqrt_tripleword_overflow.
bool is_pred_word_application(const atermpp::aterm &e)
Recogniser for application of @pred_word.
void one_word_manual_implementation(data_expression &result)
The machine number representing 1.
void make_sqrt_tripleword(data_expression &result, const data_expression &arg0, const data_expression &arg1, const data_expression &arg2)
Make an application of function symbol @sqrt_tripleword.
const data_expression & arg(const data_expression &e)
Function for projecting out argument. arg from an application.
const data_expression & left(const data_expression &e)
Function for projecting out argument. left from an application.
const function_symbol & less_equal_word()
Constructor for function symbol @less_equal.
void div_doubleword_application(data_expression &result, const data_expression &a1)
Application of a function that is user defined instead of by rewrite rules. It does not have sort par...
void equal_word_manual_implementation(data_expression &result, const data_expression &e1, const data_expression &e2)
The equality function on two machine words.
bool is_equals_max_word_application(const atermpp::aterm &e)
Recogniser for application of @equals_max_word.
bool is_greater_word_application(const atermpp::aterm &e)
Recogniser for application of @greater.
bool is_sqrt_word_application(const atermpp::aterm &e)
Recogniser for application of @sqrt_word.
void four_word_manual_implementation(data_expression &result)
The machine number representing 4.
bool is_sqrt_tripleword_application(const atermpp::aterm &e)
Recogniser for application of @sqrt_tripleword.
bool is_equals_max_word_function_symbol(const atermpp::aterm &e)
Recogniser for function @equals_max_word.
void minus_word_manual_implementation(data_expression &result, const data_expression &e1, const data_expression &e2)
The result of subtracting two words modulo the maximal representable machine word plus 1.
void succ_word_manual_implementation(data_expression &result, const data_expression &e)
The successor function on a machine numbers, that wraps around.
implementation_map machine_word_cpp_implementable_constructors()
Give all system defined constructors which have an implementation in C++ and not in rewrite rules for...
void equals_max_word_manual_implementation(data_expression &result, const data_expression &e)
Checks whether the argument is equal to the largest 64 bit number.
void mod_doubleword_manual_implementation(data_expression &result, const data_expression &e1, const data_expression &e2, const data_expression &e3)
Calculates (base*e1 + e2) mod e3. The result fits in one word.
bool is_add_overflow_word_application(const atermpp::aterm &e)
Recogniser for application of @add_overflow_word.
void add_with_carry_overflow_word_manual_implementation(data_expression &result, const data_expression &e1, const data_expression &e2)
An indication whether an overflow occurs when e1 and e2 are added.
void pred_word_application(data_expression &result, const data_expression &a1)
Application of a function that is user defined instead of by rewrite rules. It does not have sort par...
void add_overflow_word_manual_implementation(data_expression &result, const data_expression &e1, const data_expression &e2)
An indication whether an overflow occurs when e1 and e2 are added.
data_equation_vector machine_word_generate_equations_code()
Give all system defined equations for machine_word.
const core::identifier_string & machine_word_name()
const core::identifier_string & four_word_name()
Generate identifier @four_word.
void sqrt_word_manual_implementation(data_expression &result, const data_expression &e)
The square root of e, rounded down to a machine word.
void div_word_application(data_expression &result, const data_expression &a1)
Application of a function that is user defined instead of by rewrite rules. It does not have sort par...
const function_symbol & times_word()
Constructor for function symbol @times_word.
void zero_word_application(data_expression &result, const data_expression &a)
Application of a function that is user defined instead of by rewrite rules. It does not have sort par...
bool is_equals_zero_word_application(const atermpp::aterm &e)
Recogniser for application of @equals_zero_word.
void add_with_carry_word_application(data_expression &result, const data_expression &a1)
Application of a function that is user defined instead of by rewrite rules. It does not have sort par...
const core::identifier_string & shift_right_name()
Generate identifier @shift_right.
const core::identifier_string & div_double_doubleword_name()
Generate identifier @div_double_doubleword.
const core::identifier_string & max_word_name()
Generate identifier @max_word.
const core::identifier_string & equals_one_word_name()
Generate identifier @equals_one_word.
bool is_minus_word_application(const atermpp::aterm &e)
Recogniser for application of @minus_word.
function_symbol_vector machine_word_generate_constructors_and_functions_code()
Give all system defined mappings and constructors for machine_word.
bool is_div_double_doubleword_function_symbol(const atermpp::aterm &e)
Recogniser for function @div_double_doubleword.
function_symbol_vector machine_word_mCRL2_usable_constructors()
Give all defined constructors which can be used in mCRL2 specs for machine_word.
bool is_rightmost_bit_function_symbol(const atermpp::aterm &e)
Recogniser for function @rightmost_bit.
void rightmost_bit_manual_implementation(data_expression &result, const data_expression &e)
The right most bit of a machine number.
void two_word_application(data_expression &result, const data_expression &a)
Application of a function that is user defined instead of by rewrite rules. It does not have sort par...
void greater_word_manual_implementation(data_expression &result, const data_expression &e1, const data_expression &e2)
The greater than function on two machine words.
bool is_mod_word_application(const atermpp::aterm &e)
Recogniser for application of @mod_word.
bool is_sqrt_tripleword_overflow_application(const atermpp::aterm &e)
Recogniser for application of @sqrt_tripleword_overflow.
void make_sqrt_doubleword(data_expression &result, const data_expression &arg0, const data_expression &arg1)
Make an application of function symbol @sqrt_doubleword.
const data_expression & arg2(const data_expression &e)
Function for projecting out argument. arg2 from an application.
const function_symbol & sqrt_doubleword()
Constructor for function symbol @sqrt_doubleword.
const core::identifier_string & times_with_carry_overflow_word_name()
Generate identifier @times_with_carry_overflow_word.
void div_word_manual_implementation(data_expression &result, const data_expression &e1, const data_expression &e2)
Calculates the division of the first word by the second.
void make_equals_max_word(data_expression &result, const data_expression &arg0)
Make an application of function symbol @equals_max_word.
bool is_times_with_carry_word_application(const atermpp::aterm &e)
Recogniser for application of @times_with_carry_word.
void make_mod_word(data_expression &result, const data_expression &arg0, const data_expression &arg1)
Make an application of function symbol @mod_word.
void less_equal_word_application(data_expression &result, const data_expression &a1)
Application of a function that is user defined instead of by rewrite rules. It does not have sort par...
bool is_mod_word_function_symbol(const atermpp::aterm &e)
Recogniser for function @mod_word.
void add_word_application(data_expression &result, const data_expression &a1)
Application of a function that is user defined instead of by rewrite rules. It does not have sort par...
bool is_div_triple_doubleword_application(const atermpp::aterm &e)
Recogniser for application of @div_triple_doubleword.
const function_symbol & shift_right()
Constructor for function symbol @shift_right.
const function_symbol & two_word()
Constructor for function symbol @two_word.
void monus_word_manual_implementation(data_expression &result, const data_expression &e1, const data_expression &e2)
The result of subtracting two words. If the result is negative 0 is returned.
const function_symbol & add_overflow_word()
Constructor for function symbol @add_overflow_word.
void make_not_equal_word(data_expression &result, const data_expression &arg0, const data_expression &arg1)
Make an application of function symbol @not_equal.
function_symbol less_equal(const sort_expression &s)
Constructor for function symbol <=.
Definition standard.h:277
function_symbol less(const sort_expression &s)
Constructor for function symbol <.
Definition standard.h:240
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_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 ==.
Definition standard.h:126
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
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...
Definition indexed_set.h:72
Standard functions that are available for all sorts.