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
More simplifications to the KCFG class #503
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
…s in module_name directly
…ot need KDefinition
…in favor of stuck
tothtamas28
approved these changes
Jun 20, 2023
Baltoli
pushed a commit
to runtimeverification/k
that referenced
this pull request
Apr 9, 2024
This brings in what should be most of the rest of the refactorings to the KCFG class, including: - Removing data from the `KCFG` class: - The notion of `target` is removed (tracked in classes like `APRProof` where it has semantic meaning). - The notion of `init` is broadened to any node not having predecessors. - The notion of `frontier` is removed (in favor of `leaves`). - The notion of `expanded` is removed, in favor of direct storage of `stuck` attribute for given nodes. - The notion of `init` in renamed to `root`. - Move the `path_length` method to a `staticmethod` of the `KCFG` class intead of being direct in `kcfg` module. - `sort_ac_collections` is changed to hardcode how it searches for AC collections, rather than using a `KDefinition`. This is potentially a problem down the road, if the user names a sort quite specifically, but allows not threading through a `KDefinition` into `KCFGShow` and such. - Refactors to `KCFGShow`: - Move `KCFGShow.to_module` to `KCFG.to_module`. Do any post-processing needed in `KCFGShow` instead, which may require a definition or extra CLI arguments. - Remove all handling of `target` nodes from `KCFGShow`. - Refactors to the `APRProof` and `APRBMCProof` classes, how they compute their node subsets: - The predicates `APR*Proof.is_...` are prioritized for defining the sets rather than the other way around. - New predicate `APR*Proof.is_failing` and set `APR*Proof.failing` is added, to determine if there are failing nodes. - `APRProof.status` is updated to cehck the failing set directly, and then the exact same status can be used in subclass `APRBMCProof.status` instead of duplicating that check. - Logic for checking sbuproof status is simplified. - Add class `APRProofShow` for printing out information about `APRProof`. It: - Holds a `KCFGShow` for printing out the KCFG portion. - Extends the functionality to include the extra information about `target` nodes. --------- Co-authored-by: devops <[email protected]> Co-authored-by: rv-jenkins <[email protected]>
Baltoli
pushed a commit
to runtimeverification/k
that referenced
this pull request
Apr 9, 2024
This brings in what should be most of the rest of the refactorings to the KCFG class, including: - Removing data from the `KCFG` class: - The notion of `target` is removed (tracked in classes like `APRProof` where it has semantic meaning). - The notion of `init` is broadened to any node not having predecessors. - The notion of `frontier` is removed (in favor of `leaves`). - The notion of `expanded` is removed, in favor of direct storage of `stuck` attribute for given nodes. - The notion of `init` in renamed to `root`. - Move the `path_length` method to a `staticmethod` of the `KCFG` class intead of being direct in `kcfg` module. - `sort_ac_collections` is changed to hardcode how it searches for AC collections, rather than using a `KDefinition`. This is potentially a problem down the road, if the user names a sort quite specifically, but allows not threading through a `KDefinition` into `KCFGShow` and such. - Refactors to `KCFGShow`: - Move `KCFGShow.to_module` to `KCFG.to_module`. Do any post-processing needed in `KCFGShow` instead, which may require a definition or extra CLI arguments. - Remove all handling of `target` nodes from `KCFGShow`. - Refactors to the `APRProof` and `APRBMCProof` classes, how they compute their node subsets: - The predicates `APR*Proof.is_...` are prioritized for defining the sets rather than the other way around. - New predicate `APR*Proof.is_failing` and set `APR*Proof.failing` is added, to determine if there are failing nodes. - `APRProof.status` is updated to cehck the failing set directly, and then the exact same status can be used in subclass `APRBMCProof.status` instead of duplicating that check. - Logic for checking sbuproof status is simplified. - Add class `APRProofShow` for printing out information about `APRProof`. It: - Holds a `KCFGShow` for printing out the KCFG portion. - Extends the functionality to include the extra information about `target` nodes. --------- Co-authored-by: devops <[email protected]> Co-authored-by: rv-jenkins <[email protected]>
Baltoli
pushed a commit
to runtimeverification/k
that referenced
this pull request
Apr 10, 2024
This brings in what should be most of the rest of the refactorings to the KCFG class, including: - Removing data from the `KCFG` class: - The notion of `target` is removed (tracked in classes like `APRProof` where it has semantic meaning). - The notion of `init` is broadened to any node not having predecessors. - The notion of `frontier` is removed (in favor of `leaves`). - The notion of `expanded` is removed, in favor of direct storage of `stuck` attribute for given nodes. - The notion of `init` in renamed to `root`. - Move the `path_length` method to a `staticmethod` of the `KCFG` class intead of being direct in `kcfg` module. - `sort_ac_collections` is changed to hardcode how it searches for AC collections, rather than using a `KDefinition`. This is potentially a problem down the road, if the user names a sort quite specifically, but allows not threading through a `KDefinition` into `KCFGShow` and such. - Refactors to `KCFGShow`: - Move `KCFGShow.to_module` to `KCFG.to_module`. Do any post-processing needed in `KCFGShow` instead, which may require a definition or extra CLI arguments. - Remove all handling of `target` nodes from `KCFGShow`. - Refactors to the `APRProof` and `APRBMCProof` classes, how they compute their node subsets: - The predicates `APR*Proof.is_...` are prioritized for defining the sets rather than the other way around. - New predicate `APR*Proof.is_failing` and set `APR*Proof.failing` is added, to determine if there are failing nodes. - `APRProof.status` is updated to cehck the failing set directly, and then the exact same status can be used in subclass `APRBMCProof.status` instead of duplicating that check. - Logic for checking sbuproof status is simplified. - Add class `APRProofShow` for printing out information about `APRProof`. It: - Holds a `KCFGShow` for printing out the KCFG portion. - Extends the functionality to include the extra information about `target` nodes. --------- Co-authored-by: devops <[email protected]> Co-authored-by: rv-jenkins <[email protected]>
Baltoli
pushed a commit
to runtimeverification/k
that referenced
this pull request
Apr 10, 2024
This brings in what should be most of the rest of the refactorings to the KCFG class, including: - Removing data from the `KCFG` class: - The notion of `target` is removed (tracked in classes like `APRProof` where it has semantic meaning). - The notion of `init` is broadened to any node not having predecessors. - The notion of `frontier` is removed (in favor of `leaves`). - The notion of `expanded` is removed, in favor of direct storage of `stuck` attribute for given nodes. - The notion of `init` in renamed to `root`. - Move the `path_length` method to a `staticmethod` of the `KCFG` class intead of being direct in `kcfg` module. - `sort_ac_collections` is changed to hardcode how it searches for AC collections, rather than using a `KDefinition`. This is potentially a problem down the road, if the user names a sort quite specifically, but allows not threading through a `KDefinition` into `KCFGShow` and such. - Refactors to `KCFGShow`: - Move `KCFGShow.to_module` to `KCFG.to_module`. Do any post-processing needed in `KCFGShow` instead, which may require a definition or extra CLI arguments. - Remove all handling of `target` nodes from `KCFGShow`. - Refactors to the `APRProof` and `APRBMCProof` classes, how they compute their node subsets: - The predicates `APR*Proof.is_...` are prioritized for defining the sets rather than the other way around. - New predicate `APR*Proof.is_failing` and set `APR*Proof.failing` is added, to determine if there are failing nodes. - `APRProof.status` is updated to cehck the failing set directly, and then the exact same status can be used in subclass `APRBMCProof.status` instead of duplicating that check. - Logic for checking sbuproof status is simplified. - Add class `APRProofShow` for printing out information about `APRProof`. It: - Holds a `KCFGShow` for printing out the KCFG portion. - Extends the functionality to include the extra information about `target` nodes. --------- Co-authored-by: devops <[email protected]> Co-authored-by: rv-jenkins <[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 brings in what should be most of the rest of the refactorings to the KCFG class, including:
KCFGclass:targetis removed (tracked in classes likeAPRProofwhere it has semantic meaning).initis broadened to any node not having predecessors.frontieris removed (in favor ofleaves).expandedis removed, in favor of direct storage ofstuckattribute for given nodes.initin renamed toroot.path_lengthmethod to astaticmethodof theKCFGclass intead of being direct inkcfgmodule.sort_ac_collectionsis changed to hardcode how it searches for AC collections, rather than using aKDefinition. This is potentially a problem down the road, if the user names a sort quite specifically, but allows not threading through aKDefinitionintoKCFGShowand such.KCFGShow:KCFGShow.to_moduletoKCFG.to_module. Do any post-processing needed inKCFGShowinstead, which may require a definition or extra CLI arguments.targetnodes fromKCFGShow.APRProofandAPRBMCProofclasses, how they compute their node subsets:APR*Proof.is_...are prioritized for defining the sets rather than the other way around.APR*Proof.is_failingand setAPR*Proof.failingis added, to determine if there are failing nodes.APRProof.statusis updated to cehck the failing set directly, and then the exact same status can be used in subclassAPRBMCProof.statusinstead of duplicating that check.APRProofShowfor printing out information aboutAPRProof. It:KCFGShowfor printing out the KCFG portion.targetnodes.