Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion deps/kevm_release
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.0.858
1.0.860
8 changes: 4 additions & 4 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 @@ -5,7 +5,7 @@
rv-nix-tools.url = "github:runtimeverification/rv-nix-tools/854d4f05ea78547d46e807b414faad64cea10ae4";
nixpkgs.follows = "rv-nix-tools/nixpkgs";

kevm.url = "github:runtimeverification/evm-semantics/v1.0.858";
kevm.url = "github:runtimeverification/evm-semantics/v1.0.860";
kevm.inputs.nixpkgs.follows = "nixpkgs";

k-framework.follows = "kevm/k-framework";
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ version = "1.0.0"
description = "Foundry integration for KEVM"
requires-python = "~=3.10"
dependencies = [
"kevm-pyk@git+https://github.com/runtimeverification/evm-semantics.git@v1.0.858#subdirectory=kevm-pyk",
"kevm-pyk@git+https://github.com/runtimeverification/evm-semantics.git@v1.0.860#subdirectory=kevm-pyk",
"eth-utils>=5,<6",
"pycryptodome>=3.20.0,<4",
"pyevmasm>=0.2.3,<0.3",
Expand Down
6 changes: 5 additions & 1 deletion src/kontrol/prove.py
Original file line number Diff line number Diff line change
Expand Up @@ -965,6 +965,7 @@ def _init_cterm(
trace_options = TraceOptions({})

jumpdests = bytesToken(_process_jumpdests(bytecode=program))
id_cell = KVariable(Foundry.symbolic_contract_id(contract_name), sort=KSort('Int'))
init_subst = {
'MODE_CELL': KApply(evm_chain_options.mode),
'USEGAS_CELL': boolToken(evm_chain_options.usegas),
Expand All @@ -974,7 +975,8 @@ def _init_cterm(
'STATUSCODE_CELL': KVariable('STATUSCODE'),
'PROGRAM_CELL': bytesToken(program),
'JUMPDESTS_CELL': jumpdests,
'ID_CELL': KVariable(Foundry.symbolic_contract_id(contract_name), sort=KSort('Int')),
'ID_CELL': id_cell,
'CODEADDR_CELL': id_cell,
'ORIGIN_CELL': KVariable('ORIGIN_ID', sort=KSort('Int')),
'CALLER_CELL': KVariable('CALLER_ID', sort=KSort('Int')),
'LOCALMEM_CELL': bytesToken(b''),
Expand Down Expand Up @@ -1016,6 +1018,7 @@ def _init_cterm(
'CALLSTACK_CELL': list_empty(),
'CALLDEPTH_CELL': intToken(0),
'ID_CELL': Foundry.address_TEST_CONTRACT(),
'CODEADDR_CELL': Foundry.address_TEST_CONTRACT(),
'ORIGIN_CELL': origin_id,
'CALLER_CELL': caller_id,
'LOG_CELL': list_empty(),
Expand Down Expand Up @@ -1397,6 +1400,7 @@ def _final_term(
account_list.append(KVariable('ACCOUNTS_FINAL'))
final_subst_test = {
'ID_CELL': Foundry.address_TEST_CONTRACT(),
'CODEADDR_CELL': Foundry.address_TEST_CONTRACT(),
'ACCOUNTS_CELL': KEVM.accounts(account_list),
}
final_subst.update(final_subst_test)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,9 @@ module SUMMARY-TEST%ACCOUNTPARAMSTEST.TESTDEALCONCRETE():0
<callDepth>
0
</callDepth>
<codeAddr>
#address ( FoundryTest )
</codeAddr>
...
</callState>
<substate>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,9 @@ module SUMMARY-SRC%CSE%ADDCONST.APPLYOP(UINT256):0
<callGas>
0
</callGas>
<codeAddr>
C_ADDCONST_ID:Int
</codeAddr>
...
</callState>
<substate>
Expand Down Expand Up @@ -250,9 +253,15 @@ module SUMMARY-SRC%CSE%ADDCONST.APPLYOP(UINT256):0
andBool ( ( notBool <acctID>
C_ADDCONST_ID:Int
</acctID> in_keys ( ACCOUNTS_REST:AccountCellMap ) )
andBool ( ( notBool #range ( 0 < CALLER_ID:Int <= 10 ) )
andBool ( ( notBool #range ( 0 < ORIGIN_ID:Int <= 10 ) )
andBool ( ( notBool #range ( 0 < C_ADDCONST_ID:Int <= 10 ) )
andBool ( ( CALLER_ID:Int <=Int 0
orBool ( 10 <Int CALLER_ID:Int
))
andBool ( ( ORIGIN_ID:Int <=Int 0
orBool ( 10 <Int ORIGIN_ID:Int
))
andBool ( ( C_ADDCONST_ID:Int <=Int 0
orBool ( 10 <Int C_ADDCONST_ID:Int
))
andBool ( KV0_x:Int <=Int ( maxUInt256 -Int #lookup ( C_ADDCONST_STORAGE:Map , 0 ) )
))))))))))))))))))))))))
[priority(20), label(BASIC-BLOCK-8-TO-6)]
Expand Down Expand Up @@ -305,6 +314,9 @@ module SUMMARY-SRC%CSE%ADDCONST.APPLYOP(UINT256):0
<callGas>
0
</callGas>
<codeAddr>
C_ADDCONST_ID:Int
</codeAddr>
...
</callState>
<substate>
Expand Down Expand Up @@ -429,9 +441,15 @@ module SUMMARY-SRC%CSE%ADDCONST.APPLYOP(UINT256):0
andBool ( ( notBool <acctID>
C_ADDCONST_ID:Int
</acctID> in_keys ( ACCOUNTS_REST:AccountCellMap ) )
andBool ( ( notBool #range ( 0 < CALLER_ID:Int <= 10 ) )
andBool ( ( notBool #range ( 0 < ORIGIN_ID:Int <= 10 ) )
andBool ( ( notBool #range ( 0 < C_ADDCONST_ID:Int <= 10 ) )
andBool ( ( CALLER_ID:Int <=Int 0
orBool ( 10 <Int CALLER_ID:Int
))
andBool ( ( ORIGIN_ID:Int <=Int 0
orBool ( 10 <Int ORIGIN_ID:Int
))
andBool ( ( C_ADDCONST_ID:Int <=Int 0
orBool ( 10 <Int C_ADDCONST_ID:Int
))
andBool ( ( maxUInt256 -Int #lookup ( C_ADDCONST_STORAGE:Map , 0 ) ) <Int KV0_x:Int
))))))))))))))))))))))))
[priority(20), label(BASIC-BLOCK-9-TO-7)]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,9 @@ module SUMMARY-TEST%ADDRTEST.TEST-ADDR-TRUE():0
<callDepth>
0
</callDepth>
<codeAddr>
#address ( FoundryTest )
</codeAddr>
...
</callState>
<substate>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,9 @@ module SUMMARY-TEST%ARITHMETICCALLTEST.TEST-DOUBLE-ADD(UINT256,UINT256):0
<callDepth>
0
</callDepth>
<codeAddr>
#address ( FoundryTest )
</codeAddr>
...
</callState> ) => .List )
</callStack>
Expand Down Expand Up @@ -300,6 +303,9 @@ module SUMMARY-TEST%ARITHMETICCALLTEST.TEST-DOUBLE-ADD(UINT256,UINT256):0
<callDepth>
( 1 => 0 )
</callDepth>
<codeAddr>
( 491460923342184218035706888008750043977755113263 => #address ( FoundryTest ) )
</codeAddr>
...
</callState>
<substate>
Expand Down Expand Up @@ -555,6 +561,9 @@ module SUMMARY-TEST%ARITHMETICCALLTEST.TEST-DOUBLE-ADD(UINT256,UINT256):0
<callDepth>
0
</callDepth>
<codeAddr>
#address ( FoundryTest )
</codeAddr>
...
</callState> ) )
</callStack>
Expand Down Expand Up @@ -680,6 +689,9 @@ module SUMMARY-TEST%ARITHMETICCALLTEST.TEST-DOUBLE-ADD(UINT256,UINT256):0
<callDepth>
( 0 => 1 )
</callDepth>
<codeAddr>
( #address ( FoundryTest ) => 491460923342184218035706888008750043977755113263 )
</codeAddr>
...
</callState>
<substate>
Expand Down Expand Up @@ -959,6 +971,9 @@ module SUMMARY-TEST%ARITHMETICCALLTEST.TEST-DOUBLE-ADD(UINT256,UINT256):0
<callDepth>
0
</callDepth>
<codeAddr>
#address ( FoundryTest )
</codeAddr>
...
</callState> ) => .List )
</callStack>
Expand Down Expand Up @@ -1084,6 +1099,9 @@ module SUMMARY-TEST%ARITHMETICCALLTEST.TEST-DOUBLE-ADD(UINT256,UINT256):0
<callDepth>
( 1 => 0 )
</callDepth>
<codeAddr>
( 491460923342184218035706888008750043977755113263 => #address ( FoundryTest ) )
</codeAddr>
...
</callState>
<substate>
Expand Down Expand Up @@ -1344,6 +1362,9 @@ module SUMMARY-TEST%ARITHMETICCALLTEST.TEST-DOUBLE-ADD(UINT256,UINT256):0
<callDepth>
0
</callDepth>
<codeAddr>
#address ( FoundryTest )
</codeAddr>
...
</callState> ) => .List )
</callStack>
Expand Down Expand Up @@ -1469,6 +1490,9 @@ module SUMMARY-TEST%ARITHMETICCALLTEST.TEST-DOUBLE-ADD(UINT256,UINT256):0
<callDepth>
( 1 => 0 )
</callDepth>
<codeAddr>
( 491460923342184218035706888008750043977755113263 => #address ( FoundryTest ) )
</codeAddr>
...
</callState>
<substate>
Expand Down Expand Up @@ -1730,6 +1754,9 @@ module SUMMARY-TEST%ARITHMETICCALLTEST.TEST-DOUBLE-ADD(UINT256,UINT256):0
<callDepth>
0
</callDepth>
<codeAddr>
#address ( FoundryTest )
</codeAddr>
...
</callState> ) => .List )
</callStack>
Expand Down Expand Up @@ -1855,6 +1882,9 @@ module SUMMARY-TEST%ARITHMETICCALLTEST.TEST-DOUBLE-ADD(UINT256,UINT256):0
<callDepth>
( 1 => 0 )
</callDepth>
<codeAddr>
( 491460923342184218035706888008750043977755113263 => #address ( FoundryTest ) )
</codeAddr>
...
</callState>
<substate>
Expand Down
Loading