Commit fbee2cb
authored
HOTFIXES not stuck on uneval.d functions, replacement from path condition (#4117)
## Indeterminate result for function calls under injections
When the rewrite subject contains a function call under an injection,
the function's return sort may be more general than the sort expected by
a rewrite rule that is being tried. This shows up as a failing match
between two injections in rule LHS and subject. Previous code was
declaring this a match failure for the rule but didn't abort the
rewrite. The correct behaviour is to abort the rewrite (or to unify,
which booster doesn't).
Fixes a problem where booster would return `Stuck` which then falls back
to legacy `kore-rpc` where progress can be made.
It is still possible for booster to return `Stuck` when trying to match
a function call (because of rule indexing which limits the amount of
rules that could possibly apply. An expression with an unevaluated
function call will never be rewritten by booster, but a modification of
the indexing mechanism and rule selection is left for future work.
## Added replacement from path conditions into term evaluation
When the path condition contains equations of the form `domain-value
==Int expression`, this information should be used to replace any
syntactic occurrences of `expression` by the obviously simpler
`domain-value` (`expression` should obviously not be another, different,
domain value so it must be a function call or a more complex
expression).
This holds likewise for `==Bool` and for other domain equality
operations, `==Int` and `==Bool` replacements are implemented. The
replacement happens after LLVM evaluation but before any other hook or
(function or simplification) equation application.1 parent 9b319f1 commit fbee2cb
File tree
3 files changed
+74
-101
lines changed- booster
- library/Booster/Pattern
- test/rpc-integration/test-implies-issue-3941
3 files changed
+74
-101
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
47 | | - | |
| 47 | + | |
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
| |||
161 | 161 | | |
162 | 162 | | |
163 | 163 | | |
164 | | - | |
| 164 | + | |
165 | 165 | | |
166 | 166 | | |
167 | 167 | | |
168 | 168 | | |
169 | | - | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
170 | 173 | | |
171 | 174 | | |
172 | | - | |
| 175 | + | |
173 | 176 | | |
174 | | - | |
| 177 | + | |
175 | 178 | | |
176 | 179 | | |
177 | 180 | | |
| |||
192 | 195 | | |
193 | 196 | | |
194 | 197 | | |
195 | | - | |
| 198 | + | |
| 199 | + | |
196 | 200 | | |
197 | 201 | | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
198 | 219 | | |
199 | 220 | | |
200 | 221 | | |
| |||
237 | 258 | | |
238 | 259 | | |
239 | 260 | | |
| 261 | + | |
240 | 262 | | |
241 | 263 | | |
242 | 264 | | |
| |||
261 | 283 | | |
262 | 284 | | |
263 | 285 | | |
| 286 | + | |
264 | 287 | | |
265 | 288 | | |
266 | 289 | | |
| |||
377 | 400 | | |
378 | 401 | | |
379 | 402 | | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
380 | 407 | | |
381 | 408 | | |
382 | 409 | | |
383 | | - | |
| 410 | + | |
384 | 411 | | |
385 | 412 | | |
386 | 413 | | |
| |||
913 | 940 | | |
914 | 941 | | |
915 | 942 | | |
916 | | - | |
917 | | - | |
| 943 | + | |
918 | 944 | | |
919 | 945 | | |
920 | 946 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
350 | 350 | | |
351 | 351 | | |
352 | 352 | | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
353 | 364 | | |
354 | 365 | | |
355 | 366 | | |
| |||
Lines changed: 28 additions & 92 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
463 | 463 | | |
464 | 464 | | |
465 | 465 | | |
466 | | - | |
467 | | - | |
468 | | - | |
469 | | - | |
470 | | - | |
471 | | - | |
472 | | - | |
473 | | - | |
474 | | - | |
475 | | - | |
476 | | - | |
477 | | - | |
478 | | - | |
479 | | - | |
480 | | - | |
481 | | - | |
482 | | - | |
483 | | - | |
484 | | - | |
485 | | - | |
486 | | - | |
487 | | - | |
488 | | - | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
489 | 473 | | |
490 | 474 | | |
491 | 475 | | |
| |||
674 | 658 | | |
675 | 659 | | |
676 | 660 | | |
677 | | - | |
678 | | - | |
679 | | - | |
680 | | - | |
681 | | - | |
682 | | - | |
683 | | - | |
684 | | - | |
685 | | - | |
686 | | - | |
687 | | - | |
688 | | - | |
689 | | - | |
690 | | - | |
691 | | - | |
692 | | - | |
693 | | - | |
694 | | - | |
695 | | - | |
696 | | - | |
697 | | - | |
698 | | - | |
699 | | - | |
| 661 | + | |
| 662 | + | |
| 663 | + | |
| 664 | + | |
| 665 | + | |
| 666 | + | |
| 667 | + | |
700 | 668 | | |
701 | 669 | | |
702 | 670 | | |
| |||
3517 | 3485 | | |
3518 | 3486 | | |
3519 | 3487 | | |
3520 | | - | |
3521 | | - | |
3522 | | - | |
3523 | | - | |
3524 | | - | |
3525 | | - | |
3526 | | - | |
3527 | | - | |
3528 | | - | |
3529 | | - | |
3530 | | - | |
3531 | | - | |
3532 | | - | |
3533 | | - | |
3534 | | - | |
3535 | | - | |
3536 | | - | |
3537 | | - | |
3538 | | - | |
3539 | | - | |
3540 | | - | |
3541 | | - | |
3542 | | - | |
| 3488 | + | |
| 3489 | + | |
| 3490 | + | |
| 3491 | + | |
| 3492 | + | |
| 3493 | + | |
| 3494 | + | |
3543 | 3495 | | |
3544 | 3496 | | |
3545 | 3497 | | |
| |||
3733 | 3685 | | |
3734 | 3686 | | |
3735 | 3687 | | |
3736 | | - | |
3737 | | - | |
3738 | | - | |
3739 | | - | |
3740 | | - | |
3741 | | - | |
3742 | | - | |
3743 | | - | |
3744 | | - | |
3745 | | - | |
3746 | | - | |
3747 | | - | |
3748 | | - | |
3749 | | - | |
3750 | | - | |
3751 | | - | |
3752 | | - | |
3753 | | - | |
3754 | | - | |
3755 | | - | |
3756 | | - | |
3757 | | - | |
3758 | | - | |
| 3688 | + | |
| 3689 | + | |
| 3690 | + | |
| 3691 | + | |
| 3692 | + | |
| 3693 | + | |
| 3694 | + | |
3759 | 3695 | | |
3760 | 3696 | | |
3761 | 3697 | | |
| |||
0 commit comments