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
Code re-organizations prepping for KCFG refactors #486
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
5756198 to
2260bd5
Compare
…plore => APRProof
668aae0 to
2052260
Compare
….path_constraints
aa96e2f to
ba48ce0
Compare
a41ed7a to
428c4f5
Compare
tothtamas28
approved these changes
Jun 12, 2023
Collaborator
Do you also plan to remove
Subsumption into the target will still be retained in the KCFG though, right? |
Member
Author
|
After discussion, we'll be removing the notion of |
Baltoli
pushed a commit
to runtimeverification/k
that referenced
this pull request
Apr 9, 2024
…n/pyk#486) Part of #471, #413 As I was working towards the goal of better BMC prover visualization, it's clear we need: - Proof specific viewers, - Fixing the BMC checker off-by-one-error, and - Trimming of the structure stored in the KCFG (removing the notion of `target`, `expanded`). This makes the first least controversial steps towards those changes, including: - Method `KCFG.replace_node` now replaces the node in place, so that the node identifier doesn't change. This is possible now because the node identifier is not tied to the contents of the node, and makes tracking things like `init/target/terminal/bounded` sets externally in the `*Proof` classes more feasible even if nodes are being simplified for example. - The notion of a unique `target` and `init` is added to the `APRProof` class, in preparation for removing the `target` notion from `KCFG`. - Add fields `target` and `init` to `APRProof` state, which explicitly call out the unique init/target states. - Move `KCFGExplore.target_subsume => APRProver._check_subsumed`, which makes use of the explicitly called out `init/target` states. - Moves `KCFG.path_constraints => APRProof.path_constraints`, because it relies on a unique target node. - The notion of `stuck` nodes is moved into `APRProof` state as `terminal` nodes. - The field `_terminal_nodes` is added to `APRProof` state. - `APRProver._check_terminal` directly manipulates this set instead of `stuck/expanded` set. - The notion of `APRProof.terminal` is added, which returns the set of nodes in the `APRProof._terminal_nodes` set. - The notion of `APRProof.pending` is added, which returns the set of `KCFG.frontier` nodes that are _not_ in the proofs `terminal_nodes` set. - The `APRProof.terminal` and `APRProof.pending` sets are used for determining `APRProof.status`. - The `APRBMCProof.bounded` set is added, which similarly tracks the bounded set of nodes directly. This is used in computing `APRBMCProof.pending` and `APRBMCProof.status`. - Methods `APRProof.from_claim` and `APRBMCProof.from_claim_with_bmc_depth` are added for reading these proof types directly from claims (and tests are updated appropriately). - Method `APRBMCProof.dict` is refactored to use `APRProof.dict` directly first, then add the needed information to it. - Methods `KCFG.node_attrs => KCFGShow.node_attrs` and `KCFG.node_short_info => KCFGShow.node_short_info` are moved to localize them to use site. - Adds `Proof.json` as shortcut for `json.dumps(Proof.dict)`. - For each of the `integration/kcfg` tests that do `APRProof`s, adds logging at `info` level for the generated KCFG, to make debugging them easier by just throwing a flag. --------- Co-authored-by: devops <[email protected]>
Baltoli
pushed a commit
to runtimeverification/k
that referenced
this pull request
Apr 9, 2024
…n/pyk#486) Part of #471, #413 As I was working towards the goal of better BMC prover visualization, it's clear we need: - Proof specific viewers, - Fixing the BMC checker off-by-one-error, and - Trimming of the structure stored in the KCFG (removing the notion of `target`, `expanded`). This makes the first least controversial steps towards those changes, including: - Method `KCFG.replace_node` now replaces the node in place, so that the node identifier doesn't change. This is possible now because the node identifier is not tied to the contents of the node, and makes tracking things like `init/target/terminal/bounded` sets externally in the `*Proof` classes more feasible even if nodes are being simplified for example. - The notion of a unique `target` and `init` is added to the `APRProof` class, in preparation for removing the `target` notion from `KCFG`. - Add fields `target` and `init` to `APRProof` state, which explicitly call out the unique init/target states. - Move `KCFGExplore.target_subsume => APRProver._check_subsumed`, which makes use of the explicitly called out `init/target` states. - Moves `KCFG.path_constraints => APRProof.path_constraints`, because it relies on a unique target node. - The notion of `stuck` nodes is moved into `APRProof` state as `terminal` nodes. - The field `_terminal_nodes` is added to `APRProof` state. - `APRProver._check_terminal` directly manipulates this set instead of `stuck/expanded` set. - The notion of `APRProof.terminal` is added, which returns the set of nodes in the `APRProof._terminal_nodes` set. - The notion of `APRProof.pending` is added, which returns the set of `KCFG.frontier` nodes that are _not_ in the proofs `terminal_nodes` set. - The `APRProof.terminal` and `APRProof.pending` sets are used for determining `APRProof.status`. - The `APRBMCProof.bounded` set is added, which similarly tracks the bounded set of nodes directly. This is used in computing `APRBMCProof.pending` and `APRBMCProof.status`. - Methods `APRProof.from_claim` and `APRBMCProof.from_claim_with_bmc_depth` are added for reading these proof types directly from claims (and tests are updated appropriately). - Method `APRBMCProof.dict` is refactored to use `APRProof.dict` directly first, then add the needed information to it. - Methods `KCFG.node_attrs => KCFGShow.node_attrs` and `KCFG.node_short_info => KCFGShow.node_short_info` are moved to localize them to use site. - Adds `Proof.json` as shortcut for `json.dumps(Proof.dict)`. - For each of the `integration/kcfg` tests that do `APRProof`s, adds logging at `info` level for the generated KCFG, to make debugging them easier by just throwing a flag. --------- Co-authored-by: devops <[email protected]>
Baltoli
pushed a commit
to runtimeverification/k
that referenced
this pull request
Apr 10, 2024
…n/pyk#486) Part of #471, #413 As I was working towards the goal of better BMC prover visualization, it's clear we need: - Proof specific viewers, - Fixing the BMC checker off-by-one-error, and - Trimming of the structure stored in the KCFG (removing the notion of `target`, `expanded`). This makes the first least controversial steps towards those changes, including: - Method `KCFG.replace_node` now replaces the node in place, so that the node identifier doesn't change. This is possible now because the node identifier is not tied to the contents of the node, and makes tracking things like `init/target/terminal/bounded` sets externally in the `*Proof` classes more feasible even if nodes are being simplified for example. - The notion of a unique `target` and `init` is added to the `APRProof` class, in preparation for removing the `target` notion from `KCFG`. - Add fields `target` and `init` to `APRProof` state, which explicitly call out the unique init/target states. - Move `KCFGExplore.target_subsume => APRProver._check_subsumed`, which makes use of the explicitly called out `init/target` states. - Moves `KCFG.path_constraints => APRProof.path_constraints`, because it relies on a unique target node. - The notion of `stuck` nodes is moved into `APRProof` state as `terminal` nodes. - The field `_terminal_nodes` is added to `APRProof` state. - `APRProver._check_terminal` directly manipulates this set instead of `stuck/expanded` set. - The notion of `APRProof.terminal` is added, which returns the set of nodes in the `APRProof._terminal_nodes` set. - The notion of `APRProof.pending` is added, which returns the set of `KCFG.frontier` nodes that are _not_ in the proofs `terminal_nodes` set. - The `APRProof.terminal` and `APRProof.pending` sets are used for determining `APRProof.status`. - The `APRBMCProof.bounded` set is added, which similarly tracks the bounded set of nodes directly. This is used in computing `APRBMCProof.pending` and `APRBMCProof.status`. - Methods `APRProof.from_claim` and `APRBMCProof.from_claim_with_bmc_depth` are added for reading these proof types directly from claims (and tests are updated appropriately). - Method `APRBMCProof.dict` is refactored to use `APRProof.dict` directly first, then add the needed information to it. - Methods `KCFG.node_attrs => KCFGShow.node_attrs` and `KCFG.node_short_info => KCFGShow.node_short_info` are moved to localize them to use site. - Adds `Proof.json` as shortcut for `json.dumps(Proof.dict)`. - For each of the `integration/kcfg` tests that do `APRProof`s, adds logging at `info` level for the generated KCFG, to make debugging them easier by just throwing a flag. --------- Co-authored-by: devops <[email protected]>
Baltoli
pushed a commit
to runtimeverification/k
that referenced
this pull request
Apr 10, 2024
…n/pyk#486) Part of #471, #413 As I was working towards the goal of better BMC prover visualization, it's clear we need: - Proof specific viewers, - Fixing the BMC checker off-by-one-error, and - Trimming of the structure stored in the KCFG (removing the notion of `target`, `expanded`). This makes the first least controversial steps towards those changes, including: - Method `KCFG.replace_node` now replaces the node in place, so that the node identifier doesn't change. This is possible now because the node identifier is not tied to the contents of the node, and makes tracking things like `init/target/terminal/bounded` sets externally in the `*Proof` classes more feasible even if nodes are being simplified for example. - The notion of a unique `target` and `init` is added to the `APRProof` class, in preparation for removing the `target` notion from `KCFG`. - Add fields `target` and `init` to `APRProof` state, which explicitly call out the unique init/target states. - Move `KCFGExplore.target_subsume => APRProver._check_subsumed`, which makes use of the explicitly called out `init/target` states. - Moves `KCFG.path_constraints => APRProof.path_constraints`, because it relies on a unique target node. - The notion of `stuck` nodes is moved into `APRProof` state as `terminal` nodes. - The field `_terminal_nodes` is added to `APRProof` state. - `APRProver._check_terminal` directly manipulates this set instead of `stuck/expanded` set. - The notion of `APRProof.terminal` is added, which returns the set of nodes in the `APRProof._terminal_nodes` set. - The notion of `APRProof.pending` is added, which returns the set of `KCFG.frontier` nodes that are _not_ in the proofs `terminal_nodes` set. - The `APRProof.terminal` and `APRProof.pending` sets are used for determining `APRProof.status`. - The `APRBMCProof.bounded` set is added, which similarly tracks the bounded set of nodes directly. This is used in computing `APRBMCProof.pending` and `APRBMCProof.status`. - Methods `APRProof.from_claim` and `APRBMCProof.from_claim_with_bmc_depth` are added for reading these proof types directly from claims (and tests are updated appropriately). - Method `APRBMCProof.dict` is refactored to use `APRProof.dict` directly first, then add the needed information to it. - Methods `KCFG.node_attrs => KCFGShow.node_attrs` and `KCFG.node_short_info => KCFGShow.node_short_info` are moved to localize them to use site. - Adds `Proof.json` as shortcut for `json.dumps(Proof.dict)`. - For each of the `integration/kcfg` tests that do `APRProof`s, adds logging at `info` level for the generated KCFG, to make debugging them easier by just throwing a flag. --------- 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.
Part of #471, #413
As I was working towards the goal of better BMC prover visualization, it's clear we need:
target,expanded).This makes the first least controversial steps towards those changes, including:
KCFG.replace_nodenow replaces the node in place, so that the node identifier doesn't change. This is possible now because the node identifier is not tied to the contents of the node, and makes tracking things likeinit/target/terminal/boundedsets externally in the*Proofclasses more feasible even if nodes are being simplified for example.targetandinitis added to theAPRProofclass, in preparation for removing thetargetnotion fromKCFG.targetandinittoAPRProofstate, which explicitly call out the unique init/target states.KCFGExplore.target_subsume => APRProver._check_subsumed, which makes use of the explicitly called outinit/targetstates.KCFG.path_constraints => APRProof.path_constraints, because it relies on a unique target node.stucknodes is moved intoAPRProofstate asterminalnodes._terminal_nodesis added toAPRProofstate.APRProver._check_terminaldirectly manipulates this set instead ofstuck/expandedset.APRProof.terminalis added, which returns the set of nodes in theAPRProof._terminal_nodesset.APRProof.pendingis added, which returns the set ofKCFG.frontiernodes that are not in the proofsterminal_nodesset.APRProof.terminalandAPRProof.pendingsets are used for determiningAPRProof.status.APRBMCProof.boundedset is added, which similarly tracks the bounded set of nodes directly. This is used in computingAPRBMCProof.pendingandAPRBMCProof.status.APRProof.from_claimandAPRBMCProof.from_claim_with_bmc_depthare added for reading these proof types directly from claims (and tests are updated appropriately).APRBMCProof.dictis refactored to useAPRProof.dictdirectly first, then add the needed information to it.KCFG.node_attrs => KCFGShow.node_attrsandKCFG.node_short_info => KCFGShow.node_short_infoare moved to localize them to use site.Proof.jsonas shortcut forjson.dumps(Proof.dict).integration/kcfgtests that doAPRProofs, adds logging atinfolevel for the generated KCFG, to make debugging them easier by just throwing a flag.