From 630555963952921e48226a10308da2cee4d663a0 Mon Sep 17 00:00:00 2001 From: palinatolmach Date: Wed, 8 Jan 2025 21:59:01 +0400 Subject: [PATCH 01/35] Draft for the `allowCalls` implementation --- src/kontrol/kdist/cheatcodes.md | 144 ++++++++++++++++++++++++++++---- 1 file changed, 129 insertions(+), 15 deletions(-) diff --git a/src/kontrol/kdist/cheatcodes.md b/src/kontrol/kdist/cheatcodes.md index c7c4ffcc9..f38ce8c60 100644 --- a/src/kontrol/kdist/cheatcodes.md +++ b/src/kontrol/kdist/cheatcodes.md @@ -76,8 +76,14 @@ module FOUNDRY-CHEAT-CODES false + + + .Account + .List + false + + false - .List .List @@ -963,19 +969,42 @@ We define two new status codes: The `ACCTTO` value is checked for each call while the whitelist restriction is enabled for calls. If the address is not in the whitelist `WLIST` then `KEVM` goes into an error state providing the `ACCTTO` value. -```k +// ```k +// rule [foundry.catchNonWhitelistedCalls]: +// (#call _ ACCTTO _ _ _ _ false +// ~> #popCallStack +// ~> #popWorldState) => #end KONTROL_WHITELISTCALL ... +// +// true +// WLIST +// ... +// +// requires notBool ACCTTO in WLIST +// [priority(40)] +// ``` + rule [foundry.catchNonWhitelistedCalls]: - (#call _ ACCTTO _ _ _ _ false + (#call _ ACCTTO _ _ _ CALLDATA false ~> #popCallStack ~> #popWorldState) => #end KONTROL_WHITELISTCALL ... true - WLIST + + + ACCTTO + ALLOWEDLIST + ALLOWALL + + ... + ... - requires notBool ACCTTO in WLIST + requires notBool ( + ALLOWALL + or + ListItem(CALLDATA) in ALLOWEDLIST + ) [priority(40)] -``` When the storage whitelist restriction is enabled, the `SSTORE` operation will check if the address and the storage index are in the whitelist. If the pair is not present in the whitelist `WLIST` then `KEVM` goes into an error state providing the address and the storage index values. @@ -1003,9 +1032,32 @@ function allowCallsToAddress(address) external; Adds an account address to the whitelist. The execution of the modified KEVM will stop when a call has been made to an address which is not in the whitelist. ```k - rule [foundry.allowCallsToAddress]: - #cheatcode_call SELECTOR ARGS => #loadAccount #asWord(ARGS) ~> #addAddressToWhitelist #asWord(ARGS) ... - requires SELECTOR ==Int selector ( "allowCallsToAddress(address)" ) + rule [foundry.allowAllCallsToAddress]: + #cheatcode_call SELECTOR ARGS + => #loadAccount #asWord(ARGS) + ~> #setAllowedAllCalls #asWord(ARGS) ... + requires SELECTOR ==Int selector("allowCallsToAddress(address)") +``` + +#### `allowCalls` - Add an account address and calldata prefix to a whitelist. + +``` +function allowCalls(address, bytes calldata data) external; +``` + +Adds an account address and calldata prefix to the whitelist. The execution of the modified KEVM will stop when a call has been made to an address and/or with calldata which are not in the whitelist. + +```k + rule [foundry.allowCalls]: + #cheatcode_call SELECTOR ARGS + => #loadAccount #asWord(#range(ARGS, 0, 32)) + ~> #etchAccountIfEmpty #asWord(#range(ARGS, 0, 32)) + ~> #setAllowedCall + #asWord(#range(ARGS, 0, 32)) + #range(ARGS, #asWord(#range(ARGS, 32, 32)) +Int 32, #asWord(#range(ARGS, #asWord(#range(ARGS, 32, 32)), 32))) + ... + + requires SELECTOR ==Int selector ( "allowCalls(address,bytes)" ) ``` #### `allowChangesToStorage` - Add an account address and a storage slot to a whitelist. @@ -1593,12 +1645,12 @@ If the flag is false, it skips comparison, assuming success; otherwise, it compa ```k syntax KItem ::= "#addAddressToWhitelist" Int [symbol(foundry_addAddressToWhitelist)] // ------------------------------------------------------------------------------------- - rule #addAddressToWhitelist ACCT => .K ... - - _ => true - WLIST => WLIST ListItem(ACCT) - ... - + // rule #addAddressToWhitelist ACCT => .K ... + // + // _ => true + // WLIST => WLIST ListItem(ACCT) + // ... + // ``` - `#addStorageSlotToWhitelist` enables the whitelist restriction for storage chagnes and adds a `StorageSlot` item to the whitelist. @@ -1632,6 +1684,67 @@ If the flag is false, it skips comparison, assuming success; otherwise, it compa rule #etchAccountIfEmpty _ => .K ... [owise] ``` +- `#setAllowedCall ALLOWEDACCOUNT ALLOWEDCALLDATA` will update the `` mapping for the given account. + +```k + syntax KItem ::= "#setAllowedCall" Account Bytes [symbol(foundry_setAllowedCall)] + syntax KItem ::= "#setAllowedAllCalls" Account [symbol(foundry_setAllowedAllCalls)] + // --------------------------------------------------------------------------------- + rule #setAllowedCall ALLOWEDACCOUNT ALLOWEDCALLDATA => .K ... + + _ => true + + ALLOWEDACCOUNT + CALLDATALIST => CALLDATALIST ListItem(ALLOWEDCALLDATA) + _ => false + + ... + + + rule #setAllowedCall ALLOWEDACCOUNT ALLOWEDCALLDATA => .K ... + + _ => true + + ( .Bag + => + ALLOWEDACCOUNT + ListItem(ALLOWEDCALLDATA) + false + + ) + ... + + ... + + + rule #setAllowedAllCalls ALLOWEDACCOUNT => .K ... + + _ => true + + ALLOWEDACCOUNT + _ => .List + _ => true + + ... + + + rule #setAllowedAllCalls ALLOWEDACCOUNT => .K ... + + _ => true + + ( .Bag + => + ALLOWEDACCOUNT + .List + true + + ) + ... + + ... + +``` + - `#setMockCall MOCKADDRESS MOCKCALLDATA MOCKRETURN` will update the `` mapping for the given account. ```k @@ -1745,6 +1858,7 @@ Selectors for **implemented** cheat code functions. rule ( selector ( "prank(address)" ) => 3395723175 ) rule ( selector ( "prank(address,address)" ) => 1206193358 ) rule ( selector ( "allowCallsToAddress(address)" ) => 1850795572 ) + rule ( selector ( "allowCalls(address,bytes)" ) => 1808051021 ) rule ( selector ( "allowChangesToStorage(address,uint256)" ) => 4207417100 ) rule ( selector ( "infiniteGas()" ) => 3986649939 ) rule ( selector ( "setGas(uint256)" ) => 3713137314 ) From 6f33d5382a03d16ff90d6f9c5dababa79198201f Mon Sep 17 00:00:00 2001 From: palinatolmach Date: Fri, 10 Jan 2025 16:49:11 +0400 Subject: [PATCH 02/35] Make `AllowedCallCellMap` empty in init cterm --- src/kontrol/prove.py | 1 + 1 file changed, 1 insertion(+) diff --git a/src/kontrol/prove.py b/src/kontrol/prove.py index a9169b5a1..61b9229b6 100644 --- a/src/kontrol/prove.py +++ b/src/kontrol/prove.py @@ -1040,6 +1040,7 @@ def _init_cterm( 'ISSTORAGEWHITELISTACTIVE_CELL': FALSE, 'ADDRESSLIST_CELL': list_empty(), 'STORAGESLOTLIST_CELL': list_empty(), + 'ALLOWEDCALLS_CELL': KApply('.AllowedCallCellMap'), 'MOCKCALLS_CELL': KApply('.MockCallCellMap'), 'MOCKFUNCTIONS_CELL': KApply('.MockFunctionCellMap'), 'ACTIVETRACING_CELL': TRUE if trace_options.active_tracing else FALSE, From f4a75d78be5efd087c07283d56a3784bd3b8d329 Mon Sep 17 00:00:00 2001 From: palinatolmach Date: Fri, 10 Jan 2025 20:45:20 +0400 Subject: [PATCH 03/35] `allowedCallsList` refactoring, add `allowedAllCalls` --- src/kontrol/kdist/cheatcodes.md | 96 ++++++--------------------------- src/kontrol/prove.py | 2 +- 2 files changed, 16 insertions(+), 82 deletions(-) diff --git a/src/kontrol/kdist/cheatcodes.md b/src/kontrol/kdist/cheatcodes.md index f38ce8c60..f7137c421 100644 --- a/src/kontrol/kdist/cheatcodes.md +++ b/src/kontrol/kdist/cheatcodes.md @@ -76,13 +76,7 @@ module FOUNDRY-CHEAT-CODES false - - - .Account - .List - false - - + .List false .List @@ -952,6 +946,7 @@ A `StorageSlot` pair is formed from an address and a storage index. ```k syntax StorageSlot ::= "{" Int "|" Int "}" + syntax CallToAddress ::= "{" Int "|" Bytes "}" // ------------------------------------------ ``` @@ -969,42 +964,21 @@ We define two new status codes: The `ACCTTO` value is checked for each call while the whitelist restriction is enabled for calls. If the address is not in the whitelist `WLIST` then `KEVM` goes into an error state providing the `ACCTTO` value. -// ```k -// rule [foundry.catchNonWhitelistedCalls]: -// (#call _ ACCTTO _ _ _ _ false -// ~> #popCallStack -// ~> #popWorldState) => #end KONTROL_WHITELISTCALL ... -// -// true -// WLIST -// ... -// -// requires notBool ACCTTO in WLIST -// [priority(40)] -// ``` - +```k rule [foundry.catchNonWhitelistedCalls]: - (#call _ ACCTTO _ _ _ CALLDATA false + #call _ ACCTTO _ _ _ CALLDATA false + /* ~> #popCallStack - ~> #popWorldState) => #end KONTROL_WHITELISTCALL ... + ~> #popWorldState) + */ => #end KONTROL_WHITELISTCALL ... true - - - ACCTTO - ALLOWEDLIST - ALLOWALL - - ... - + WLIST ... - requires notBool ( - ALLOWALL - or - ListItem(CALLDATA) in ALLOWEDLIST - ) + requires notBool ({ACCTTO|CALLDATA} in WLIST orBool {ACCTTO|b"*"} in WLIST) [priority(40)] +``` When the storage whitelist restriction is enabled, the `SSTORE` operation will check if the address and the storage index are in the whitelist. If the pair is not present in the whitelist `WLIST` then `KEVM` goes into an error state providing the address and the storage index values. @@ -1643,7 +1617,7 @@ If the flag is false, it skips comparison, assuming success; otherwise, it compa - `#addAddressToWhitelist` enables the whitelist restriction for calls and adds an address to the whitelist. ```k - syntax KItem ::= "#addAddressToWhitelist" Int [symbol(foundry_addAddressToWhitelist)] + // syntax KItem ::= "#addAddressToWhitelist" Int [symbol(foundry_addAddressToWhitelist)] // ------------------------------------------------------------------------------------- // rule #addAddressToWhitelist ACCT => .K ... // @@ -1684,7 +1658,7 @@ If the flag is false, it skips comparison, assuming success; otherwise, it compa rule #etchAccountIfEmpty _ => .K ... [owise] ``` -- `#setAllowedCall ALLOWEDACCOUNT ALLOWEDCALLDATA` will update the `` mapping for the given account. +- `#setAllowedCall ALLOWEDACCOUNT ALLOWEDCALLDATA` and `setAllowedAllCalls ALLOWEDACCOUNT` will update the `` list with the given account and calldata. ```k syntax KItem ::= "#setAllowedCall" Account Bytes [symbol(foundry_setAllowedCall)] @@ -1693,54 +1667,14 @@ If the flag is false, it skips comparison, assuming success; otherwise, it compa rule #setAllowedCall ALLOWEDACCOUNT ALLOWEDCALLDATA => .K ... _ => true - - ALLOWEDACCOUNT - CALLDATALIST => CALLDATALIST ListItem(ALLOWEDCALLDATA) - _ => false - - ... - - - rule #setAllowedCall ALLOWEDACCOUNT ALLOWEDCALLDATA => .K ... - - _ => true - - ( .Bag - => - ALLOWEDACCOUNT - ListItem(ALLOWEDCALLDATA) - false - - ) + ALLOWEDCALLS => ALLOWEDCALLS ListItem({ALLOWEDACCOUNT|ALLOWEDCALLDATA}) ... - - ... - + rule #setAllowedAllCalls ALLOWEDACCOUNT => .K ... _ => true - - ALLOWEDACCOUNT - _ => .List - _ => true - - ... - - - rule #setAllowedAllCalls ALLOWEDACCOUNT => .K ... - - _ => true - - ( .Bag - => - ALLOWEDACCOUNT - .List - true - - ) - ... - + ALLOWEDCALLS => ALLOWEDCALLS ListItem({ALLOWEDACCOUNT|b"*"}) ... ``` diff --git a/src/kontrol/prove.py b/src/kontrol/prove.py index 61b9229b6..f95707bf6 100644 --- a/src/kontrol/prove.py +++ b/src/kontrol/prove.py @@ -1040,7 +1040,7 @@ def _init_cterm( 'ISSTORAGEWHITELISTACTIVE_CELL': FALSE, 'ADDRESSLIST_CELL': list_empty(), 'STORAGESLOTLIST_CELL': list_empty(), - 'ALLOWEDCALLS_CELL': KApply('.AllowedCallCellMap'), + 'ALLOWEDCALLSLIST_CELL': list_empty(), 'MOCKCALLS_CELL': KApply('.MockCallCellMap'), 'MOCKFUNCTIONS_CELL': KApply('.MockFunctionCellMap'), 'ACTIVETRACING_CELL': TRUE if trace_options.active_tracing else FALSE, From 5c47b68c648550e35620eb16102b4c5770d952e3 Mon Sep 17 00:00:00 2001 From: palinatolmach Date: Mon, 13 Jan 2025 17:56:41 +0400 Subject: [PATCH 04/35] Add new rule, K cell pattern --- src/kontrol/kdist/cheatcodes.md | 7 ++----- src/kontrol/kdist/kontrol_lemmas.md | 2 ++ 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/kontrol/kdist/cheatcodes.md b/src/kontrol/kdist/cheatcodes.md index f7137c421..455809dd2 100644 --- a/src/kontrol/kdist/cheatcodes.md +++ b/src/kontrol/kdist/cheatcodes.md @@ -966,11 +966,8 @@ If the address is not in the whitelist `WLIST` then `KEVM` goes into an error st ```k rule [foundry.catchNonWhitelistedCalls]: - #call _ ACCTTO _ _ _ CALLDATA false - /* - ~> #popCallStack - ~> #popWorldState) - */ => #end KONTROL_WHITELISTCALL ... + (#call _ ACCTTO _ _ _ CALLDATA false + ~> #return _ _) => #end KONTROL_WHITELISTCALL ... true WLIST diff --git a/src/kontrol/kdist/kontrol_lemmas.md b/src/kontrol/kdist/kontrol_lemmas.md index 8e965c2fc..b95832529 100644 --- a/src/kontrol/kdist/kontrol_lemmas.md +++ b/src/kontrol/kdist/kontrol_lemmas.md @@ -188,5 +188,7 @@ module KONTROL-AUX-LEMMAS requires 0 true [simplification] + endmodule ``` \ No newline at end of file From 759caeb313f513036fcdbf67364bdf17c5827c0a Mon Sep 17 00:00:00 2001 From: palinatolmach Date: Thu, 16 Jan 2025 16:51:14 +0400 Subject: [PATCH 05/35] Add list simplifications --- src/kontrol/kdist/kontrol_lemmas.md | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/kontrol/kdist/kontrol_lemmas.md b/src/kontrol/kdist/kontrol_lemmas.md index b95832529..f4aeeb343 100644 --- a/src/kontrol/kdist/kontrol_lemmas.md +++ b/src/kontrol/kdist/kontrol_lemmas.md @@ -188,7 +188,18 @@ module KONTROL-AUX-LEMMAS requires 0 true [simplification] + // + // List simplifications for `allowCalls` + // + + // List membership check simplification for lists with a single element + rule KI:KItem in ListItem(KI:KItem) => true [simplification] + rule KI:KItem in ListItem(KJ:KItem) => KI ==K KJ [simplification] + + // Recursive list membership check for lists with multiple elements + rule KI:KItem in (ListItem(KI) Rest) => true [simplification] + rule KI:KItem in (ListItem(KJ) Rest) => KI in Rest [simplification] + rule KI:KItem in .List => false [simplification] endmodule ``` \ No newline at end of file From 50bf8326a25d78f435c794bbb2aea6bfba1d6c8c Mon Sep 17 00:00:00 2001 From: palinatolmach Date: Thu, 16 Jan 2025 17:40:17 +0400 Subject: [PATCH 06/35] Adjust and add tests for `allowCalls` --- src/kontrol/foundry.py | 3 +- .../integration/test-data/foundry-prove-all | 2 + .../test-data/foundry-prove-skip-legacy | 2 + .../foundry/test/AllowChangesTest.t.sol | 40 ++++++++++++++++++- 4 files changed, 44 insertions(+), 3 deletions(-) diff --git a/src/kontrol/foundry.py b/src/kontrol/foundry.py index cbd6f7c4e..b67bac726 100644 --- a/src/kontrol/foundry.py +++ b/src/kontrol/foundry.py @@ -1521,8 +1521,9 @@ def init_project(project_root: Path, *, skip_forge: bool) -> None: write_to_file(root / 'lemmas.k', empty_lemmas_file_contents()) write_to_file(root / 'KONTROL.md', kontrol_file_contents()) write_to_file(root / 'kontrol.toml', kontrol_toml_file_contents()) + # TODO(palina): the version is fixed for testing, remove run_process_2( - ['forge', 'install', '--no-git', 'runtimeverification/kontrol-cheatcodes'], + ['forge', 'install', '--no-git', 'runtimeverification/kontrol-cheatcodes@0edc87b03c313b25df2e015d30a0ca9fce6caba6'], logger=_LOGGER, cwd=root, ) diff --git a/src/tests/integration/test-data/foundry-prove-all b/src/tests/integration/test-data/foundry-prove-all index 2e5edf0b8..06dd7307c 100644 --- a/src/tests/integration/test-data/foundry-prove-all +++ b/src/tests/integration/test-data/foundry-prove-all @@ -20,6 +20,8 @@ AddrTest.test_notBuiltinAddress_concrete() AddrTest.test_notBuiltinAddress_symbolic(address) AllowChangesTest.test() AllowChangesTest.testAllow() +AllowChangesTest.testAllowCalls(uint256) +AllowChangesTest.testAllowCalls_failIfNotWhitelisted(uint256) AllowChangesTest.testAllowSymbolic() AllowChangesTest.testAllow_fail() AllowChangesTest.testFailAllowCallsToAddress() diff --git a/src/tests/integration/test-data/foundry-prove-skip-legacy b/src/tests/integration/test-data/foundry-prove-skip-legacy index ddf75f0b1..dbc3c6a59 100644 --- a/src/tests/integration/test-data/foundry-prove-skip-legacy +++ b/src/tests/integration/test-data/foundry-prove-skip-legacy @@ -18,6 +18,8 @@ AddrTest.testFail_addr_true() AddrTest.test_notBuiltinAddress_symbolic(address) AllowChangesTest.test() AllowChangesTest.testAllow() +AllowChangesTest.testAllowCalls(uint256) +AllowChangesTest.testAllowCalls_failIfNotWhitelisted(uint256) AllowChangesTest.testAllowSymbolic() AllowChangesTest.testAllow_fail() AllowChangesTest.testFailAllowCallsToAddress() diff --git a/src/tests/integration/test-data/foundry/test/AllowChangesTest.t.sol b/src/tests/integration/test-data/foundry/test/AllowChangesTest.t.sol index 918e5c68d..8f8b0da22 100644 --- a/src/tests/integration/test-data/foundry/test/AllowChangesTest.t.sol +++ b/src/tests/integration/test-data/foundry/test/AllowChangesTest.t.sol @@ -42,13 +42,11 @@ contract AllowChangesTest is Test, KontrolCheats { } function testFailAllowCallsToAddress() public { kevm.allowCallsToAddress(address(canChange)); - kevm.allowChangesToStorage(address(canChange), 0); cannotChange.changeSlot0(10245); } function testFailAllowChangesToStorage() public { - kevm.allowCallsToAddress(address(canChange)); kevm.allowChangesToStorage(address(canChange), 0); canChange.changeSlot1(23452); @@ -60,4 +58,42 @@ contract AllowChangesTest is Test, KontrolCheats { canChange.changeSlot1(234521); } + + function testAllowCalls(uint256 value) public { + /* Whitelisting two calls to ensure that `allowCalls` is working + for whitelist with > 1 elements */ + bytes memory changeCallDataOne = abi.encodeWithSelector( + ValueStore.changeSlot0.selector, + value + ); + + bytes memory changeCallDataTwo = abi.encodeWithSelector( + ValueStore.changeSlot1.selector, + value + ); + + kevm.allowCalls(address(canChange), changeCallDataOne); + kevm.allowCalls(address(canChange), changeCallDataTwo); + + canChange.changeSlot0(value); + } + + function testAllowCalls_failIfNotWhitelisted(uint256 value) public { + bytes memory changeCallData = abi.encodeWithSelector( + ValueStore.changeSlot0.selector, + value + ); + + kevm.allowCalls(address(canChange), changeCallData); + + vm.expectRevert(); + canChange.changeSlot1(value); + } + + function testFailAllowCalls() public { + kevm.allowCallsToAddress(address(canChange)); + kevm.allowChangesToStorage(address(canChange), 0); + + canChange.changeSlot1(234521); + } } From 7e5e33ba042a103a088b987d65ebf559dfbe8d20 Mon Sep 17 00:00:00 2001 From: palinatolmach Date: Thu, 16 Jan 2025 18:08:34 +0400 Subject: [PATCH 07/35] Add tests for `allowCalls` to end-to-end tests --- .../test-data/end-to-end-prove-all | 2 + .../integration/test-data/foundry-prove-all | 2 - .../test-data/foundry-prove-skip-legacy | 2 - .../foundry/test/AllowChangesTest.t.sol | 31 ---------- .../test-data/src/AllowCalls.t.sol | 59 +++++++++++++++++++ 5 files changed, 61 insertions(+), 35 deletions(-) create mode 100644 src/tests/integration/test-data/src/AllowCalls.t.sol diff --git a/src/tests/integration/test-data/end-to-end-prove-all b/src/tests/integration/test-data/end-to-end-prove-all index 6a2bc826c..d241458e4 100644 --- a/src/tests/integration/test-data/end-to-end-prove-all +++ b/src/tests/integration/test-data/end-to-end-prove-all @@ -1,3 +1,5 @@ +AllowChangesTest.testAllowCalls(uint256) +AllowChangesTest.testAllowCalls_failIfNotWhitelisted(uint256) CounterTest.test_Increment() RandomVarTest.test_custom_names() RandomVarTest.test_randomBool() diff --git a/src/tests/integration/test-data/foundry-prove-all b/src/tests/integration/test-data/foundry-prove-all index 06dd7307c..2e5edf0b8 100644 --- a/src/tests/integration/test-data/foundry-prove-all +++ b/src/tests/integration/test-data/foundry-prove-all @@ -20,8 +20,6 @@ AddrTest.test_notBuiltinAddress_concrete() AddrTest.test_notBuiltinAddress_symbolic(address) AllowChangesTest.test() AllowChangesTest.testAllow() -AllowChangesTest.testAllowCalls(uint256) -AllowChangesTest.testAllowCalls_failIfNotWhitelisted(uint256) AllowChangesTest.testAllowSymbolic() AllowChangesTest.testAllow_fail() AllowChangesTest.testFailAllowCallsToAddress() diff --git a/src/tests/integration/test-data/foundry-prove-skip-legacy b/src/tests/integration/test-data/foundry-prove-skip-legacy index dbc3c6a59..ddf75f0b1 100644 --- a/src/tests/integration/test-data/foundry-prove-skip-legacy +++ b/src/tests/integration/test-data/foundry-prove-skip-legacy @@ -18,8 +18,6 @@ AddrTest.testFail_addr_true() AddrTest.test_notBuiltinAddress_symbolic(address) AllowChangesTest.test() AllowChangesTest.testAllow() -AllowChangesTest.testAllowCalls(uint256) -AllowChangesTest.testAllowCalls_failIfNotWhitelisted(uint256) AllowChangesTest.testAllowSymbolic() AllowChangesTest.testAllow_fail() AllowChangesTest.testFailAllowCallsToAddress() diff --git a/src/tests/integration/test-data/foundry/test/AllowChangesTest.t.sol b/src/tests/integration/test-data/foundry/test/AllowChangesTest.t.sol index 8f8b0da22..fdd9c5d75 100644 --- a/src/tests/integration/test-data/foundry/test/AllowChangesTest.t.sol +++ b/src/tests/integration/test-data/foundry/test/AllowChangesTest.t.sol @@ -59,37 +59,6 @@ contract AllowChangesTest is Test, KontrolCheats { canChange.changeSlot1(234521); } - function testAllowCalls(uint256 value) public { - /* Whitelisting two calls to ensure that `allowCalls` is working - for whitelist with > 1 elements */ - bytes memory changeCallDataOne = abi.encodeWithSelector( - ValueStore.changeSlot0.selector, - value - ); - - bytes memory changeCallDataTwo = abi.encodeWithSelector( - ValueStore.changeSlot1.selector, - value - ); - - kevm.allowCalls(address(canChange), changeCallDataOne); - kevm.allowCalls(address(canChange), changeCallDataTwo); - - canChange.changeSlot0(value); - } - - function testAllowCalls_failIfNotWhitelisted(uint256 value) public { - bytes memory changeCallData = abi.encodeWithSelector( - ValueStore.changeSlot0.selector, - value - ); - - kevm.allowCalls(address(canChange), changeCallData); - - vm.expectRevert(); - canChange.changeSlot1(value); - } - function testFailAllowCalls() public { kevm.allowCallsToAddress(address(canChange)); kevm.allowChangesToStorage(address(canChange), 0); diff --git a/src/tests/integration/test-data/src/AllowCalls.t.sol b/src/tests/integration/test-data/src/AllowCalls.t.sol new file mode 100644 index 000000000..9526f64fc --- /dev/null +++ b/src/tests/integration/test-data/src/AllowCalls.t.sol @@ -0,0 +1,59 @@ +// SPDX-License-Identifier: UNLICENSED +pragma solidity =0.8.13; + +import "forge-std/Test.sol"; +import "kontrol-cheatcodes/KontrolCheats.sol"; + +contract ValueStore { + uint256 public slot0; + uint256 public slot1; + + function changeSlot0(uint256 newValue) public { + slot0 = newValue; + } + + function changeSlot1(uint256 newValue) public { + slot1 = newValue; + } +} + +contract AllowChangesTest is Test, KontrolCheats { + ValueStore canChange; + ValueStore cannotChange; + + function setUp() public { + canChange = new ValueStore(); + cannotChange = new ValueStore(); + } + + function testAllowCalls(uint256 value) public { + /* Whitelisting two calls to ensure that `allowCalls` is working + for whitelist with > 1 elements */ + bytes memory changeCallDataOne = abi.encodeWithSelector( + ValueStore.changeSlot0.selector, + value + ); + + bytes memory changeCallDataTwo = abi.encodeWithSelector( + ValueStore.changeSlot1.selector, + value + ); + + kevm.allowCalls(address(canChange), changeCallDataOne); + kevm.allowCalls(address(canChange), changeCallDataTwo); + + canChange.changeSlot0(value); + } + + function testAllowCalls_failIfNotWhitelisted(uint256 value) public { + bytes memory changeCallData = abi.encodeWithSelector( + ValueStore.changeSlot0.selector, + value + ); + + kevm.allowCalls(address(canChange), changeCallData); + + vm.expectRevert(); + canChange.changeSlot1(value); + } +} \ No newline at end of file From bff0810daf73193f24b0488cb3d502affc043f09 Mon Sep 17 00:00:00 2001 From: palinatolmach Date: Thu, 16 Jan 2025 18:12:47 +0400 Subject: [PATCH 08/35] Update expected output in `end-to-end` tests --- ...RandomVarTest.test_custom_names().expected | 90 +++++++++---------- 1 file changed, 45 insertions(+), 45 deletions(-) diff --git a/src/tests/integration/test-data/show/RandomVarTest.test_custom_names().expected b/src/tests/integration/test-data/show/RandomVarTest.test_custom_names().expected index e5eb08823..6f359cd49 100644 --- a/src/tests/integration/test-data/show/RandomVarTest.test_custom_names().expected +++ b/src/tests/integration/test-data/show/RandomVarTest.test_custom_names().expected @@ -345,12 +345,12 @@ module SUMMARY-TEST%RANDOMVARTEST.TEST-CUSTOM-NAMES():0 false + + .List + false - - .List - .List @@ -590,12 +590,12 @@ module SUMMARY-TEST%RANDOMVARTEST.TEST-CUSTOM-NAMES():0 false + + .List + false - - .List - .List @@ -837,12 +837,12 @@ module SUMMARY-TEST%RANDOMVARTEST.TEST-CUSTOM-NAMES():0 false + + .List + false - - .List - .List @@ -1084,12 +1084,12 @@ module SUMMARY-TEST%RANDOMVARTEST.TEST-CUSTOM-NAMES():0 false + + .List + false - - .List - .List @@ -1332,12 +1332,12 @@ module SUMMARY-TEST%RANDOMVARTEST.TEST-CUSTOM-NAMES():0 false + + .List + false - - .List - .List @@ -1581,12 +1581,12 @@ module SUMMARY-TEST%RANDOMVARTEST.TEST-CUSTOM-NAMES():0 false + + .List + false - - .List - .List @@ -1828,12 +1828,12 @@ module SUMMARY-TEST%RANDOMVARTEST.TEST-CUSTOM-NAMES():0 false + + .List + false - - .List - .List @@ -2077,12 +2077,12 @@ module SUMMARY-TEST%RANDOMVARTEST.TEST-CUSTOM-NAMES():0 false + + .List + false - - .List - .List @@ -2328,12 +2328,12 @@ module SUMMARY-TEST%RANDOMVARTEST.TEST-CUSTOM-NAMES():0 false + + .List + false - - .List - .List @@ -2625,12 +2625,12 @@ module SUMMARY-TEST%RANDOMVARTEST.TEST-CUSTOM-NAMES():0 false + + .List + false - - .List - .List @@ -2896,12 +2896,12 @@ module SUMMARY-TEST%RANDOMVARTEST.TEST-CUSTOM-NAMES():0 false + + .List + false - - .List - .List @@ -3168,12 +3168,12 @@ module SUMMARY-TEST%RANDOMVARTEST.TEST-CUSTOM-NAMES():0 false + + .List + false - - .List - .List @@ -3440,12 +3440,12 @@ module SUMMARY-TEST%RANDOMVARTEST.TEST-CUSTOM-NAMES():0 false + + .List + false - - .List - .List @@ -3713,12 +3713,12 @@ module SUMMARY-TEST%RANDOMVARTEST.TEST-CUSTOM-NAMES():0 false + + .List + false - - .List - .List @@ -3987,12 +3987,12 @@ module SUMMARY-TEST%RANDOMVARTEST.TEST-CUSTOM-NAMES():0 false + + .List + false - - .List - .List From 001cf55ba6612c4e807dd6fcdc2d425ce67b2458 Mon Sep 17 00:00:00 2001 From: palinatolmach Date: Thu, 16 Jan 2025 18:25:26 +0400 Subject: [PATCH 09/35] Remove fixed `kontrol-cheatcodes` version --- src/kontrol/foundry.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/kontrol/foundry.py b/src/kontrol/foundry.py index b67bac726..dce564001 100644 --- a/src/kontrol/foundry.py +++ b/src/kontrol/foundry.py @@ -1523,7 +1523,7 @@ def init_project(project_root: Path, *, skip_forge: bool) -> None: write_to_file(root / 'kontrol.toml', kontrol_toml_file_contents()) # TODO(palina): the version is fixed for testing, remove run_process_2( - ['forge', 'install', '--no-git', 'runtimeverification/kontrol-cheatcodes@0edc87b03c313b25df2e015d30a0ca9fce6caba6'], + ['forge', 'install', '--no-git', 'runtimeverification/kontrol-cheatcodes'], logger=_LOGGER, cwd=root, ) From e5ab34b5a38ce648fb0427fc1e337e72c6f376a0 Mon Sep 17 00:00:00 2001 From: palinatolmach Date: Thu, 16 Jan 2025 18:26:01 +0400 Subject: [PATCH 10/35] Removed a TODO comment --- src/kontrol/foundry.py | 1 - 1 file changed, 1 deletion(-) diff --git a/src/kontrol/foundry.py b/src/kontrol/foundry.py index dce564001..cbd6f7c4e 100644 --- a/src/kontrol/foundry.py +++ b/src/kontrol/foundry.py @@ -1521,7 +1521,6 @@ def init_project(project_root: Path, *, skip_forge: bool) -> None: write_to_file(root / 'lemmas.k', empty_lemmas_file_contents()) write_to_file(root / 'KONTROL.md', kontrol_file_contents()) write_to_file(root / 'kontrol.toml', kontrol_toml_file_contents()) - # TODO(palina): the version is fixed for testing, remove run_process_2( ['forge', 'install', '--no-git', 'runtimeverification/kontrol-cheatcodes'], logger=_LOGGER, From a4ad642bbdfabe95c74cc448d801bc1e948f09a2 Mon Sep 17 00:00:00 2001 From: palinatolmach Date: Thu, 16 Jan 2025 18:37:43 +0400 Subject: [PATCH 11/35] `cheatcodes.md` cleanup --- src/kontrol/kdist/cheatcodes.md | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/src/kontrol/kdist/cheatcodes.md b/src/kontrol/kdist/cheatcodes.md index 455809dd2..bfebc68c9 100644 --- a/src/kontrol/kdist/cheatcodes.md +++ b/src/kontrol/kdist/cheatcodes.md @@ -1611,19 +1611,6 @@ If the flag is false, it skips comparison, assuming success; otherwise, it compa rule #checkTopics(ListItem(CHECK) CHECKS, ListItem(V1) L1, ListItem(V2) L2) => #checkTopic(CHECK, V1, V2) andBool #checkTopics(CHECKS, L1, L2) requires size(L1) ==Int size(L2) ``` -- `#addAddressToWhitelist` enables the whitelist restriction for calls and adds an address to the whitelist. - -```k - // syntax KItem ::= "#addAddressToWhitelist" Int [symbol(foundry_addAddressToWhitelist)] - // ------------------------------------------------------------------------------------- - // rule #addAddressToWhitelist ACCT => .K ... - // - // _ => true - // WLIST => WLIST ListItem(ACCT) - // ... - // -``` - - `#addStorageSlotToWhitelist` enables the whitelist restriction for storage chagnes and adds a `StorageSlot` item to the whitelist. ```k From eb4b11893b412aef09936ff0ff09d382adf0682f Mon Sep 17 00:00:00 2001 From: palinatolmach Date: Thu, 16 Jan 2025 18:46:13 +0400 Subject: [PATCH 12/35] Remove `ADDRESSLIST_CELL` --- src/kontrol/prove.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/kontrol/prove.py b/src/kontrol/prove.py index c0fb739d0..9aed3db62 100644 --- a/src/kontrol/prove.py +++ b/src/kontrol/prove.py @@ -1038,7 +1038,6 @@ def _init_cterm( 'ISEVENTEXPECTED_CELL': FALSE, 'ISCALLWHITELISTACTIVE_CELL': FALSE, 'ISSTORAGEWHITELISTACTIVE_CELL': FALSE, - 'ADDRESSLIST_CELL': list_empty(), 'STORAGESLOTLIST_CELL': list_empty(), 'ALLOWEDCALLSLIST_CELL': list_empty(), 'MOCKCALLS_CELL': KApply('.MockCallCellMap'), @@ -1426,7 +1425,7 @@ def _final_term( 'ISEVENTEXPECTED_CELL': KVariable('ISEVENTEXPECTED_FINAL'), 'ISCALLWHITELISTACTIVE_CELL': KVariable('ISCALLWHITELISTACTIVE_FINAL'), 'ISSTORAGEWHITELISTACTIVE_CELL': KVariable('ISSTORAGEWHITELISTACTIVE_FINAL'), - 'ADDRESSLIST_CELL': KVariable('ADDRESSLIST_FINAL'), + 'ALLOWEDCALLSLIST_CELL': KVariable('ALLOWEDCALLSLIST_FINAL'), 'STORAGESLOTLIST_CELL': KVariable('STORAGESLOTLIST_FINAL'), } From 5a32c70352f81b1773b04fbe8fdc2b6e7aa4893d Mon Sep 17 00:00:00 2001 From: palinatolmach Date: Thu, 16 Jan 2025 18:50:37 +0400 Subject: [PATCH 13/35] `AllowChangesTest` cleanup --- .../test-data/foundry/test/AllowChangesTest.t.sol | 7 ------- 1 file changed, 7 deletions(-) diff --git a/src/tests/integration/test-data/foundry/test/AllowChangesTest.t.sol b/src/tests/integration/test-data/foundry/test/AllowChangesTest.t.sol index fdd9c5d75..6745a87f7 100644 --- a/src/tests/integration/test-data/foundry/test/AllowChangesTest.t.sol +++ b/src/tests/integration/test-data/foundry/test/AllowChangesTest.t.sol @@ -58,11 +58,4 @@ contract AllowChangesTest is Test, KontrolCheats { canChange.changeSlot1(234521); } - - function testFailAllowCalls() public { - kevm.allowCallsToAddress(address(canChange)); - kevm.allowChangesToStorage(address(canChange), 0); - - canChange.changeSlot1(234521); - } } From 7918983c41a567640f40fa6800551d2b1bf22471 Mon Sep 17 00:00:00 2001 From: palinatolmach Date: Thu, 16 Jan 2025 19:10:10 +0400 Subject: [PATCH 14/35] Another output update --- .../RandomVarTest.test_custom_names().expected | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/src/tests/integration/test-data/show/RandomVarTest.test_custom_names().expected b/src/tests/integration/test-data/show/RandomVarTest.test_custom_names().expected index 6f359cd49..dd5ab9c5d 100644 --- a/src/tests/integration/test-data/show/RandomVarTest.test_custom_names().expected +++ b/src/tests/integration/test-data/show/RandomVarTest.test_custom_names().expected @@ -4,7 +4,6 @@ │ pc: 0 │ callDepth: 0 │ statusCode: STATUSCODE:StatusCode -│ src: test/RandomVar.t.sol:7:68 │ method: test%RandomVarTest.test_custom_names() │ │ (369 steps) @@ -13,7 +12,6 @@ │ pc: 2946 │ callDepth: 0 │ statusCode: STATUSCODE:StatusCode -│ src: test/RandomVar.t.sol:58:58 │ method: test%RandomVarTest.test_custom_names() │ │ (1 step) @@ -22,7 +20,6 @@ │ pc: 2946 │ callDepth: 0 │ statusCode: STATUSCODE:StatusCode -│ src: test/RandomVar.t.sol:58:58 │ method: test%RandomVarTest.test_custom_names() │ │ (454 steps) @@ -31,7 +28,6 @@ │ pc: 3081 │ callDepth: 0 │ statusCode: STATUSCODE:StatusCode -│ src: test/RandomVar.t.sol:59:59 │ method: test%RandomVarTest.test_custom_names() │ │ (1 step) @@ -40,7 +36,6 @@ │ pc: 3081 │ callDepth: 0 │ statusCode: STATUSCODE:StatusCode -│ src: test/RandomVar.t.sol:59:59 │ method: test%RandomVarTest.test_custom_names() │ │ (1000 steps) @@ -57,7 +52,6 @@ │ pc: 5597 │ callDepth: 0 │ statusCode: STATUSCODE:StatusCode -│ src: lib/kontrol-cheatcodes/src/KontrolCheats.sol:277:277 │ method: test%RandomVarTest.test_custom_names() │ │ (1 step) @@ -66,7 +60,6 @@ │ pc: 5597 │ callDepth: 0 │ statusCode: STATUSCODE:StatusCode -│ src: lib/kontrol-cheatcodes/src/KontrolCheats.sol:277:277 │ method: test%RandomVarTest.test_custom_names() │ │ (450 steps) @@ -75,7 +68,6 @@ │ pc: 3445 │ callDepth: 0 │ statusCode: STATUSCODE:StatusCode -│ src: test/RandomVar.t.sol:63:63 │ method: test%RandomVarTest.test_custom_names() │ │ (1 step) @@ -84,7 +76,6 @@ │ pc: 3445 │ callDepth: 0 │ statusCode: STATUSCODE:StatusCode -│ src: test/RandomVar.t.sol:63:63 │ method: test%RandomVarTest.test_custom_names() │ │ (551 steps) @@ -93,7 +84,6 @@ │ pc: 3621 │ callDepth: 0 │ statusCode: STATUSCODE:StatusCode -│ src: test/RandomVar.t.sol:64:64 │ method: test%RandomVarTest.test_custom_names() │ │ (1 step) @@ -102,7 +92,6 @@ │ pc: 3621 │ callDepth: 0 │ statusCode: STATUSCODE:StatusCode -│ src: test/RandomVar.t.sol:64:64 │ method: test%RandomVarTest.test_custom_names() │ │ (261 steps) @@ -111,7 +100,6 @@ │ pc: 3731 │ callDepth: 0 │ statusCode: STATUSCODE:StatusCode -│ src: test/RandomVar.t.sol:65:65 │ method: test%RandomVarTest.test_custom_names() │ │ (1 step) @@ -120,7 +108,6 @@ │ pc: 3731 │ callDepth: 0 │ statusCode: STATUSCODE:StatusCode -│ src: test/RandomVar.t.sol:65:65 │ method: test%RandomVarTest.test_custom_names() │ │ (1000 steps) @@ -129,7 +116,6 @@ │ pc: 3919 │ callDepth: 0 │ statusCode: STATUSCODE:StatusCode -│ src: test/RandomVar.t.sol:57:67 │ method: test%RandomVarTest.test_custom_names() │ │ (26 steps) @@ -138,7 +124,6 @@ │ pc: 371 │ callDepth: 0 │ statusCode: EVMC_SUCCESS -│ src: test/RandomVar.t.sol:45:50 │ method: test%RandomVarTest.test_custom_names() │ ┊ constraint: From f5a8b1248b67f1c2cef5ebca5642700db7e8ab47 Mon Sep 17 00:00:00 2001 From: palinatolmach Date: Thu, 16 Jan 2025 19:43:50 +0400 Subject: [PATCH 15/35] Update expected output --- ...sertTest.checkFail_assert_false().expected | 30 +- ...AssertTest.testFail_assert_true().expected | 36 +- ...sertTest.testFail_expect_revert().expected | 96 ++--- .../AssertTest.test_assert_false().expected | 36 +- .../AssertTest.test_assert_true().expected | 30 +- ...Test.test_failing_branch(uint256).expected | 60 +-- ...st_revert_branch(uint256,uint256).expected | 66 ++-- ...ail_assume_false(uint256,uint256).expected | 36 +- ...Fail_assume_true(uint256,uint256).expected | 48 +-- ...est_assume_false(uint256,uint256).expected | 54 +-- .../show/BMCBoundTest.testBound().expected | 84 ++--- ...RandomVarTest.test_custom_names().expected | 15 + ...etUpDeployTest.test_extcodesize().expected | 30 +- .../test-data/show/gas-abstraction.expected | 24 +- .../test-data/show/merge-loop-heads.expected | 48 +-- .../test-data/show/node-refutation.expected | 24 +- .../test-data/show/split-node.expected | 342 +++++++++--------- 17 files changed, 537 insertions(+), 522 deletions(-) diff --git a/src/tests/integration/test-data/show/AssertTest.checkFail_assert_false().expected b/src/tests/integration/test-data/show/AssertTest.checkFail_assert_false().expected index 0f4005130..901d14df0 100644 --- a/src/tests/integration/test-data/show/AssertTest.checkFail_assert_false().expected +++ b/src/tests/integration/test-data/show/AssertTest.checkFail_assert_false().expected @@ -251,12 +251,12 @@ module SUMMARY-TEST%ASSERTTEST.CHECKFAIL-ASSERT-FALSE():0 false + + .List + false - - .List - .List @@ -493,12 +493,12 @@ module SUMMARY-TEST%ASSERTTEST.CHECKFAIL-ASSERT-FALSE():0 false + + .List + false - - .List - .List @@ -734,12 +734,12 @@ module SUMMARY-TEST%ASSERTTEST.CHECKFAIL-ASSERT-FALSE():0 false + + .List + false - - .List - .List @@ -977,12 +977,12 @@ module SUMMARY-TEST%ASSERTTEST.CHECKFAIL-ASSERT-FALSE():0 false + + .List + false - - .List - .List @@ -1220,12 +1220,12 @@ module SUMMARY-TEST%ASSERTTEST.CHECKFAIL-ASSERT-FALSE():0 false + + .List + false - - .List - .List diff --git a/src/tests/integration/test-data/show/AssertTest.testFail_assert_true().expected b/src/tests/integration/test-data/show/AssertTest.testFail_assert_true().expected index cad3904ce..c8eaa9dd9 100644 --- a/src/tests/integration/test-data/show/AssertTest.testFail_assert_true().expected +++ b/src/tests/integration/test-data/show/AssertTest.testFail_assert_true().expected @@ -251,12 +251,12 @@ Node 10: false + + .List + false - - .List - .List @@ -497,12 +497,12 @@ module SUMMARY-TEST%ASSERTTEST.TESTFAIL-ASSERT-TRUE():0 false + + .List + false - - .List - .List @@ -739,12 +739,12 @@ module SUMMARY-TEST%ASSERTTEST.TESTFAIL-ASSERT-TRUE():0 false + + .List + false - - .List - .List @@ -980,12 +980,12 @@ module SUMMARY-TEST%ASSERTTEST.TESTFAIL-ASSERT-TRUE():0 false + + .List + false - - .List - .List @@ -1223,12 +1223,12 @@ module SUMMARY-TEST%ASSERTTEST.TESTFAIL-ASSERT-TRUE():0 false + + .List + false - - .List - .List @@ -1466,12 +1466,12 @@ module SUMMARY-TEST%ASSERTTEST.TESTFAIL-ASSERT-TRUE():0 false + + .List + false - - .List - .List diff --git a/src/tests/integration/test-data/show/AssertTest.testFail_expect_revert().expected b/src/tests/integration/test-data/show/AssertTest.testFail_expect_revert().expected index c059452a2..65c3e6259 100644 --- a/src/tests/integration/test-data/show/AssertTest.testFail_expect_revert().expected +++ b/src/tests/integration/test-data/show/AssertTest.testFail_expect_revert().expected @@ -342,12 +342,12 @@ Node 20: false + + .List + false - - .List - .List @@ -588,12 +588,12 @@ module SUMMARY-TEST%ASSERTTEST.TESTFAIL-EXPECT-REVERT():0 false + + .List + false - - .List - .List @@ -830,12 +830,12 @@ module SUMMARY-TEST%ASSERTTEST.TESTFAIL-EXPECT-REVERT():0 false + + .List + false - - .List - .List @@ -1071,12 +1071,12 @@ module SUMMARY-TEST%ASSERTTEST.TESTFAIL-EXPECT-REVERT():0 false + + .List + false - - .List - .List @@ -1314,12 +1314,12 @@ module SUMMARY-TEST%ASSERTTEST.TESTFAIL-EXPECT-REVERT():0 false + + .List + false - - .List - .List @@ -1565,12 +1565,12 @@ module SUMMARY-TEST%ASSERTTEST.TESTFAIL-EXPECT-REVERT():0 false + + .List + false - - .List - .List @@ -1815,12 +1815,12 @@ module SUMMARY-TEST%ASSERTTEST.TESTFAIL-EXPECT-REVERT():0 false + + .List + false - - .List - .List @@ -2162,12 +2162,12 @@ module SUMMARY-TEST%ASSERTTEST.TESTFAIL-EXPECT-REVERT():0 false + + .List + false - - .List - .List @@ -2507,12 +2507,12 @@ module SUMMARY-TEST%ASSERTTEST.TESTFAIL-EXPECT-REVERT():0 false + + .List + false - - .List - .List @@ -2853,12 +2853,12 @@ module SUMMARY-TEST%ASSERTTEST.TESTFAIL-EXPECT-REVERT():0 false + + .List + false - - .List - .List @@ -3202,12 +3202,12 @@ module SUMMARY-TEST%ASSERTTEST.TESTFAIL-EXPECT-REVERT():0 false + + .List + false - - .List - .List @@ -3551,12 +3551,12 @@ module SUMMARY-TEST%ASSERTTEST.TESTFAIL-EXPECT-REVERT():0 false + + .List + false - - .List - .List @@ -3903,12 +3903,12 @@ module SUMMARY-TEST%ASSERTTEST.TESTFAIL-EXPECT-REVERT():0 false + + .List + false - - .List - .List @@ -4255,12 +4255,12 @@ module SUMMARY-TEST%ASSERTTEST.TESTFAIL-EXPECT-REVERT():0 false + + .List + false - - .List - .List @@ -4503,12 +4503,12 @@ module SUMMARY-TEST%ASSERTTEST.TESTFAIL-EXPECT-REVERT():0 false + + .List + false - - .List - .List @@ -4751,12 +4751,12 @@ module SUMMARY-TEST%ASSERTTEST.TESTFAIL-EXPECT-REVERT():0 false + + .List + false - - .List - .List diff --git a/src/tests/integration/test-data/show/AssertTest.test_assert_false().expected b/src/tests/integration/test-data/show/AssertTest.test_assert_false().expected index e1d963a32..2f3cc100d 100644 --- a/src/tests/integration/test-data/show/AssertTest.test_assert_false().expected +++ b/src/tests/integration/test-data/show/AssertTest.test_assert_false().expected @@ -248,12 +248,12 @@ Node 10: false + + .List + false - - .List - .List @@ -494,12 +494,12 @@ module SUMMARY-TEST%ASSERTTEST.TEST-ASSERT-FALSE():0 false + + .List + false - - .List - .List @@ -736,12 +736,12 @@ module SUMMARY-TEST%ASSERTTEST.TEST-ASSERT-FALSE():0 false + + .List + false - - .List - .List @@ -977,12 +977,12 @@ module SUMMARY-TEST%ASSERTTEST.TEST-ASSERT-FALSE():0 false + + .List + false - - .List - .List @@ -1220,12 +1220,12 @@ module SUMMARY-TEST%ASSERTTEST.TEST-ASSERT-FALSE():0 false + + .List + false - - .List - .List @@ -1463,12 +1463,12 @@ module SUMMARY-TEST%ASSERTTEST.TEST-ASSERT-FALSE():0 false + + .List + false - - .List - .List diff --git a/src/tests/integration/test-data/show/AssertTest.test_assert_true().expected b/src/tests/integration/test-data/show/AssertTest.test_assert_true().expected index 60c34dd20..47e4a56d9 100644 --- a/src/tests/integration/test-data/show/AssertTest.test_assert_true().expected +++ b/src/tests/integration/test-data/show/AssertTest.test_assert_true().expected @@ -254,12 +254,12 @@ module SUMMARY-TEST%ASSERTTEST.TEST-ASSERT-TRUE():0 false + + .List + false - - .List - .List @@ -496,12 +496,12 @@ module SUMMARY-TEST%ASSERTTEST.TEST-ASSERT-TRUE():0 false + + .List + false - - .List - .List @@ -737,12 +737,12 @@ module SUMMARY-TEST%ASSERTTEST.TEST-ASSERT-TRUE():0 false + + .List + false - - .List - .List @@ -980,12 +980,12 @@ module SUMMARY-TEST%ASSERTTEST.TEST-ASSERT-TRUE():0 false + + .List + false - - .List - .List @@ -1223,12 +1223,12 @@ module SUMMARY-TEST%ASSERTTEST.TEST-ASSERT-TRUE():0 false + + .List + false - - .List - .List diff --git a/src/tests/integration/test-data/show/AssertTest.test_failing_branch(uint256).expected b/src/tests/integration/test-data/show/AssertTest.test_failing_branch(uint256).expected index 91b8973a1..6576b5dbd 100644 --- a/src/tests/integration/test-data/show/AssertTest.test_failing_branch(uint256).expected +++ b/src/tests/integration/test-data/show/AssertTest.test_failing_branch(uint256).expected @@ -311,12 +311,12 @@ Node 16: false + + .List + false - - .List - .List @@ -560,12 +560,12 @@ module SUMMARY-TEST%ASSERTTEST.TEST-FAILING-BRANCH(UINT256):0 false + + .List + false - - .List - .List @@ -802,12 +802,12 @@ module SUMMARY-TEST%ASSERTTEST.TEST-FAILING-BRANCH(UINT256):0 false + + .List + false - - .List - .List @@ -1046,12 +1046,12 @@ module SUMMARY-TEST%ASSERTTEST.TEST-FAILING-BRANCH(UINT256):0 false + + .List + false - - .List - .List @@ -1289,12 +1289,12 @@ module SUMMARY-TEST%ASSERTTEST.TEST-FAILING-BRANCH(UINT256):0 false + + .List + false - - .List - .List @@ -1533,12 +1533,12 @@ module SUMMARY-TEST%ASSERTTEST.TEST-FAILING-BRANCH(UINT256):0 false + + .List + false - - .List - .List @@ -1779,12 +1779,12 @@ module SUMMARY-TEST%ASSERTTEST.TEST-FAILING-BRANCH(UINT256):0 false + + .List + false - - .List - .List @@ -2025,12 +2025,12 @@ module SUMMARY-TEST%ASSERTTEST.TEST-FAILING-BRANCH(UINT256):0 false + + .List + false - - .List - .List @@ -2271,12 +2271,12 @@ module SUMMARY-TEST%ASSERTTEST.TEST-FAILING-BRANCH(UINT256):0 false + + .List + false - - .List - .List @@ -2517,12 +2517,12 @@ module SUMMARY-TEST%ASSERTTEST.TEST-FAILING-BRANCH(UINT256):0 false + + .List + false - - .List - .List diff --git a/src/tests/integration/test-data/show/AssertTest.test_revert_branch(uint256,uint256).expected b/src/tests/integration/test-data/show/AssertTest.test_revert_branch(uint256,uint256).expected index 6b41bfd24..ac7fbec9e 100644 --- a/src/tests/integration/test-data/show/AssertTest.test_revert_branch(uint256,uint256).expected +++ b/src/tests/integration/test-data/show/AssertTest.test_revert_branch(uint256,uint256).expected @@ -309,12 +309,12 @@ Node 16: false + + .List + false - - .List - .List @@ -560,12 +560,12 @@ Node 15: false + + .List + false - - .List - .List @@ -811,12 +811,12 @@ module SUMMARY-TEST%ASSERTTEST.TEST-REVERT-BRANCH(UINT256,UINT256):0 false + + .List + false - - .List - .List @@ -1053,12 +1053,12 @@ module SUMMARY-TEST%ASSERTTEST.TEST-REVERT-BRANCH(UINT256,UINT256):0 false + + .List + false - - .List - .List @@ -1299,12 +1299,12 @@ module SUMMARY-TEST%ASSERTTEST.TEST-REVERT-BRANCH(UINT256,UINT256):0 false + + .List + false - - .List - .List @@ -1544,12 +1544,12 @@ module SUMMARY-TEST%ASSERTTEST.TEST-REVERT-BRANCH(UINT256,UINT256):0 false + + .List + false - - .List - .List @@ -1790,12 +1790,12 @@ module SUMMARY-TEST%ASSERTTEST.TEST-REVERT-BRANCH(UINT256,UINT256):0 false + + .List + false - - .List - .List @@ -2038,12 +2038,12 @@ module SUMMARY-TEST%ASSERTTEST.TEST-REVERT-BRANCH(UINT256,UINT256):0 false + + .List + false - - .List - .List @@ -2286,12 +2286,12 @@ module SUMMARY-TEST%ASSERTTEST.TEST-REVERT-BRANCH(UINT256,UINT256):0 false + + .List + false - - .List - .List @@ -2534,12 +2534,12 @@ module SUMMARY-TEST%ASSERTTEST.TEST-REVERT-BRANCH(UINT256,UINT256):0 false + + .List + false - - .List - .List @@ -2782,12 +2782,12 @@ module SUMMARY-TEST%ASSERTTEST.TEST-REVERT-BRANCH(UINT256,UINT256):0 false + + .List + false - - .List - .List diff --git a/src/tests/integration/test-data/show/AssumeTest.testFail_assume_false(uint256,uint256).expected b/src/tests/integration/test-data/show/AssumeTest.testFail_assume_false(uint256,uint256).expected index 4e7c3f7ae..e02077a7b 100644 --- a/src/tests/integration/test-data/show/AssumeTest.testFail_assume_false(uint256,uint256).expected +++ b/src/tests/integration/test-data/show/AssumeTest.testFail_assume_false(uint256,uint256).expected @@ -249,12 +249,12 @@ Node 7: false + + .List + false - - .List - .List @@ -498,12 +498,12 @@ module SUMMARY-TEST%ASSUMETEST.TESTFAIL-ASSUME-FALSE(UINT256,UINT256):0 false + + .List + false - - .List - .List @@ -746,12 +746,12 @@ module SUMMARY-TEST%ASSUMETEST.TESTFAIL-ASSUME-FALSE(UINT256,UINT256):0 false + + .List + false - - .List - .List @@ -995,12 +995,12 @@ module SUMMARY-TEST%ASSUMETEST.TESTFAIL-ASSUME-FALSE(UINT256,UINT256):0 false + + .List + false - - .List - .List @@ -1244,12 +1244,12 @@ module SUMMARY-TEST%ASSUMETEST.TESTFAIL-ASSUME-FALSE(UINT256,UINT256):0 false + + .List + false - - .List - .List @@ -1491,12 +1491,12 @@ module SUMMARY-TEST%ASSUMETEST.TESTFAIL-ASSUME-FALSE(UINT256,UINT256):0 false + + .List + false - - .List - .List diff --git a/src/tests/integration/test-data/show/AssumeTest.testFail_assume_true(uint256,uint256).expected b/src/tests/integration/test-data/show/AssumeTest.testFail_assume_true(uint256,uint256).expected index fd3dfa906..b452ab48d 100644 --- a/src/tests/integration/test-data/show/AssumeTest.testFail_assume_true(uint256,uint256).expected +++ b/src/tests/integration/test-data/show/AssumeTest.testFail_assume_true(uint256,uint256).expected @@ -275,12 +275,12 @@ module SUMMARY-TEST%ASSUMETEST.TESTFAIL-ASSUME-TRUE(UINT256,UINT256):0 false + + .List + false - - .List - .List @@ -523,12 +523,12 @@ module SUMMARY-TEST%ASSUMETEST.TESTFAIL-ASSUME-TRUE(UINT256,UINT256):0 false + + .List + false - - .List - .List @@ -771,12 +771,12 @@ module SUMMARY-TEST%ASSUMETEST.TESTFAIL-ASSUME-TRUE(UINT256,UINT256):0 false + + .List + false - - .List - .List @@ -1017,12 +1017,12 @@ module SUMMARY-TEST%ASSUMETEST.TESTFAIL-ASSUME-TRUE(UINT256,UINT256):0 false + + .List + false - - .List - .List @@ -1266,12 +1266,12 @@ module SUMMARY-TEST%ASSUMETEST.TESTFAIL-ASSUME-TRUE(UINT256,UINT256):0 false + + .List + false - - .List - .List @@ -1516,12 +1516,12 @@ module SUMMARY-TEST%ASSUMETEST.TESTFAIL-ASSUME-TRUE(UINT256,UINT256):0 false + + .List + false - - .List - .List @@ -1765,12 +1765,12 @@ module SUMMARY-TEST%ASSUMETEST.TESTFAIL-ASSUME-TRUE(UINT256,UINT256):0 false + + .List + false - - .List - .List @@ -2014,12 +2014,12 @@ module SUMMARY-TEST%ASSUMETEST.TESTFAIL-ASSUME-TRUE(UINT256,UINT256):0 false + + .List + false - - .List - .List diff --git a/src/tests/integration/test-data/show/AssumeTest.test_assume_false(uint256,uint256).expected b/src/tests/integration/test-data/show/AssumeTest.test_assume_false(uint256,uint256).expected index 0f428cc54..7d987bb42 100644 --- a/src/tests/integration/test-data/show/AssumeTest.test_assume_false(uint256,uint256).expected +++ b/src/tests/integration/test-data/show/AssumeTest.test_assume_false(uint256,uint256).expected @@ -273,12 +273,12 @@ Node 10: false + + .List + false - - .List - .List @@ -524,12 +524,12 @@ module SUMMARY-TEST%ASSUMETEST.TEST-ASSUME-FALSE(UINT256,UINT256):0 false + + .List + false - - .List - .List @@ -772,12 +772,12 @@ module SUMMARY-TEST%ASSUMETEST.TEST-ASSUME-FALSE(UINT256,UINT256):0 false + + .List + false - - .List - .List @@ -1020,12 +1020,12 @@ module SUMMARY-TEST%ASSUMETEST.TEST-ASSUME-FALSE(UINT256,UINT256):0 false + + .List + false - - .List - .List @@ -1266,12 +1266,12 @@ module SUMMARY-TEST%ASSUMETEST.TEST-ASSUME-FALSE(UINT256,UINT256):0 false + + .List + false - - .List - .List @@ -1515,12 +1515,12 @@ module SUMMARY-TEST%ASSUMETEST.TEST-ASSUME-FALSE(UINT256,UINT256):0 false + + .List + false - - .List - .List @@ -1765,12 +1765,12 @@ module SUMMARY-TEST%ASSUMETEST.TEST-ASSUME-FALSE(UINT256,UINT256):0 false + + .List + false - - .List - .List @@ -2014,12 +2014,12 @@ module SUMMARY-TEST%ASSUMETEST.TEST-ASSUME-FALSE(UINT256,UINT256):0 false + + .List + false - - .List - .List @@ -2263,12 +2263,12 @@ module SUMMARY-TEST%ASSUMETEST.TEST-ASSUME-FALSE(UINT256,UINT256):0 false + + .List + false - - .List - .List diff --git a/src/tests/integration/test-data/show/BMCBoundTest.testBound().expected b/src/tests/integration/test-data/show/BMCBoundTest.testBound().expected index 70a3077f3..98a5246dd 100644 --- a/src/tests/integration/test-data/show/BMCBoundTest.testBound().expected +++ b/src/tests/integration/test-data/show/BMCBoundTest.testBound().expected @@ -421,12 +421,12 @@ module SUMMARY-TEST%BMCBOUNDTEST.TESTBOUND():0 false + + .List + false - - .List - .List @@ -668,12 +668,12 @@ module SUMMARY-TEST%BMCBOUNDTEST.TESTBOUND():0 false + + .List + false - - .List - .List @@ -915,12 +915,12 @@ module SUMMARY-TEST%BMCBOUNDTEST.TESTBOUND():0 false + + .List + false - - .List - .List @@ -1163,12 +1163,12 @@ module SUMMARY-TEST%BMCBOUNDTEST.TESTBOUND():0 false + + .List + false - - .List - .List @@ -1412,12 +1412,12 @@ module SUMMARY-TEST%BMCBOUNDTEST.TESTBOUND():0 false + + .List + false - - .List - .List @@ -1659,12 +1659,12 @@ module SUMMARY-TEST%BMCBOUNDTEST.TESTBOUND():0 false + + .List + false - - .List - .List @@ -1907,12 +1907,12 @@ module SUMMARY-TEST%BMCBOUNDTEST.TESTBOUND():0 false + + .List + false - - .List - .List @@ -2152,12 +2152,12 @@ module SUMMARY-TEST%BMCBOUNDTEST.TESTBOUND():0 false + + .List + false - - .List - .List @@ -2398,12 +2398,12 @@ module SUMMARY-TEST%BMCBOUNDTEST.TESTBOUND():0 false + + .List + false - - .List - .List @@ -2645,12 +2645,12 @@ module SUMMARY-TEST%BMCBOUNDTEST.TESTBOUND():0 false + + .List + false - - .List - .List @@ -2893,12 +2893,12 @@ module SUMMARY-TEST%BMCBOUNDTEST.TESTBOUND():0 false + + .List + false - - .List - .List @@ -3137,12 +3137,12 @@ module SUMMARY-TEST%BMCBOUNDTEST.TESTBOUND():0 false + + .List + false - - .List - .List @@ -3382,12 +3382,12 @@ module SUMMARY-TEST%BMCBOUNDTEST.TESTBOUND():0 false + + .List + false - - .List - .List @@ -3628,12 +3628,12 @@ module SUMMARY-TEST%BMCBOUNDTEST.TESTBOUND():0 false + + .List + false - - .List - .List diff --git a/src/tests/integration/test-data/show/RandomVarTest.test_custom_names().expected b/src/tests/integration/test-data/show/RandomVarTest.test_custom_names().expected index dd5ab9c5d..6f359cd49 100644 --- a/src/tests/integration/test-data/show/RandomVarTest.test_custom_names().expected +++ b/src/tests/integration/test-data/show/RandomVarTest.test_custom_names().expected @@ -4,6 +4,7 @@ │ pc: 0 │ callDepth: 0 │ statusCode: STATUSCODE:StatusCode +│ src: test/RandomVar.t.sol:7:68 │ method: test%RandomVarTest.test_custom_names() │ │ (369 steps) @@ -12,6 +13,7 @@ │ pc: 2946 │ callDepth: 0 │ statusCode: STATUSCODE:StatusCode +│ src: test/RandomVar.t.sol:58:58 │ method: test%RandomVarTest.test_custom_names() │ │ (1 step) @@ -20,6 +22,7 @@ │ pc: 2946 │ callDepth: 0 │ statusCode: STATUSCODE:StatusCode +│ src: test/RandomVar.t.sol:58:58 │ method: test%RandomVarTest.test_custom_names() │ │ (454 steps) @@ -28,6 +31,7 @@ │ pc: 3081 │ callDepth: 0 │ statusCode: STATUSCODE:StatusCode +│ src: test/RandomVar.t.sol:59:59 │ method: test%RandomVarTest.test_custom_names() │ │ (1 step) @@ -36,6 +40,7 @@ │ pc: 3081 │ callDepth: 0 │ statusCode: STATUSCODE:StatusCode +│ src: test/RandomVar.t.sol:59:59 │ method: test%RandomVarTest.test_custom_names() │ │ (1000 steps) @@ -52,6 +57,7 @@ │ pc: 5597 │ callDepth: 0 │ statusCode: STATUSCODE:StatusCode +│ src: lib/kontrol-cheatcodes/src/KontrolCheats.sol:277:277 │ method: test%RandomVarTest.test_custom_names() │ │ (1 step) @@ -60,6 +66,7 @@ │ pc: 5597 │ callDepth: 0 │ statusCode: STATUSCODE:StatusCode +│ src: lib/kontrol-cheatcodes/src/KontrolCheats.sol:277:277 │ method: test%RandomVarTest.test_custom_names() │ │ (450 steps) @@ -68,6 +75,7 @@ │ pc: 3445 │ callDepth: 0 │ statusCode: STATUSCODE:StatusCode +│ src: test/RandomVar.t.sol:63:63 │ method: test%RandomVarTest.test_custom_names() │ │ (1 step) @@ -76,6 +84,7 @@ │ pc: 3445 │ callDepth: 0 │ statusCode: STATUSCODE:StatusCode +│ src: test/RandomVar.t.sol:63:63 │ method: test%RandomVarTest.test_custom_names() │ │ (551 steps) @@ -84,6 +93,7 @@ │ pc: 3621 │ callDepth: 0 │ statusCode: STATUSCODE:StatusCode +│ src: test/RandomVar.t.sol:64:64 │ method: test%RandomVarTest.test_custom_names() │ │ (1 step) @@ -92,6 +102,7 @@ │ pc: 3621 │ callDepth: 0 │ statusCode: STATUSCODE:StatusCode +│ src: test/RandomVar.t.sol:64:64 │ method: test%RandomVarTest.test_custom_names() │ │ (261 steps) @@ -100,6 +111,7 @@ │ pc: 3731 │ callDepth: 0 │ statusCode: STATUSCODE:StatusCode +│ src: test/RandomVar.t.sol:65:65 │ method: test%RandomVarTest.test_custom_names() │ │ (1 step) @@ -108,6 +120,7 @@ │ pc: 3731 │ callDepth: 0 │ statusCode: STATUSCODE:StatusCode +│ src: test/RandomVar.t.sol:65:65 │ method: test%RandomVarTest.test_custom_names() │ │ (1000 steps) @@ -116,6 +129,7 @@ │ pc: 3919 │ callDepth: 0 │ statusCode: STATUSCODE:StatusCode +│ src: test/RandomVar.t.sol:57:67 │ method: test%RandomVarTest.test_custom_names() │ │ (26 steps) @@ -124,6 +138,7 @@ │ pc: 371 │ callDepth: 0 │ statusCode: EVMC_SUCCESS +│ src: test/RandomVar.t.sol:45:50 │ method: test%RandomVarTest.test_custom_names() │ ┊ constraint: diff --git a/src/tests/integration/test-data/show/SetUpDeployTest.test_extcodesize().expected b/src/tests/integration/test-data/show/SetUpDeployTest.test_extcodesize().expected index 74e0c344d..90d9f2116 100644 --- a/src/tests/integration/test-data/show/SetUpDeployTest.test_extcodesize().expected +++ b/src/tests/integration/test-data/show/SetUpDeployTest.test_extcodesize().expected @@ -295,12 +295,12 @@ module SUMMARY-TEST%SETUPDEPLOYTEST.TEST-EXTCODESIZE():0 false + + .List + false - - .List - .List @@ -558,12 +558,12 @@ module SUMMARY-TEST%SETUPDEPLOYTEST.TEST-EXTCODESIZE():0 false + + .List + false - - .List - .List @@ -820,12 +820,12 @@ module SUMMARY-TEST%SETUPDEPLOYTEST.TEST-EXTCODESIZE():0 false + + .List + false - - .List - .List @@ -1084,12 +1084,12 @@ module SUMMARY-TEST%SETUPDEPLOYTEST.TEST-EXTCODESIZE():0 false + + .List + false - - .List - .List @@ -1348,12 +1348,12 @@ module SUMMARY-TEST%SETUPDEPLOYTEST.TEST-EXTCODESIZE():0 false + + .List + false - - .List - .List diff --git a/src/tests/integration/test-data/show/gas-abstraction.expected b/src/tests/integration/test-data/show/gas-abstraction.expected index 1822c744d..17c59e5e6 100644 --- a/src/tests/integration/test-data/show/gas-abstraction.expected +++ b/src/tests/integration/test-data/show/gas-abstraction.expected @@ -354,12 +354,12 @@ Node 6: false + + .List + false - - .List - .List @@ -596,12 +596,12 @@ module SUMMARY-TEST%GASTEST.TESTINFINITEGAS():0 false + + .List + false - - .List - .List @@ -834,12 +834,12 @@ module SUMMARY-TEST%GASTEST.TESTINFINITEGAS():0 false + + .List + false - - .List - .List @@ -1072,12 +1072,12 @@ module SUMMARY-TEST%GASTEST.TESTINFINITEGAS():0 false + + .List + false - - .List - .List diff --git a/src/tests/integration/test-data/show/merge-loop-heads.expected b/src/tests/integration/test-data/show/merge-loop-heads.expected index 295cb4771..be60f1ee9 100644 --- a/src/tests/integration/test-data/show/merge-loop-heads.expected +++ b/src/tests/integration/test-data/show/merge-loop-heads.expected @@ -391,12 +391,12 @@ Node 21: false + + .List + false - - .List - .List @@ -643,12 +643,12 @@ Node 22: false + + .List + false - - .List - .List @@ -895,12 +895,12 @@ Node 23: false + + .List + false - - .List - .List @@ -1144,12 +1144,12 @@ module SUMMARY-TEST%BMCLOOPSTEST.TEST-BMC(UINT256):0 false + + .List + false - - .List - .List @@ -1387,12 +1387,12 @@ module SUMMARY-TEST%BMCLOOPSTEST.TEST-BMC(UINT256):0 false + + .List + false - - .List - .List @@ -1631,12 +1631,12 @@ module SUMMARY-TEST%BMCLOOPSTEST.TEST-BMC(UINT256):0 false + + .List + false - - .List - .List @@ -1876,12 +1876,12 @@ module SUMMARY-TEST%BMCLOOPSTEST.TEST-BMC(UINT256):0 false + + .List + false - - .List - .List @@ -2123,12 +2123,12 @@ module SUMMARY-TEST%BMCLOOPSTEST.TEST-BMC(UINT256):0 false + + .List + false - - .List - .List diff --git a/src/tests/integration/test-data/show/node-refutation.expected b/src/tests/integration/test-data/show/node-refutation.expected index 5e67920d3..f723e4284 100644 --- a/src/tests/integration/test-data/show/node-refutation.expected +++ b/src/tests/integration/test-data/show/node-refutation.expected @@ -269,12 +269,12 @@ module SUMMARY-TEST%MERGETEST.TEST-BRANCH-MERGE(UINT256):0 false + + .List + false - - .List - .List @@ -513,12 +513,12 @@ module SUMMARY-TEST%MERGETEST.TEST-BRANCH-MERGE(UINT256):0 false + + .List + false - - .List - .List @@ -760,12 +760,12 @@ module SUMMARY-TEST%MERGETEST.TEST-BRANCH-MERGE(UINT256):0 false + + .List + false - - .List - .List @@ -1007,12 +1007,12 @@ module SUMMARY-TEST%MERGETEST.TEST-BRANCH-MERGE(UINT256):0 false + + .List + false - - .List - .List diff --git a/src/tests/integration/test-data/show/split-node.expected b/src/tests/integration/test-data/show/split-node.expected index 2623e4990..cadfb8dad 100644 --- a/src/tests/integration/test-data/show/split-node.expected +++ b/src/tests/integration/test-data/show/split-node.expected @@ -885,12 +885,12 @@ module SUMMARY-TEST%PRANKTEST.TESTSYMBOLICSTARTPRANK(ADDRESS):0 false + + .List + false - - .List - .List @@ -1148,12 +1148,12 @@ module SUMMARY-TEST%PRANKTEST.TESTSYMBOLICSTARTPRANK(ADDRESS):0 false + + .List + false - - .List - .List @@ -1413,12 +1413,12 @@ module SUMMARY-TEST%PRANKTEST.TESTSYMBOLICSTARTPRANK(ADDRESS):0 false + + .List + false - - .List - .List @@ -1679,12 +1679,12 @@ module SUMMARY-TEST%PRANKTEST.TESTSYMBOLICSTARTPRANK(ADDRESS):0 false + + .List + false - - .List - .List @@ -1947,12 +1947,12 @@ module SUMMARY-TEST%PRANKTEST.TESTSYMBOLICSTARTPRANK(ADDRESS):0 false + + .List + false - - .List - .List @@ -2230,12 +2230,12 @@ module SUMMARY-TEST%PRANKTEST.TESTSYMBOLICSTARTPRANK(ADDRESS):0 false + + .List + false - - .List - .List @@ -2513,12 +2513,12 @@ module SUMMARY-TEST%PRANKTEST.TESTSYMBOLICSTARTPRANK(ADDRESS):0 false + + .List + false - - .List - .List @@ -2796,12 +2796,12 @@ module SUMMARY-TEST%PRANKTEST.TESTSYMBOLICSTARTPRANK(ADDRESS):0 false + + .List + false - - .List - .List @@ -3121,12 +3121,12 @@ module SUMMARY-TEST%PRANKTEST.TESTSYMBOLICSTARTPRANK(ADDRESS):0 false + + .List + false - - .List - .List @@ -3407,12 +3407,12 @@ module SUMMARY-TEST%PRANKTEST.TESTSYMBOLICSTARTPRANK(ADDRESS):0 false + + .List + false - - .List - .List @@ -3690,12 +3690,12 @@ module SUMMARY-TEST%PRANKTEST.TESTSYMBOLICSTARTPRANK(ADDRESS):0 false + + .List + false - - .List - .List @@ -3973,12 +3973,12 @@ module SUMMARY-TEST%PRANKTEST.TESTSYMBOLICSTARTPRANK(ADDRESS):0 false + + .List + false - - .List - .List @@ -4277,12 +4277,12 @@ module SUMMARY-TEST%PRANKTEST.TESTSYMBOLICSTARTPRANK(ADDRESS):0 false + + .List + false - - .List - .List @@ -4681,12 +4681,12 @@ module SUMMARY-TEST%PRANKTEST.TESTSYMBOLICSTARTPRANK(ADDRESS):0 false + + .List + false - - .List - .List @@ -5082,12 +5082,12 @@ module SUMMARY-TEST%PRANKTEST.TESTSYMBOLICSTARTPRANK(ADDRESS):0 false + + .List + false - - .List - .List @@ -5483,12 +5483,12 @@ module SUMMARY-TEST%PRANKTEST.TESTSYMBOLICSTARTPRANK(ADDRESS):0 false + + .List + false - - .List - .List @@ -5926,12 +5926,12 @@ module SUMMARY-TEST%PRANKTEST.TESTSYMBOLICSTARTPRANK(ADDRESS):0 false + + .List + false - - .List - .List @@ -6328,12 +6328,12 @@ module SUMMARY-TEST%PRANKTEST.TESTSYMBOLICSTARTPRANK(ADDRESS):0 false + + .List + false - - .List - .List @@ -6727,12 +6727,12 @@ module SUMMARY-TEST%PRANKTEST.TESTSYMBOLICSTARTPRANK(ADDRESS):0 false + + .List + false - - .List - .List @@ -7126,12 +7126,12 @@ module SUMMARY-TEST%PRANKTEST.TESTSYMBOLICSTARTPRANK(ADDRESS):0 false + + .List + false - - .List - .List @@ -7567,12 +7567,12 @@ module SUMMARY-TEST%PRANKTEST.TESTSYMBOLICSTARTPRANK(ADDRESS):0 false + + .List + false - - .List - .List @@ -7970,12 +7970,12 @@ module SUMMARY-TEST%PRANKTEST.TESTSYMBOLICSTARTPRANK(ADDRESS):0 false + + .List + false - - .List - .List @@ -8370,12 +8370,12 @@ module SUMMARY-TEST%PRANKTEST.TESTSYMBOLICSTARTPRANK(ADDRESS):0 false + + .List + false - - .List - .List @@ -8770,12 +8770,12 @@ module SUMMARY-TEST%PRANKTEST.TESTSYMBOLICSTARTPRANK(ADDRESS):0 false + + .List + false - - .List - .List @@ -9212,12 +9212,12 @@ module SUMMARY-TEST%PRANKTEST.TESTSYMBOLICSTARTPRANK(ADDRESS):0 false + + .List + false - - .List - .List @@ -9618,12 +9618,12 @@ module SUMMARY-TEST%PRANKTEST.TESTSYMBOLICSTARTPRANK(ADDRESS):0 false + + .List + false - - .List - .List @@ -10021,12 +10021,12 @@ module SUMMARY-TEST%PRANKTEST.TESTSYMBOLICSTARTPRANK(ADDRESS):0 false + + .List + false - - .List - .List @@ -10424,12 +10424,12 @@ module SUMMARY-TEST%PRANKTEST.TESTSYMBOLICSTARTPRANK(ADDRESS):0 false + + .List + false - - .List - .List @@ -10869,12 +10869,12 @@ module SUMMARY-TEST%PRANKTEST.TESTSYMBOLICSTARTPRANK(ADDRESS):0 false + + .List + false - - .List - .List @@ -11275,12 +11275,12 @@ module SUMMARY-TEST%PRANKTEST.TESTSYMBOLICSTARTPRANK(ADDRESS):0 false + + .List + false - - .List - .List @@ -11678,12 +11678,12 @@ module SUMMARY-TEST%PRANKTEST.TESTSYMBOLICSTARTPRANK(ADDRESS):0 false + + .List + false - - .List - .List @@ -12081,12 +12081,12 @@ module SUMMARY-TEST%PRANKTEST.TESTSYMBOLICSTARTPRANK(ADDRESS):0 false + + .List + false - - .List - .List @@ -12526,12 +12526,12 @@ module SUMMARY-TEST%PRANKTEST.TESTSYMBOLICSTARTPRANK(ADDRESS):0 false + + .List + false - - .List - .List @@ -12935,12 +12935,12 @@ module SUMMARY-TEST%PRANKTEST.TESTSYMBOLICSTARTPRANK(ADDRESS):0 false + + .List + false - - .List - .List @@ -13341,12 +13341,12 @@ module SUMMARY-TEST%PRANKTEST.TESTSYMBOLICSTARTPRANK(ADDRESS):0 false + + .List + false - - .List - .List @@ -13747,12 +13747,12 @@ module SUMMARY-TEST%PRANKTEST.TESTSYMBOLICSTARTPRANK(ADDRESS):0 false + + .List + false - - .List - .List @@ -14195,12 +14195,12 @@ module SUMMARY-TEST%PRANKTEST.TESTSYMBOLICSTARTPRANK(ADDRESS):0 false + + .List + false - - .List - .List @@ -14604,12 +14604,12 @@ module SUMMARY-TEST%PRANKTEST.TESTSYMBOLICSTARTPRANK(ADDRESS):0 false + + .List + false - - .List - .List @@ -15010,12 +15010,12 @@ module SUMMARY-TEST%PRANKTEST.TESTSYMBOLICSTARTPRANK(ADDRESS):0 false + + .List + false - - .List - .List @@ -15416,12 +15416,12 @@ module SUMMARY-TEST%PRANKTEST.TESTSYMBOLICSTARTPRANK(ADDRESS):0 false + + .List + false - - .List - .List @@ -15864,12 +15864,12 @@ module SUMMARY-TEST%PRANKTEST.TESTSYMBOLICSTARTPRANK(ADDRESS):0 false + + .List + false - - .List - .List @@ -16153,12 +16153,12 @@ module SUMMARY-TEST%PRANKTEST.TESTSYMBOLICSTARTPRANK(ADDRESS):0 false + + .List + false - - .List - .List @@ -16438,12 +16438,12 @@ module SUMMARY-TEST%PRANKTEST.TESTSYMBOLICSTARTPRANK(ADDRESS):0 false + + .List + false - - .List - .List @@ -16723,12 +16723,12 @@ module SUMMARY-TEST%PRANKTEST.TESTSYMBOLICSTARTPRANK(ADDRESS):0 false + + .List + false - - .List - .List @@ -17029,12 +17029,12 @@ module SUMMARY-TEST%PRANKTEST.TESTSYMBOLICSTARTPRANK(ADDRESS):0 false + + .List + false - - .List - .List @@ -17319,12 +17319,12 @@ module SUMMARY-TEST%PRANKTEST.TESTSYMBOLICSTARTPRANK(ADDRESS):0 false + + .List + false - - .List - .List @@ -17605,12 +17605,12 @@ module SUMMARY-TEST%PRANKTEST.TESTSYMBOLICSTARTPRANK(ADDRESS):0 false + + .List + false - - .List - .List @@ -17891,12 +17891,12 @@ module SUMMARY-TEST%PRANKTEST.TESTSYMBOLICSTARTPRANK(ADDRESS):0 false + + .List + false - - .List - .List @@ -18198,12 +18198,12 @@ module SUMMARY-TEST%PRANKTEST.TESTSYMBOLICSTARTPRANK(ADDRESS):0 false + + .List + false - - .List - .List @@ -18484,12 +18484,12 @@ module SUMMARY-TEST%PRANKTEST.TESTSYMBOLICSTARTPRANK(ADDRESS):0 false + + .List + false - - .List - .List @@ -18766,12 +18766,12 @@ module SUMMARY-TEST%PRANKTEST.TESTSYMBOLICSTARTPRANK(ADDRESS):0 false + + .List + false - - .List - .List @@ -19048,12 +19048,12 @@ module SUMMARY-TEST%PRANKTEST.TESTSYMBOLICSTARTPRANK(ADDRESS):0 false + + .List + false - - .List - .List @@ -19351,12 +19351,12 @@ module SUMMARY-TEST%PRANKTEST.TESTSYMBOLICSTARTPRANK(ADDRESS):0 false + + .List + false - - .List - .List @@ -19637,12 +19637,12 @@ module SUMMARY-TEST%PRANKTEST.TESTSYMBOLICSTARTPRANK(ADDRESS):0 false + + .List + false - - .List - .List @@ -19919,12 +19919,12 @@ module SUMMARY-TEST%PRANKTEST.TESTSYMBOLICSTARTPRANK(ADDRESS):0 false + + .List + false - - .List - .List @@ -20201,12 +20201,12 @@ module SUMMARY-TEST%PRANKTEST.TESTSYMBOLICSTARTPRANK(ADDRESS):0 false + + .List + false - - .List - .List @@ -20504,12 +20504,12 @@ module SUMMARY-TEST%PRANKTEST.TESTSYMBOLICSTARTPRANK(ADDRESS):0 false + + .List + false - - .List - .List From 3181d14928f37edec59880a8138884cac07e3e72 Mon Sep 17 00:00:00 2001 From: palinatolmach Date: Thu, 16 Jan 2025 20:25:26 +0400 Subject: [PATCH 16/35] Update CSE expected output --- .../AddConst.applyOp(uint256).cse.expected | 12 +++--- ...t_double_add(uint256,uint256).cse.expected | 30 ++++++------- ...d_double_sub(uint256,uint256).cse.expected | 42 +++++++++---------- ...rnal(uint256,uint256,uint256).cse.expected | 42 +++++++++---------- ...Contract.add(uint256,uint256).cse.expected | 12 +++--- ...rnal(uint256,uint256,uint256).cse.expected | 24 +++++------ ...st_add_const(uint256,uint256).cse.expected | 18 ++++---- ...est_identity(uint256,uint256).cse.expected | 18 ++++---- ...CallableStorageContract.str().cse.expected | 12 +++--- ...allableStorageTest.test_str().cse.expected | 6 +-- .../show/ConstructorTest.init.cse.expected | 6 +-- ...ctorTest.test_contract_call().cse.expected | 6 +-- ...ctFieldTest.testEscrowToken().cse.expected | 6 +-- ...um.enum_argument_range(uint8).cse.expected | 6 +-- .../Enum.enum_storage_range().cse.expected | 12 +++--- .../test-data/show/Enum.init.cse.expected | 6 +-- .../Identity.applyOp(uint256).cse.expected | 12 +++--- .../Identity.identity(uint256).cse.expected | 6 +-- ...ImportedContract.add(uint256).cse.expected | 12 +++--- .../ImportedContract.count().cse.expected | 6 +-- .../show/ImportedContract.init.cse.expected | 6 +-- ...ImportedContract.set(uint256).cse.expected | 12 +++--- ...erfaceTagTest.testInterface().cse.expected | 6 +-- ...aticCallContract.set(uint256).cse.expected | 6 +-- ...e.getEscrowTokenTotalSupply().cse.expected | 18 ++++---- ...sertTest.testFail_expect_revert().expected | 12 +++--- .../AssertTest.test_assert_false().expected | 12 +++--- ...Test.test_failing_branch(uint256).expected | 24 +++++------ ...st_revert_branch(uint256,uint256).expected | 30 ++++++------- ...ranch_merge(uint256,uint256,bool).expected | 24 +++++------ 30 files changed, 222 insertions(+), 222 deletions(-) diff --git a/src/tests/integration/test-data/show/AddConst.applyOp(uint256).cse.expected b/src/tests/integration/test-data/show/AddConst.applyOp(uint256).cse.expected index 5839f7885..a9a56b800 100644 --- a/src/tests/integration/test-data/show/AddConst.applyOp(uint256).cse.expected +++ b/src/tests/integration/test-data/show/AddConst.applyOp(uint256).cse.expected @@ -189,12 +189,12 @@ module SUMMARY-SRC%CSE%ADDCONST.APPLYOP(UINT256):0 false + + .List + false - - .List - .List @@ -368,12 +368,12 @@ module SUMMARY-SRC%CSE%ADDCONST.APPLYOP(UINT256):0 false + + .List + false - - .List - .List diff --git a/src/tests/integration/test-data/show/ArithmeticCallTest.test_double_add(uint256,uint256).cse.expected b/src/tests/integration/test-data/show/ArithmeticCallTest.test_double_add(uint256,uint256).cse.expected index a3c3b470a..41d8cf702 100644 --- a/src/tests/integration/test-data/show/ArithmeticCallTest.test_double_add(uint256,uint256).cse.expected +++ b/src/tests/integration/test-data/show/ArithmeticCallTest.test_double_add(uint256,uint256).cse.expected @@ -450,12 +450,12 @@ module SUMMARY-TEST%ARITHMETICCALLTEST.TEST-DOUBLE-ADD(UINT256,UINT256):0 false + + .List + false - - .List - .List @@ -859,12 +859,12 @@ module SUMMARY-TEST%ARITHMETICCALLTEST.TEST-DOUBLE-ADD(UINT256,UINT256):0 false + + .List + false - - .List - .List @@ -1250,12 +1250,12 @@ module SUMMARY-TEST%ARITHMETICCALLTEST.TEST-DOUBLE-ADD(UINT256,UINT256):0 false + + .List + false - - .List - .List @@ -1643,12 +1643,12 @@ module SUMMARY-TEST%ARITHMETICCALLTEST.TEST-DOUBLE-ADD(UINT256,UINT256):0 false + + .List + false - - .List - .List @@ -2037,12 +2037,12 @@ module SUMMARY-TEST%ARITHMETICCALLTEST.TEST-DOUBLE-ADD(UINT256,UINT256):0 false + + .List + false - - .List - .List diff --git a/src/tests/integration/test-data/show/ArithmeticCallTest.test_double_add_double_sub(uint256,uint256).cse.expected b/src/tests/integration/test-data/show/ArithmeticCallTest.test_double_add_double_sub(uint256,uint256).cse.expected index 6199594f2..59c18ddc8 100644 --- a/src/tests/integration/test-data/show/ArithmeticCallTest.test_double_add_double_sub(uint256,uint256).cse.expected +++ b/src/tests/integration/test-data/show/ArithmeticCallTest.test_double_add_double_sub(uint256,uint256).cse.expected @@ -499,12 +499,12 @@ module SUMMARY-TEST%ARITHMETICCALLTEST.TEST-DOUBLE-ADD-DOUBLE-SUB(UINT256,UINT25 false + + .List + false - - .List - .List @@ -908,12 +908,12 @@ module SUMMARY-TEST%ARITHMETICCALLTEST.TEST-DOUBLE-ADD-DOUBLE-SUB(UINT256,UINT25 false + + .List + false - - .List - .List @@ -1299,12 +1299,12 @@ module SUMMARY-TEST%ARITHMETICCALLTEST.TEST-DOUBLE-ADD-DOUBLE-SUB(UINT256,UINT25 false + + .List + false - - .List - .List @@ -1692,12 +1692,12 @@ module SUMMARY-TEST%ARITHMETICCALLTEST.TEST-DOUBLE-ADD-DOUBLE-SUB(UINT256,UINT25 false + + .List + false - - .List - .List @@ -2086,12 +2086,12 @@ module SUMMARY-TEST%ARITHMETICCALLTEST.TEST-DOUBLE-ADD-DOUBLE-SUB(UINT256,UINT25 false + + .List + false - - .List - .List @@ -2484,12 +2484,12 @@ module SUMMARY-TEST%ARITHMETICCALLTEST.TEST-DOUBLE-ADD-DOUBLE-SUB(UINT256,UINT25 false + + .List + false - - .List - .List @@ -2884,12 +2884,12 @@ module SUMMARY-TEST%ARITHMETICCALLTEST.TEST-DOUBLE-ADD-DOUBLE-SUB(UINT256,UINT25 false + + .List + false - - .List - .List diff --git a/src/tests/integration/test-data/show/ArithmeticCallTest.test_double_add_sub_external(uint256,uint256,uint256).cse.expected b/src/tests/integration/test-data/show/ArithmeticCallTest.test_double_add_sub_external(uint256,uint256,uint256).cse.expected index 4d632dbd9..11c8ef679 100644 --- a/src/tests/integration/test-data/show/ArithmeticCallTest.test_double_add_sub_external(uint256,uint256,uint256).cse.expected +++ b/src/tests/integration/test-data/show/ArithmeticCallTest.test_double_add_sub_external(uint256,uint256,uint256).cse.expected @@ -503,12 +503,12 @@ module SUMMARY-TEST%ARITHMETICCALLTEST.TEST-DOUBLE-ADD-SUB-EXTERNAL(UINT256,UINT false + + .List + false - - .List - .List @@ -896,12 +896,12 @@ module SUMMARY-TEST%ARITHMETICCALLTEST.TEST-DOUBLE-ADD-SUB-EXTERNAL(UINT256,UINT false + + .List + false - - .List - .List @@ -1308,12 +1308,12 @@ module SUMMARY-TEST%ARITHMETICCALLTEST.TEST-DOUBLE-ADD-SUB-EXTERNAL(UINT256,UINT false + + .List + false - - .List - .List @@ -1701,12 +1701,12 @@ module SUMMARY-TEST%ARITHMETICCALLTEST.TEST-DOUBLE-ADD-SUB-EXTERNAL(UINT256,UINT false + + .List + false - - .List - .List @@ -2099,12 +2099,12 @@ module SUMMARY-TEST%ARITHMETICCALLTEST.TEST-DOUBLE-ADD-SUB-EXTERNAL(UINT256,UINT false + + .List + false - - .List - .List @@ -2498,12 +2498,12 @@ module SUMMARY-TEST%ARITHMETICCALLTEST.TEST-DOUBLE-ADD-SUB-EXTERNAL(UINT256,UINT false + + .List + false - - .List - .List @@ -2898,12 +2898,12 @@ module SUMMARY-TEST%ARITHMETICCALLTEST.TEST-DOUBLE-ADD-SUB-EXTERNAL(UINT256,UINT false + + .List + false - - .List - .List diff --git a/src/tests/integration/test-data/show/ArithmeticContract.add(uint256,uint256).cse.expected b/src/tests/integration/test-data/show/ArithmeticContract.add(uint256,uint256).cse.expected index 2907a5dc0..0813b0022 100644 --- a/src/tests/integration/test-data/show/ArithmeticContract.add(uint256,uint256).cse.expected +++ b/src/tests/integration/test-data/show/ArithmeticContract.add(uint256,uint256).cse.expected @@ -186,12 +186,12 @@ module SUMMARY-SRC%ARITHMETICCONTRACT.ADD(UINT256,UINT256):0 false + + .List + false - - .List - .List @@ -364,12 +364,12 @@ module SUMMARY-SRC%ARITHMETICCONTRACT.ADD(UINT256,UINT256):0 false + + .List + false - - .List - .List diff --git a/src/tests/integration/test-data/show/ArithmeticContract.add_sub_external(uint256,uint256,uint256).cse.expected b/src/tests/integration/test-data/show/ArithmeticContract.add_sub_external(uint256,uint256,uint256).cse.expected index f615ee2fe..fe508239a 100644 --- a/src/tests/integration/test-data/show/ArithmeticContract.add_sub_external(uint256,uint256,uint256).cse.expected +++ b/src/tests/integration/test-data/show/ArithmeticContract.add_sub_external(uint256,uint256,uint256).cse.expected @@ -261,12 +261,12 @@ module SUMMARY-SRC%ARITHMETICCONTRACT.ADD-SUB-EXTERNAL(UINT256,UINT256,UINT256): false + + .List + false - - .List - .List @@ -450,12 +450,12 @@ module SUMMARY-SRC%ARITHMETICCONTRACT.ADD-SUB-EXTERNAL(UINT256,UINT256,UINT256): false + + .List + false - - .List - .List @@ -640,12 +640,12 @@ module SUMMARY-SRC%ARITHMETICCONTRACT.ADD-SUB-EXTERNAL(UINT256,UINT256,UINT256): false + + .List + false - - .List - .List @@ -831,12 +831,12 @@ module SUMMARY-SRC%ARITHMETICCONTRACT.ADD-SUB-EXTERNAL(UINT256,UINT256,UINT256): false + + .List + false - - .List - .List diff --git a/src/tests/integration/test-data/show/CSETest.test_add_const(uint256,uint256).cse.expected b/src/tests/integration/test-data/show/CSETest.test_add_const(uint256,uint256).cse.expected index 1d0dd8381..a3624eb88 100644 --- a/src/tests/integration/test-data/show/CSETest.test_add_const(uint256,uint256).cse.expected +++ b/src/tests/integration/test-data/show/CSETest.test_add_const(uint256,uint256).cse.expected @@ -329,12 +329,12 @@ module SUMMARY-TEST%CSETEST.TEST-ADD-CONST(UINT256,UINT256):0 false + + .List + false - - .List - .List @@ -644,12 +644,12 @@ module SUMMARY-TEST%CSETEST.TEST-ADD-CONST(UINT256,UINT256):0 false + + .List + false - - .List - .List @@ -980,12 +980,12 @@ module SUMMARY-TEST%CSETEST.TEST-ADD-CONST(UINT256,UINT256):0 false + + .List + false - - .List - .List diff --git a/src/tests/integration/test-data/show/CSETest.test_identity(uint256,uint256).cse.expected b/src/tests/integration/test-data/show/CSETest.test_identity(uint256,uint256).cse.expected index a4e26924b..059b6fefe 100644 --- a/src/tests/integration/test-data/show/CSETest.test_identity(uint256,uint256).cse.expected +++ b/src/tests/integration/test-data/show/CSETest.test_identity(uint256,uint256).cse.expected @@ -325,12 +325,12 @@ module SUMMARY-TEST%CSETEST.TEST-IDENTITY(UINT256,UINT256):0 false + + .List + false - - .List - .List @@ -640,12 +640,12 @@ module SUMMARY-TEST%CSETEST.TEST-IDENTITY(UINT256,UINT256):0 false + + .List + false - - .List - .List @@ -974,12 +974,12 @@ module SUMMARY-TEST%CSETEST.TEST-IDENTITY(UINT256,UINT256):0 false + + .List + false - - .List - .List diff --git a/src/tests/integration/test-data/show/CallableStorageContract.str().cse.expected b/src/tests/integration/test-data/show/CallableStorageContract.str().cse.expected index 9d277726d..d7c9285ed 100644 --- a/src/tests/integration/test-data/show/CallableStorageContract.str().cse.expected +++ b/src/tests/integration/test-data/show/CallableStorageContract.str().cse.expected @@ -192,12 +192,12 @@ module SUMMARY-TEST%CALLABLESTORAGECONTRACT.STR():0 false + + .List + false - - .List - .List @@ -374,12 +374,12 @@ module SUMMARY-TEST%CALLABLESTORAGECONTRACT.STR():0 false + + .List + false - - .List - .List diff --git a/src/tests/integration/test-data/show/CallableStorageTest.test_str().cse.expected b/src/tests/integration/test-data/show/CallableStorageTest.test_str().cse.expected index f919fac25..337422f07 100644 --- a/src/tests/integration/test-data/show/CallableStorageTest.test_str().cse.expected +++ b/src/tests/integration/test-data/show/CallableStorageTest.test_str().cse.expected @@ -259,12 +259,12 @@ module SUMMARY-TEST%CALLABLESTORAGETEST.TEST-STR():0 false + + .List + false - - .List - .List diff --git a/src/tests/integration/test-data/show/ConstructorTest.init.cse.expected b/src/tests/integration/test-data/show/ConstructorTest.init.cse.expected index ebcff5f60..597e69a00 100644 --- a/src/tests/integration/test-data/show/ConstructorTest.init.cse.expected +++ b/src/tests/integration/test-data/show/ConstructorTest.init.cse.expected @@ -259,12 +259,12 @@ module SUMMARY-TEST%CONSTRUCTORTEST.INIT:0 false + + .List + false - - .List - .List diff --git a/src/tests/integration/test-data/show/ConstructorTest.test_contract_call().cse.expected b/src/tests/integration/test-data/show/ConstructorTest.test_contract_call().cse.expected index b03bd75d3..f17b40774 100644 --- a/src/tests/integration/test-data/show/ConstructorTest.test_contract_call().cse.expected +++ b/src/tests/integration/test-data/show/ConstructorTest.test_contract_call().cse.expected @@ -284,12 +284,12 @@ module SUMMARY-TEST%CONSTRUCTORTEST.TEST-CONTRACT-CALL():0 false + + .List + false - - .List - .List diff --git a/src/tests/integration/test-data/show/ContractFieldTest.testEscrowToken().cse.expected b/src/tests/integration/test-data/show/ContractFieldTest.testEscrowToken().cse.expected index eea594a44..3f9b1b622 100644 --- a/src/tests/integration/test-data/show/ContractFieldTest.testEscrowToken().cse.expected +++ b/src/tests/integration/test-data/show/ContractFieldTest.testEscrowToken().cse.expected @@ -284,12 +284,12 @@ module SUMMARY-TEST%CONTRACTFIELDTEST.TESTESCROWTOKEN():0 false + + .List + false - - .List - .List diff --git a/src/tests/integration/test-data/show/Enum.enum_argument_range(uint8).cse.expected b/src/tests/integration/test-data/show/Enum.enum_argument_range(uint8).cse.expected index dd61dfb39..434219dc2 100644 --- a/src/tests/integration/test-data/show/Enum.enum_argument_range(uint8).cse.expected +++ b/src/tests/integration/test-data/show/Enum.enum_argument_range(uint8).cse.expected @@ -165,12 +165,12 @@ module SUMMARY-TEST%ENUM.ENUM-ARGUMENT-RANGE(UINT8):0 false + + .List + false - - .List - .List diff --git a/src/tests/integration/test-data/show/Enum.enum_storage_range().cse.expected b/src/tests/integration/test-data/show/Enum.enum_storage_range().cse.expected index f6de1631b..871434fb6 100644 --- a/src/tests/integration/test-data/show/Enum.enum_storage_range().cse.expected +++ b/src/tests/integration/test-data/show/Enum.enum_storage_range().cse.expected @@ -224,12 +224,12 @@ module SUMMARY-TEST%ENUM.ENUM-STORAGE-RANGE():0 false + + .List + false - - .List - .List @@ -437,12 +437,12 @@ module SUMMARY-TEST%ENUM.ENUM-STORAGE-RANGE():0 false + + .List + false - - .List - .List diff --git a/src/tests/integration/test-data/show/Enum.init.cse.expected b/src/tests/integration/test-data/show/Enum.init.cse.expected index 3ef942a8f..6207b02f7 100644 --- a/src/tests/integration/test-data/show/Enum.init.cse.expected +++ b/src/tests/integration/test-data/show/Enum.init.cse.expected @@ -140,12 +140,12 @@ module SUMMARY-TEST%ENUM.INIT:0 false + + .List + false - - .List - .List diff --git a/src/tests/integration/test-data/show/Identity.applyOp(uint256).cse.expected b/src/tests/integration/test-data/show/Identity.applyOp(uint256).cse.expected index f2e3660c6..788345e59 100644 --- a/src/tests/integration/test-data/show/Identity.applyOp(uint256).cse.expected +++ b/src/tests/integration/test-data/show/Identity.applyOp(uint256).cse.expected @@ -195,12 +195,12 @@ module SUMMARY-SRC%CSE%IDENTITY.APPLYOP(UINT256):0 false + + .List + false - - .List - .List @@ -377,12 +377,12 @@ module SUMMARY-SRC%CSE%IDENTITY.APPLYOP(UINT256):0 false + + .List + false - - .List - .List diff --git a/src/tests/integration/test-data/show/Identity.identity(uint256).cse.expected b/src/tests/integration/test-data/show/Identity.identity(uint256).cse.expected index b46893d41..7da976662 100644 --- a/src/tests/integration/test-data/show/Identity.identity(uint256).cse.expected +++ b/src/tests/integration/test-data/show/Identity.identity(uint256).cse.expected @@ -141,12 +141,12 @@ module SUMMARY-SRC%CSE%IDENTITY.IDENTITY(UINT256):0 false + + .List + false - - .List - .List diff --git a/src/tests/integration/test-data/show/ImportedContract.add(uint256).cse.expected b/src/tests/integration/test-data/show/ImportedContract.add(uint256).cse.expected index c510e14da..0d40cd822 100644 --- a/src/tests/integration/test-data/show/ImportedContract.add(uint256).cse.expected +++ b/src/tests/integration/test-data/show/ImportedContract.add(uint256).cse.expected @@ -192,12 +192,12 @@ module SUMMARY-TEST%IMPORTEDCONTRACT.ADD(UINT256):0 false + + .List + false - - .List - .List @@ -376,12 +376,12 @@ module SUMMARY-TEST%IMPORTEDCONTRACT.ADD(UINT256):0 false + + .List + false - - .List - .List diff --git a/src/tests/integration/test-data/show/ImportedContract.count().cse.expected b/src/tests/integration/test-data/show/ImportedContract.count().cse.expected index f75a11a5a..923908da3 100644 --- a/src/tests/integration/test-data/show/ImportedContract.count().cse.expected +++ b/src/tests/integration/test-data/show/ImportedContract.count().cse.expected @@ -144,12 +144,12 @@ module SUMMARY-TEST%IMPORTEDCONTRACT.COUNT():0 false + + .List + false - - .List - .List diff --git a/src/tests/integration/test-data/show/ImportedContract.init.cse.expected b/src/tests/integration/test-data/show/ImportedContract.init.cse.expected index ed1f0e86c..601d82f82 100644 --- a/src/tests/integration/test-data/show/ImportedContract.init.cse.expected +++ b/src/tests/integration/test-data/show/ImportedContract.init.cse.expected @@ -145,12 +145,12 @@ module SUMMARY-TEST%IMPORTEDCONTRACT.INIT:0 false + + .List + false - - .List - .List diff --git a/src/tests/integration/test-data/show/ImportedContract.set(uint256).cse.expected b/src/tests/integration/test-data/show/ImportedContract.set(uint256).cse.expected index a03695b29..047f43943 100644 --- a/src/tests/integration/test-data/show/ImportedContract.set(uint256).cse.expected +++ b/src/tests/integration/test-data/show/ImportedContract.set(uint256).cse.expected @@ -192,12 +192,12 @@ module SUMMARY-TEST%IMPORTEDCONTRACT.SET(UINT256):0 false + + .List + false - - .List - .List @@ -374,12 +374,12 @@ module SUMMARY-TEST%IMPORTEDCONTRACT.SET(UINT256):0 false + + .List + false - - .List - .List diff --git a/src/tests/integration/test-data/show/InterfaceTagTest.testInterface().cse.expected b/src/tests/integration/test-data/show/InterfaceTagTest.testInterface().cse.expected index 3017ecff3..c5df7e7a3 100644 --- a/src/tests/integration/test-data/show/InterfaceTagTest.testInterface().cse.expected +++ b/src/tests/integration/test-data/show/InterfaceTagTest.testInterface().cse.expected @@ -283,12 +283,12 @@ module SUMMARY-TEST%INTERFACETAGTEST.TESTINTERFACE():0 false + + .List + false - - .List - .List diff --git a/src/tests/integration/test-data/show/StaticCallContract.set(uint256).cse.expected b/src/tests/integration/test-data/show/StaticCallContract.set(uint256).cse.expected index ea7f161c6..1f21d5f2e 100644 --- a/src/tests/integration/test-data/show/StaticCallContract.set(uint256).cse.expected +++ b/src/tests/integration/test-data/show/StaticCallContract.set(uint256).cse.expected @@ -147,12 +147,12 @@ module SUMMARY-TEST%STATICCALLCONTRACT.SET(UINT256):0 false + + .List + false - - .List - .List diff --git a/src/tests/integration/test-data/show/TGovernance.getEscrowTokenTotalSupply().cse.expected b/src/tests/integration/test-data/show/TGovernance.getEscrowTokenTotalSupply().cse.expected index a869046be..d11b60c35 100644 --- a/src/tests/integration/test-data/show/TGovernance.getEscrowTokenTotalSupply().cse.expected +++ b/src/tests/integration/test-data/show/TGovernance.getEscrowTokenTotalSupply().cse.expected @@ -294,12 +294,12 @@ module SUMMARY-TEST%TGOVERNANCE.GETESCROWTOKENTOTALSUPPLY():0 false + + .List + false - - .List - .List @@ -544,12 +544,12 @@ module SUMMARY-TEST%TGOVERNANCE.GETESCROWTOKENTOTALSUPPLY():0 false + + .List + false - - .List - .List @@ -792,12 +792,12 @@ module SUMMARY-TEST%TGOVERNANCE.GETESCROWTOKENTOTALSUPPLY():0 false + + .List + false - - .List - .List diff --git a/src/tests/integration/test-data/show/minimized/AssertTest.testFail_expect_revert().expected b/src/tests/integration/test-data/show/minimized/AssertTest.testFail_expect_revert().expected index 131248867..0d0bd2332 100644 --- a/src/tests/integration/test-data/show/minimized/AssertTest.testFail_expect_revert().expected +++ b/src/tests/integration/test-data/show/minimized/AssertTest.testFail_expect_revert().expected @@ -220,12 +220,12 @@ Node 20: false + + .List + false - - .List - .List @@ -471,12 +471,12 @@ module SUMMARY-TEST%ASSERTTEST.TESTFAIL-EXPECT-REVERT():0 false + + .List + false - - .List - .List diff --git a/src/tests/integration/test-data/show/minimized/AssertTest.test_assert_false().expected b/src/tests/integration/test-data/show/minimized/AssertTest.test_assert_false().expected index 9d59b57a1..e71898ed0 100644 --- a/src/tests/integration/test-data/show/minimized/AssertTest.test_assert_false().expected +++ b/src/tests/integration/test-data/show/minimized/AssertTest.test_assert_false().expected @@ -214,12 +214,12 @@ Node 10: false + + .List + false - - .List - .List @@ -460,12 +460,12 @@ module SUMMARY-TEST%ASSERTTEST.TEST-ASSERT-FALSE():0 false + + .List + false - - .List - .List diff --git a/src/tests/integration/test-data/show/minimized/AssertTest.test_failing_branch(uint256).expected b/src/tests/integration/test-data/show/minimized/AssertTest.test_failing_branch(uint256).expected index 90e025e02..5c946b7c9 100644 --- a/src/tests/integration/test-data/show/minimized/AssertTest.test_failing_branch(uint256).expected +++ b/src/tests/integration/test-data/show/minimized/AssertTest.test_failing_branch(uint256).expected @@ -259,12 +259,12 @@ Node 16: false + + .List + false - - .List - .List @@ -507,12 +507,12 @@ module SUMMARY-TEST%ASSERTTEST.TEST-FAILING-BRANCH(UINT256):0 false + + .List + false - - .List - .List @@ -754,12 +754,12 @@ module SUMMARY-TEST%ASSERTTEST.TEST-FAILING-BRANCH(UINT256):0 false + + .List + false - - .List - .List @@ -1000,12 +1000,12 @@ module SUMMARY-TEST%ASSERTTEST.TEST-FAILING-BRANCH(UINT256):0 false + + .List + false - - .List - .List diff --git a/src/tests/integration/test-data/show/minimized/AssertTest.test_revert_branch(uint256,uint256).expected b/src/tests/integration/test-data/show/minimized/AssertTest.test_revert_branch(uint256,uint256).expected index d76f77f4e..976620cc5 100644 --- a/src/tests/integration/test-data/show/minimized/AssertTest.test_revert_branch(uint256,uint256).expected +++ b/src/tests/integration/test-data/show/minimized/AssertTest.test_revert_branch(uint256,uint256).expected @@ -257,12 +257,12 @@ Node 16: false + + .List + false - - .List - .List @@ -508,12 +508,12 @@ Node 15: false + + .List + false - - .List - .List @@ -758,12 +758,12 @@ module SUMMARY-TEST%ASSERTTEST.TEST-REVERT-BRANCH(UINT256,UINT256):0 false + + .List + false - - .List - .List @@ -1007,12 +1007,12 @@ module SUMMARY-TEST%ASSERTTEST.TEST-REVERT-BRANCH(UINT256,UINT256):0 false + + .List + false - - .List - .List @@ -1255,12 +1255,12 @@ module SUMMARY-TEST%ASSERTTEST.TEST-REVERT-BRANCH(UINT256,UINT256):0 false + + .List + false - - .List - .List diff --git a/src/tests/integration/test-data/show/minimized/MergeKCFGTest.test_branch_merge(uint256,uint256,bool).expected b/src/tests/integration/test-data/show/minimized/MergeKCFGTest.test_branch_merge(uint256,uint256,bool).expected index 07e47add6..be9bfa4f9 100644 --- a/src/tests/integration/test-data/show/minimized/MergeKCFGTest.test_branch_merge(uint256,uint256,bool).expected +++ b/src/tests/integration/test-data/show/minimized/MergeKCFGTest.test_branch_merge(uint256,uint256,bool).expected @@ -461,12 +461,12 @@ module SUMMARY-TEST%MERGEKCFGTEST.TEST-BRANCH-MERGE(UINT256,UINT256,BOOL):0 false + + .List + false - - .List - .List @@ -854,12 +854,12 @@ module SUMMARY-TEST%MERGEKCFGTEST.TEST-BRANCH-MERGE(UINT256,UINT256,BOOL):0 false + + .List + false - - .List - .List @@ -1246,12 +1246,12 @@ module SUMMARY-TEST%MERGEKCFGTEST.TEST-BRANCH-MERGE(UINT256,UINT256,BOOL):0 false + + .List + false - - .List - .List @@ -1639,12 +1639,12 @@ module SUMMARY-TEST%MERGEKCFGTEST.TEST-BRANCH-MERGE(UINT256,UINT256,BOOL):0 false + + .List + false - - .List - .List From 2ffc75da658f79823d20368a5f30403dfca86561 Mon Sep 17 00:00:00 2001 From: palinatolmach Date: Thu, 16 Jan 2025 21:10:21 +0400 Subject: [PATCH 17/35] Update `trace` tests output --- .../AccountParamsTest.testDealConcrete().trace.expected | 6 +++--- .../test-data/show/AddrTest.test_addr_true().trace.expected | 6 +++--- .../show/BlockParamsTest.testWarp(uint256).trace.expected | 6 +++--- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/tests/integration/test-data/show/AccountParamsTest.testDealConcrete().trace.expected b/src/tests/integration/test-data/show/AccountParamsTest.testDealConcrete().trace.expected index 30ef0fb59..7bef83aec 100644 --- a/src/tests/integration/test-data/show/AccountParamsTest.testDealConcrete().trace.expected +++ b/src/tests/integration/test-data/show/AccountParamsTest.testDealConcrete().trace.expected @@ -258,12 +258,12 @@ module SUMMARY-TEST%ACCOUNTPARAMSTEST.TESTDEALCONCRETE():0 false + + .List + false - - .List - .List diff --git a/src/tests/integration/test-data/show/AddrTest.test_addr_true().trace.expected b/src/tests/integration/test-data/show/AddrTest.test_addr_true().trace.expected index 3509a9af7..eb359ce72 100644 --- a/src/tests/integration/test-data/show/AddrTest.test_addr_true().trace.expected +++ b/src/tests/integration/test-data/show/AddrTest.test_addr_true().trace.expected @@ -218,12 +218,12 @@ module SUMMARY-TEST%ADDRTEST.TEST-ADDR-TRUE():0 false + + .List + false - - .List - .List diff --git a/src/tests/integration/test-data/show/BlockParamsTest.testWarp(uint256).trace.expected b/src/tests/integration/test-data/show/BlockParamsTest.testWarp(uint256).trace.expected index cb918e8fe..a418a1dbe 100644 --- a/src/tests/integration/test-data/show/BlockParamsTest.testWarp(uint256).trace.expected +++ b/src/tests/integration/test-data/show/BlockParamsTest.testWarp(uint256).trace.expected @@ -218,12 +218,12 @@ module SUMMARY-TEST%BLOCKPARAMSTEST.TESTWARP(UINT256):0 false + + .List + false - - .List - .List From 0c4380b34f8dd72c791e4cd1d764d4bef40142f4 Mon Sep 17 00:00:00 2001 From: palinatolmach Date: Thu, 16 Jan 2025 21:44:37 +0400 Subject: [PATCH 18/35] Use `auxiliary_lemmas` in end-to-end tests --- src/tests/integration/test_kontrol.py | 1 + 1 file changed, 1 insertion(+) diff --git a/src/tests/integration/test_kontrol.py b/src/tests/integration/test_kontrol.py index 14d1c68d7..1746fbc2c 100644 --- a/src/tests/integration/test_kontrol.py +++ b/src/tests/integration/test_kontrol.py @@ -117,6 +117,7 @@ def test_kontrol_end_to_end( 'force_sequential': force_sequential, 'schedule': 'CANCUN', 'stack_checks': False, + 'auxiliary_lemmas': True, } ), ) From bef331a8031a2178a65adc36be7f66ad7a4b8b74 Mon Sep 17 00:00:00 2001 From: palinatolmach Date: Thu, 16 Jan 2025 22:04:38 +0400 Subject: [PATCH 19/35] Output update for `RandomVarTest` --- .../RandomVarTest.test_custom_names().expected | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/src/tests/integration/test-data/show/RandomVarTest.test_custom_names().expected b/src/tests/integration/test-data/show/RandomVarTest.test_custom_names().expected index 6f359cd49..dd5ab9c5d 100644 --- a/src/tests/integration/test-data/show/RandomVarTest.test_custom_names().expected +++ b/src/tests/integration/test-data/show/RandomVarTest.test_custom_names().expected @@ -4,7 +4,6 @@ │ pc: 0 │ callDepth: 0 │ statusCode: STATUSCODE:StatusCode -│ src: test/RandomVar.t.sol:7:68 │ method: test%RandomVarTest.test_custom_names() │ │ (369 steps) @@ -13,7 +12,6 @@ │ pc: 2946 │ callDepth: 0 │ statusCode: STATUSCODE:StatusCode -│ src: test/RandomVar.t.sol:58:58 │ method: test%RandomVarTest.test_custom_names() │ │ (1 step) @@ -22,7 +20,6 @@ │ pc: 2946 │ callDepth: 0 │ statusCode: STATUSCODE:StatusCode -│ src: test/RandomVar.t.sol:58:58 │ method: test%RandomVarTest.test_custom_names() │ │ (454 steps) @@ -31,7 +28,6 @@ │ pc: 3081 │ callDepth: 0 │ statusCode: STATUSCODE:StatusCode -│ src: test/RandomVar.t.sol:59:59 │ method: test%RandomVarTest.test_custom_names() │ │ (1 step) @@ -40,7 +36,6 @@ │ pc: 3081 │ callDepth: 0 │ statusCode: STATUSCODE:StatusCode -│ src: test/RandomVar.t.sol:59:59 │ method: test%RandomVarTest.test_custom_names() │ │ (1000 steps) @@ -57,7 +52,6 @@ │ pc: 5597 │ callDepth: 0 │ statusCode: STATUSCODE:StatusCode -│ src: lib/kontrol-cheatcodes/src/KontrolCheats.sol:277:277 │ method: test%RandomVarTest.test_custom_names() │ │ (1 step) @@ -66,7 +60,6 @@ │ pc: 5597 │ callDepth: 0 │ statusCode: STATUSCODE:StatusCode -│ src: lib/kontrol-cheatcodes/src/KontrolCheats.sol:277:277 │ method: test%RandomVarTest.test_custom_names() │ │ (450 steps) @@ -75,7 +68,6 @@ │ pc: 3445 │ callDepth: 0 │ statusCode: STATUSCODE:StatusCode -│ src: test/RandomVar.t.sol:63:63 │ method: test%RandomVarTest.test_custom_names() │ │ (1 step) @@ -84,7 +76,6 @@ │ pc: 3445 │ callDepth: 0 │ statusCode: STATUSCODE:StatusCode -│ src: test/RandomVar.t.sol:63:63 │ method: test%RandomVarTest.test_custom_names() │ │ (551 steps) @@ -93,7 +84,6 @@ │ pc: 3621 │ callDepth: 0 │ statusCode: STATUSCODE:StatusCode -│ src: test/RandomVar.t.sol:64:64 │ method: test%RandomVarTest.test_custom_names() │ │ (1 step) @@ -102,7 +92,6 @@ │ pc: 3621 │ callDepth: 0 │ statusCode: STATUSCODE:StatusCode -│ src: test/RandomVar.t.sol:64:64 │ method: test%RandomVarTest.test_custom_names() │ │ (261 steps) @@ -111,7 +100,6 @@ │ pc: 3731 │ callDepth: 0 │ statusCode: STATUSCODE:StatusCode -│ src: test/RandomVar.t.sol:65:65 │ method: test%RandomVarTest.test_custom_names() │ │ (1 step) @@ -120,7 +108,6 @@ │ pc: 3731 │ callDepth: 0 │ statusCode: STATUSCODE:StatusCode -│ src: test/RandomVar.t.sol:65:65 │ method: test%RandomVarTest.test_custom_names() │ │ (1000 steps) @@ -129,7 +116,6 @@ │ pc: 3919 │ callDepth: 0 │ statusCode: STATUSCODE:StatusCode -│ src: test/RandomVar.t.sol:57:67 │ method: test%RandomVarTest.test_custom_names() │ │ (26 steps) @@ -138,7 +124,6 @@ │ pc: 371 │ callDepth: 0 │ statusCode: EVMC_SUCCESS -│ src: test/RandomVar.t.sol:45:50 │ method: test%RandomVarTest.test_custom_names() │ ┊ constraint: From 232ec941af0097eae186f024fd1244c8b492be0f Mon Sep 17 00:00:00 2001 From: palinatolmach Date: Thu, 16 Jan 2025 23:30:37 +0400 Subject: [PATCH 20/35] Enable `auxiliary_lemmas` in `build` instead of `prove` --- src/tests/integration/test_kontrol.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tests/integration/test_kontrol.py b/src/tests/integration/test_kontrol.py index 1746fbc2c..5e4ea717d 100644 --- a/src/tests/integration/test_kontrol.py +++ b/src/tests/integration/test_kontrol.py @@ -68,6 +68,7 @@ def foundry_end_to_end(foundry_root_dir: Path | None, tmp_path_factory: TempPath 'require': str(foundry_root / 'lemmas.k'), 'module-import': 'TestBase:KONTROL-LEMMAS', 'metadata': False, + 'auxiliary_lemmas': True, } ), foundry=Foundry(foundry_root), @@ -117,7 +118,6 @@ def test_kontrol_end_to_end( 'force_sequential': force_sequential, 'schedule': 'CANCUN', 'stack_checks': False, - 'auxiliary_lemmas': True, } ), ) From c7d2baba7969247b21b40a7ee0844e22b8711746 Mon Sep 17 00:00:00 2001 From: palinatolmach Date: Thu, 16 Jan 2025 23:40:35 +0400 Subject: [PATCH 21/35] Change `testFailAllowCalls_ifNotWhitelisted` signature --- src/tests/integration/test-data/end-to-end-prove-all | 2 +- src/tests/integration/test-data/src/AllowCalls.t.sol | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/tests/integration/test-data/end-to-end-prove-all b/src/tests/integration/test-data/end-to-end-prove-all index d241458e4..8e5a40d08 100644 --- a/src/tests/integration/test-data/end-to-end-prove-all +++ b/src/tests/integration/test-data/end-to-end-prove-all @@ -1,5 +1,5 @@ AllowChangesTest.testAllowCalls(uint256) -AllowChangesTest.testAllowCalls_failIfNotWhitelisted(uint256) +AllowChangesTest.testFailAllowCalls_ifNotWhitelisted(uint256) CounterTest.test_Increment() RandomVarTest.test_custom_names() RandomVarTest.test_randomBool() diff --git a/src/tests/integration/test-data/src/AllowCalls.t.sol b/src/tests/integration/test-data/src/AllowCalls.t.sol index 9526f64fc..8c5d4e0d1 100644 --- a/src/tests/integration/test-data/src/AllowCalls.t.sol +++ b/src/tests/integration/test-data/src/AllowCalls.t.sol @@ -45,7 +45,7 @@ contract AllowChangesTest is Test, KontrolCheats { canChange.changeSlot0(value); } - function testAllowCalls_failIfNotWhitelisted(uint256 value) public { + function testFailAllowCalls_ifNotWhitelisted(uint256 value) public { bytes memory changeCallData = abi.encodeWithSelector( ValueStore.changeSlot0.selector, value From 376146c462ee80c5f8ddf9b1f13feab3e0e56892 Mon Sep 17 00:00:00 2001 From: palinatolmach Date: Thu, 16 Jan 2025 23:45:08 +0400 Subject: [PATCH 22/35] Remove `expectRevert` from failing test --- src/tests/integration/test-data/src/AllowCalls.t.sol | 1 - 1 file changed, 1 deletion(-) diff --git a/src/tests/integration/test-data/src/AllowCalls.t.sol b/src/tests/integration/test-data/src/AllowCalls.t.sol index 8c5d4e0d1..77db2e321 100644 --- a/src/tests/integration/test-data/src/AllowCalls.t.sol +++ b/src/tests/integration/test-data/src/AllowCalls.t.sol @@ -53,7 +53,6 @@ contract AllowChangesTest is Test, KontrolCheats { kevm.allowCalls(address(canChange), changeCallData); - vm.expectRevert(); canChange.changeSlot1(value); } } \ No newline at end of file From b758ee0f2893eeedb66bcaf0783ecf260fea718f Mon Sep 17 00:00:00 2001 From: Palina Date: Thu, 16 Jan 2025 23:48:23 +0400 Subject: [PATCH 23/35] Apply review suggestion MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Andrei Văcaru <16517508+anvacaru@users.noreply.github.com> --- src/kontrol/kdist/cheatcodes.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/kontrol/kdist/cheatcodes.md b/src/kontrol/kdist/cheatcodes.md index bfebc68c9..3249a6ad7 100644 --- a/src/kontrol/kdist/cheatcodes.md +++ b/src/kontrol/kdist/cheatcodes.md @@ -1646,8 +1646,8 @@ If the flag is false, it skips comparison, assuming success; otherwise, it compa ```k syntax KItem ::= "#setAllowedCall" Account Bytes [symbol(foundry_setAllowedCall)] - syntax KItem ::= "#setAllowedAllCalls" Account [symbol(foundry_setAllowedAllCalls)] - // --------------------------------------------------------------------------------- + | "#setAllowedAllCalls" Account [symbol(foundry_setAllowedAllCalls)] + // ----------------------------------------------------------------------------------- rule #setAllowedCall ALLOWEDACCOUNT ALLOWEDCALLDATA => .K ... _ => true From a9fae410cdd8c65a2cede4d32ee125e2d42dfe5c Mon Sep 17 00:00:00 2001 From: palinatolmach Date: Fri, 17 Jan 2025 01:38:28 +0400 Subject: [PATCH 24/35] Another output update for `RandomVarTest` --- .../RandomVarTest.test_custom_names().expected | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/tests/integration/test-data/show/RandomVarTest.test_custom_names().expected b/src/tests/integration/test-data/show/RandomVarTest.test_custom_names().expected index dd5ab9c5d..6f359cd49 100644 --- a/src/tests/integration/test-data/show/RandomVarTest.test_custom_names().expected +++ b/src/tests/integration/test-data/show/RandomVarTest.test_custom_names().expected @@ -4,6 +4,7 @@ │ pc: 0 │ callDepth: 0 │ statusCode: STATUSCODE:StatusCode +│ src: test/RandomVar.t.sol:7:68 │ method: test%RandomVarTest.test_custom_names() │ │ (369 steps) @@ -12,6 +13,7 @@ │ pc: 2946 │ callDepth: 0 │ statusCode: STATUSCODE:StatusCode +│ src: test/RandomVar.t.sol:58:58 │ method: test%RandomVarTest.test_custom_names() │ │ (1 step) @@ -20,6 +22,7 @@ │ pc: 2946 │ callDepth: 0 │ statusCode: STATUSCODE:StatusCode +│ src: test/RandomVar.t.sol:58:58 │ method: test%RandomVarTest.test_custom_names() │ │ (454 steps) @@ -28,6 +31,7 @@ │ pc: 3081 │ callDepth: 0 │ statusCode: STATUSCODE:StatusCode +│ src: test/RandomVar.t.sol:59:59 │ method: test%RandomVarTest.test_custom_names() │ │ (1 step) @@ -36,6 +40,7 @@ │ pc: 3081 │ callDepth: 0 │ statusCode: STATUSCODE:StatusCode +│ src: test/RandomVar.t.sol:59:59 │ method: test%RandomVarTest.test_custom_names() │ │ (1000 steps) @@ -52,6 +57,7 @@ │ pc: 5597 │ callDepth: 0 │ statusCode: STATUSCODE:StatusCode +│ src: lib/kontrol-cheatcodes/src/KontrolCheats.sol:277:277 │ method: test%RandomVarTest.test_custom_names() │ │ (1 step) @@ -60,6 +66,7 @@ │ pc: 5597 │ callDepth: 0 │ statusCode: STATUSCODE:StatusCode +│ src: lib/kontrol-cheatcodes/src/KontrolCheats.sol:277:277 │ method: test%RandomVarTest.test_custom_names() │ │ (450 steps) @@ -68,6 +75,7 @@ │ pc: 3445 │ callDepth: 0 │ statusCode: STATUSCODE:StatusCode +│ src: test/RandomVar.t.sol:63:63 │ method: test%RandomVarTest.test_custom_names() │ │ (1 step) @@ -76,6 +84,7 @@ │ pc: 3445 │ callDepth: 0 │ statusCode: STATUSCODE:StatusCode +│ src: test/RandomVar.t.sol:63:63 │ method: test%RandomVarTest.test_custom_names() │ │ (551 steps) @@ -84,6 +93,7 @@ │ pc: 3621 │ callDepth: 0 │ statusCode: STATUSCODE:StatusCode +│ src: test/RandomVar.t.sol:64:64 │ method: test%RandomVarTest.test_custom_names() │ │ (1 step) @@ -92,6 +102,7 @@ │ pc: 3621 │ callDepth: 0 │ statusCode: STATUSCODE:StatusCode +│ src: test/RandomVar.t.sol:64:64 │ method: test%RandomVarTest.test_custom_names() │ │ (261 steps) @@ -100,6 +111,7 @@ │ pc: 3731 │ callDepth: 0 │ statusCode: STATUSCODE:StatusCode +│ src: test/RandomVar.t.sol:65:65 │ method: test%RandomVarTest.test_custom_names() │ │ (1 step) @@ -108,6 +120,7 @@ │ pc: 3731 │ callDepth: 0 │ statusCode: STATUSCODE:StatusCode +│ src: test/RandomVar.t.sol:65:65 │ method: test%RandomVarTest.test_custom_names() │ │ (1000 steps) @@ -116,6 +129,7 @@ │ pc: 3919 │ callDepth: 0 │ statusCode: STATUSCODE:StatusCode +│ src: test/RandomVar.t.sol:57:67 │ method: test%RandomVarTest.test_custom_names() │ │ (26 steps) @@ -124,6 +138,7 @@ │ pc: 371 │ callDepth: 0 │ statusCode: EVMC_SUCCESS +│ src: test/RandomVar.t.sol:45:50 │ method: test%RandomVarTest.test_custom_names() │ ┊ constraint: From 7a097499e52e0a9b9ee41a6d4bd638a34d5397de Mon Sep 17 00:00:00 2001 From: palinatolmach Date: Fri, 17 Jan 2025 08:53:06 +0400 Subject: [PATCH 25/35] Reduce `end-to-end` parallel processes to 6 --- .github/workflows/test-pr.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test-pr.yml b/.github/workflows/test-pr.yml index 83668a50c..242dc6aa4 100644 --- a/.github/workflows/test-pr.yml +++ b/.github/workflows/test-pr.yml @@ -149,7 +149,7 @@ jobs: docker exec -u github-user kontrol-ci-integration-${GITHUB_SHA} /bin/bash -c 'CXX=clang++-14 poetry run kdist --verbose build -j`nproc` evm-semantics.haskell kontrol.foundry' - name: 'Run end-to-end tests' run: | - TEST_ARGS='--numprocesses=8 -vv -k "test_kontrol_end_to_end"' + TEST_ARGS='--numprocesses=6 -vv -k "test_kontrol_end_to_end"' docker exec --user github-user kontrol-ci-integration-${GITHUB_SHA} make cov-integration TEST_ARGS="${TEST_ARGS}" - name: 'Tear down Docker' if: always() From 33d6eb561db759b946fd603be68c3891823e2f1d Mon Sep 17 00:00:00 2001 From: Andrei <16517508+anvacaru@users.noreply.github.com> Date: Fri, 17 Jan 2025 12:29:58 +0200 Subject: [PATCH 26/35] update expected output --- .../RandomVarTest.test_custom_names().expected | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/src/tests/integration/test-data/show/RandomVarTest.test_custom_names().expected b/src/tests/integration/test-data/show/RandomVarTest.test_custom_names().expected index 6f359cd49..dd5ab9c5d 100644 --- a/src/tests/integration/test-data/show/RandomVarTest.test_custom_names().expected +++ b/src/tests/integration/test-data/show/RandomVarTest.test_custom_names().expected @@ -4,7 +4,6 @@ │ pc: 0 │ callDepth: 0 │ statusCode: STATUSCODE:StatusCode -│ src: test/RandomVar.t.sol:7:68 │ method: test%RandomVarTest.test_custom_names() │ │ (369 steps) @@ -13,7 +12,6 @@ │ pc: 2946 │ callDepth: 0 │ statusCode: STATUSCODE:StatusCode -│ src: test/RandomVar.t.sol:58:58 │ method: test%RandomVarTest.test_custom_names() │ │ (1 step) @@ -22,7 +20,6 @@ │ pc: 2946 │ callDepth: 0 │ statusCode: STATUSCODE:StatusCode -│ src: test/RandomVar.t.sol:58:58 │ method: test%RandomVarTest.test_custom_names() │ │ (454 steps) @@ -31,7 +28,6 @@ │ pc: 3081 │ callDepth: 0 │ statusCode: STATUSCODE:StatusCode -│ src: test/RandomVar.t.sol:59:59 │ method: test%RandomVarTest.test_custom_names() │ │ (1 step) @@ -40,7 +36,6 @@ │ pc: 3081 │ callDepth: 0 │ statusCode: STATUSCODE:StatusCode -│ src: test/RandomVar.t.sol:59:59 │ method: test%RandomVarTest.test_custom_names() │ │ (1000 steps) @@ -57,7 +52,6 @@ │ pc: 5597 │ callDepth: 0 │ statusCode: STATUSCODE:StatusCode -│ src: lib/kontrol-cheatcodes/src/KontrolCheats.sol:277:277 │ method: test%RandomVarTest.test_custom_names() │ │ (1 step) @@ -66,7 +60,6 @@ │ pc: 5597 │ callDepth: 0 │ statusCode: STATUSCODE:StatusCode -│ src: lib/kontrol-cheatcodes/src/KontrolCheats.sol:277:277 │ method: test%RandomVarTest.test_custom_names() │ │ (450 steps) @@ -75,7 +68,6 @@ │ pc: 3445 │ callDepth: 0 │ statusCode: STATUSCODE:StatusCode -│ src: test/RandomVar.t.sol:63:63 │ method: test%RandomVarTest.test_custom_names() │ │ (1 step) @@ -84,7 +76,6 @@ │ pc: 3445 │ callDepth: 0 │ statusCode: STATUSCODE:StatusCode -│ src: test/RandomVar.t.sol:63:63 │ method: test%RandomVarTest.test_custom_names() │ │ (551 steps) @@ -93,7 +84,6 @@ │ pc: 3621 │ callDepth: 0 │ statusCode: STATUSCODE:StatusCode -│ src: test/RandomVar.t.sol:64:64 │ method: test%RandomVarTest.test_custom_names() │ │ (1 step) @@ -102,7 +92,6 @@ │ pc: 3621 │ callDepth: 0 │ statusCode: STATUSCODE:StatusCode -│ src: test/RandomVar.t.sol:64:64 │ method: test%RandomVarTest.test_custom_names() │ │ (261 steps) @@ -111,7 +100,6 @@ │ pc: 3731 │ callDepth: 0 │ statusCode: STATUSCODE:StatusCode -│ src: test/RandomVar.t.sol:65:65 │ method: test%RandomVarTest.test_custom_names() │ │ (1 step) @@ -120,7 +108,6 @@ │ pc: 3731 │ callDepth: 0 │ statusCode: STATUSCODE:StatusCode -│ src: test/RandomVar.t.sol:65:65 │ method: test%RandomVarTest.test_custom_names() │ │ (1000 steps) @@ -129,7 +116,6 @@ │ pc: 3919 │ callDepth: 0 │ statusCode: STATUSCODE:StatusCode -│ src: test/RandomVar.t.sol:57:67 │ method: test%RandomVarTest.test_custom_names() │ │ (26 steps) @@ -138,7 +124,6 @@ │ pc: 371 │ callDepth: 0 │ statusCode: EVMC_SUCCESS -│ src: test/RandomVar.t.sol:45:50 │ method: test%RandomVarTest.test_custom_names() │ ┊ constraint: From c412328d270c1b37c3b1cb1332aa31e313d0de3d Mon Sep 17 00:00:00 2001 From: Palina Date: Fri, 17 Jan 2025 17:28:42 +0400 Subject: [PATCH 27/35] Apply `CallToAddress` review suggestion MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Andrei Văcaru <16517508+anvacaru@users.noreply.github.com> --- src/kontrol/kdist/cheatcodes.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/kontrol/kdist/cheatcodes.md b/src/kontrol/kdist/cheatcodes.md index 3249a6ad7..f95d9bc79 100644 --- a/src/kontrol/kdist/cheatcodes.md +++ b/src/kontrol/kdist/cheatcodes.md @@ -947,7 +947,7 @@ A `StorageSlot` pair is formed from an address and a storage index. ```k syntax StorageSlot ::= "{" Int "|" Int "}" syntax CallToAddress ::= "{" Int "|" Bytes "}" - // ------------------------------------------ + // ---------------------------------------------- ``` We define two new status codes: From ab78122360c06846d680107b50b3e09803fac5ba Mon Sep 17 00:00:00 2001 From: palinatolmach Date: Fri, 17 Jan 2025 18:08:15 +0400 Subject: [PATCH 28/35] Use `.Bytes` to represent all calls being allowed --- src/kontrol/kdist/cheatcodes.md | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/src/kontrol/kdist/cheatcodes.md b/src/kontrol/kdist/cheatcodes.md index f95d9bc79..357fc1241 100644 --- a/src/kontrol/kdist/cheatcodes.md +++ b/src/kontrol/kdist/cheatcodes.md @@ -973,7 +973,7 @@ If the address is not in the whitelist `WLIST` then `KEVM` goes into an error st WLIST ... - requires notBool ({ACCTTO|CALLDATA} in WLIST orBool {ACCTTO|b"*"} in WLIST) + requires notBool ({ACCTTO|CALLDATA} in WLIST orBool {ACCTTO|.Bytes} in WLIST) [priority(40)] ``` @@ -1006,7 +1006,7 @@ Adds an account address to the whitelist. The execution of the modified KEVM wil rule [foundry.allowAllCallsToAddress]: #cheatcode_call SELECTOR ARGS => #loadAccount #asWord(ARGS) - ~> #setAllowedAllCalls #asWord(ARGS) ... + ~> #setAllowedCall #asWord(ARGS) .Bytes ... requires SELECTOR ==Int selector("allowCallsToAddress(address)") ``` @@ -1646,7 +1646,6 @@ If the flag is false, it skips comparison, assuming success; otherwise, it compa ```k syntax KItem ::= "#setAllowedCall" Account Bytes [symbol(foundry_setAllowedCall)] - | "#setAllowedAllCalls" Account [symbol(foundry_setAllowedAllCalls)] // ----------------------------------------------------------------------------------- rule #setAllowedCall ALLOWEDACCOUNT ALLOWEDCALLDATA => .K ... @@ -1654,13 +1653,6 @@ If the flag is false, it skips comparison, assuming success; otherwise, it compa ALLOWEDCALLS => ALLOWEDCALLS ListItem({ALLOWEDACCOUNT|ALLOWEDCALLDATA}) ... - - rule #setAllowedAllCalls ALLOWEDACCOUNT => .K ... - - _ => true - ALLOWEDCALLS => ALLOWEDCALLS ListItem({ALLOWEDACCOUNT|b"*"}) - ... - ``` - `#setMockCall MOCKADDRESS MOCKCALLDATA MOCKRETURN` will update the `` mapping for the given account. From 0eeb8269668975f1b1570949c2c6251760687250 Mon Sep 17 00:00:00 2001 From: palinatolmach Date: Fri, 17 Jan 2025 18:22:47 +0400 Subject: [PATCH 29/35] Another output update for `RandomVarTest.test_custom_names` --- .../RandomVarTest.test_custom_names().expected | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/tests/integration/test-data/show/RandomVarTest.test_custom_names().expected b/src/tests/integration/test-data/show/RandomVarTest.test_custom_names().expected index dd5ab9c5d..6f359cd49 100644 --- a/src/tests/integration/test-data/show/RandomVarTest.test_custom_names().expected +++ b/src/tests/integration/test-data/show/RandomVarTest.test_custom_names().expected @@ -4,6 +4,7 @@ │ pc: 0 │ callDepth: 0 │ statusCode: STATUSCODE:StatusCode +│ src: test/RandomVar.t.sol:7:68 │ method: test%RandomVarTest.test_custom_names() │ │ (369 steps) @@ -12,6 +13,7 @@ │ pc: 2946 │ callDepth: 0 │ statusCode: STATUSCODE:StatusCode +│ src: test/RandomVar.t.sol:58:58 │ method: test%RandomVarTest.test_custom_names() │ │ (1 step) @@ -20,6 +22,7 @@ │ pc: 2946 │ callDepth: 0 │ statusCode: STATUSCODE:StatusCode +│ src: test/RandomVar.t.sol:58:58 │ method: test%RandomVarTest.test_custom_names() │ │ (454 steps) @@ -28,6 +31,7 @@ │ pc: 3081 │ callDepth: 0 │ statusCode: STATUSCODE:StatusCode +│ src: test/RandomVar.t.sol:59:59 │ method: test%RandomVarTest.test_custom_names() │ │ (1 step) @@ -36,6 +40,7 @@ │ pc: 3081 │ callDepth: 0 │ statusCode: STATUSCODE:StatusCode +│ src: test/RandomVar.t.sol:59:59 │ method: test%RandomVarTest.test_custom_names() │ │ (1000 steps) @@ -52,6 +57,7 @@ │ pc: 5597 │ callDepth: 0 │ statusCode: STATUSCODE:StatusCode +│ src: lib/kontrol-cheatcodes/src/KontrolCheats.sol:277:277 │ method: test%RandomVarTest.test_custom_names() │ │ (1 step) @@ -60,6 +66,7 @@ │ pc: 5597 │ callDepth: 0 │ statusCode: STATUSCODE:StatusCode +│ src: lib/kontrol-cheatcodes/src/KontrolCheats.sol:277:277 │ method: test%RandomVarTest.test_custom_names() │ │ (450 steps) @@ -68,6 +75,7 @@ │ pc: 3445 │ callDepth: 0 │ statusCode: STATUSCODE:StatusCode +│ src: test/RandomVar.t.sol:63:63 │ method: test%RandomVarTest.test_custom_names() │ │ (1 step) @@ -76,6 +84,7 @@ │ pc: 3445 │ callDepth: 0 │ statusCode: STATUSCODE:StatusCode +│ src: test/RandomVar.t.sol:63:63 │ method: test%RandomVarTest.test_custom_names() │ │ (551 steps) @@ -84,6 +93,7 @@ │ pc: 3621 │ callDepth: 0 │ statusCode: STATUSCODE:StatusCode +│ src: test/RandomVar.t.sol:64:64 │ method: test%RandomVarTest.test_custom_names() │ │ (1 step) @@ -92,6 +102,7 @@ │ pc: 3621 │ callDepth: 0 │ statusCode: STATUSCODE:StatusCode +│ src: test/RandomVar.t.sol:64:64 │ method: test%RandomVarTest.test_custom_names() │ │ (261 steps) @@ -100,6 +111,7 @@ │ pc: 3731 │ callDepth: 0 │ statusCode: STATUSCODE:StatusCode +│ src: test/RandomVar.t.sol:65:65 │ method: test%RandomVarTest.test_custom_names() │ │ (1 step) @@ -108,6 +120,7 @@ │ pc: 3731 │ callDepth: 0 │ statusCode: STATUSCODE:StatusCode +│ src: test/RandomVar.t.sol:65:65 │ method: test%RandomVarTest.test_custom_names() │ │ (1000 steps) @@ -116,6 +129,7 @@ │ pc: 3919 │ callDepth: 0 │ statusCode: STATUSCODE:StatusCode +│ src: test/RandomVar.t.sol:57:67 │ method: test%RandomVarTest.test_custom_names() │ │ (26 steps) @@ -124,6 +138,7 @@ │ pc: 371 │ callDepth: 0 │ statusCode: EVMC_SUCCESS +│ src: test/RandomVar.t.sol:45:50 │ method: test%RandomVarTest.test_custom_names() │ ┊ constraint: From a533c8b60b3b381b320cc2d9e7c7c63f6b6132b9 Mon Sep 17 00:00:00 2001 From: palinatolmach Date: Sun, 19 Jan 2025 16:18:31 +0530 Subject: [PATCH 30/35] Experiment: add `--force-sequential` to end-to-end tests --- .github/workflows/test-pr.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test-pr.yml b/.github/workflows/test-pr.yml index 242dc6aa4..87217aec7 100644 --- a/.github/workflows/test-pr.yml +++ b/.github/workflows/test-pr.yml @@ -149,7 +149,7 @@ jobs: docker exec -u github-user kontrol-ci-integration-${GITHUB_SHA} /bin/bash -c 'CXX=clang++-14 poetry run kdist --verbose build -j`nproc` evm-semantics.haskell kontrol.foundry' - name: 'Run end-to-end tests' run: | - TEST_ARGS='--numprocesses=6 -vv -k "test_kontrol_end_to_end"' + TEST_ARGS='--numprocesses=6 -vv --force-sequential -k "test_kontrol_end_to_end"' docker exec --user github-user kontrol-ci-integration-${GITHUB_SHA} make cov-integration TEST_ARGS="${TEST_ARGS}" - name: 'Tear down Docker' if: always() From 44cc1dc36128ef17bd26f4ec5fde7a544cf728be Mon Sep 17 00:00:00 2001 From: palinatolmach Date: Sun, 19 Jan 2025 16:34:36 +0530 Subject: [PATCH 31/35] Reduce num processes in the update-output job to 4 --- .github/workflows/update-expected-output.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/update-expected-output.yml b/.github/workflows/update-expected-output.yml index af8655e5d..1076c19f8 100644 --- a/.github/workflows/update-expected-output.yml +++ b/.github/workflows/update-expected-output.yml @@ -28,7 +28,7 @@ jobs: docker exec -u github-user kontrol-ci-integration-${GITHUB_SHA} /bin/bash -c 'CXX=clang++-14 poetry run kdist --verbose build -j`nproc` evm-semantics.haskell kontrol.foundry' - name: 'Run integration tests' run: | - TEST_ARGS="--maxfail=1000 --numprocesses=6 --update-expected-output --force-sequential -vv" + TEST_ARGS="--maxfail=1000 --numprocesses=4 --update-expected-output --force-sequential -vv" docker exec --user github-user kontrol-ci-integration-${GITHUB_SHA} bash -c "make cov-integration TEST_ARGS='${TEST_ARGS} -k \"not (test_kontrol_cse or test_foundry_minimize_proof or test_kontrol_end_to_end)\"' || true" docker exec --user github-user kontrol-ci-integration-${GITHUB_SHA} bash -c "make cov-integration TEST_ARGS='${TEST_ARGS} -k \"test_kontrol_cse or test_foundry_minimize_proof\"' || true" - name: 'Copy updated files to host' From bc8c5f9d326300b36e852e6639eb130808c49b74 Mon Sep 17 00:00:00 2001 From: palinatolmach Date: Sun, 19 Jan 2025 17:04:13 +0530 Subject: [PATCH 32/35] Update `RandomVarTest.test_custom_names` --- .../RandomVarTest.test_custom_names().expected | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/src/tests/integration/test-data/show/RandomVarTest.test_custom_names().expected b/src/tests/integration/test-data/show/RandomVarTest.test_custom_names().expected index 6f359cd49..dd5ab9c5d 100644 --- a/src/tests/integration/test-data/show/RandomVarTest.test_custom_names().expected +++ b/src/tests/integration/test-data/show/RandomVarTest.test_custom_names().expected @@ -4,7 +4,6 @@ │ pc: 0 │ callDepth: 0 │ statusCode: STATUSCODE:StatusCode -│ src: test/RandomVar.t.sol:7:68 │ method: test%RandomVarTest.test_custom_names() │ │ (369 steps) @@ -13,7 +12,6 @@ │ pc: 2946 │ callDepth: 0 │ statusCode: STATUSCODE:StatusCode -│ src: test/RandomVar.t.sol:58:58 │ method: test%RandomVarTest.test_custom_names() │ │ (1 step) @@ -22,7 +20,6 @@ │ pc: 2946 │ callDepth: 0 │ statusCode: STATUSCODE:StatusCode -│ src: test/RandomVar.t.sol:58:58 │ method: test%RandomVarTest.test_custom_names() │ │ (454 steps) @@ -31,7 +28,6 @@ │ pc: 3081 │ callDepth: 0 │ statusCode: STATUSCODE:StatusCode -│ src: test/RandomVar.t.sol:59:59 │ method: test%RandomVarTest.test_custom_names() │ │ (1 step) @@ -40,7 +36,6 @@ │ pc: 3081 │ callDepth: 0 │ statusCode: STATUSCODE:StatusCode -│ src: test/RandomVar.t.sol:59:59 │ method: test%RandomVarTest.test_custom_names() │ │ (1000 steps) @@ -57,7 +52,6 @@ │ pc: 5597 │ callDepth: 0 │ statusCode: STATUSCODE:StatusCode -│ src: lib/kontrol-cheatcodes/src/KontrolCheats.sol:277:277 │ method: test%RandomVarTest.test_custom_names() │ │ (1 step) @@ -66,7 +60,6 @@ │ pc: 5597 │ callDepth: 0 │ statusCode: STATUSCODE:StatusCode -│ src: lib/kontrol-cheatcodes/src/KontrolCheats.sol:277:277 │ method: test%RandomVarTest.test_custom_names() │ │ (450 steps) @@ -75,7 +68,6 @@ │ pc: 3445 │ callDepth: 0 │ statusCode: STATUSCODE:StatusCode -│ src: test/RandomVar.t.sol:63:63 │ method: test%RandomVarTest.test_custom_names() │ │ (1 step) @@ -84,7 +76,6 @@ │ pc: 3445 │ callDepth: 0 │ statusCode: STATUSCODE:StatusCode -│ src: test/RandomVar.t.sol:63:63 │ method: test%RandomVarTest.test_custom_names() │ │ (551 steps) @@ -93,7 +84,6 @@ │ pc: 3621 │ callDepth: 0 │ statusCode: STATUSCODE:StatusCode -│ src: test/RandomVar.t.sol:64:64 │ method: test%RandomVarTest.test_custom_names() │ │ (1 step) @@ -102,7 +92,6 @@ │ pc: 3621 │ callDepth: 0 │ statusCode: STATUSCODE:StatusCode -│ src: test/RandomVar.t.sol:64:64 │ method: test%RandomVarTest.test_custom_names() │ │ (261 steps) @@ -111,7 +100,6 @@ │ pc: 3731 │ callDepth: 0 │ statusCode: STATUSCODE:StatusCode -│ src: test/RandomVar.t.sol:65:65 │ method: test%RandomVarTest.test_custom_names() │ │ (1 step) @@ -120,7 +108,6 @@ │ pc: 3731 │ callDepth: 0 │ statusCode: STATUSCODE:StatusCode -│ src: test/RandomVar.t.sol:65:65 │ method: test%RandomVarTest.test_custom_names() │ │ (1000 steps) @@ -129,7 +116,6 @@ │ pc: 3919 │ callDepth: 0 │ statusCode: STATUSCODE:StatusCode -│ src: test/RandomVar.t.sol:57:67 │ method: test%RandomVarTest.test_custom_names() │ │ (26 steps) @@ -138,7 +124,6 @@ │ pc: 371 │ callDepth: 0 │ statusCode: EVMC_SUCCESS -│ src: test/RandomVar.t.sol:45:50 │ method: test%RandomVarTest.test_custom_names() │ ┊ constraint: From e8b1db597e9d8c8171a613092cf807175196b6cc Mon Sep 17 00:00:00 2001 From: Andrei <16517508+anvacaru@users.noreply.github.com> Date: Mon, 20 Jan 2025 12:50:19 +0200 Subject: [PATCH 33/35] update expected output --- .../RandomVarTest.test_custom_names().expected | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/tests/integration/test-data/show/RandomVarTest.test_custom_names().expected b/src/tests/integration/test-data/show/RandomVarTest.test_custom_names().expected index dd5ab9c5d..6f359cd49 100644 --- a/src/tests/integration/test-data/show/RandomVarTest.test_custom_names().expected +++ b/src/tests/integration/test-data/show/RandomVarTest.test_custom_names().expected @@ -4,6 +4,7 @@ │ pc: 0 │ callDepth: 0 │ statusCode: STATUSCODE:StatusCode +│ src: test/RandomVar.t.sol:7:68 │ method: test%RandomVarTest.test_custom_names() │ │ (369 steps) @@ -12,6 +13,7 @@ │ pc: 2946 │ callDepth: 0 │ statusCode: STATUSCODE:StatusCode +│ src: test/RandomVar.t.sol:58:58 │ method: test%RandomVarTest.test_custom_names() │ │ (1 step) @@ -20,6 +22,7 @@ │ pc: 2946 │ callDepth: 0 │ statusCode: STATUSCODE:StatusCode +│ src: test/RandomVar.t.sol:58:58 │ method: test%RandomVarTest.test_custom_names() │ │ (454 steps) @@ -28,6 +31,7 @@ │ pc: 3081 │ callDepth: 0 │ statusCode: STATUSCODE:StatusCode +│ src: test/RandomVar.t.sol:59:59 │ method: test%RandomVarTest.test_custom_names() │ │ (1 step) @@ -36,6 +40,7 @@ │ pc: 3081 │ callDepth: 0 │ statusCode: STATUSCODE:StatusCode +│ src: test/RandomVar.t.sol:59:59 │ method: test%RandomVarTest.test_custom_names() │ │ (1000 steps) @@ -52,6 +57,7 @@ │ pc: 5597 │ callDepth: 0 │ statusCode: STATUSCODE:StatusCode +│ src: lib/kontrol-cheatcodes/src/KontrolCheats.sol:277:277 │ method: test%RandomVarTest.test_custom_names() │ │ (1 step) @@ -60,6 +66,7 @@ │ pc: 5597 │ callDepth: 0 │ statusCode: STATUSCODE:StatusCode +│ src: lib/kontrol-cheatcodes/src/KontrolCheats.sol:277:277 │ method: test%RandomVarTest.test_custom_names() │ │ (450 steps) @@ -68,6 +75,7 @@ │ pc: 3445 │ callDepth: 0 │ statusCode: STATUSCODE:StatusCode +│ src: test/RandomVar.t.sol:63:63 │ method: test%RandomVarTest.test_custom_names() │ │ (1 step) @@ -76,6 +84,7 @@ │ pc: 3445 │ callDepth: 0 │ statusCode: STATUSCODE:StatusCode +│ src: test/RandomVar.t.sol:63:63 │ method: test%RandomVarTest.test_custom_names() │ │ (551 steps) @@ -84,6 +93,7 @@ │ pc: 3621 │ callDepth: 0 │ statusCode: STATUSCODE:StatusCode +│ src: test/RandomVar.t.sol:64:64 │ method: test%RandomVarTest.test_custom_names() │ │ (1 step) @@ -92,6 +102,7 @@ │ pc: 3621 │ callDepth: 0 │ statusCode: STATUSCODE:StatusCode +│ src: test/RandomVar.t.sol:64:64 │ method: test%RandomVarTest.test_custom_names() │ │ (261 steps) @@ -100,6 +111,7 @@ │ pc: 3731 │ callDepth: 0 │ statusCode: STATUSCODE:StatusCode +│ src: test/RandomVar.t.sol:65:65 │ method: test%RandomVarTest.test_custom_names() │ │ (1 step) @@ -108,6 +120,7 @@ │ pc: 3731 │ callDepth: 0 │ statusCode: STATUSCODE:StatusCode +│ src: test/RandomVar.t.sol:65:65 │ method: test%RandomVarTest.test_custom_names() │ │ (1000 steps) @@ -116,6 +129,7 @@ │ pc: 3919 │ callDepth: 0 │ statusCode: STATUSCODE:StatusCode +│ src: test/RandomVar.t.sol:57:67 │ method: test%RandomVarTest.test_custom_names() │ │ (26 steps) @@ -124,6 +138,7 @@ │ pc: 371 │ callDepth: 0 │ statusCode: EVMC_SUCCESS +│ src: test/RandomVar.t.sol:45:50 │ method: test%RandomVarTest.test_custom_names() │ ┊ constraint: From 2c03441a342bda69c28dc841870987bb1479f9a9 Mon Sep 17 00:00:00 2001 From: Andrei <16517508+anvacaru@users.noreply.github.com> Date: Tue, 21 Jan 2025 08:01:20 +0200 Subject: [PATCH 34/35] see full diff in ci --- .github/workflows/test-pr.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test-pr.yml b/.github/workflows/test-pr.yml index 87217aec7..2b0f9ca8b 100644 --- a/.github/workflows/test-pr.yml +++ b/.github/workflows/test-pr.yml @@ -149,7 +149,7 @@ jobs: docker exec -u github-user kontrol-ci-integration-${GITHUB_SHA} /bin/bash -c 'CXX=clang++-14 poetry run kdist --verbose build -j`nproc` evm-semantics.haskell kontrol.foundry' - name: 'Run end-to-end tests' run: | - TEST_ARGS='--numprocesses=6 -vv --force-sequential -k "test_kontrol_end_to_end"' + TEST_ARGS='--numprocesses=6 -vv --force-sequential --assert=plain -k "test_kontrol_end_to_end"' docker exec --user github-user kontrol-ci-integration-${GITHUB_SHA} make cov-integration TEST_ARGS="${TEST_ARGS}" - name: 'Tear down Docker' if: always() From 5fbe1ccc5ec7938d56eab1636b93bcb87e28d015 Mon Sep 17 00:00:00 2001 From: Andrei <16517508+anvacaru@users.noreply.github.com> Date: Tue, 21 Jan 2025 14:12:56 +0200 Subject: [PATCH 35/35] show diff in ci --- src/tests/integration/utils.py | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/tests/integration/utils.py b/src/tests/integration/utils.py index 010fda208..39e2d1ebb 100644 --- a/src/tests/integration/utils.py +++ b/src/tests/integration/utils.py @@ -1,5 +1,6 @@ from __future__ import annotations +import difflib from pathlib import Path from typing import TYPE_CHECKING @@ -47,7 +48,17 @@ def assert_or_update_show_output(actual_text: str, expected_file: Path, *, updat else: assert expected_file.is_file() expected_text = expected_file.read_text() - assert actual_text == expected_text + if actual_text != expected_text: + diff = difflib.unified_diff( + expected_text.splitlines(), + actual_text.splitlines(), + fromfile=str(expected_file), + tofile='actual_text', + lineterm='', + ) + for line in diff: + print(line) + raise AssertionError def assert_pass(test: str, proof: Proof) -> None: