Skip to content

Commit

Permalink
Pass llvm_definition_dir to KCFGExplore in foundry-prove (#1957)
Browse files Browse the repository at this point in the history
* Update foundry-kompile, passing llvm_definition_dir to KCFGExplore when using booster

* Set Version: 1.0.235

* Set Version: 1.0.237

* Set Version: 1.0.238

* Set Version: 1.0.239

* Set Version: 1.0.240

* Set Version: 1.0.241

---------

Co-authored-by: devops <[email protected]>
Co-authored-by: rv-jenkins <[email protected]>
Co-authored-by: Andrei Văcaru <[email protected]>
  • Loading branch information
4 people authored Jul 26, 2023
1 parent c467120 commit 8960441
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 13 deletions.
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.240"
version = "1.0.241"
description = ""
authors = [
"Runtime Verification, Inc. <[email protected]>",
Expand Down
2 changes: 1 addition & 1 deletion kevm-pyk/src/kevm_pyk/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -525,7 +525,7 @@ def exec_foundry_prove(
implication_every_block: bool = True,
bmc_depth: int | None = None,
bug_report: bool = False,
kore_rpc_command: str | Iterable[str] = ('kore-rpc',),
kore_rpc_command: str | Iterable[str] | None = None,
use_booster: bool = False,
smt_timeout: int | None = None,
smt_retry_limit: int | None = None,
Expand Down
2 changes: 1 addition & 1 deletion kevm-pyk/src/kevm_pyk/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ def explore_args(self) -> ArgumentParser:
'--kore-rpc-command',
dest='kore_rpc_command',
type=str,
default='kore-rpc',
default=None,
help='Custom command to start RPC server',
)
args.add_argument(
Expand Down
14 changes: 6 additions & 8 deletions kevm-pyk/src/kevm_pyk/foundry.py
Original file line number Diff line number Diff line change
Expand Up @@ -423,7 +423,7 @@ def foundry_prove(
implication_every_block: bool = True,
bmc_depth: int | None = None,
bug_report: bool = False,
kore_rpc_command: str | Iterable[str] = ('kore-rpc',),
kore_rpc_command: str | Iterable[str] | None = None,
use_booster: bool = False,
smt_timeout: int | None = None,
smt_retry_limit: int | None = None,
Expand Down Expand Up @@ -451,13 +451,8 @@ def foundry_prove(
"Couldn't locate the kore-rpc-booster RPC binary. Please put 'kore-rpc-booster' on PATH manually or using kup install/kup shell."
) from None

if foundry.llvm_dylib:
kore_rpc_command = ('kore-rpc-booster', '--llvm-backend-library', str(foundry.llvm_dylib))
else:
foundry_llvm_dir = foundry.out / 'kompiled-llvm'
raise ValueError(
f"Could not find the LLVM dynamic library in {foundry_llvm_dir}. Please re-run foundry-kompile with the '--with-llvm-library' flag"
)
if kore_rpc_command is None:
kore_rpc_command = ('kore-rpc-booster',) if use_booster else ('kore-rpc',)

all_tests = [
f'{contract.name}.{method.name}'
Expand Down Expand Up @@ -516,11 +511,14 @@ def foundry_prove(

def _init_and_run_proof(_init_problem: tuple[str, str]) -> tuple[bool, list[str] | None]:
proof_id = f'{_init_problem[0]}.{_init_problem[1]}'
llvm_definition_dir = foundry.out / 'kompiled-llvm' if use_booster else None

with KCFGExplore(
foundry.kevm,
id=proof_id,
bug_report=br,
kore_rpc_command=kore_rpc_command,
llvm_definition_dir=llvm_definition_dir,
smt_timeout=smt_timeout,
smt_retry_limit=smt_retry_limit,
trace_rewrites=trace_rewrites,
Expand Down
2 changes: 1 addition & 1 deletion package/debian/changelog
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
kevm (1.0.240) unstable; urgency=medium
kevm (1.0.241) unstable; urgency=medium

* Initial Release.

Expand Down
2 changes: 1 addition & 1 deletion package/version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.0.240
1.0.241

0 comments on commit 8960441

Please sign in to comment.