Leonardo
65c2089b43
Merge pull request #10310 from blishko/issue-10306
...
[SMTChecker] Adding a dummy frame to the call stack for the implicit constructor
2020-11-17 09:34:49 -01:00
chriseth
98cc7a1ea9
Copying structs from storage to storage.
2020-11-17 11:06:25 +01:00
chriseth
d9fb17a85e
Copy value array from storage to storage.
2020-11-17 10:51:34 +01:00
chriseth
7ccb4fea2b
Merge pull request #10270 from ethereum/copyByteArrayFromStorageToStorage
...
[SolYul] Copy byte arrays from storage to storage.
2020-11-17 00:30:30 +01:00
Martin Blicha
07427c798c
[SMTChecker] Adding a dummy frame to the call stack for the implicit constructor
2020-11-16 22:46:17 +01:00
chriseth
62893aa1a1
Copy byte arrays from storage to storage.
2020-11-16 19:06:33 +01:00
Kamil Śliwak
b97c6c55ad
StandardCompiler: Don't assume that link reference always contains a colon
2020-11-16 17:41:54 +01:00
Leonardo
f1846b57a2
Merge pull request #10244 from blishko/this-external-calls
...
[SMTChecker] Analyzing external calls to `this`
2020-11-13 11:28:34 +00:00
Martin Blicha
5ca7a24896
[SMTChecker] Added support for precise modeling of external calls to this
.
...
Modeling external calls to this, since we can trust these calls.
fixed problem with transaction data not being restored after trusted external call
update to the tests
additional tests
changelog entry
added tests for external getters of this
2020-11-13 11:49:09 +01:00
Alex Beregszaszi
a3381d7260
Add settings.viaIR to standard json
2020-11-12 22:38:44 +00:00
Alex Beregszaszi
301d7ea39e
Add viaIR option to CompilerStack
...
It also sets the experimental flag in the metadata to true.
2020-11-12 22:34:31 +00:00
Alex Beregszaszi
fcedaba7f7
[ewasm] Allow compiling abstract/interface contracts
2020-11-12 15:26:11 +00:00
chriseth
44eb63fad0
Merge pull request #10263 from ethereum/fixTryCreateYul
...
Fix Yul codegen for try with create.
2020-11-11 20:10:54 +01:00
chriseth
571e1e5269
Merge pull request #10266 from ethereum/fixCalldataIndexAccess
...
Fix calldata index access.
2020-11-11 19:03:19 +01:00
chriseth
e7e76131c8
Merge pull request #10265 from ethereum/fixMappingInit
...
Fix initializing mapping return variables.
2020-11-11 18:42:45 +01:00
chriseth
8f570a3184
Fix calldata index access.
2020-11-11 18:42:26 +01:00
chriseth
01d7d50750
Fix initializing mapping return variables.
2020-11-11 18:08:42 +01:00
chriseth
59da25056b
Fix Yul codegen for try with create.
2020-11-11 17:52:50 +01:00
Alex Beregszaszi
2f899bbffa
[SMTChecker] Avoid implicit conversion
2020-11-11 16:29:03 +00:00
Leonardo
55ac5de472
Merge pull request #10240 from ethereum/immutablesPureValue
...
Immutables with literal values are pure.
2020-11-10 15:23:33 +00:00
chriseth
6cc264ff0a
Merge pull request #10221 from ethereum/refactorArrayConversions
...
[Sol->Yul] Refactor array conversions
2020-11-10 16:18:11 +01:00
Djordje Mijovic
efba9e45e4
[Sol->Yul] Refactoring array conversions so that they end up in same function.
2020-11-10 15:13:45 +01:00
chriseth
b981a2a74a
Merge pull request #10229 from ethereum/linking-in-assembly-mode
...
Linking in assembly mode
2020-11-10 13:21:57 +01:00
chriseth
765ed13814
Immutables with literal values are pure.
2020-11-10 13:08:42 +01:00
Leonardo
25b2a38d8b
Merge pull request #10202 from ethereum/smt_fix_modifiers_branches
...
[SMTChecker] Fix CHC false positives when using branches inside modifiers
2020-11-09 16:42:30 +00:00
Kamil Śliwak
df8e182b46
Link binaries produced in assembly mode
2020-11-09 17:17:43 +01:00
Kamil Śliwak
c970fb46ce
YulUtilFunctions::conversionFunction: Add more info to the assertion that fails on invalid conversion
2020-11-09 13:41:03 +01:00
Leonardo Alt
00858c0ccf
Isoltets SMTChecker option and BMC specific tests
2020-11-06 15:03:38 +00:00
Leonardo Alt
89dce24f24
Force SMT variable creation order
2020-11-06 11:51:01 +00:00
Leonardo Alt
646be53f2f
Sort variables and expressions by AST id
2020-11-06 11:50:43 +00:00
chriseth
b40fb527de
Remove access to functions from inline assembly (unused code).
2020-11-05 14:43:29 +01:00
Leonardo Alt
1dbd8f8d67
Fix CHC false positives when using branches inside modifiers
2020-11-04 21:47:07 +00:00
Leonardo
62535c2fd4
Merge pull request #10181 from ethereum/smt_user_timeout
...
[SMTChecker] User timeout option
2020-11-04 10:55:28 +00:00
Leonardo Alt
daf859c15b
[SMTChecker] report SMTEncoder warnings also via CHC
2020-11-03 16:06:17 +00:00
chriseth
001eac546e
Merge pull request #10161 from ethereum/VirtualLookup-static
...
Fix incorrectly set annotation.requiredLookup
2020-11-03 17:03:17 +01:00
chriseth
1f3239d097
Simplify split parameter.
2020-11-03 14:34:18 +01:00
chriseth
fea3f848f9
Prepare store for external function types.
2020-11-03 14:34:18 +01:00
chriseth
06d0459a72
Merge pull request #10187 from ethereum/validateExternal
...
[SolYul] Properly validate external functions from calldata.
2020-11-03 14:29:28 +01:00
chriseth
e27a1b786b
Wording in error messages.
2020-11-03 13:31:51 +01:00
chriseth
834da7be90
Introduce abicoder pragma.
2020-11-03 13:31:50 +01:00
chriseth
c16b535804
Validate external functions from calldata.
2020-11-03 13:28:08 +01:00
Leonardo Alt
d03ddeb0fa
[SMTChecker] User timeout option
2020-11-03 10:46:11 +00:00
chriseth
22b31054b6
Merge pull request #10174 from ethereum/storeInternalFunctions
...
Implement internal functions in storage.
2020-11-03 09:56:12 +01:00
Đorđe Mijović
e0529989da
Merge pull request #10180 from ethereum/convertDuringStoring
...
[SolYul] Convert properly during storing.
2020-11-03 08:42:14 +01:00
chriseth
129b095b09
Implement internal functions in storage.
2020-11-02 23:10:03 +01:00
chriseth
49bd3f2af4
Convert properly during storing.
2020-11-02 21:15:34 +01:00
Leonardo Alt
e38d0db683
[SMTChecker] Fix internal error when array.push() is used as LHS of assignment
2020-11-02 13:32:53 +00:00
Leonardo Alt
94e2506132
Fix inherited state vars for BMC
2020-11-02 11:42:39 +00:00
Martin Blicha
c1a57ffbfe
[SMTChecker] More precise creation of verification targets.
2020-10-30 19:11:28 +01:00
hrkrshnn
adcf9eba8d
Fix incorrectly set annotation.requiredLookup
2020-10-30 15:40:06 +01:00
chriseth
1066af3b98
Copy byte array to storage.
2020-10-29 18:53:15 +01:00
chriseth
14d7ca49c0
Rename function.
2020-10-29 18:53:15 +01:00
chriseth
ace810b078
Merge pull request #10137 from ethereum/fixedBytesOps
...
[Sol->Yul] Bit operations for fixed bytes types.
2020-10-29 18:04:07 +01:00
chriseth
f215042cf6
Fix style.
2020-10-29 17:35:55 +01:00
Alex Beregszaszi
1ab6340828
Move AsmJsonImporter from libsolidity to libyul
...
It is next to AsmJsonConverter now and interdependencies are shrunk.
2020-10-29 14:06:34 +00:00
chriseth
0c12b2e53a
Bit operations for fixed bytes types.
2020-10-28 18:04:54 +01:00
Đorđe Mijović
1f50b86aad
Merge pull request #10073 from ethereum/smt_format_array_cex
...
Format array cex
2020-10-28 12:39:19 +01:00
Leonardo Alt
25f75ce547
Remove nondet tests
2020-10-28 11:03:42 +00:00
chriseth
cc4b44058d
Merge pull request #10126 from ethereum/fixIceStructCalldataToStorageSol2Yul
...
[Sol->Yul] Fixing ice when copying struct that contains nested array to storage
2020-10-28 11:46:22 +01:00
Leonardo
07c454949f
Merge pull request #10127 from ethereum/fixIceSmtBitwise
...
[SMTChecker] Fix ICE when using >>>
2020-10-28 09:28:18 +00:00
Djordje Mijovic
28f92064b9
[Sol->Yul] Fixing ice when copying struct that contains nested array to storage
2020-10-28 09:28:40 +01:00
Djordje Mijovic
9cc37c3fa4
[SMTChecker] Fix ICE when using >>>
2020-10-28 09:25:14 +01:00
Leonardo Alt
f2f84a7f97
Format array cex
2020-10-27 16:32:43 +00:00
Leonardo Alt
446e46fe06
Use Expression instead of plain strings for counterexamples
2020-10-27 12:04:51 +00:00
Leonardo Alt
4755cfe157
Fix assignment to contract member access
2020-10-26 14:39:02 +00:00
Leonardo Alt
d3d77e482c
Fix ICE on conditions with tuples of rationals
2020-10-23 14:47:53 +01:00
Martin Blicha
ade3b9951c
[SMTChecker] Added support for selector when expression's value is known at compile time
2020-10-22 14:18:52 +02:00
Leonardo Alt
b087fa9750
[SMTChecker] Fix ICE implicit conversion string literal -> byte
2020-10-21 22:03:01 +01:00
Martin Blicha
f0d81601db
[SMTChecker] Adding division by zero checks in the CHC engine
2020-10-21 14:48:33 +02:00
chriseth
a83ad58109
Merge pull request #10081 from ethereum/maskBytes
...
Extract mask bytes function.
2020-10-21 10:09:40 +02:00
chriseth
3920f398aa
Update libsolidity/codegen/YulUtilFunctions.h
...
Co-authored-by: Harikrishnan Mulackal <webmail.hari@gmail.com>
2020-10-21 09:48:22 +02:00
chriseth
53d6721e47
Extract mask bytes function.
2020-10-20 17:36:46 +02:00
Mathias Baumann
a4dc110b38
Fix dependency tracking for abstract contracts for Yul codegen
2020-10-20 16:58:24 +02:00
Mathias Baumann
e991465336
Fix dependency tracking for abstract contracts
2020-10-20 16:58:24 +02:00
Leonardo Alt
cf35785328
Add unknown message to all verification targets
2020-10-19 20:54:13 +01:00
Leonardo Alt
b67ade5163
Move modelCheckerSettings out of settings in StandardCompiler
2020-10-19 10:39:06 +01:00
Daniel Kirchner
909ce9164a
Allow arrays of contract types as type expressions e.g. for abi.decode.
2020-10-16 19:40:41 +02:00
Daniel Kirchner
db4dd51739
Merge pull request #10055 from ethereum/userDefinedLibraryTypes
...
Disallow invalid use of library names as type names.
2020-10-16 18:55:42 +02:00
Daniel Kirchner
3f14c904b0
Disallow invalid use of library names as type names.
2020-10-16 18:25:08 +02:00
Leonardo
a097f9f124
Merge pull request #10025 from ethereum/smt_crypto_functions
...
[SMTChecker] Support crypto functions in CHC
2020-10-16 16:40:29 +01:00
Leonardo
8d7bdcaba7
Merge pull request #10036 from ethereum/smt_cli_option
...
Add CLI option to choose model checker engine
2020-10-16 16:37:33 +01:00
Martin Blicha
78c8fbc7ce
[SMTChecker] encoding division and modulo operations using slack variables
2020-10-16 16:06:31 +02:00
Leonardo Alt
4e49135318
Add CLI option to choose model checker engine
2020-10-16 15:01:47 +01:00
Leonardo Alt
54f76e081a
[SMTChecker] Support crypto functions in CHC
2020-10-16 14:57:13 +01:00
Djordje Mijovic
5f0b8dd716
[Sol->Yul] Changing yul unimplemented test as delete bytes is implemented now.
2020-10-15 22:05:40 +02:00
Djordje Mijovic
4a66723ff9
[Sol->Yul] Implementing resizing of dynamic byte arrays
...
Co-authored-by: chriseth <chris@ethereum.org>
2020-10-15 22:05:35 +02:00
chriseth
c9ed1b9ae9
Merge pull request #10047 from ethereum/removeMemoryGuards
...
Disable StackLimitEvader again until we have stronger correctness guarantees.
2020-10-15 18:56:33 +02:00
chriseth
89bdad2096
Merge pull request #10043 from ethereum/emptyArrayCopy
...
Fix empty array copy bug.
2020-10-15 17:07:54 +02:00
chriseth
38abadf502
Fix empty array copy bug.
2020-10-15 16:48:08 +02:00
Daniel Kirchner
82876fd00e
Disable StackLimitEvader again until we have stronger correctness guarantees.
2020-10-15 16:16:41 +02:00
chriseth
e17d6853a9
Merge pull request #9985 from ethereum/optimizeDeleteStructSol2Yul
...
[Sol->Yul] Optimizing delete struct.
2020-10-15 16:03:06 +02:00
Daniel Kirchner
20072918d9
Make sure lValueOfOrdinaryAssignment does not have an undefined value.
2020-10-14 21:00:18 +02:00
Djordje Mijovic
6f7947cfa5
[Sol->Yul] Optimizing delete struct.
...
Co-authored-by: Daniel Kirchner <daniel@ekpyron.org>
2020-10-14 13:35:15 +02:00
chriseth
25b10b9643
Merge pull request #10028 from ethereum/useArrayLength
...
Use array length function.
2020-10-14 13:35:09 +02:00
chriseth
92a2cddbfa
Merge pull request #10024 from ethereum/outofBoundsGetter
...
Use revert for out-of-bounds array index access in getter.
2020-10-14 12:33:41 +02:00
chriseth
a737e51533
Use array length function.
2020-10-14 12:22:34 +02:00
chriseth
56d6855222
Merge pull request #9738 from ethereum/arrayCopyingSol2Yul
...
[Sol->Yul] Implementing copying of arrays to storage
2020-10-14 12:22:09 +02:00
chriseth
8d241fece9
Merge pull request #9849 from ethereum/fixIce9817
...
Fixing ICE on returning struct with mapping from library
2020-10-14 00:05:19 +02:00
Leonardo Alt
440e5b3935
[SMTChecker] Fix counterexample state reporting
2020-10-13 22:18:43 +01:00
Djordje Mijovic
850a94bdc9
[Sol->Yul] Implementing arrays copying to storage.
...
Co-authored-by: chriseth <chris@ethereum.org>
2020-10-13 20:31:08 +02:00
Djordje Mijovic
1272c474ba
Fixing ICE when returning Struct from library
2020-10-13 20:00:11 +02:00
chriseth
5dc3a971cb
Use revert for out-of-bounds array index access in getter.
2020-10-13 18:57:41 +02:00
Leonardo Alt
aec456021d
Add tx constraints to CHC
2020-10-13 17:49:04 +01:00
Leonardo Alt
a2cdde1191
Add tx data to symbolic state
2020-10-13 17:49:04 +01:00
Leonardo
8fd6de9403
Merge pull request #10014 from ethereum/smt_fix_predicagte
...
[SMTChecker] Fix implicit constructor summary predicate
2020-10-13 14:55:52 +01:00
Mathias Baumann
32b4f18023
Print warning for unnamed return parameters and no return statement
2020-10-13 13:11:29 +02:00
Leonardo Alt
1e568d7dc6
[SMTChecker] Fix implicit constructor summary predicate
2020-10-13 09:38:58 +01:00
chriseth
abfa136afb
Merge pull request #10012 from ethereum/extractSelectorFunction
...
Extract function to compute function selector from signature.
2020-10-12 20:32:05 +02:00
chriseth
4b342a7cad
Merge pull request #9816 from ethereum/exp-base-literals
...
[Sol->Yul] Optimization for exponentiation when the base is a literal
2020-10-12 19:34:38 +02:00
Harikrishnan Mulackal
418aa01c5b
Optimization for exponentiation when the base is a literal
2020-10-12 18:54:58 +02:00
chriseth
cb0d1134b7
Extract function to compute function selector from signature.
2020-10-12 17:57:34 +02:00
Djordje Mijovic
e23d8f5593
[SMTChecker] Supporting inline arrays.
2020-10-12 16:59:14 +02:00
Kamil Śliwak
e1cc888369
Fix checkBaseABICompatibility() to make it actually check return parameters and not just ordinary parameters twice
2020-10-12 15:14:56 +02:00
Kamil Śliwak
3128e82a9a
Look for experimental pragmas in the module containing the definition when generating code for modifiers and inherited functions
2020-10-12 14:29:53 +02:00
chriseth
1a125cf755
Merge pull request #10006 from ethereum/bug-9229-fix
...
Fixes internal compiler error with an unused reference to module member.
2020-10-12 13:43:35 +02:00
Leonardo Alt
18cf01c187
Add this and state to CHC
2020-10-12 11:11:52 +01:00
Leonardo Alt
a86f656704
Refactor state as tuple
2020-10-12 11:11:52 +01:00
Christian Parpart
712d0805eb
Fixes internal compiler error with an unused reference to module member.
2020-10-12 11:56:01 +02:00
chriseth
3739b03af6
Merge pull request #9877 from a3d4/fix-homonymous-declarations-warnings
...
Fix shadowing/same-name warnings for later declarations
2020-10-08 22:27:15 +02:00
a3d4
90c8c32d86
If a declaration shadows several others, group them together
2020-10-08 21:01:25 +02:00
chriseth
ca86eacfb2
Remove traces of errors due to shifts by negative amounts.
2020-10-08 20:24:53 +02:00
a3d4
f29ebc0847
Fix shadowing/same-name warnings for later declarations
2020-10-08 20:22:04 +02:00
chriseth
2d1bd03a98
Merge pull request #9994 from ethereum/revertOnFailingReadFromCalldata
...
Revert on failing read from calldata.
2020-10-08 20:11:45 +02:00
chriseth
3970c4e57d
Merge pull request #9892 from ethereum/constantsAtFileLevel
...
Constants at file-level.
2020-10-08 19:53:33 +02:00
chriseth
8b96d17cb5
Revert on failing read from calldata.
2020-10-08 19:43:16 +02:00
chriseth
f8d5c4db36
Merge pull request #9843 from ethereum/deleteStructSol2Yul
...
[Sol->Yul] Implementing delete struct
2020-10-08 19:08:40 +02:00
chriseth
b2be8e1c0f
Fix module member access.
2020-10-08 18:56:17 +02:00
chriseth
346fe1c6c5
Constants at file-level.
2020-10-08 18:56:17 +02:00
chriseth
21dee1c8ba
Check for circular constants across contracts.
2020-10-08 18:56:17 +02:00
chriseth
2d9479b06c
Properly set scope.
2020-10-08 18:56:17 +02:00
chriseth
b5a08f8641
Merge pull request #9958 from a3d4/fix-ice-storage-parameters-in-libraries
...
Fix ICE caused by storage parameters with nested mappings in libraries
2020-10-08 17:17:09 +02:00
Djordje Mijovic
ad8d840ee7
[Sol->Yul] Implementing conversion of struct to struct pointer.
...
Co-authored-by: Daniel Kirchner <daniel@ekpyron.org>
2020-10-08 16:37:57 +02:00
Djordje Mijovic
700390a68b
[Sol->Yul] Implementing deleting storage structs
2020-10-08 15:27:33 +02:00
Djordje Mijovic
3ede1f1bca
Adding support for recursive functions in MultiUseYulFunctionCollector
2020-10-08 15:27:33 +02:00
chriseth
fd6196af16
Copying of arrays from storage to memory.
2020-10-08 15:16:13 +02:00
a3d4
d7b4b4a7aa
Fix ICE caused by storage parameters with nested mappings in libraries
2020-10-07 22:07:57 +02:00
Mathias Baumann
6114cd8e8e
Add missing annotation assignments
2020-10-07 14:52:35 +02:00
Christian Parpart
99d48348de
Eliminate dead ASTReduce.
2020-10-07 13:38:46 +02:00
Christian Parpart
04079bff6f
Eliminates dead code around GasEstimator
...
- structuralEstimation()
- breakToStatementLevel()
2020-10-07 13:31:40 +02:00
chriseth
431397eddf
Merge pull request #9943 from ethereum/array-cleanup
...
Array cleanup
2020-10-07 11:53:06 +02:00
Kamil Śliwak
33ff79bf82
Add missing checks for parameter compatibilty with ABIEncoderV1 in calls
2020-10-06 21:28:46 +02:00
chriseth
25d408058b
Merge pull request #9954 from ethereum/issue-9948
...
Remove unneeded assert
2020-10-06 16:50:14 +02:00
Harikrishnan Mulackal
1bdbc10110
Properly cleanup after copying dynamic-array to storage for packed types
2020-10-06 16:06:02 +02:00
Djordje Mijovic
818afcbec2
[Sol->Yul] Implementing push for nested storage arrays and storage arrays of structs.
2020-10-06 13:06:40 +02:00
Mathias Baumann
6af16469e7
Remove unneeded assert
...
An error will trigger later in the name resolve phase
2020-10-05 13:01:11 +02:00
Alex Beregszaszi
7417965ae3
Merge pull request #9945 from ethereum/fix-storage-typo
...
Fix typo: storage
2020-10-02 13:25:27 +01:00
Harikrishnan Mulackal
7773bb3bd0
Fix typo: storage
2020-10-02 11:44:10 +02:00
Alex Beregszaszi
fedbea46cd
[SMTChecker] Support type conversions
2020-10-02 10:26:02 +02:00
Leonardo
87e1934bee
Merge pull request #9885 from ethereum/smt_array_slices
...
[SMTChecker] Support array slices
2020-10-01 18:12:57 +02:00
chriseth
e5771efdf8
Merge pull request #9905 from ethereum/deleteArrayPackedSol2Yul
...
[Sol->Yul] Implementing deleting of storage array of types that are packed in storage
2020-10-01 16:50:57 +02:00