-
Notifications
You must be signed in to change notification settings - Fork 150
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
Allow merging branches back after a split #1931
Comments
@ehildenb suggested @nwatson22, @palinatolmach or @iFrostizz for this |
Here is an anti-unification routine that can be used: https://github.com/runtimeverification/pyk/blob/49d861944bad260be137f68f4adc37b360e25771/src/pyk/kast/manip.py#L585 And here is the variant that can also handle constraints, though it does not do a good job: https://github.com/runtimeverification/pyk/blob/49d861944bad260be137f68f4adc37b360e25771/src/pyk/kast/manip.py#L600 You may need to fix this issue at the same time: runtimeverification/k#4219 |
What is meant by convex here? |
Convex here means that no disjuncts ( |
So when we abstract a cell, we should not do the thing suggested where we include an |
That's right, that would make the anti-unifier concave instead of convex. |
We need a way to merge branches back after they have been split. For example, if we have code like
KEVM will split into two branches, one where
x
contains10
and another where it contains12
, and the rest of the program will be executed twice, once in each branch. Instead, in some cases it would be better if we could merge these branches back into a single branch where the contents ofx
are replaced with a symbolic variableX
with the constraintX ==Int 10 orBool X ==Int 12
, and then execute the rest of the program only once.This could be implemented by a command like (just a suggestion, feel free to use a different syntax)
kevm foundry-merge-nodes ContractName.testName --node N1 --node N2 ... --node Nk
, which would create a new nodeN
subsuming nodesN1...Nk
. According to @ehildenb, this node can be computed automatically as a convex anti-unifier ofN1...Nk
.The text was updated successfully, but these errors were encountered: