-
Notifications
You must be signed in to change notification settings - Fork 122
[WIP] Commutative operations and negative exponent match in rules #752
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
[WIP] Commutative operations and negative exponent match in rules #752
Conversation
Benchmark Results
Benchmark PlotsA plot of the benchmark results have been uploaded as an artifact to the workflow run for this PR. |
7a0f514
to
562cb99
Compare
f5fddf2
to
860aa70
Compare
In this last commit, f0a9bcd i modified the code of pow_term_matcher, that has the job to match a power. previously was: do the normal pow matcher, if no result check if the data has the form (1/...)^..., if no result check if the data has the form 1/(...^...) now is: check if the data has the form (1/...)^...,, if no result do the normal pow matcher, if no result check if the data has the form 1/(...^...) The reason is that there were some problems with deflsot. A pattern like (( In terms of performace, on every power in the lhs of rule, it has to do an additional three checks |
To sum up, this pr includes:
|
… expressions like (1/...)^(...)
fe18cf5
to
9bcabec
Compare
this pr builds on top of defslot and extends negative exponent matching. Before this pr julia symbolic rewriting rules had this unfortunate behaviour:
there was the acrule macro that helped, but was working only on the first operation of the expression, not every level. with this pr instead every * and + operation creates a matcher that checks all possible orderings of its arguments.
This can also be a bad thing becuse the cases to check could be too many...
Also I refacored the code from my last two pr to make everything clearer and cleaner