-
Notifications
You must be signed in to change notification settings - Fork 24
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
Use two rules for 'select' to avoid if-then-else on valstack #655
Conversation
Use two rules will likely result in state splitting, which will probably make performance worse. What might improve things is to make a specific That, or just marking the rule as preserving definedness? Either way, then we need to axiomatize it, with axioms like:
For example. |
The split happens either way, but it is correct that the shape of the graph changes (we move the split). I tried to float the
Happy to try the approach of replacing FWIW my tests of this change in |
Using mx-backend from PR runtimeverification/kasmer-multiversx#158 together with this change, the following fall-backs were observed in the suite of proofs (excluding
Most of these fallbacks are now due to |
I'm still really skeptical of this change. If we have a |
How does this affect overall performance on some real-world proofs? Not just fallback number, but overall time consumed? |
The best comparison measurements I have are from recent Burak's PRs (merged last week), the master measurements included here are older.
Short proofs did not speed utp significantly, the biggest improvement is in the |
Go ahead and merge then! |
The rule for
select
was previously pushing (potentially unevaluated)#if..#then..#else
expressions on thevalstack
which may later cause fall-backs due to indeterminate matching of operations with the arguments (operations would typically expect a fixed number type, which is hidden under the#if
).This change splits the logic for
#select
into two rules , forcing the rewrite to decide which branch to take (or whether to explore both) already when executing the#select
.Requires the linked companion PR in
mx-backend
to avoid a spurious second branch (adding some simplifications inint-encoding
).