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
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
3f7e975
to
74803bb
Compare
Changes to KEVM to make it build successfully with this change are in this branch: runtimeverification/evm-semantics#2294 |
…r and EqualityPRover
…us to ImpliesProof.status
7108637
to
c01aeff
Compare
nwatson22
approved these changes
Feb 14, 2024
ehildenb
added a commit
that referenced
this pull request
Feb 15, 2024
~Blocked on: #878 In an attempt to make the prover interfaces simpler, we are making it so that `advance_proof` is a generic method among all `*Prover` classes. This will allow us to have a generic way to call subproofs and advance them, then call superproofs and advance them, which will allow simplifying some downstream logic a bit. - Makes it so that `mlEqualsTrue` and `mlEqualsFalse` can take sort arguments for their outer sort. - Moves all the `APRProof` specific arguments of `APRProof.advance_proof` to the constructor instead. - Adds an `abstractmethod Proof.step_proof(...)` which should take one step of executing a proof to completion. - Adds an `abstractmethod Proof.can_progress` which lets you know if it's possible to make progress on a given proof. - Implements generic `Proof.advance_proof(...)` which handles calling `step_proof` in a loop until either `max_iterations` is reached, the proof can no longer progress, or if `fail_fast` trigger hits. It also handles writing proof data each iteration. - Adjusts all the tests to the new interface. --------- Co-authored-by: devops <[email protected]>
Baltoli
pushed a commit
to runtimeverification/k
that referenced
this pull request
Apr 9, 2024
~Blocked on: runtimeverification/pyk#878 In an attempt to make the prover interfaces simpler, we are making it so that `advance_proof` is a generic method among all `*Prover` classes. This will allow us to have a generic way to call subproofs and advance them, then call superproofs and advance them, which will allow simplifying some downstream logic a bit. - Makes it so that `mlEqualsTrue` and `mlEqualsFalse` can take sort arguments for their outer sort. - Moves all the `APRProof` specific arguments of `APRProof.advance_proof` to the constructor instead. - Adds an `abstractmethod Proof.step_proof(...)` which should take one step of executing a proof to completion. - Adds an `abstractmethod Proof.can_progress` which lets you know if it's possible to make progress on a given proof. - Implements generic `Proof.advance_proof(...)` which handles calling `step_proof` in a loop until either `max_iterations` is reached, the proof can no longer progress, or if `fail_fast` trigger hits. It also handles writing proof data each iteration. - Adjusts all the tests to the new interface. --------- Co-authored-by: devops <[email protected]>
Baltoli
pushed a commit
to runtimeverification/k
that referenced
this pull request
Apr 9, 2024
While working on runtimeverification/pyk#875, I found many places in `ImpliesProof` class hierarchy that we can make things simpler. In general: - `mlEqualsTrue` and `mlEqualsFalse` are given sorts they can use for the outer sort of the equality. - The various renaming of `antecedent` and `consequent` in subclasses are removed. - The `ImpliesProof` gets its own `dict` and `from_dict` methods, and the subclasses and reuse it. - `advance_proof` no longer needs to be overloaded in the subclasses. - Various really simple setter methods are removed in favor of direct setting of paramaters in the proofs. - The now-useless classes `EqualityProver` and `RefutationProver` are removed. Essentially, after this, `EqualityProof` and `RefutationProof` are just "smart constructors" for `ImpliesProof`, with different names for the antecedent/consequent and specific ways of constructing the antecedent/consequent. The key difference here is that `EqualityProver` and `RefutationProver` were tracking their own proof state before (by storing and manipulating `_antecedent_kast` and `_consequent_kast` themselves directly), and now they rely only on the `*Proof` objects to store state. --------- Co-authored-by: devops <[email protected]>
Baltoli
pushed a commit
to runtimeverification/k
that referenced
this pull request
Apr 9, 2024
~Blocked on: runtimeverification/pyk#878 In an attempt to make the prover interfaces simpler, we are making it so that `advance_proof` is a generic method among all `*Prover` classes. This will allow us to have a generic way to call subproofs and advance them, then call superproofs and advance them, which will allow simplifying some downstream logic a bit. - Makes it so that `mlEqualsTrue` and `mlEqualsFalse` can take sort arguments for their outer sort. - Moves all the `APRProof` specific arguments of `APRProof.advance_proof` to the constructor instead. - Adds an `abstractmethod Proof.step_proof(...)` which should take one step of executing a proof to completion. - Adds an `abstractmethod Proof.can_progress` which lets you know if it's possible to make progress on a given proof. - Implements generic `Proof.advance_proof(...)` which handles calling `step_proof` in a loop until either `max_iterations` is reached, the proof can no longer progress, or if `fail_fast` trigger hits. It also handles writing proof data each iteration. - Adjusts all the tests to the new interface. --------- Co-authored-by: devops <[email protected]>
Baltoli
pushed a commit
to runtimeverification/k
that referenced
this pull request
Apr 9, 2024
While working on runtimeverification/pyk#875, I found many places in `ImpliesProof` class hierarchy that we can make things simpler. In general: - `mlEqualsTrue` and `mlEqualsFalse` are given sorts they can use for the outer sort of the equality. - The various renaming of `antecedent` and `consequent` in subclasses are removed. - The `ImpliesProof` gets its own `dict` and `from_dict` methods, and the subclasses and reuse it. - `advance_proof` no longer needs to be overloaded in the subclasses. - Various really simple setter methods are removed in favor of direct setting of paramaters in the proofs. - The now-useless classes `EqualityProver` and `RefutationProver` are removed. Essentially, after this, `EqualityProof` and `RefutationProof` are just "smart constructors" for `ImpliesProof`, with different names for the antecedent/consequent and specific ways of constructing the antecedent/consequent. The key difference here is that `EqualityProver` and `RefutationProver` were tracking their own proof state before (by storing and manipulating `_antecedent_kast` and `_consequent_kast` themselves directly), and now they rely only on the `*Proof` objects to store state. --------- Co-authored-by: devops <[email protected]>
Baltoli
pushed a commit
to runtimeverification/k
that referenced
this pull request
Apr 9, 2024
~Blocked on: runtimeverification/pyk#878 In an attempt to make the prover interfaces simpler, we are making it so that `advance_proof` is a generic method among all `*Prover` classes. This will allow us to have a generic way to call subproofs and advance them, then call superproofs and advance them, which will allow simplifying some downstream logic a bit. - Makes it so that `mlEqualsTrue` and `mlEqualsFalse` can take sort arguments for their outer sort. - Moves all the `APRProof` specific arguments of `APRProof.advance_proof` to the constructor instead. - Adds an `abstractmethod Proof.step_proof(...)` which should take one step of executing a proof to completion. - Adds an `abstractmethod Proof.can_progress` which lets you know if it's possible to make progress on a given proof. - Implements generic `Proof.advance_proof(...)` which handles calling `step_proof` in a loop until either `max_iterations` is reached, the proof can no longer progress, or if `fail_fast` trigger hits. It also handles writing proof data each iteration. - Adjusts all the tests to the new interface. --------- Co-authored-by: devops <[email protected]>
Baltoli
pushed a commit
to runtimeverification/k
that referenced
this pull request
Apr 10, 2024
While working on runtimeverification/pyk#875, I found many places in `ImpliesProof` class hierarchy that we can make things simpler. In general: - `mlEqualsTrue` and `mlEqualsFalse` are given sorts they can use for the outer sort of the equality. - The various renaming of `antecedent` and `consequent` in subclasses are removed. - The `ImpliesProof` gets its own `dict` and `from_dict` methods, and the subclasses and reuse it. - `advance_proof` no longer needs to be overloaded in the subclasses. - Various really simple setter methods are removed in favor of direct setting of paramaters in the proofs. - The now-useless classes `EqualityProver` and `RefutationProver` are removed. Essentially, after this, `EqualityProof` and `RefutationProof` are just "smart constructors" for `ImpliesProof`, with different names for the antecedent/consequent and specific ways of constructing the antecedent/consequent. The key difference here is that `EqualityProver` and `RefutationProver` were tracking their own proof state before (by storing and manipulating `_antecedent_kast` and `_consequent_kast` themselves directly), and now they rely only on the `*Proof` objects to store state. --------- Co-authored-by: devops <[email protected]>
Baltoli
pushed a commit
to runtimeverification/k
that referenced
this pull request
Apr 10, 2024
~Blocked on: runtimeverification/pyk#878 In an attempt to make the prover interfaces simpler, we are making it so that `advance_proof` is a generic method among all `*Prover` classes. This will allow us to have a generic way to call subproofs and advance them, then call superproofs and advance them, which will allow simplifying some downstream logic a bit. - Makes it so that `mlEqualsTrue` and `mlEqualsFalse` can take sort arguments for their outer sort. - Moves all the `APRProof` specific arguments of `APRProof.advance_proof` to the constructor instead. - Adds an `abstractmethod Proof.step_proof(...)` which should take one step of executing a proof to completion. - Adds an `abstractmethod Proof.can_progress` which lets you know if it's possible to make progress on a given proof. - Implements generic `Proof.advance_proof(...)` which handles calling `step_proof` in a loop until either `max_iterations` is reached, the proof can no longer progress, or if `fail_fast` trigger hits. It also handles writing proof data each iteration. - Adjusts all the tests to the new interface. --------- Co-authored-by: devops <[email protected]>
Baltoli
pushed a commit
to runtimeverification/k
that referenced
this pull request
Apr 10, 2024
While working on runtimeverification/pyk#875, I found many places in `ImpliesProof` class hierarchy that we can make things simpler. In general: - `mlEqualsTrue` and `mlEqualsFalse` are given sorts they can use for the outer sort of the equality. - The various renaming of `antecedent` and `consequent` in subclasses are removed. - The `ImpliesProof` gets its own `dict` and `from_dict` methods, and the subclasses and reuse it. - `advance_proof` no longer needs to be overloaded in the subclasses. - Various really simple setter methods are removed in favor of direct setting of paramaters in the proofs. - The now-useless classes `EqualityProver` and `RefutationProver` are removed. Essentially, after this, `EqualityProof` and `RefutationProof` are just "smart constructors" for `ImpliesProof`, with different names for the antecedent/consequent and specific ways of constructing the antecedent/consequent. The key difference here is that `EqualityProver` and `RefutationProver` were tracking their own proof state before (by storing and manipulating `_antecedent_kast` and `_consequent_kast` themselves directly), and now they rely only on the `*Proof` objects to store state. --------- Co-authored-by: devops <[email protected]>
Baltoli
pushed a commit
to runtimeverification/k
that referenced
this pull request
Apr 10, 2024
~Blocked on: runtimeverification/pyk#878 In an attempt to make the prover interfaces simpler, we are making it so that `advance_proof` is a generic method among all `*Prover` classes. This will allow us to have a generic way to call subproofs and advance them, then call superproofs and advance them, which will allow simplifying some downstream logic a bit. - Makes it so that `mlEqualsTrue` and `mlEqualsFalse` can take sort arguments for their outer sort. - Moves all the `APRProof` specific arguments of `APRProof.advance_proof` to the constructor instead. - Adds an `abstractmethod Proof.step_proof(...)` which should take one step of executing a proof to completion. - Adds an `abstractmethod Proof.can_progress` which lets you know if it's possible to make progress on a given proof. - Implements generic `Proof.advance_proof(...)` which handles calling `step_proof` in a loop until either `max_iterations` is reached, the proof can no longer progress, or if `fail_fast` trigger hits. It also handles writing proof data each iteration. - Adjusts all the tests to the new interface. --------- 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.
While working on #875, I found many places in
ImpliesProof
class hierarchy that we can make things simpler. In general:mlEqualsTrue
andmlEqualsFalse
are given sorts they can use for the outer sort of the equality.antecedent
andconsequent
in subclasses are removed.ImpliesProof
gets its owndict
andfrom_dict
methods, and the subclasses and reuse it.advance_proof
no longer needs to be overloaded in the subclasses.EqualityProver
andRefutationProver
are removed.Essentially, after this,
EqualityProof
andRefutationProof
are just "smart constructors" forImpliesProof
, with different names for the antecedent/consequent and specific ways of constructing the antecedent/consequent. The key difference here is thatEqualityProver
andRefutationProver
were tracking their own proof state before (by storing and manipulating_antecedent_kast
and_consequent_kast
themselves directly), and now they rely only on the*Proof
objects to store state.