This repository was archived by the owner on Apr 25, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
Fix bugs in node refutation functionality #877
Merged
Merged
Conversation
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
* Add `.items()` when iterating over dictionary, otherwise iteration is only over keys * Convert `node_id` to int before passing it to `_resolve`
ehildenb
approved these changes
Feb 14, 2024
rv-jenkins
pushed a commit
that referenced
this pull request
Feb 16, 2024
Adds tests in `test_refute_node.py` for the fixes from #877. * Initialization of the prover is factored out to its own function `build_prover`. * `test_apr_proof_read_node_refutations` tests that the node refutations can be successfully and correctly read from the `.json` file (before the above PR this would raise an error). * `test_apr_proof_refute_node_no_successors` tests that a node can only be refuted if it has no successors. --------- Co-authored-by: devops <[email protected]>
Baltoli
pushed a commit
to runtimeverification/k
that referenced
this pull request
Apr 9, 2024
This PR fixes bugs in the implementation of node refutation, in advance of implementing a `kontrol refute-node` command as part of runtimeverification/evm-semantics#1752. The following changes are introduced: 1. Fix the way node refutations are read from a JSON file: 1. When iterating over the `node_refutations` dictionary, the `.items()` method was missing, meaning that only the keys were being iterated over, rather than both keys and values. 2. In the same line, the node id needed to be converted back to an int before being passed to `_resolve`, since the JSON file stores the key as a string. 2. Prevent refuting a node that has successors (otherwise execution of the refuted branch, which should have been paused, will continue from the successor nodes). 3. Add `refuted` to the list of attributes for a node when displaying the KCFG. --------- Co-authored-by: Lucas MT <[email protected]> Co-authored-by: devops <[email protected]>
Baltoli
pushed a commit
to runtimeverification/k
that referenced
this pull request
Apr 9, 2024
This PR fixes bugs in the implementation of node refutation, in advance of implementing a `kontrol refute-node` command as part of runtimeverification/evm-semantics#1752. The following changes are introduced: 1. Fix the way node refutations are read from a JSON file: 1. When iterating over the `node_refutations` dictionary, the `.items()` method was missing, meaning that only the keys were being iterated over, rather than both keys and values. 2. In the same line, the node id needed to be converted back to an int before being passed to `_resolve`, since the JSON file stores the key as a string. 2. Prevent refuting a node that has successors (otherwise execution of the refuted branch, which should have been paused, will continue from the successor nodes). 3. Add `refuted` to the list of attributes for a node when displaying the KCFG. --------- Co-authored-by: Lucas MT <[email protected]> Co-authored-by: devops <[email protected]>
Baltoli
pushed a commit
to runtimeverification/k
that referenced
this pull request
Apr 10, 2024
This PR fixes bugs in the implementation of node refutation, in advance of implementing a `kontrol refute-node` command as part of runtimeverification/evm-semantics#1752. The following changes are introduced: 1. Fix the way node refutations are read from a JSON file: 1. When iterating over the `node_refutations` dictionary, the `.items()` method was missing, meaning that only the keys were being iterated over, rather than both keys and values. 2. In the same line, the node id needed to be converted back to an int before being passed to `_resolve`, since the JSON file stores the key as a string. 2. Prevent refuting a node that has successors (otherwise execution of the refuted branch, which should have been paused, will continue from the successor nodes). 3. Add `refuted` to the list of attributes for a node when displaying the KCFG. --------- Co-authored-by: Lucas MT <[email protected]> Co-authored-by: devops <[email protected]>
Baltoli
pushed a commit
to runtimeverification/k
that referenced
this pull request
Apr 10, 2024
This PR fixes bugs in the implementation of node refutation, in advance of implementing a `kontrol refute-node` command as part of runtimeverification/evm-semantics#1752. The following changes are introduced: 1. Fix the way node refutations are read from a JSON file: 1. When iterating over the `node_refutations` dictionary, the `.items()` method was missing, meaning that only the keys were being iterated over, rather than both keys and values. 2. In the same line, the node id needed to be converted back to an int before being passed to `_resolve`, since the JSON file stores the key as a string. 2. Prevent refuting a node that has successors (otherwise execution of the refuted branch, which should have been paused, will continue from the successor nodes). 3. Add `refuted` to the list of attributes for a node when displaying the KCFG. --------- Co-authored-by: Lucas MT <[email protected]> Co-authored-by: devops <[email protected]>
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
This PR fixes bugs in the implementation of node refutation, in advance of implementing a
kontrol refute-node
command as part of runtimeverification/evm-semantics#1752. The following changes are introduced:node_refutations
dictionary, the.items()
method was missing, meaning that only the keys were being iterated over, rather than both keys and values._resolve
, since the JSON file stores the key as a string.refuted
to the list of attributes for a node when displaying the KCFG.