Skip to content
This repository was archived by the owner on Apr 25, 2024. It is now read-only.

Implement first past of KFlatModule conversion to Kore #835

Merged
merged 11 commits into from
Jan 24, 2024

Conversation

ehildenb
Copy link
Member

@ehildenb ehildenb commented Jan 23, 2024

This PR is to begin a refactoring needed for CSE, and also begin work on implementing the skeleton of ModuleToKORE in pyk.

  • A new routine is added to konvert for kflatmodule_to_kore, which converts modules which contain only rules and imports to Kore.
  • This routine is used for building up the dependencies and circularities modules in initializing the APRProver, and then putting them into the add_module endpoint directly.
  • The code KCFG.as_claim is turned into a simpler KCFG.as_rule, which uses existing routines instead of making a new one. This uses the cterm modules build_rule functionality, which is adjusted to not strip out information needed for making backend-compatible rules (previously this routine was used for display purposes only).
  • Old code for handling the dependencies/circularities modules in APRProver is removed.

@ehildenb ehildenb self-assigned this Jan 23, 2024
Copy link
Contributor

@nwatson22 nwatson22 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think I am just missing some context for this. How/for what is ModuleToKORE intended to be used?

@ehildenb
Copy link
Member Author

ModuleToKORE is implemented in the Java frontend here. It implements the frontends translation of KAST to Kore.

This takes us one step closer to fully implementing that in pyk instead of in the Java frontend.

@rv-jenkins rv-jenkins merged commit fa9051a into master Jan 24, 2024
@rv-jenkins rv-jenkins deleted the kflatmodule-to-kore branch January 24, 2024 17:26
anvacaru pushed a commit that referenced this pull request Jan 25, 2024
…832)

~Blocked on: #835

In this PR, we setup for CSE (compositional symbolic execution) in
Kontrol. This PR enables using the existing subproof mechanism for
setting up that possibility. In particular:

- The method `KCFG.to_rules` is factored out of `KCFG.to_module`, to
produce the list of rules associated with the basic blocks of the KCFG.
- The injection of dependencies for a given subproof is modified to use
this `KCFG.to_rules` instead, so that it is injecting the basic blocks
of the subproof instead of the created transitino from init to target
term.
- A proof that was marked as `PENDING` before when having an un-admitted
dependency is now marked as `FAILING` because of the more careful way we
handle un-admitted dependencies when adding dependencies modules.
- Improves the module name munging to produce Modules from KCFGs.

---------

Co-authored-by: devops <[email protected]>
rv-jenkins pushed a commit that referenced this pull request Feb 3, 2024
In this PR: #835, the
function `build_rule` is modified to maintain all structure of a rule.
But that routine is also used for creating pretty-printing rules for
parsing via the frontend. Rules that need to be parsed via the frontend
must not contain the `<generated*>` cells.

This PR makes sure that `KCFGShow(...)` still minimizes the rules that
are printed via `to_module`. This should allow undoing most of the
output changes here:
runtimeverification/kontrol#325.

---------

Co-authored-by: devops <[email protected]>
Baltoli pushed a commit to runtimeverification/k that referenced this pull request Apr 9, 2024
…832)

~Blocked on: runtimeverification/pyk#835

In this PR, we setup for CSE (compositional symbolic execution) in
Kontrol. This PR enables using the existing subproof mechanism for
setting up that possibility. In particular:

- The method `KCFG.to_rules` is factored out of `KCFG.to_module`, to
produce the list of rules associated with the basic blocks of the KCFG.
- The injection of dependencies for a given subproof is modified to use
this `KCFG.to_rules` instead, so that it is injecting the basic blocks
of the subproof instead of the created transitino from init to target
term.
- A proof that was marked as `PENDING` before when having an un-admitted
dependency is now marked as `FAILING` because of the more careful way we
handle un-admitted dependencies when adding dependencies modules.
- Improves the module name munging to produce Modules from KCFGs.

---------

Co-authored-by: devops <[email protected]>
Baltoli pushed a commit to runtimeverification/k that referenced this pull request Apr 9, 2024
In this PR: runtimeverification/pyk#835, the
function `build_rule` is modified to maintain all structure of a rule.
But that routine is also used for creating pretty-printing rules for
parsing via the frontend. Rules that need to be parsed via the frontend
must not contain the `<generated*>` cells.

This PR makes sure that `KCFGShow(...)` still minimizes the rules that
are printed via `to_module`. This should allow undoing most of the
output changes here:
runtimeverification/kontrol#325.

---------

Co-authored-by: devops <[email protected]>
Baltoli pushed a commit to runtimeverification/k that referenced this pull request Apr 9, 2024
…cation/pyk#835)

This PR is to begin a refactoring needed for CSE, and also begin work on
implementing the skeleton of ModuleToKORE in pyk.

- A new routine is added to `konvert` for `kflatmodule_to_kore`, which
converts modules which contain only rules and imports to Kore.
- This routine is used for building up the dependencies and
circularities modules in initializing the `APRProver`, and then putting
them into the `add_module` endpoint directly.
- The code `KCFG.as_claim` is turned into a simpler `KCFG.as_rule`,
which uses existing routines instead of making a new one. This uses the
`cterm` modules `build_rule` functionality, which is adjusted to not
strip out information needed for making backend-compatible rules
(previously this routine was used for display purposes only).
- Old code for handling the dependencies/circularities modules in
`APRProver` is removed.

---------

Co-authored-by: devops <[email protected]>
Baltoli pushed a commit to runtimeverification/k that referenced this pull request Apr 9, 2024
…untimeverification/pyk#832)

~Blocked on: runtimeverification/pyk#835

In this PR, we setup for CSE (compositional symbolic execution) in
Kontrol. This PR enables using the existing subproof mechanism for
setting up that possibility. In particular:

- The method `KCFG.to_rules` is factored out of `KCFG.to_module`, to
produce the list of rules associated with the basic blocks of the KCFG.
- The injection of dependencies for a given subproof is modified to use
this `KCFG.to_rules` instead, so that it is injecting the basic blocks
of the subproof instead of the created transitino from init to target
term.
- A proof that was marked as `PENDING` before when having an un-admitted
dependency is now marked as `FAILING` because of the more careful way we
handle un-admitted dependencies when adding dependencies modules.
- Improves the module name munging to produce Modules from KCFGs.

---------

Co-authored-by: devops <[email protected]>
Baltoli pushed a commit to runtimeverification/k that referenced this pull request Apr 9, 2024
In this PR: runtimeverification/pyk#835, the
function `build_rule` is modified to maintain all structure of a rule.
But that routine is also used for creating pretty-printing rules for
parsing via the frontend. Rules that need to be parsed via the frontend
must not contain the `<generated*>` cells.

This PR makes sure that `KCFGShow(...)` still minimizes the rules that
are printed via `to_module`. This should allow undoing most of the
output changes here:
runtimeverification/kontrol#325.

---------

Co-authored-by: devops <[email protected]>
Baltoli pushed a commit to runtimeverification/k that referenced this pull request Apr 9, 2024
…cation/pyk#835)

This PR is to begin a refactoring needed for CSE, and also begin work on
implementing the skeleton of ModuleToKORE in pyk.

- A new routine is added to `konvert` for `kflatmodule_to_kore`, which
converts modules which contain only rules and imports to Kore.
- This routine is used for building up the dependencies and
circularities modules in initializing the `APRProver`, and then putting
them into the `add_module` endpoint directly.
- The code `KCFG.as_claim` is turned into a simpler `KCFG.as_rule`,
which uses existing routines instead of making a new one. This uses the
`cterm` modules `build_rule` functionality, which is adjusted to not
strip out information needed for making backend-compatible rules
(previously this routine was used for display purposes only).
- Old code for handling the dependencies/circularities modules in
`APRProver` is removed.

---------

Co-authored-by: devops <[email protected]>
Baltoli pushed a commit to runtimeverification/k that referenced this pull request Apr 9, 2024
…untimeverification/pyk#832)

~Blocked on: runtimeverification/pyk#835

In this PR, we setup for CSE (compositional symbolic execution) in
Kontrol. This PR enables using the existing subproof mechanism for
setting up that possibility. In particular:

- The method `KCFG.to_rules` is factored out of `KCFG.to_module`, to
produce the list of rules associated with the basic blocks of the KCFG.
- The injection of dependencies for a given subproof is modified to use
this `KCFG.to_rules` instead, so that it is injecting the basic blocks
of the subproof instead of the created transitino from init to target
term.
- A proof that was marked as `PENDING` before when having an un-admitted
dependency is now marked as `FAILING` because of the more careful way we
handle un-admitted dependencies when adding dependencies modules.
- Improves the module name munging to produce Modules from KCFGs.

---------

Co-authored-by: devops <[email protected]>
Baltoli pushed a commit to runtimeverification/k that referenced this pull request Apr 9, 2024
In this PR: runtimeverification/pyk#835, the
function `build_rule` is modified to maintain all structure of a rule.
But that routine is also used for creating pretty-printing rules for
parsing via the frontend. Rules that need to be parsed via the frontend
must not contain the `<generated*>` cells.

This PR makes sure that `KCFGShow(...)` still minimizes the rules that
are printed via `to_module`. This should allow undoing most of the
output changes here:
runtimeverification/kontrol#325.

---------

Co-authored-by: devops <[email protected]>
Baltoli pushed a commit to runtimeverification/k that referenced this pull request Apr 10, 2024
…cation/pyk#835)

This PR is to begin a refactoring needed for CSE, and also begin work on
implementing the skeleton of ModuleToKORE in pyk.

- A new routine is added to `konvert` for `kflatmodule_to_kore`, which
converts modules which contain only rules and imports to Kore.
- This routine is used for building up the dependencies and
circularities modules in initializing the `APRProver`, and then putting
them into the `add_module` endpoint directly.
- The code `KCFG.as_claim` is turned into a simpler `KCFG.as_rule`,
which uses existing routines instead of making a new one. This uses the
`cterm` modules `build_rule` functionality, which is adjusted to not
strip out information needed for making backend-compatible rules
(previously this routine was used for display purposes only).
- Old code for handling the dependencies/circularities modules in
`APRProver` is removed.

---------

Co-authored-by: devops <[email protected]>
Baltoli pushed a commit to runtimeverification/k that referenced this pull request Apr 10, 2024
…untimeverification/pyk#832)

~Blocked on: runtimeverification/pyk#835

In this PR, we setup for CSE (compositional symbolic execution) in
Kontrol. This PR enables using the existing subproof mechanism for
setting up that possibility. In particular:

- The method `KCFG.to_rules` is factored out of `KCFG.to_module`, to
produce the list of rules associated with the basic blocks of the KCFG.
- The injection of dependencies for a given subproof is modified to use
this `KCFG.to_rules` instead, so that it is injecting the basic blocks
of the subproof instead of the created transitino from init to target
term.
- A proof that was marked as `PENDING` before when having an un-admitted
dependency is now marked as `FAILING` because of the more careful way we
handle un-admitted dependencies when adding dependencies modules.
- Improves the module name munging to produce Modules from KCFGs.

---------

Co-authored-by: devops <[email protected]>
Baltoli pushed a commit to runtimeverification/k that referenced this pull request Apr 10, 2024
In this PR: runtimeverification/pyk#835, the
function `build_rule` is modified to maintain all structure of a rule.
But that routine is also used for creating pretty-printing rules for
parsing via the frontend. Rules that need to be parsed via the frontend
must not contain the `<generated*>` cells.

This PR makes sure that `KCFGShow(...)` still minimizes the rules that
are printed via `to_module`. This should allow undoing most of the
output changes here:
runtimeverification/kontrol#325.

---------

Co-authored-by: devops <[email protected]>
Baltoli pushed a commit to runtimeverification/k that referenced this pull request Apr 10, 2024
…cation/pyk#835)

This PR is to begin a refactoring needed for CSE, and also begin work on
implementing the skeleton of ModuleToKORE in pyk.

- A new routine is added to `konvert` for `kflatmodule_to_kore`, which
converts modules which contain only rules and imports to Kore.
- This routine is used for building up the dependencies and
circularities modules in initializing the `APRProver`, and then putting
them into the `add_module` endpoint directly.
- The code `KCFG.as_claim` is turned into a simpler `KCFG.as_rule`,
which uses existing routines instead of making a new one. This uses the
`cterm` modules `build_rule` functionality, which is adjusted to not
strip out information needed for making backend-compatible rules
(previously this routine was used for display purposes only).
- Old code for handling the dependencies/circularities modules in
`APRProver` is removed.

---------

Co-authored-by: devops <[email protected]>
Baltoli pushed a commit to runtimeverification/k that referenced this pull request Apr 10, 2024
…untimeverification/pyk#832)

~Blocked on: runtimeverification/pyk#835

In this PR, we setup for CSE (compositional symbolic execution) in
Kontrol. This PR enables using the existing subproof mechanism for
setting up that possibility. In particular:

- The method `KCFG.to_rules` is factored out of `KCFG.to_module`, to
produce the list of rules associated with the basic blocks of the KCFG.
- The injection of dependencies for a given subproof is modified to use
this `KCFG.to_rules` instead, so that it is injecting the basic blocks
of the subproof instead of the created transitino from init to target
term.
- A proof that was marked as `PENDING` before when having an un-admitted
dependency is now marked as `FAILING` because of the more careful way we
handle un-admitted dependencies when adding dependencies modules.
- Improves the module name munging to produce Modules from KCFGs.

---------

Co-authored-by: devops <[email protected]>
Baltoli pushed a commit to runtimeverification/k that referenced this pull request Apr 10, 2024
In this PR: runtimeverification/pyk#835, the
function `build_rule` is modified to maintain all structure of a rule.
But that routine is also used for creating pretty-printing rules for
parsing via the frontend. Rules that need to be parsed via the frontend
must not contain the `<generated*>` cells.

This PR makes sure that `KCFGShow(...)` still minimizes the rules that
are printed via `to_module`. This should allow undoing most of the
output changes here:
runtimeverification/kontrol#325.

---------

Co-authored-by: devops <[email protected]>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants