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
r0qs
ea7ee3d5fe
Fix yul ast ID to 0 instead of 1.
2023-07-28 17:48:35 +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
r0qs
dcbd645798
Delete old prb-math.sh script
2023-07-21 20:25:58 +02:00
r0qs
ab4f5f2983
Initial prototype of prb-math external tests using foundry rewritten in python
...
Co-authored-by: Kamil Śliwak <kamil.sliwak@codepoets.it>
2023-07-21 20:25:58 +02:00
r0qs
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
ba3f9dd2a2
FullInliner: Do not include calls whose arguments may have side-effects
2023-07-17 16:40:43 +02:00
Kamil Śliwak
5e1e0e7752
FullInliner: Fix order of arguments of inlined functions
2023-07-17 16:40:43 +02:00
Kamil Śliwak
a07f6c443a
Tests for Yul argument evaluation order after optimization
2023-07-17 16:40:43 +02:00
Kamil Śliwak
edceb4d2d1
Allow testing FullInliner without ExpressionSplitter
2023-07-17 16:40:43 +02:00
Kamil Śliwak
96bb39d1b4
Merge pull request #14304 from ethereum/relax-restrictions-on-immutable-initialization-outside-functions-and-modifiers
...
Relax restrictions on immutable initialization (outside of functions and modifiers)
2023-07-17 16:38:57 +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
Kamil Śliwak
ea724071b1
prepare_report: Add viaIR presets
2023-07-14 15:28:11 +02:00
Nikola Matic
1628678de2
Remove missing test from OZ script
2023-07-14 13:22:06 +02:00
Alejandro Criado-Pérez
29358806f4
updated protoToAbiv2.h
2023-07-09 01:45:54 +02:00
Bhargava Shastry
5d7533b540
Merge pull request #14227 from ethereum/update-codegen-fuzzer
...
Stack optimizer fuzzer: Detect stack-too-deep during optimization
2023-07-03 14:52:27 +02:00
Martin Blicha
29041c8101
Remove ReasoningBasedSimplifier from libyul
...
Due to a design decision to move away from a bundled SMT solver,
ReasoningBasedSimplifier in its current form cannot be use any longer.
This is a necessary step to allow a unified way to call solvers using
only SMTLIB interface.
Since this optimization pass has always been marked as highly
experimental and never turned on by default, it should be OK to remove
it.
2023-06-28 14:38:36 +02:00
Leo
2cf03e3f0b
Merge pull request #14344 from pgebal/pgebal/fix-ice-internal-type
...
Fix error in SMTChecker: Use rich indentifier instead of external identifier to encode member access to functions
2023-06-27 12:31:25 +02:00
Bhargava Shastry
87d0c84960
Stack optimizer fuzzer: Detect stack-too-deep during optimization
...
Co-authored-by: r0qs <deepmarolaest@gmail.com>
2023-06-27 10:32:23 +02:00
Kamil Śliwak
10670d6286
prepare_report: Replace hard-coded optimize setting with selectable presets
2023-06-23 19:00:30 +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
Nikola Matić
08897b88c9
Merge pull request #14342 from ethereum/peg-oz-to-specific-commit
...
Disable failing OZ tests
2023-06-21 16:11:23 +02:00
Nikola Matic
edd99b07fe
Disable failing OZ tests
2023-06-21 14:50:05 +02:00
Kamil Śliwak
dc7cda18f0
Merge pull request #14338 from ethereum/cmdline-tests-exclude-option
...
Add `--exclude` option to `cmdlineTests.sh`
2023-06-20 13:49:53 +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
Kamil Śliwak
399457d74b
cmdlineTests.sh: Add --exclude option
2023-06-19 16:43:30 +02:00
Kamil Śliwak
4752b31e6c
cmdlineTests.sh: Rewrite test selection to use find
2023-06-19 16:43:30 +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
Daniel
374a6fd50e
Merge pull request #14311 from ethereum/StackToMemoryDeterminism
...
Deterministically choose memory slots for variables during stack-to-memory.
2023-06-14 17:31:32 +02:00
Daniel
ca8db58edd
Merge pull request #14322 from ethereum/stackLayoutsForUnassignedReturnVariables
...
Account for unassigned return variables in stack layout generation.
2023-06-14 17:30:57 +02:00
Kamil Śliwak
e45e6cc31d
CLI tests for metadata output
2023-06-14 16:04:33 +02:00
Kamil Śliwak
e6b1f5ccee
cmdlineTest.sh: Remove compiler version from metadata in Standard JSON output as well
2023-06-14 16:04:33 +02:00
Kamil Śliwak
4e113820c9
Merge pull request #14321 from ethereum/fix-bash-syntax-error-on-expectation-update-in-cli-tests
...
Fix Bash syntax error that shows up in CLI test output when updating expectations
2023-06-14 16:03:40 +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
f4217bdc2c
Fix Bash syntax error that shows up in CLI tests when updating expectations
2023-06-14 14:22:10 +02:00
Daniel Kirchner
aa01223398
Account for unassigned return variables in stack layout generation.
2023-06-14 11:43:46 +02:00
r0qs
28573dc71b
Workaround open-zeppelin expectRevertCustomError bug
2023-06-14 09:49:38 +02:00
Daniel
53c305ea80
Merge pull request #14310 from ethereum/moreRobustSemanticsTests
...
Do not let low-level semantic test calls depend on a well-defined contract ABI.
2023-06-12 17:32:21 +02:00
Daniel Kirchner
b7abd9bba4
Deterministically choose memory slots for variables independently of names that may depend on AST IDs.
2023-06-12 17:28:01 +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
3aaa207162
Enable unoptimized presets in those external tests where they now pass
2023-06-07 16:45:45 +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
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
c7372f3f22
Merge pull request #14268 from ethereum/resurrect-yul-optimizer-cli-options
...
Resurrect Yul optimizer CLI options
2023-06-07 10:28:16 +02:00
Nikola Matic
47969adf91
Experimental standard library
...
Change import syntax and cover with tests
2023-06-06 17:16:23 +02:00
Kamil Śliwak
2769bb52f6
Make --optimize-yul work again
2023-06-06 09:54:07 +02:00
Kamil Śliwak
42a068b449
CommandLineParser: Store the state of EVM assembly and Yul optimizer explicitly
...
- Does not change the meaning of CLI options, just the way we map them to internal variables.
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
Kamil Śliwak
dd10334754
cmdlineTests: Support tests that contain a script to run as an alternative to input.* files
2023-06-02 16:09:11 +02:00
Kamil Śliwak
72a384f4fe
cmdlineTests: Ensure that leading symbols in names affect the sort order
2023-06-02 16:09:11 +02:00
r0qs
824e59dec2
Remove unnecessary line from OZ external test script
2023-06-02 12:09:53 +02:00
Matheus Aguiar
d657e77f1e
Remove problematic sed commands in openzeppelin external test
2023-05-31 02:11:33 -03: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
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
Kamil Śliwak
8c5304368d
test_via_ir_equivalence(): Simplify by merging the asm loops
...
- And fix indentation
2023-05-23 15:30:07 +02:00
Kamil Śliwak
bcdb41f743
test_via_ir_equivalence(): Remove unnecessary filter for asm_output_two_stage
...
- This bit will never actually appear in the output file.
2023-05-23 15:28:18 +02:00
Kamil Śliwak
17aacfdb6a
test_via_ir_equivalence(): Fix quoting and locals
2023-05-23 15:25:48 +02:00
Kamil Śliwak
0ce5e4c94d
test_via_ir_equivalence(): Use assertions for precondition checks
2023-05-23 15:23:44 +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
r0qs
af74ab69c9
Workaround gp2 and prb-math external tests
2023-05-16 16:13:51 +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
Daniel Kirchner
53626fc092
Bump docker images and evmone version.
2023-05-09 17:59:00 +02:00