Commit Graph
4599 Commits
Author SHA1 Message Date
Kamil Śliwak 339053f185 AnalysisFramework.formatErrors(): Fix _withErrorIds flag not having any effect 2023-08-11 14:15:56 +02:00
Kamil Śliwak 8407c8c615 SourceReferenceFormatter: Support full range of options in formatErrorInformation() 2023-08-11 14:15:56 +02:00
Kamil Śliwak b7d2c8bb0a SourceReferenceFormatter: Line wrapping and unused includes 2023-08-11 14:15:56 +02:00
Kamil Śliwak e357b8bc42 Merge pull request #14474 from ethereum/refactor-analysis-framework-error-filtering
Sane error filtering in `AnalysisFramework`
2023-08-07 20:02:45 +02:00
Daniel 0fbc5cc7d3 Merge pull request #14469 from ethereum/push0-rematerializer
Push0 rematerializer
2023-08-07 18:26:08 +02:00
Nikola Matic 96e7b4f46b Rematerialize zero literals 2023-08-07 17:33:16 +02:00
Kamil Śliwak 6d8b1374c5 Use AnalysisFramework's error formatting and filtering features in more test cases 2023-08-07 14:40:34 +02:00
Kamil Śliwak e42242cd6f AnalysisFramework.formatErrors(): Require providing errors explicitly 2023-08-07 14:40:34 +02:00
Kamil Śliwak 6c1bcb9a81 AnalysisFramework.formatErrors(): Support colored output and error IDs 2023-08-07 14:26:23 +02:00
Kamil Śliwak 6f3a379557 AnalysisFramework: Add filteredErrors() 2023-08-07 14:26:23 +02:00
Kamil Śliwak e62bc30e9e AnalysisFramework.filterErrors(): Provide default for _includeWarningsAndInfos 2023-08-07 14:26:23 +02:00
Kamil Śliwak f87bef2431 AnalysisFramework: Make it possible to customize CompilerStack creation 2023-08-07 14:06:16 +02:00
Kamil Śliwak aecb11eff4 Make better use of virtual functions to customize CommonSyntaxTest in test cases based on it 2023-08-07 14:05:43 +02:00
Pawel Gebal 6574c10f25 SMTChecker: Visit the condition in for and while loops after loop is unrolled 2023-08-03 13:36:41 +02:00
Pawel Gebal db5baebff8 SMTChecker fix: Do not unroll loop after it completes 2023-07-26 16:31:03 +02:00
Martin Blicha cdfc19b503 SMTChecker: Bring back counterexample checks in regression tests
Since the default is now to ignore the counterexamples when checking
test output, we bring back counterexample checks in tests where the
counterexample is (mostly) deterministic.
2023-07-25 12:26:21 +02:00
Martin Blicha 2e38798408 SMTChecker: Keep counterexamples on test expectation update 2023-07-24 18:36:18 +02:00
Nikola Matic 964bdc711c Fix ICE when emitting event from another contract 2023-07-21 21:49:09 +02:00
r0qsandKamil Śliwak 86602852be Add buglist entry
Co-authored-by: Kamil Śliwak <kamil.sliwak@codepoets.it>
2023-07-18 18:15:32 +02:00
Daniel Kirchner 5c7214cbe3 Always generate code for .selector member access. 2023-07-18 18:15:32 +02:00
Nikola Matić 64427412c4 Merge pull request #14347 from ethereum/fixTypeCheckingAbiDecode
Disallow the use of `TypeType` in complex expressions
2023-07-18 18:14:45 +02:00
Nikola Matic 82cb5338a9 Relax delegatecall type restriction plus test 2023-07-18 17:07:13 +02:00
Daniel Kirchner 110e2a656d Restrict mobile types of function types.
Move ternary tests to semanticTests
2023-07-18 14:13:36 +02:00
Matheus Aguiar 4fd5bbf50b Restrict mobileType of TypeType 2023-07-18 12:58:11 +02:00
Matheus Aguiar f3fc19080a Override mobileType of MagicType to null 2023-07-18 10:56:02 +02:00
Daniel Kirchner 0ab0842c29 Disallow conversions between declaration function types. 2023-07-17 18:33:07 +02:00
Kamil Śliwak dad2bf6472 Relax restrictions on immutable initialization 2023-07-14 15:29:32 +02:00
Kamil Śliwak 0afe025f19 Minor tweaks to immutable tests for better diffs 2023-07-14 15:29:32 +02:00
Pawel Gebal 826fd90dcf Fix error in SMTChecker: Use rich indentifier instead of external identifier to ecnode member access to functions 2023-06-23 15:24:55 +02:00
Daniel Kirchner 0ea06e1c71 Do not let low-level semantic test calls depend on a well-defined contract ABI. 2023-06-07 13:40:14 +02:00
Nikola Matic 47969adf91 Experimental standard library
Change import syntax and cover with tests
2023-06-06 17:16:23 +02:00
Pawel Gebal f15b826431 Add optional bounds to unroll loops in BMC model checker 2023-06-02 18:32:38 +02:00
Leo a0933fa80a Merge pull request #14276 from ethereum/smtchecker-fix-ice
SMTChecker: External function call with struct member is not getter
2023-05-30 13:46:35 +02:00
Leo ceab4dfee5 Merge pull request #14269 from blishko/smtchecker-fix-analysis-external-calls
[SMTChecker] Remember verification targets from trusted external calls
2023-05-30 13:45:37 +02:00
Martin Blicha 8ca453f82e SMTChecker: External function call with struct member is not getter
if a struct has a member that is a function pointer with `external`
attribute, and such a member is called, it is currently incorrectly
treated as a public getter in SMTEncoder.

The proposed fix is to make SMTEncoder::publicGetter more strict in
deciding whether an expression is a public getter.
The added condition, that the access happens on a state variable, is
exactly what is checked later with an assertion that is currently
failing.
2023-05-26 14:23:45 +02:00
Nikola Matić 477b621f2e Merge pull request #14274 from ethereum/enable-access-to-foreign-events 2023-05-26 13:49:13 +02:00
Martin Blicha b0419da654 [SMTChecker] Remember verification targets from trusted external calls
Previously, we did not remember trusted external calls for later phase
when we compute possible verification targets for each function.
This led to false negative in cases where verification target can be
violated, but not by calling a public function directly, but only when
it is called as an external function from other function.

The added test cases witnesses this behaviour. The underflow in
`dec` cannot happen in any other way except what the `dec` is called
from `f`.

The same problem did not occur when the functions are called internally,
because for such cases, we have already been remembering these calls in
the callgraph in the CHC engine.
2023-05-26 13:03:44 +02:00
Nikola Matic 5893e099fe Allow qualified access to events from other contracts 2023-05-26 12:52:52 +02:00
GiokaMarkella 28a1abf89a Yul AST output on the CLI and in Standard JSON 2023-05-26 12:35:31 +02:00
Nikola Matic e7f5303a39 Make ASTJSONTest an EVMVersionRestrictedTestCase 2023-05-17 18:10:16 +02:00
Nikola Matic 7a34d34045 Restrict experimental solidity to constantinople and above 2023-05-17 17:03:43 +02:00
Nikola Matic 8a41f4ac7e Introduce solidity-next pragma
Exclude pragma experimental error from ANTLR tests

Test for first pragma after non-pragma declaration

Resolve import pragmas

Change pragma name from next to solidity

Add Changelog entries

Address review comments
2023-05-15 19:25:13 +02:00
Daniel 9804085934 Merge pull request #14216 from ethereum/fix_bmc_side_effects_in_statement
Fix encoding of side-effects inside if and ternary in BMC
2023-05-15 13:34:22 +02:00
Alexander Arlt c5673278a7 Remove EWASM backend. 2023-05-11 10:56:55 -05:00
Leo Alt 678461e828 Fix encoding of side-effects inside if and conditional statements in the BMC engine 2023-05-11 16:44:09 +02:00
Alexander Arlt 4837d42361 Add experimental support to import AST via Standard JSON. 2023-05-09 14:07:38 -05:00
Daniel Kirchner 75a0c486a8 Adjust gas expectations due to new creation costs. 2023-05-09 18:22:44 +02:00
Nikola Matic 9a87b587d5 Disallow immutable initialization in try catch statements
Trigger github
2023-05-09 14:48:14 +02: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
a29f77369a Move AST annotation of internal function dispatch IDs to ContractDefinition
Co-authored-by: Daniel <daniel@ekpyron.org>
Co-authored-by: Nikola Matić <nikola.matic@ethereum.org>
2023-05-06 20:31:27 +02:00