Skip to content

Commit

Permalink
Merge branch 'master' into comment-auto-gen-file
Browse files Browse the repository at this point in the history
  • Loading branch information
lisandrasilva authored Jan 10, 2024
2 parents f60c413 + c44fb0a commit 86d49e5
Show file tree
Hide file tree
Showing 12 changed files with 220 additions and 205 deletions.
2 changes: 1 addition & 1 deletion deps/kevm_release
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.0.406
1.0.410
14 changes: 7 additions & 7 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.406";
kevm.url = "github:runtimeverification/evm-semantics/v1.0.410";
nixpkgs.follows = "kevm/nixpkgs";
nixpkgs-pyk.follows = "kevm/nixpkgs-pyk";
k-framework.follows = "kevm/k-framework";
Expand Down
203 changes: 102 additions & 101 deletions poetry.lock

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ authors = [

[tool.poetry.dependencies]
python = "^3.10"
kevm-pyk = { git = "https://github.com/runtimeverification/evm-semantics.git", tag = "v1.0.406", subdirectory = "kevm-pyk" }
kevm-pyk = { git = "https://github.com/runtimeverification/evm-semantics.git", tag = "v1.0.410", subdirectory = "kevm-pyk" }

[tool.poetry.group.dev.dependencies]
autoflake = "*"
Expand Down
4 changes: 4 additions & 0 deletions src/kontrol/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,8 @@ def exec_prove(
break_every_step: bool = False,
break_on_jumpi: bool = False,
break_on_calls: bool = True,
break_on_storage: bool = False,
break_on_basic_blocks: bool = False,
bmc_depth: int | None = None,
bug_report: BugReport | None = None,
kore_rpc_command: str | Iterable[str] | None = None,
Expand Down Expand Up @@ -256,6 +258,8 @@ def exec_prove(
break_every_step=break_every_step,
break_on_jumpi=break_on_jumpi,
break_on_calls=break_on_calls,
break_on_storage=break_on_storage,
break_on_basic_blocks=break_on_basic_blocks,
workers=workers,
counterexample_info=counterexample_info,
max_iterations=max_iterations,
Expand Down
6 changes: 6 additions & 0 deletions src/kontrol/options.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ class ProveOptions:
break_every_step: bool
break_on_jumpi: bool
break_on_calls: bool
break_on_storage: bool
break_on_basic_blocks: bool
workers: int
counterexample_info: bool
max_iterations: int | None
Expand All @@ -36,6 +38,8 @@ def __init__(
break_every_step: bool = False,
break_on_jumpi: bool = False,
break_on_calls: bool = True,
break_on_storage: bool = False,
break_on_basic_blocks: bool = False,
workers: int = 1,
counterexample_info: bool = False,
max_iterations: int | None = None,
Expand All @@ -51,6 +55,8 @@ def __init__(
object.__setattr__(self, 'break_every_step', break_every_step)
object.__setattr__(self, 'break_on_jumpi', break_on_jumpi)
object.__setattr__(self, 'break_on_calls', break_on_calls)
object.__setattr__(self, 'break_on_storage', break_on_storage)
object.__setattr__(self, 'break_on_basic_blocks', break_on_basic_blocks)
object.__setattr__(self, 'workers', workers)
object.__setattr__(self, 'counterexample_info', counterexample_info)
object.__setattr__(self, 'max_iterations', max_iterations)
Expand Down
5 changes: 4 additions & 1 deletion src/kontrol/prove.py
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,10 @@ def init_and_run_proof(test: FoundryTest) -> Proof:
max_depth=prove_options.max_depth,
max_iterations=prove_options.max_iterations,
cut_point_rules=KEVMSemantics.cut_point_rules(
prove_options.break_on_jumpi, prove_options.break_on_calls
prove_options.break_on_jumpi,
prove_options.break_on_calls,
prove_options.break_on_storage,
prove_options.break_on_basic_blocks,
),
terminal_rules=KEVMSemantics.terminal_rules(prove_options.break_every_step),
counterexample_info=prove_options.counterexample_info,
Expand Down
10 changes: 5 additions & 5 deletions src/tests/integration/test-data/gas-abstraction.expected
Original file line number Diff line number Diff line change
Expand Up @@ -391,7 +391,7 @@ Node 6:
#And ( { true #Equals CALLER_ID:Int <Int pow160 }
#And ( { true #Equals ORIGIN_ID:Int <Int pow160 }
#And ( { true #Equals NUMBER_CELL:Int <=Int maxSInt256 }
#And { true #Equals VGAS:Int <Int ( VGAS:Int +Int 91 ) } ) ) ) ) ) ) )
#And { true #Equals ( VGAS:Int +Int -298 ) <Int ( VGAS:Int +Int -207 ) } ) ) ) ) ) ) )



Expand Down Expand Up @@ -603,7 +603,7 @@ Node 6:
andBool ( ORIGIN_ID:Int <Int pow160
andBool ( NUMBER_CELL:Int <=Int maxSInt256
))))))
ensures VGAS:Int <Int ( VGAS:Int +Int 91 )
ensures ( VGAS:Int +Int -298 ) <Int ( VGAS:Int +Int -207 )
[label(BASIC-BLOCK-1-TO-3)]

rule [BASIC-BLOCK-4-TO-5]: <foundry>
Expand Down Expand Up @@ -814,7 +814,7 @@ Node 6:
andBool ( CALLER_ID:Int <Int pow160
andBool ( ORIGIN_ID:Int <Int pow160
andBool ( NUMBER_CELL:Int <=Int maxSInt256
andBool ( VGAS:Int <Int ( VGAS:Int +Int 91 )
andBool ( ( VGAS:Int +Int -298 ) <Int ( VGAS:Int +Int -207 )
)))))))
[label(BASIC-BLOCK-4-TO-5)]

Expand Down Expand Up @@ -1026,7 +1026,7 @@ Node 6:
andBool ( CALLER_ID:Int <Int pow160
andBool ( ORIGIN_ID:Int <Int pow160
andBool ( NUMBER_CELL:Int <=Int maxSInt256
andBool ( VGAS:Int <Int ( VGAS:Int +Int 91 )
andBool ( ( VGAS:Int +Int -298 ) <Int ( VGAS:Int +Int -207 )
)))))))
[label(BASIC-BLOCK-5-TO-6)]

Expand All @@ -1044,7 +1044,7 @@ Failing nodes:
#And ( { true #Equals CALLER_ID:Int <Int pow160 }
#And ( { true #Equals ORIGIN_ID:Int <Int pow160 }
#And ( { true #Equals NUMBER_CELL:Int <=Int maxSInt256 }
#And { true #Equals VGAS:Int <Int ( VGAS:Int +Int 91 ) } ) ) ) ) ) ) #Implies { true #Equals foundry_success ( ... statusCode: EVMC_REVERT , failed: #lookup ( .Map , 46308022326495007027972728677917914892729792999299745830475596687180801507328 ) , revertExpected: false , opcodeExpected: false , recordEventExpected: false , eventExpected: false ) } )
#And { true #Equals ( VGAS:Int +Int -298 ) <Int ( VGAS:Int +Int -207 ) } ) ) ) ) ) ) #Implies { true #Equals foundry_success ( ... statusCode: EVMC_REVERT , failed: #lookup ( .Map , 46308022326495007027972728677917914892729792999299745830475596687180801507328 ) , revertExpected: false , opcodeExpected: false , recordEventExpected: false , eventExpected: false ) } )
Path condition:
#Top

Expand Down
Loading

0 comments on commit 86d49e5

Please sign in to comment.