Commit Graph
507 Commits
Author SHA1 Message Date
Nikola Matic fdc6699159 Rematerialize zero literals with default cleanup sequence
Add unused pruner step to the end of the default cleanup sequence
2023-09-04 15:40:33 +02:00
Kamil Śliwak 9adbced98e Remove parser error recovery mode 2023-08-22 12:00:11 +02:00
Kamil Śliwak 36429e397c Fix ICE when requesting --combined-json outputs other than AST with --stop-after parsing 2023-08-21 17:50:41 +02:00
Kamil Śliwak a15ef59eec Remove the ability to produce an AST in presence of errors in --error-recovery mode
This reverts commit 7fd7cc1e76.
2023-08-21 17:50:41 +02:00
Nikola Matic 96e7b4f46b Rematerialize zero literals 2023-08-07 17:33:16 +02:00
r0qs ea7ee3d5fe Fix yul ast ID to 0 instead of 1. 2023-07-28 17:48:35 +02:00
Kamil Śliwak 3ecf968001 Merge pull request #14328 from ethereum/fix-incomplete-ast-in-standard-json-on-analysis-fail
Fix incomplete AST in standard json on analysis fail
2023-06-19 18:26:33 +02:00
Pawel Gebal d4be1d9c2f Add --print-smt flag to output SMTChecker SMTLIB code 2023-06-16 14:04:07 +02:00
Kamil Śliwak 712229a5c6 Fix StandardCompiler returning an incomplete AST in Standard JSON in case of an early exit during analysis 2023-06-15 10:50:04 +02:00
Kamil Śliwak f50820fcae Tests checking outputs produced in presence of errors 2023-06-15 10:49:19 +02:00
Kamil Śliwak e45e6cc31d CLI tests for metadata output 2023-06-14 16:04:33 +02:00
Kamil Śliwak e87333f20f More CLI tests for --stop-after parsing 2023-06-14 14:22:38 +02:00
Kamil Śliwak f8a1af8bd5 CommandLineParser: Fix some outputs not being properly disallowed with --stop-after parsing 2023-06-14 14:22:38 +02:00
Kamil Śliwak b1a773be2f IRGenerator: Leave IR optimization up to the caller to avoid unnecessarily doing it twice 2023-06-07 19:44:40 +02:00
Kamil Śliwak 5e32a728fe Update test expectations 2023-06-07 12:13:39 +02:00
Kamil Śliwak 25be38905f YulStack: When Yul optimization is not requested, run Yul optimizer with a minimal sequence instead of disabling it 2023-06-07 12:13:38 +02:00
Kamil Śliwak 8e35e8dd8e Command-line tests checking behavior of msize without optimizer 2023-06-07 12:12:00 +02:00
Kamil Śliwak 7ab730d410 Update tests that would become ineffective with minimal optimizations applied 2023-06-07 12:12:00 +02:00
Kamil Śliwak 64ef9d581b Command-line test for equivalence of optimizer options on the CLI and in Standard JSON 2023-06-07 10:29:45 +02:00
Kamil Śliwak e6716e3208 Helpers for removing decorations form solc output 2023-06-07 10:29:45 +02:00
Kamil Śliwak 2769bb52f6 Make --optimize-yul work again 2023-06-06 09:54:07 +02:00
Pawel Gebal f15b826431 Add optional bounds to unroll loops in BMC model checker 2023-06-02 18:32:38 +02:00
Kamil Śliwak f397b9a083 cmdlineTests: Add prefixes for temporary files/dirs 2023-06-02 16:10:40 +02:00
Kamil Śliwak 5c5f8e8dad cmdlineTests: Remove superfluous set and temporary dirs 2023-06-02 16:10:40 +02:00
Kamil Śliwak 00c2f511d3 cmdlineTests: Remove superfluous output from script-based tests and adjust the rest 2023-06-02 16:10:40 +02:00
Kamil Śliwak c1df8ed563 cmdlineTests: Remove unnecessary subshells
- Whitespace-only change, separated out to make it easy to diff.
2023-06-02 16:10:40 +02:00
Kamil Śliwak 6b061ba696 cmdlineTests: Extract script-based test out of cmdlineTests.sh
- Just extraction, with as few changes to the code as possible.
2023-06-02 16:10:40 +02:00
GiokaMarkella 28a1abf89a Yul AST output on the CLI and in Standard JSON 2023-05-26 12:35:31 +02:00
Kamil Śliwak a11b1c83f0 Disallow using both --optimize-yul and --no-optimize-yul at the same time 2023-05-24 15:54:40 +02:00
Kamil Śliwak b24e4fcbfa Command-line tests for --optimize-yul and --no-optimize-yul used together 2023-05-24 15:53:29 +02:00
Alexander Arlt c5673278a7 Remove EWASM backend. 2023-05-11 10:56:55 -05:00
Alexander Arlt 4837d42361 Add experimental support to import AST via Standard JSON. 2023-05-09 14:07:38 -05:00
Daniel KirchnerandRodrigo Q. Saramago 44da8507b1 Change default EVM version to Shanghai.
Co-authored-by: Rodrigo Q. Saramago <rodrigoqsaramago@gmail.com>
2023-05-08 16:34:23 +02:00
chriseth 1e63615206 Export all events.
Update tests.

Additional tests

Revert changes to the Natspec
2023-05-03 14:08:27 -03: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 6c58f31b4a add cli tests 2023-03-15 17:52:58 +01:00
Leo Alt 21c0f78650 Report safe properties in BMC and CHC 2023-03-09 14:59:32 +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
ef6ff2f055 Adds support for the EVM version "Paris".
Deprecates `block.difficulty` and disallow `difficulty()` in inline assembly for EVM versions >= paris.
The change is due to the renaming introduced by EIP-4399 (see: https://eips.ethereum.org/EIPS/eip-4399).
Introduces `block.prevrandao` in Solidity and `prevrandao()` in inline assembly for EVM versions >= paris.

Co-authored-by: Alex Beregszaszi <alex@rtfs.hu>
Co-authored-by: Daniel <daniel@ekpyron.org>
Co-authored-by: matheusaaguiar <95899911+matheusaaguiar@users.noreply.github.com>
Co-authored-by: Nikola Matić <nikola.matic@ethereum.org>
2023-01-23 18:50:36 +00:00
andy53 3bc535e1a1 Report when no contracts to compile
updates
2022-12-19 13:47:03 +01:00
Leo Alt c3a7adad27 update cli tests 2022-11-24 13:08:06 +01:00
Leo Alt 24df40de9a Allow running Eldarica from the command line 2022-11-22 21:16:45 +01:00
George Plotnikov 6374b4fe23 regenerating tests expectation 2022-10-26 15:13:47 +05:00
Kamil Śliwak ed3d3959aa Rename command line tests for the --no-cbor-metadata/appendCBOR option 2022-10-19 21:28:45 +02:00
hrkrshnn 6854e2b5d6 fix: bytecodeHash cannot be set to non-none for appendCBOR=false
Testing: see `test/cmdlineTests/metadata_append_standard_json_error`

Closes: https://github.com/ethereum/solidity/issues/13628
2022-10-13 02:07:20 +02:00
hrkrshnn d32661c0af Added tests for --no-append-metadata
- Command line tests
- Documented the standard json
- Changelog
- A Change in SolidityExecutionFramework to prevent flaky gas tests
- A boost test for --no-append-metadata
- Removed an outdated comment
2022-09-26 20:40:34 +02:00
Miles Liu dad1a56321 Pretty print expected json output of command line tests 2022-09-22 18:49:55 +08:00
nishant-sachdeva eafd7218b7 refactored struct message to use std::variant for _typeOrSeverity 2022-09-20 19:20:43 +05:30
nishant-sachdeva c8011d8719 Cleaning up helpers around errors 2022-09-19 10:51:14 +05:30