Commit 76c8c62
authored
Improve standard simplify rule matches in non-commutative contexts (#2841)
* Improve standard simplify rule matches in non-commutative contexts
Addresses the rule application limitation aspect as highlighted in
issue #2825; such that a broader set of successful standard replacement
rules are applied to multi-arg/associative expressions in
non-commutative contexts.
* Remove 'clone()' operations on expanded simplify rules
since original rule nodes (including expanded variations) are essentially
readonly objects, cloning of expanded rule LHS' is unnecessary during
canonicalization
* Hoist non-commutative context expanded rule app. in simplify (applyRule)
* Add two simplify non-commutative ctx. test cases1 parent f99020e commit 76c8c62
File tree
2 files changed
+53
-3
lines changed- src/function/algebra
- test/unit-tests/function/algebra
2 files changed
+53
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
447 | 447 | | |
448 | 448 | | |
449 | 449 | | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
450 | 455 | | |
451 | 456 | | |
452 | 457 | | |
453 | | - | |
| 458 | + | |
454 | 459 | | |
455 | 460 | | |
456 | 461 | | |
457 | 462 | | |
458 | 463 | | |
| 464 | + | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
| 473 | + | |
| 474 | + | |
| 475 | + | |
| 476 | + | |
| 477 | + | |
459 | 478 | | |
460 | 479 | | |
461 | 480 | | |
| |||
657 | 676 | | |
658 | 677 | | |
659 | 678 | | |
| 679 | + | |
| 680 | + | |
| 681 | + | |
| 682 | + | |
| 683 | + | |
| 684 | + | |
| 685 | + | |
| 686 | + | |
| 687 | + | |
660 | 688 | | |
661 | 689 | | |
662 | 690 | | |
| |||
880 | 908 | | |
881 | 909 | | |
882 | 910 | | |
883 | | - | |
884 | | - | |
| 911 | + | |
| 912 | + | |
885 | 913 | | |
886 | 914 | | |
887 | 915 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
440 | 440 | | |
441 | 441 | | |
442 | 442 | | |
| 443 | + | |
| 444 | + | |
443 | 445 | | |
444 | 446 | | |
445 | 447 | | |
446 | 448 | | |
447 | 449 | | |
448 | 450 | | |
449 | 451 | | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
| 460 | + | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
450 | 472 | | |
451 | 473 | | |
452 | 474 | | |
| |||
0 commit comments