Skip to content

Commit

Permalink
Merge branch 'master' into _update-deps/runtimeverification/pyk
Browse files Browse the repository at this point in the history
  • Loading branch information
anvacaru authored Aug 24, 2023
2 parents 5e18613 + f3aa859 commit 990b7f6
Show file tree
Hide file tree
Showing 9 changed files with 23 additions and 17 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/master-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ jobs:
uses: actions/checkout@v3
with:
ref: ${{ github.event.push.head.sha }}
fetch-depth: 0
- name: 'Upgrade bash'
if: ${{ contains(matrix.os, 'macos') }}
run: brew install bash
Expand Down Expand Up @@ -61,6 +62,7 @@ jobs:
with:
submodules: recursive
ref: ${{ github.event.push.head.sha }}
fetch-depth: 0
- name: 'Set up Docker'
uses: ./.github/actions/with-docker
with:
Expand Down Expand Up @@ -119,6 +121,7 @@ jobs:
uses: actions/checkout@v3
with:
ref: ${{ github.event.push.head.sha }}
fetch-depth: 0
- name: 'Make Release'
env:
GITHUB_TOKEN: ${{ secrets.JENKINS_GITHUB_PAT }}
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/test-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ jobs:
uses: actions/checkout@v3
with:
submodules: true
fetch-depth: 0
- name: 'Install Poetry'
uses: Gr1N/setup-poetry@v8
- name: 'Build kevm'
Expand Down Expand Up @@ -136,6 +137,7 @@ jobs:
uses: actions/checkout@v3
with:
submodules: recursive
fetch-depth: 0
- name: 'Set up Docker'
uses: ./.github/actions/with-docker
with:
Expand All @@ -157,6 +159,7 @@ jobs:
uses: actions/checkout@v3
with:
submodules: recursive
fetch-depth: 0
- name: 'Set up Docker'
uses: ./.github/actions/with-docker
with:
Expand All @@ -182,6 +185,7 @@ jobs:
uses: actions/checkout@v3
with:
submodules: recursive
fetch-depth: 0
- name: 'Set up Docker'
uses: ./.github/actions/with-docker
with:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/update-foundry-prove.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ jobs:
submodules: recursive
token: ${{ secrets.JENKINS_GITHUB_PAT }}
ref: ${{ github.events.inputs.branch }}
fetch-depth: 0
- name: 'Configure GitHub user'
run: |
git config user.name devops
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/update-version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ jobs:
with:
submodules: recursive
token: ${{ secrets.JENKINS_GITHUB_PAT }}
fetch-depth: 0
- name: 'Configure GitHub user'
run: |
git config user.name devops
Expand Down
2 changes: 1 addition & 1 deletion kevm-pyk/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "poetry.core.masonry.api"

[tool.poetry]
name = "kevm-pyk"
version = "1.0.274"
version = "1.0.275"
description = ""
authors = [
"Runtime Verification, Inc. <contact@runtimeverification.com>",
Expand Down
17 changes: 4 additions & 13 deletions kevm-pyk/src/kevm_pyk/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
from pyk.kore.rpc import KoreClient, KoreExecLogFormat, kore_server
from pyk.proof import APRBMCProof, APRBMCProver, APRProof, APRProver
from pyk.proof.equality import EqualityProof, EqualityProver
from pyk.proof.proof import ProofStatus
from pyk.utils import single

if TYPE_CHECKING:
Expand Down Expand Up @@ -125,38 +124,30 @@ def kevm_prove(
cut_point_rules=cut_point_rules,
)
assert isinstance(proof, APRProof)
failure_nodes = proof.failing
if len(failure_nodes) == 0:
if proof.passed:
_LOGGER.info(f'Proof passed: {proof.id}')
return True
else:
_LOGGER.error(f'Proof failed: {proof.id}')
return False
elif type(prover) is EqualityProver:
prover.advance_proof()
if prover.proof.status == ProofStatus.PASSED:
if prover.proof.passed:
_LOGGER.info(f'Proof passed: {prover.proof.id}')
return True
if prover.proof.status == ProofStatus.FAILED:
elif prover.proof.failed:
_LOGGER.error(f'Proof failed: {prover.proof.id}')
if type(proof) is EqualityProof:
_LOGGER.info(proof.pretty(kprove))
return False
if prover.proof.status == ProofStatus.PENDING:
else:
_LOGGER.info(f'Proof pending: {prover.proof.id}')
return False
return False

except Exception as e:
_LOGGER.error(f'Proof crashed: {proof.id}\n{e}', exc_info=True)
return False
failure_nodes = proof.pending + proof.failing
if len(failure_nodes) == 0:
_LOGGER.info(f'Proof passed: {proof.id}')
return True
else:
_LOGGER.error(f'Proof failed: {proof.id}')
return False


def print_failure_info(proof: Proof, kcfg_explore: KCFGExplore, counterexample_info: bool = False) -> list[str]:
Expand Down
7 changes: 6 additions & 1 deletion kevm-pyk/src/tests/integration/test_foundry_prove.py
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,9 @@ def assert_or_update_show_output(show_res: str, expected_file: Path, *, update:


def test_foundry_resume_proof(foundry_root: Path, update_expected_output: bool) -> None:
foundry = Foundry(foundry_root)
test_id = 'AssumeTest.test_assume_false(uint256,uint256)'

prove_res = foundry_prove(
foundry_root,
tests=[test_id],
Expand All @@ -338,7 +340,10 @@ def test_foundry_resume_proof(foundry_root: Path, update_expected_output: bool)
max_iterations=4,
reinit=True,
)
assert_pass(test_id, prove_res)

proof = foundry.get_apr_proof(test_id)
assert proof.pending

prove_res = foundry_prove(
foundry_root,
tests=[test_id],
Expand Down
3 changes: 2 additions & 1 deletion package/debian/changelog
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
kevm (1.0.274) unstable; urgency=medium
kevm (1.0.275) unstable; urgency=medium

* Initial Release.

-- Everett Hildenbrandt <everett.hildenbrandt@runtimeverification.com> Tue, 16 Jul 2019 00:14:12 -0700

2 changes: 1 addition & 1 deletion package/version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.0.274
1.0.275

0 comments on commit 990b7f6

Please sign in to comment.