This repository has been 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
Split out CTerm manipulation functionalities of KCFGExplore #915
Merged
Conversation
This file contains 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
…mands into cterm submodule
…licTest, KPrintTest
tothtamas28
approved these changes
Feb 26, 2024
This was referenced Feb 27, 2024
Merged
rv-jenkins
pushed a commit
that referenced
this pull request
Feb 27, 2024
#915 introduced a circular import crash which is triggered when executing `pyk rpc-kast` `rpc.py > kprove.py > cterm > symbolic.py > rpc.py` Moves `KoreExecLogFormat` to `kore/rpc.py` --------- Co-authored-by: devops <devops@runtimeverification.com> Co-authored-by: lucasmt <36549752+lucasmt@users.noreply.github.com>
This was referenced Feb 28, 2024
Baltoli
pushed a commit
to runtimeverification/k
that referenced
this pull request
Apr 9, 2024
…erification/pyk#915) `KCFGExplore` class has grown quite a bit, and broadly contains two types of things: (i) wrappers around the `KoreClient` for the `CTerm` class, and (ii) functionalities for manipulating KCFGs using said wrappers. This PR pulls the first category out into a new submodule of the `cterm` submodule. - Module `cterm/symbolic.py` is added, with class `CTermSymbolic`, which wraps a `KoreClient` and lifts its functionalities to from Kore to `CTerm` level. - The class `CTermSymbolic` doesn't need access to a `KPrint`, instead just a `KDefinition` and a `KompiledKore`. - The class `CTermSymbolic` implements two new methods `CTermSymbolic.kast_to_kore(KInner) -> Pattern` and `CTermSymbolic.kore_to_kast(Pattern) -> KInner` as wrappers around the methods in `konvert` which have the definitions applied, and uses them in the various methods instead. In particular, that means we do _not_ have fallback to `kast` binary for these methods (instead crashes), but these codepaths are very well tested now. - The methods from `KCFGExplore.cterm_*` are moved to the `CTermSymbolic` class, with the prefix `cterm_` dropped. - The `KCFGExplore` is updated to use this class instead of a `KoreClient` directly, and various `*Prover` classes are updated as well. - Updates to the testing harness are made: - A new fixture `CTermSymbolic` is added, for when only that is needed. - The directory `src/tests/integration/kcfg` is moved to `src/tests/integration/cterm`, and lowered to `CTermSymbolic` instead of `KCFGExplore`. --------- Co-authored-by: devops <devops@runtimeverification.com>
Baltoli
pushed a commit
to runtimeverification/k
that referenced
this pull request
Apr 9, 2024
…erification/pyk#915) `KCFGExplore` class has grown quite a bit, and broadly contains two types of things: (i) wrappers around the `KoreClient` for the `CTerm` class, and (ii) functionalities for manipulating KCFGs using said wrappers. This PR pulls the first category out into a new submodule of the `cterm` submodule. - Module `cterm/symbolic.py` is added, with class `CTermSymbolic`, which wraps a `KoreClient` and lifts its functionalities to from Kore to `CTerm` level. - The class `CTermSymbolic` doesn't need access to a `KPrint`, instead just a `KDefinition` and a `KompiledKore`. - The class `CTermSymbolic` implements two new methods `CTermSymbolic.kast_to_kore(KInner) -> Pattern` and `CTermSymbolic.kore_to_kast(Pattern) -> KInner` as wrappers around the methods in `konvert` which have the definitions applied, and uses them in the various methods instead. In particular, that means we do _not_ have fallback to `kast` binary for these methods (instead crashes), but these codepaths are very well tested now. - The methods from `KCFGExplore.cterm_*` are moved to the `CTermSymbolic` class, with the prefix `cterm_` dropped. - The `KCFGExplore` is updated to use this class instead of a `KoreClient` directly, and various `*Prover` classes are updated as well. - Updates to the testing harness are made: - A new fixture `CTermSymbolic` is added, for when only that is needed. - The directory `src/tests/integration/kcfg` is moved to `src/tests/integration/cterm`, and lowered to `CTermSymbolic` instead of `KCFGExplore`. --------- Co-authored-by: devops <devops@runtimeverification.com>
Baltoli
pushed a commit
to runtimeverification/k
that referenced
this pull request
Apr 10, 2024
…erification/pyk#915) `KCFGExplore` class has grown quite a bit, and broadly contains two types of things: (i) wrappers around the `KoreClient` for the `CTerm` class, and (ii) functionalities for manipulating KCFGs using said wrappers. This PR pulls the first category out into a new submodule of the `cterm` submodule. - Module `cterm/symbolic.py` is added, with class `CTermSymbolic`, which wraps a `KoreClient` and lifts its functionalities to from Kore to `CTerm` level. - The class `CTermSymbolic` doesn't need access to a `KPrint`, instead just a `KDefinition` and a `KompiledKore`. - The class `CTermSymbolic` implements two new methods `CTermSymbolic.kast_to_kore(KInner) -> Pattern` and `CTermSymbolic.kore_to_kast(Pattern) -> KInner` as wrappers around the methods in `konvert` which have the definitions applied, and uses them in the various methods instead. In particular, that means we do _not_ have fallback to `kast` binary for these methods (instead crashes), but these codepaths are very well tested now. - The methods from `KCFGExplore.cterm_*` are moved to the `CTermSymbolic` class, with the prefix `cterm_` dropped. - The `KCFGExplore` is updated to use this class instead of a `KoreClient` directly, and various `*Prover` classes are updated as well. - Updates to the testing harness are made: - A new fixture `CTermSymbolic` is added, for when only that is needed. - The directory `src/tests/integration/kcfg` is moved to `src/tests/integration/cterm`, and lowered to `CTermSymbolic` instead of `KCFGExplore`. --------- Co-authored-by: devops <devops@runtimeverification.com>
Baltoli
pushed a commit
to runtimeverification/k
that referenced
this pull request
Apr 10, 2024
…erification/pyk#915) `KCFGExplore` class has grown quite a bit, and broadly contains two types of things: (i) wrappers around the `KoreClient` for the `CTerm` class, and (ii) functionalities for manipulating KCFGs using said wrappers. This PR pulls the first category out into a new submodule of the `cterm` submodule. - Module `cterm/symbolic.py` is added, with class `CTermSymbolic`, which wraps a `KoreClient` and lifts its functionalities to from Kore to `CTerm` level. - The class `CTermSymbolic` doesn't need access to a `KPrint`, instead just a `KDefinition` and a `KompiledKore`. - The class `CTermSymbolic` implements two new methods `CTermSymbolic.kast_to_kore(KInner) -> Pattern` and `CTermSymbolic.kore_to_kast(Pattern) -> KInner` as wrappers around the methods in `konvert` which have the definitions applied, and uses them in the various methods instead. In particular, that means we do _not_ have fallback to `kast` binary for these methods (instead crashes), but these codepaths are very well tested now. - The methods from `KCFGExplore.cterm_*` are moved to the `CTermSymbolic` class, with the prefix `cterm_` dropped. - The `KCFGExplore` is updated to use this class instead of a `KoreClient` directly, and various `*Prover` classes are updated as well. - Updates to the testing harness are made: - A new fixture `CTermSymbolic` is added, for when only that is needed. - The directory `src/tests/integration/kcfg` is moved to `src/tests/integration/cterm`, and lowered to `CTermSymbolic` instead of `KCFGExplore`. --------- Co-authored-by: devops <devops@runtimeverification.com>
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.
KCFGExplore
class has grown quite a bit, and broadly contains two types of things: (i) wrappers around theKoreClient
for theCTerm
class, and (ii) functionalities for manipulating KCFGs using said wrappers. This PR pulls the first category out into a new submodule of thecterm
submodule.cterm/symbolic.py
is added, with classCTermSymbolic
, which wraps aKoreClient
and lifts its functionalities to from Kore toCTerm
level.CTermSymbolic
doesn't need access to aKPrint
, instead just aKDefinition
and aKompiledKore
.CTermSymbolic
implements two new methodsCTermSymbolic.kast_to_kore(KInner) -> Pattern
andCTermSymbolic.kore_to_kast(Pattern) -> KInner
as wrappers around the methods inkonvert
which have the definitions applied, and uses them in the various methods instead. In particular, that means we do not have fallback tokast
binary for these methods (instead crashes), but these codepaths are very well tested now.KCFGExplore.cterm_*
are moved to theCTermSymbolic
class, with the prefixcterm_
dropped.KCFGExplore
is updated to use this class instead of aKoreClient
directly, and various*Prover
classes are updated as well.CTermSymbolic
is added, for when only that is needed.src/tests/integration/kcfg
is moved tosrc/tests/integration/cterm
, and lowered toCTermSymbolic
instead ofKCFGExplore
.