Skip to content

Commit

Permalink
Merge branch 'master' into natspec-precondition
Browse files Browse the repository at this point in the history
  • Loading branch information
palinatolmach committed Aug 11, 2024
2 parents fbc481c + e4580c6 commit 76e9428
Show file tree
Hide file tree
Showing 22 changed files with 68 additions and 57 deletions.
2 changes: 1 addition & 1 deletion deps/k_release
Original file line number Diff line number Diff line change
@@ -1 +1 @@
7.1.102
7.1.103
2 changes: 1 addition & 1 deletion deps/kevm_release
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.0.677
1.0.680
24 changes: 12 additions & 12 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
description = "Kontrol";

inputs = {
kevm.url = "github:runtimeverification/evm-semantics/v1.0.677";
kevm.url = "github:runtimeverification/evm-semantics/v1.0.680";
nixpkgs.follows = "kevm/nixpkgs";
nixpkgs-pyk.follows = "kevm/nixpkgs-pyk";
k-framework.follows = "kevm/k-framework";
Expand Down
2 changes: 1 addition & 1 deletion package/version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.1.400
0.1.403
16 changes: 8 additions & 8 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@ build-backend = "poetry.core.masonry.api"

[tool.poetry]
name = "kontrol"
version = "0.1.400"
version = "0.1.403"
description = "Foundry integration for KEVM"
authors = [
"Runtime Verification, Inc. <contact@runtimeverification.com>",
]

[tool.poetry.dependencies]
python = "^3.10"
kevm-pyk = { git = "https://github.com/runtimeverification/evm-semantics.git", tag = "v1.0.677", subdirectory = "kevm-pyk" }
kevm-pyk = { git = "https://github.com/runtimeverification/evm-semantics.git", tag = "v1.0.680", subdirectory = "kevm-pyk" }
eth-utils = "^4.1.1"
pycryptodome = "^3.20.0"
antlr4-python3-runtime = "^4.13.1"
Expand Down
2 changes: 1 addition & 1 deletion src/kontrol/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@
if TYPE_CHECKING:
from typing import Final

VERSION: Final = '0.1.400'
VERSION: Final = '0.1.403'
17 changes: 9 additions & 8 deletions src/kontrol/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -216,17 +216,18 @@ def kompile_target_args(self) -> ArgumentParser:
def rpc_args(self) -> ArgumentParser:
args = ArgumentParser(add_help=False)
args.add_argument(
'--trace-rewrites',
dest='trace_rewrites',
'--no-log-rewrites',
dest='log_succ_rewrites',
default=None,
action='store_true',
help='Log traces of all simplification and rewrite rule applications.',
action='store_false',
help='Do not log traces of any simplification and rewrite rule application.',
)
args.add_argument(
'--kore-rpc-command',
dest='kore_rpc_command',
type=str,
help='Custom command to start RPC server.',
'--log-fail-rewrites',
dest='log_fail_rewrites',
default=None,
action='store_true',
help='Log traces of all simplification and rewrite rule applications.',
)
args.add_argument(
'--use-booster',
Expand Down
12 changes: 8 additions & 4 deletions src/kontrol/foundry.py
Original file line number Diff line number Diff line change
Expand Up @@ -1058,7 +1058,8 @@ def foundry_simplify_node(
smt_timeout=options.smt_timeout,
smt_retry_limit=options.smt_retry_limit,
smt_tactic=options.smt_tactic,
trace_rewrites=options.trace_rewrites,
log_succ_rewrites=options.log_succ_rewrites,
log_fail_rewrites=options.log_fail_rewrites,
start_server=start_server,
port=options.port,
maude_port=options.maude_port,
Expand Down Expand Up @@ -1146,7 +1147,8 @@ def foundry_step_node(
smt_timeout=options.smt_timeout,
smt_retry_limit=options.smt_retry_limit,
smt_tactic=options.smt_tactic,
trace_rewrites=options.trace_rewrites,
log_succ_rewrites=options.log_succ_rewrites,
log_fail_rewrites=options.log_fail_rewrites,
start_server=start_server,
port=options.port,
maude_port=options.maude_port,
Expand Down Expand Up @@ -1222,7 +1224,8 @@ def foundry_section_edge(
smt_timeout=options.smt_timeout,
smt_retry_limit=options.smt_retry_limit,
smt_tactic=options.smt_tactic,
trace_rewrites=options.trace_rewrites,
log_succ_rewrites=options.log_succ_rewrites,
log_fail_rewrites=options.log_fail_rewrites,
start_server=start_server,
port=options.port,
maude_port=options.maude_port,
Expand Down Expand Up @@ -1273,7 +1276,8 @@ def foundry_get_model(
smt_timeout=options.smt_timeout,
smt_retry_limit=options.smt_retry_limit,
smt_tactic=options.smt_tactic,
trace_rewrites=options.trace_rewrites,
log_succ_rewrites=options.log_succ_rewrites,
log_fail_rewrites=options.log_fail_rewrites,
start_server=start_server,
port=options.port,
maude_port=options.maude_port,
Expand Down
6 changes: 4 additions & 2 deletions src/kontrol/options.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@ def get_argument_type() -> dict[str, Callable]:


class RpcOptions(Options):
trace_rewrites: bool
log_succ_rewrites: bool
log_fail_rewrites: bool
kore_rpc_command: str | None
use_booster: bool
port: int | None
Expand All @@ -58,7 +59,8 @@ class RpcOptions(Options):
@staticmethod
def default() -> dict[str, Any]:
return {
'trace_rewrites': False,
'log_succ_rewrites': True,
'log_fail_rewrites': False,
'kore_rpc_command': None,
'use_booster': True,
'port': None,
Expand Down
3 changes: 2 additions & 1 deletion src/kontrol/prove.py
Original file line number Diff line number Diff line change
Expand Up @@ -382,7 +382,8 @@ def create_kcfg_explore() -> KCFGExplore:
cterm_symbolic = CTermSymbolic(
client,
foundry.kevm.definition,
trace_rewrites=options.trace_rewrites,
log_succ_rewrites=options.log_succ_rewrites,
log_fail_rewrites=options.log_fail_rewrites,
)
return KCFGExplore(
cterm_symbolic,
Expand Down
2 changes: 1 addition & 1 deletion src/kontrol/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ def append_to_file(file_path: Path, content: str) -> None:


def empty_lemmas_file_contents() -> str:
return """require "foundry.md"
return """requires "foundry.md"
module KONTROL-LEMMAS
Expand Down
3 changes: 3 additions & 0 deletions src/tests/integration/test-data/foundry/foundry.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,6 @@ out = 'out'
test = 'test'
extra_output = ['storageLayout', 'abi', 'evm.methodIdentifiers', 'evm.deployedBytecode.object', 'devdoc']
rpc_endpoints = { optimism = "https://optimism.alchemyapi.io/v2/...", mainnet = "${RPC_MAINNET}" }

bytecode_hash = "none"
cbor_metadata = false
Loading

0 comments on commit 76e9428

Please sign in to comment.