Commit Graph
149 Commits
Author SHA1 Message Date
Alexander Arlt b80a4662b9 aaaaaaaaa 2023-07-12 18:13:35 +02:00
Alexander Arlt 894e42db34 [libevmasm] Tests: Update tests to support sub-object index. 2023-07-12 18:11:47 +02:00
Alexander Arlt c5673278a7 Remove EWASM backend. 2023-05-11 10:56:55 -05:00
Martin Blicha 12bca24774 [SMTChecker] Use path condition when creating CHC targets
Without path condition, verification targets created inside ternary
operator ignore the condition of the operator inside the branches.
This led to false positives.

Further updates:

- Function calls should consider the conditions under which they are
called, otherwise the analysis may report false positives.
The fix proposed here is to add the current path condition to the edge
that propagates error from a function call.

- Increment error index after function call

This is necessary for the analysis of the ternary operator to work
correctly. No information should leak from a function call inside a
ternary operator in the first branch to the second branch, including
whether or not an error would have occured in the first branch.

However, for the execution that continues after the function call,
we still need to ensure that under the current path condition
the error has not occurred in that function call.

It would be better to isolate the analysis of the branches to separate
clauses, but I do not see an easy way for that now. In this way, even
though the function call in first branch is included in the clause of
the second branch, no information leaks.

- Additonal test for ternary operator

This tests the behaviour of SMTChecker on ternary operator with function
calls inside both branches. Specifically, it tests that SMTChecker
successfully detects a violation of a verification target in the second
branch when the same target is present also in the first branch, but
there it cannot be triggered because of the operator's condition.
2023-04-21 18:56:34 +02:00
Leo Alt ce9a7ee954 update smtchecker tests 2023-03-28 18:23:54 +02:00
Leo Alt 21c0f78650 Report safe properties in BMC and CHC 2023-03-09 14:59:32 +01:00
wechman aba5ac5e2a User-defined operators: Tests 2023-02-22 00:40:03 +01:00
Leo 59f9ab4dee Merge pull request #13939 from pgebal/fix_handling_bitwise_operators_when_parsing_z3_call_result
Fixes handling bitwise operators for z3 model checker
2023-02-09 12:16:28 +01:00
Pawel Gebal a38549dc19 Fixes handling bitwise operators for z3 model checker 2023-02-08 18:37:17 +01:00
Leo Alt 8d91ccf028 [SMTChecker] Add a new trusted mode which assumes that code that is
available at compile time is trusted.
2023-02-06 17:02:33 +01:00
feba4de509 Add paris constraints to SMTChecker
Co-authored-by: Daniel <daniel@ekpyron.org>
Co-authored-by: Kamil Śliwak <kamil.sliwak@codepoets.it>
Co-authored-by: Leo <leo@ethereum.org>
2023-01-31 11:03:04 +01:00
Leo Alt 77698f8108 Fix internal error when deleting struct member of function type 2022-11-30 12:47:32 +01:00
Leo Alt 07870d0318 Fix internal error in assignment chains that also assign to fully qualified state variables (, for example), where the contract expression is a tuble. 2022-11-28 18:45:50 +01:00
Leo Alt d660f0cab0 adjust nondeterministic tests 2022-11-24 13:08:06 +01:00
Leo Alt 504b70b6af update smt tests 2022-11-24 13:08:06 +01:00
Ishtiaque Zahid 3abf2724a1 changed output of formatNumberReadable so that it shows powers of two and one-less-than powers of two in a more compact format 2022-11-14 17:37:38 +01:00
Leo Alt 16c0838f75 Update docker images and tests 2022-08-30 11:51:59 +02:00
Leo Alt 201c6c6819 fix smt flaky test 2022-05-05 11:38:16 +02:00
Leo Alt 4fd7de36f1 update smt tests z3 4.8.16 2022-05-03 14:23:27 +02:00
Leo Alt 098a3cb537 adjust tests for nondeterminism 2022-01-12 18:43:18 +01:00
Leo Alt 9f171c0f06 update smtchecker tests for new z3 2022-01-12 15:13:34 +01:00
Leo Alt fb8c138b8b Do not analyze unecessary contracts 2021-12-24 19:36:32 +01:00
Leo Alt a2588533e5 macos nondeterminism 2021-11-24 20:41:22 +01:00
Leo Alt ff5c842d67 update smtchecker tests 2021-11-24 20:41:22 +01:00
Leo Alt e40cf92b1d [SMTChecker] Merge all entry points for a target 2021-11-03 11:12:58 +01:00
Leo Alt 38b0cf7f9c SMTChecker tests 2021-10-26 11:30:30 +02:00
Leo Alt 4c2b661eaa [SMTChecker] Report values for block, msg and tx variables in counterexamples 2021-10-05 15:19:10 +02:00
Leo Alt 0cc9162fb5 Update SMTChecker tests 2021-08-27 16:25:09 +02:00
Leo Alt a9af63187e Adjust tests for nondeterminism 2021-08-25 21:10:43 +02:00
Leo Alt 85378b1770 Update existing tests 2021-08-25 21:10:08 +02:00
Leo Alt 880a2fffb6 tests 2021-05-11 21:20:42 +02:00
Alex Beregszaszi 1be07c2b36 Trivial isoltest updates: missing // ---- at the end 2021-04-20 17:38:29 +02:00
Alex Beregszaszi 84c05d35f3 Trivial isoltest updates: normalized whitespace 2021-04-20 17:38:29 +02:00
Kamil Śliwak 7b467a49d7 Disable assertion that gives non-deterministic results in in slice tests for SMTChecker 2021-04-15 17:14:21 +02:00
Leonardo Alt 0a4afa71bd Update old tests 2021-04-08 21:03:39 +02:00
Leonardo Alt ba97d6ac4e Add local vars to cex 2021-03-30 17:55:21 +02:00
Leonardo Alt dbd067d6db Report out of bounds index access 2021-03-30 10:28:48 +02:00
Martin Blicha 6aa6c5f5f9 [SMTChecker] Reset reference variables on assignment to a variable of reference type 2021-03-12 19:51:31 +01:00
Martin Blicha 0cb75293f9 [SMTChecker] fix handling of assignments of array/mapping state variable accessed using contract name 2021-03-12 14:01:07 +01:00
Martin Blicha 5af01f6896 [SMTChecker] Use same sort name for array slice as for the underlying array. 2021-03-09 11:06:22 +01:00
Martin Blicha a49950cdf3 [SMTChecker] Added transaction constraints also for contract deployment 2021-02-01 16:46:34 +01:00
Leonardo Alt a612daa783 Add msgvalue to cex 2021-01-21 19:05:44 +01:00
Leonardo Alt 007d39871b [SMTChecker] Synthesize untrusted functions called externally 2021-01-15 11:56:26 +01:00
Leonardo Alt b3c3836388 Output internal calls 2021-01-12 14:57:04 +01:00
Leonardo Alt f1ae24abc7 Remove extra line breaks 2021-01-12 14:00:07 +01:00
Leonardo Alt b02722ebda Add contract name to called function in cex 2021-01-04 10:03:16 +01:00
Leonardo Alt 78d55e6b4a [SMTChecker] Support check/unchecked 2020-12-30 12:14:30 +01:00
Martin Blicha be0a0f4d90 [SMTChecker] Added constraints for block properties 2020-12-29 22:17:44 +01:00
Martin Blicha 745466b71f updates to the tests 2020-12-28 14:32:53 +01:00
Leonardo Alt 50be39fc21 Add and update tests 2020-12-17 14:42:49 +01:00