mCRL2
mCRL2 copied to clipboard
Implement Nat by machine represented integers
Copied description from the old pull request. This branch replaces the rewrite systems for positive and natural numbers based on a binary number representation (using the constructor @cdub) by a representation based on 64 bit machine numbers.
The major changes are:
- Made aterm_appl the base aterm, and made everything else inherit from this.
- The addition of a "machine_number" to data_expressions.
- The addition of the the keywords "defined_by_rewrite_rules" to indicate that a mapping or constructor is defined by explicit C++ code.
- An adaption of the jitty and jittyc rewrite systems to recognise that a function symbol is implemented by explicit code.
- Addition of a file machine_word.spec defining operations on machine numbers.
- A replacement of the files pos.spec and nat.spec by a new version that employs machine numbers.
- A new test to test that large numbers (with up to a hundred decimal digits) are correctly calculated.
From the perspective of mCRL2 users the changes should be completely transparent, except that the performance is changing, sometimes appr. 10% slower (esp. the jitty rewriter), sometimes many hundreds of times faster (jittyc rewriter, for instance calculating 100000!).
TODO:
- [ ] Remove the aterm_core (which is the old aterm) that was used in the conversion process.