Reimplement conversion modulo AC#1211
Conversation
|
@NotBad4U Could you please try this PR on some other examples for linear arithmetic ? |
|
Be careful that I changed the ordering: arguments are now compared from left to right. So, you need to permute the arguments of var. |
|
I experimented the new |
|
@fblanqui I tried the new AC on my benchmarks and it is swift. I can do a computation with 500 variables, and it is faster than my current solution that compute the normal form without AC and reduces a term with a context varmap for none-interpreted term. In my current solution, the normalisation is fast but the calculation is very slow on large expression. However, I have a strange behavior that I can even replicate in my gist. If I However, if compose Then I got the result I updated the gist and the calculation is L127 if you want to reproduce on your side. Maybe we can add this |
|
It also does not work with my proof by reflexivity on reordering the pivot. |
|
@NotBad4U https://gist.github.com/NotBad4U/1638cd3787b8e5284c7030ca8a8534ec now works with the last commits. Could you please provide me with a complete file to test the example with Clause too? |
|
Thanks a lot for your work! I will give you an example as soon as possible! |
This PR reimplements conversion modulo AC without enforcing terms to be in AC-canonical form.
This is much more efficient but may not work with any rewrite system.
It seems to work well with:
This fixes the issue The modifier associative commutative can be slow with large terms #1200.
Main changes in term.ml and eval.ml:
(it reduces checking time of holide by 7%)
Other changes:
TODO: