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
Make advance proof functionality generic #875
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
56c962e
to
4565d3b
Compare
KEVM is updated here to handle this new interface: runtimeverification/evm-semantics#2294 |
This was referenced Feb 13, 2024
1639d9f
to
7b2c250
Compare
ehildenb
added a commit
that referenced
this pull request
Feb 14, 2024
I made a PR here #875 which caused CI to jump from 8 minutes to an infinite loop. We shouldn't let CI machines be taken up because of mistakes in PRs. This also adds the pytest-timeout module so we can do `make cov-integration COV_ARGS='--timeout 300'` to timeout individual tests. --------- Co-authored-by: devops <[email protected]> Co-authored-by: rv-jenkins <[email protected]>
7b2c250
to
cca2d63
Compare
rv-jenkins
pushed a commit
that referenced
this pull request
Feb 14, 2024
While working on #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]>
…Prover.step_proof
…n_progress to control iterations
cca2d63
to
44486b5
Compare
nwatson22
approved these changes
Feb 14, 2024
Baltoli
pushed a commit
to runtimeverification/k
that referenced
this pull request
Apr 9, 2024
I made a PR here runtimeverification/pyk#875 which caused CI to jump from 8 minutes to an infinite loop. We shouldn't let CI machines be taken up because of mistakes in PRs. This also adds the pytest-timeout module so we can do `make cov-integration COV_ARGS='--timeout 300'` to timeout individual tests. --------- 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
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
I made a PR here runtimeverification/pyk#875 which caused CI to jump from 8 minutes to an infinite loop. We shouldn't let CI machines be taken up because of mistakes in PRs. This also adds the pytest-timeout module so we can do `make cov-integration COV_ARGS='--timeout 300'` to timeout individual tests. --------- 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
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
I made a PR here runtimeverification/pyk#875 which caused CI to jump from 8 minutes to an infinite loop. We shouldn't let CI machines be taken up because of mistakes in PRs. This also adds the pytest-timeout module so we can do `make cov-integration COV_ARGS='--timeout 300'` to timeout individual tests. --------- 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
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
I made a PR here runtimeverification/pyk#875 which caused CI to jump from 8 minutes to an infinite loop. We shouldn't let CI machines be taken up because of mistakes in PRs. This also adds the pytest-timeout module so we can do `make cov-integration COV_ARGS='--timeout 300'` to timeout individual tests. --------- 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
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
I made a PR here runtimeverification/pyk#875 which caused CI to jump from 8 minutes to an infinite loop. We shouldn't let CI machines be taken up because of mistakes in PRs. This also adds the pytest-timeout module so we can do `make cov-integration COV_ARGS='--timeout 300'` to timeout individual tests. --------- 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
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.
Blocked on: #878In 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.mlEqualsTrue
andmlEqualsFalse
can take sort arguments for their outer sort.APRProof
specific arguments ofAPRProof.advance_proof
to the constructor instead.abstractmethod Proof.step_proof(...)
which should take one step of executing a proof to completion.abstractmethod Proof.can_progress
which lets you know if it's possible to make progress on a given proof.Proof.advance_proof(...)
which handles callingstep_proof
in a loop until eithermax_iterations
is reached, the proof can no longer progress, or iffail_fast
trigger hits. It also handles writing proof data each iteration.