-
Notifications
You must be signed in to change notification settings - Fork 152
Incremental exploration based kprove using rpc endpoints #1443
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
Conversation
As an example of using this functionality, I do:
Then I can run the proof I want, with
And I get something like this: I want to inspect the node
And I get this (highly truncated) output: Now I want to continue exploration, without any depth bound, so I simple call
This leads to the following CFG eventually (has explored 2 times, then gotten stuck, cannot make progress, proof not passing): After playing with the CFG a bit, and exploring more of the behaviors, I decide it's time to start the exploration over, so I add eth
|
6923cbf
to
d3234e9
Compare
d3234e9
to
9a0a41f
Compare
4903fae
to
b082ed7
Compare
a966100
to
ae8a872
Compare
These changes are what I needed to have a first working version of KProve implemented fully here: runtimeverification/evm-semantics#1443. In particular: - Some KAst <-> Kore problems are addressed: - If the same variable shows up multiple times in `KDefinition.sort_vars`, but with different sorts, instead of just giving up we'll check if one sort is a subsort of the other. If so, we'll return the smaller sort. Test added to `test_kast_to_kore`. - The conversions for `Exists` are added. Test added to `test_bidirectional`. - `KProve.execute` method now returns `CTerm` instead of `KInner`, as it shouldn't be able to return `mlTop()` or `mlBottom()` anyway. - `KCFG.create_cover` now allows you to specify a witness manually instead of trying to compute it for you. (De)Serialization requires that we can do `Subst.{from_dict,to_dict}`, so that functionality is added too. - `KProve.implies` method is added as a wrapper around the `implies` RPC endpoint. Tests are added that make sure it's giving back sane results. By default, we much existentially bind variables in the consequent that are not present in the antecedent to get anything useful out of the endpoint. Tests added to `test_implies` in `test_kprove`. Co-authored-by: devops <[email protected]>
6567463
to
6216a45
Compare
…build contract ids
ef89e47
to
5600b53
Compare
… node output" This reverts commit 0915734.
Subsumed by: #1538 |
These changes are what I needed to have a first working version of KProve implemented fully here: runtimeverification/evm-semantics#1443. In particular: - Some KAst <-> Kore problems are addressed: - If the same variable shows up multiple times in `KDefinition.sort_vars`, but with different sorts, instead of just giving up we'll check if one sort is a subsort of the other. If so, we'll return the smaller sort. Test added to `test_kast_to_kore`. - The conversions for `Exists` are added. Test added to `test_bidirectional`. - `KProve.execute` method now returns `CTerm` instead of `KInner`, as it shouldn't be able to return `mlTop()` or `mlBottom()` anyway. - `KCFG.create_cover` now allows you to specify a witness manually instead of trying to compute it for you. (De)Serialization requires that we can do `Subst.{from_dict,to_dict}`, so that functionality is added too. - `KProve.implies` method is added as a wrapper around the `implies` RPC endpoint. Tests are added that make sure it's giving back sane results. By default, we much existentially bind variables in the consequent that are not present in the antecedent to get anything useful out of the endpoint. Tests added to `test_implies` in `test_kprove`. Co-authored-by: devops <[email protected]>
These changes are what I needed to have a first working version of KProve implemented fully here: runtimeverification/evm-semantics#1443. In particular: - Some KAst <-> Kore problems are addressed: - If the same variable shows up multiple times in `KDefinition.sort_vars`, but with different sorts, instead of just giving up we'll check if one sort is a subsort of the other. If so, we'll return the smaller sort. Test added to `test_kast_to_kore`. - The conversions for `Exists` are added. Test added to `test_bidirectional`. - `KProve.execute` method now returns `CTerm` instead of `KInner`, as it shouldn't be able to return `mlTop()` or `mlBottom()` anyway. - `KCFG.create_cover` now allows you to specify a witness manually instead of trying to compute it for you. (De)Serialization requires that we can do `Subst.{from_dict,to_dict}`, so that functionality is added too. - `KProve.implies` method is added as a wrapper around the `implies` RPC endpoint. Tests are added that make sure it's giving back sane results. By default, we much existentially bind variables in the consequent that are not present in the antecedent to get anything useful out of the endpoint. Tests added to `test_implies` in `test_kprove`. Co-authored-by: devops <[email protected]>
These changes are what I needed to have a first working version of KProve implemented fully here: runtimeverification/evm-semantics#1443. In particular: - Some KAst <-> Kore problems are addressed: - If the same variable shows up multiple times in `KDefinition.sort_vars`, but with different sorts, instead of just giving up we'll check if one sort is a subsort of the other. If so, we'll return the smaller sort. Test added to `test_kast_to_kore`. - The conversions for `Exists` are added. Test added to `test_bidirectional`. - `KProve.execute` method now returns `CTerm` instead of `KInner`, as it shouldn't be able to return `mlTop()` or `mlBottom()` anyway. - `KCFG.create_cover` now allows you to specify a witness manually instead of trying to compute it for you. (De)Serialization requires that we can do `Subst.{from_dict,to_dict}`, so that functionality is added too. - `KProve.implies` method is added as a wrapper around the `implies` RPC endpoint. Tests are added that make sure it's giving back sane results. By default, we much existentially bind variables in the consequent that are not present in the antecedent to get anything useful out of the endpoint. Tests added to `test_implies` in `test_kprove`. Co-authored-by: devops <[email protected]>
These changes are what I needed to have a first working version of KProve implemented fully here: runtimeverification/evm-semantics#1443. In particular: - Some KAst <-> Kore problems are addressed: - If the same variable shows up multiple times in `KDefinition.sort_vars`, but with different sorts, instead of just giving up we'll check if one sort is a subsort of the other. If so, we'll return the smaller sort. Test added to `test_kast_to_kore`. - The conversions for `Exists` are added. Test added to `test_bidirectional`. - `KProve.execute` method now returns `CTerm` instead of `KInner`, as it shouldn't be able to return `mlTop()` or `mlBottom()` anyway. - `KCFG.create_cover` now allows you to specify a witness manually instead of trying to compute it for you. (De)Serialization requires that we can do `Subst.{from_dict,to_dict}`, so that functionality is added too. - `KProve.implies` method is added as a wrapper around the `implies` RPC endpoint. Tests are added that make sure it's giving back sane results. By default, we much existentially bind variables in the consequent that are not present in the antecedent to get anything useful out of the endpoint. Tests added to `test_implies` in `test_kprove`. Co-authored-by: devops <[email protected]>
These changes are what I needed to have a first working version of KProve implemented fully here: runtimeverification/evm-semantics#1443. In particular: - Some KAst <-> Kore problems are addressed: - If the same variable shows up multiple times in `KDefinition.sort_vars`, but with different sorts, instead of just giving up we'll check if one sort is a subsort of the other. If so, we'll return the smaller sort. Test added to `test_kast_to_kore`. - The conversions for `Exists` are added. Test added to `test_bidirectional`. - `KProve.execute` method now returns `CTerm` instead of `KInner`, as it shouldn't be able to return `mlTop()` or `mlBottom()` anyway. - `KCFG.create_cover` now allows you to specify a witness manually instead of trying to compute it for you. (De)Serialization requires that we can do `Subst.{from_dict,to_dict}`, so that functionality is added too. - `KProve.implies` method is added as a wrapper around the `implies` RPC endpoint. Tests are added that make sure it's giving back sane results. By default, we much existentially bind variables in the consequent that are not present in the antecedent to get anything useful out of the endpoint. Tests added to `test_implies` in `test_kprove`. Co-authored-by: devops <[email protected]>
Blocked on: #1447Blocked on: #1440Blocked on: runtimeverification/pyk#100Blocked on: #1458Blocked on: runtimeverification/pyk#112Blocked on: #1462Blocked on: runtimeverification/pyk#118Blocked on: #1476Blocked on: runtimeverification/haskell-backend#3386Blocked on: runtimeverification/k#3059Blocked on: #1484Blocked on: #1478
Blocked on: #1480
This brings in a decent amount of functionality needed for making progress incremental on Foundry proofs:
KEVM.{is_terminal,extract_branches}
, which help with auto-exploration.kprove
).--max-iterations
to limit how many calls to prover to make while exploring.--max-depth
to limit how long each exploration step will let the prover run.--no-simplify-init
to turn of simplification of the initial state (up to 2 minutes at proof startup, does not need to be repeated on subsequent runs).Doing something like
kevm foundry-prove --test MyContract.MyTest --max-depth 100
will make sure that every 100'th step is saved in the KCFG. That way you can save progress in case the prover crashes, and you can resume exploration from a later state with more lemmas in context.