HOTFIXES not stuck on uneval.d functions, replacement from path condition #4117
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 legacykore-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 ofexpression
by the obviously simplerdomain-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.