HOTFIXES not stuck on uneval.d functions, replacement from path condition#4117
Merged
jberthold merged 4 commits intoJul 16, 2025
Merged
Conversation
… not fail rewrite)
…-sort-difference-with-functions
Collaborator
Author
|
KEVM and |
Member
|
Some quick questions (for the record):
|
Collaborator
Author
Correct, this issue is not addressed, and will be part of a follow-up PR to index more things and use a better algebra. I had draft code to implement better indexing but there was a bug in it and it aborts too often so I wanted to merge the improvements first.
We retain all path conditions, we just use some of them to make the term simpler and more concrete. |
tothtamas28
approved these changes
Jul 16, 2025
jberthold
added a commit
that referenced
this pull request
Jan 29, 2026
) Improves #4117 and removes temporary workaround #4133 The injection matcher was biased towards variable matching before, and returned a `Fail` prematurely if this failed. The new preference is to check for unevaluated functions that return a supersort first (to return indeterminate), before trying to match a rule variable with supersort. If the source sorts are unrelated, the match can immediately fail.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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
Stuckwhich then falls back to legacykore-rpcwhere progress can be made.It is still possible for booster to return
Stuckwhen 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 ofexpressionby the obviously simplerdomain-value(expressionshould obviously not be another, different, domain value so it must be a function call or a more complex expression).This holds likewise for
==Booland for other domain equality operations,==Intand==Boolreplacements are implemented. The replacement happens after LLVM evaluation but before any other hook or (function or simplification) equation application.