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
APRProof specific proof state visualization #489
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
… rules from KCFG edges
…e APR*Proof.is_* predicates directly
… APR*ProofNodePrinter classes
Member
Author
|
Running You can see that it includes the In addition, for a node that is |
nwatson22
approved these changes
Jun 14, 2023
tothtamas28
approved these changes
Jun 15, 2023
| '┃ ┣━━┓\n' | ||
| '┃ ┃ │\n' | ||
| '┃ ┃ └─ \033[1m24 (frontier, leaf)\033[0m\n' | ||
| '┃ ┃ └─ 24 (frontier, leaf)\n' |
Collaborator
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
id-s are no longer bold, is this deliberate?
Member
Author
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I removed the bolding.
This was referenced Jun 20, 2023
rv-jenkins
pushed a commit
that referenced
this pull request
Jun 20, 2023
Following #489, it turns out that KEVM's TUI is broken because it relies on the old way of doing Node printing. This makes a new `APRProofViewer` class, which largely inherits from `KCFGViewer`, but adjusts it to handle the more spceific node viewers. I have tested this with both KEVM+Foundry and raw KEVM specs, and it seems to work. --------- Co-authored-by: devops <[email protected]>
Baltoli
pushed a commit
to runtimeverification/k
that referenced
this pull request
Apr 9, 2024
Following runtimeverification/pyk#489, it turns out that KEVM's TUI is broken because it relies on the old way of doing Node printing. This makes a new `APRProofViewer` class, which largely inherits from `KCFGViewer`, but adjusts it to handle the more spceific node viewers. I have tested this with both KEVM+Foundry and raw KEVM specs, and it seems to work. --------- Co-authored-by: devops <[email protected]>
Baltoli
pushed a commit
to runtimeverification/k
that referenced
this pull request
Apr 9, 2024
) Fixes: #413 This PR introduces proof-specific viewers, and does a few refactors to make that possible: - Helpers are added to `KCFG` for turning into modules, including: - `KCFG.Split.covers` which returns each individual split as a reverse cover. - `KCFG.NDBranch.edges`, which returns each non-deterministic step as an edge. - `KCFG.Edge.to_rule`, which converts an edge into a K rule (or claim). - Small refactorings to `KCFGShow` structure: - `KCFGShow.dot` returns a `Digraph` directly (for further manipulation) instead of a list of `str`. - `KCFGShow.to_module` which returns a `KFlatModule` is factored out and used directly in `KCFGShow.show`. - Helper methods embedded in other methods in `KCFGShow` are factored out directly to staticmethods of `KCFGShow` so they can be reused easily. - We just treat `stuck` as a node attribute now, printed at the beginning of a node, instead of printing it a second time following a node too. - The way that `KCFGShow` calculates node attributes is adjusted and factor out. - A new class `NodePrinter` is factored out, which by default just uses the attributes the `KCFG` knows about for printing out nodes. - That class is extended by `APRProofNodePrinter` and `APRBMCProofNodePrinter`, which add the additional information about the nodes `pending,terminal,bounded` state. If a node is `terminal` or `bounded`, then the `stuck` attribute is no longer printed for less confusion. - `KCFGShow` now takes an optional `*NodePrinter` as an argument (or builds on itself), so instantiating that class is how you can customize how nodes are displayed in text. - The tests are adapted to use the more specific `*NodePrinter` classes, and the output checked that the more specific node information is indeed being included. - Adds helper predicates `APRProof.is_{pending,terminal}` and `APRProof.is_bounded`, which should behave better in case there are qualified node ids passed in. --------- Co-authored-by: devops <[email protected]>
Baltoli
pushed a commit
to runtimeverification/k
that referenced
this pull request
Apr 9, 2024
…tion/pyk#507) Following runtimeverification/pyk#489, it turns out that KEVM's TUI is broken because it relies on the old way of doing Node printing. This makes a new `APRProofViewer` class, which largely inherits from `KCFGViewer`, but adjusts it to handle the more spceific node viewers. I have tested this with both KEVM+Foundry and raw KEVM specs, and it seems to work. --------- Co-authored-by: devops <[email protected]>
Baltoli
pushed a commit
to runtimeverification/k
that referenced
this pull request
Apr 9, 2024
) Fixes: #413 This PR introduces proof-specific viewers, and does a few refactors to make that possible: - Helpers are added to `KCFG` for turning into modules, including: - `KCFG.Split.covers` which returns each individual split as a reverse cover. - `KCFG.NDBranch.edges`, which returns each non-deterministic step as an edge. - `KCFG.Edge.to_rule`, which converts an edge into a K rule (or claim). - Small refactorings to `KCFGShow` structure: - `KCFGShow.dot` returns a `Digraph` directly (for further manipulation) instead of a list of `str`. - `KCFGShow.to_module` which returns a `KFlatModule` is factored out and used directly in `KCFGShow.show`. - Helper methods embedded in other methods in `KCFGShow` are factored out directly to staticmethods of `KCFGShow` so they can be reused easily. - We just treat `stuck` as a node attribute now, printed at the beginning of a node, instead of printing it a second time following a node too. - The way that `KCFGShow` calculates node attributes is adjusted and factor out. - A new class `NodePrinter` is factored out, which by default just uses the attributes the `KCFG` knows about for printing out nodes. - That class is extended by `APRProofNodePrinter` and `APRBMCProofNodePrinter`, which add the additional information about the nodes `pending,terminal,bounded` state. If a node is `terminal` or `bounded`, then the `stuck` attribute is no longer printed for less confusion. - `KCFGShow` now takes an optional `*NodePrinter` as an argument (or builds on itself), so instantiating that class is how you can customize how nodes are displayed in text. - The tests are adapted to use the more specific `*NodePrinter` classes, and the output checked that the more specific node information is indeed being included. - Adds helper predicates `APRProof.is_{pending,terminal}` and `APRProof.is_bounded`, which should behave better in case there are qualified node ids passed in. --------- Co-authored-by: devops <[email protected]>
Baltoli
pushed a commit
to runtimeverification/k
that referenced
this pull request
Apr 9, 2024
…tion/pyk#507) Following runtimeverification/pyk#489, it turns out that KEVM's TUI is broken because it relies on the old way of doing Node printing. This makes a new `APRProofViewer` class, which largely inherits from `KCFGViewer`, but adjusts it to handle the more spceific node viewers. I have tested this with both KEVM+Foundry and raw KEVM specs, and it seems to work. --------- Co-authored-by: devops <[email protected]>
Baltoli
pushed a commit
to runtimeverification/k
that referenced
this pull request
Apr 10, 2024
) Fixes: #413 This PR introduces proof-specific viewers, and does a few refactors to make that possible: - Helpers are added to `KCFG` for turning into modules, including: - `KCFG.Split.covers` which returns each individual split as a reverse cover. - `KCFG.NDBranch.edges`, which returns each non-deterministic step as an edge. - `KCFG.Edge.to_rule`, which converts an edge into a K rule (or claim). - Small refactorings to `KCFGShow` structure: - `KCFGShow.dot` returns a `Digraph` directly (for further manipulation) instead of a list of `str`. - `KCFGShow.to_module` which returns a `KFlatModule` is factored out and used directly in `KCFGShow.show`. - Helper methods embedded in other methods in `KCFGShow` are factored out directly to staticmethods of `KCFGShow` so they can be reused easily. - We just treat `stuck` as a node attribute now, printed at the beginning of a node, instead of printing it a second time following a node too. - The way that `KCFGShow` calculates node attributes is adjusted and factor out. - A new class `NodePrinter` is factored out, which by default just uses the attributes the `KCFG` knows about for printing out nodes. - That class is extended by `APRProofNodePrinter` and `APRBMCProofNodePrinter`, which add the additional information about the nodes `pending,terminal,bounded` state. If a node is `terminal` or `bounded`, then the `stuck` attribute is no longer printed for less confusion. - `KCFGShow` now takes an optional `*NodePrinter` as an argument (or builds on itself), so instantiating that class is how you can customize how nodes are displayed in text. - The tests are adapted to use the more specific `*NodePrinter` classes, and the output checked that the more specific node information is indeed being included. - Adds helper predicates `APRProof.is_{pending,terminal}` and `APRProof.is_bounded`, which should behave better in case there are qualified node ids passed in. --------- Co-authored-by: devops <[email protected]>
Baltoli
pushed a commit
to runtimeverification/k
that referenced
this pull request
Apr 10, 2024
…tion/pyk#507) Following runtimeverification/pyk#489, it turns out that KEVM's TUI is broken because it relies on the old way of doing Node printing. This makes a new `APRProofViewer` class, which largely inherits from `KCFGViewer`, but adjusts it to handle the more spceific node viewers. I have tested this with both KEVM+Foundry and raw KEVM specs, and it seems to work. --------- Co-authored-by: devops <[email protected]>
Baltoli
pushed a commit
to runtimeverification/k
that referenced
this pull request
Apr 10, 2024
) Fixes: #413 This PR introduces proof-specific viewers, and does a few refactors to make that possible: - Helpers are added to `KCFG` for turning into modules, including: - `KCFG.Split.covers` which returns each individual split as a reverse cover. - `KCFG.NDBranch.edges`, which returns each non-deterministic step as an edge. - `KCFG.Edge.to_rule`, which converts an edge into a K rule (or claim). - Small refactorings to `KCFGShow` structure: - `KCFGShow.dot` returns a `Digraph` directly (for further manipulation) instead of a list of `str`. - `KCFGShow.to_module` which returns a `KFlatModule` is factored out and used directly in `KCFGShow.show`. - Helper methods embedded in other methods in `KCFGShow` are factored out directly to staticmethods of `KCFGShow` so they can be reused easily. - We just treat `stuck` as a node attribute now, printed at the beginning of a node, instead of printing it a second time following a node too. - The way that `KCFGShow` calculates node attributes is adjusted and factor out. - A new class `NodePrinter` is factored out, which by default just uses the attributes the `KCFG` knows about for printing out nodes. - That class is extended by `APRProofNodePrinter` and `APRBMCProofNodePrinter`, which add the additional information about the nodes `pending,terminal,bounded` state. If a node is `terminal` or `bounded`, then the `stuck` attribute is no longer printed for less confusion. - `KCFGShow` now takes an optional `*NodePrinter` as an argument (or builds on itself), so instantiating that class is how you can customize how nodes are displayed in text. - The tests are adapted to use the more specific `*NodePrinter` classes, and the output checked that the more specific node information is indeed being included. - Adds helper predicates `APRProof.is_{pending,terminal}` and `APRProof.is_bounded`, which should behave better in case there are qualified node ids passed in. --------- Co-authored-by: devops <[email protected]>
Baltoli
pushed a commit
to runtimeverification/k
that referenced
this pull request
Apr 10, 2024
…tion/pyk#507) Following runtimeverification/pyk#489, it turns out that KEVM's TUI is broken because it relies on the old way of doing Node printing. This makes a new `APRProofViewer` class, which largely inherits from `KCFGViewer`, but adjusts it to handle the more spceific node viewers. I have tested this with both KEVM+Foundry and raw KEVM specs, and it seems to work. --------- 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.


Fixes: #413
This PR introduces proof-specific viewers, and does a few refactors to make that possible:
KCFGfor turning into modules, including:KCFG.Split.coverswhich returns each individual split as a reverse cover.KCFG.NDBranch.edges, which returns each non-deterministic step as an edge.KCFG.Edge.to_rule, which converts an edge into a K rule (or claim).KCFGShowstructure:KCFGShow.dotreturns aDigraphdirectly (for further manipulation) instead of a list ofstr.KCFGShow.to_modulewhich returns aKFlatModuleis factored out and used directly inKCFGShow.show.KCFGShoware factored out directly to staticmethods ofKCFGShowso they can be reused easily.stuckas a node attribute now, printed at the beginning of a node, instead of printing it a second time following a node too.KCFGShowcalculates node attributes is adjusted and factor out.NodePrinteris factored out, which by default just uses the attributes theKCFGknows about for printing out nodes.APRProofNodePrinterandAPRBMCProofNodePrinter, which add the additional information about the nodespending,terminal,boundedstate. If a node isterminalorbounded, then thestuckattribute is no longer printed for less confusion.KCFGShownow takes an optional*NodePrinteras an argument (or builds on itself), so instantiating that class is how you can customize how nodes are displayed in text.*NodePrinterclasses, and the output checked that the more specific node information is indeed being included.APRProof.is_{pending,terminal}andAPRProof.is_bounded, which should behave better in case there are qualified node ids passed in.