chriseth
2e2f819fd6
Merge pull request #3304 from leonardoalt/smt_checker
...
[SMTChecker] Keep track of current path conditions
2017-12-18 15:10:28 +01:00
Alex Beregszaszi
add4cde68c
Populate the sourceLocation field properly in standard JSON on errors
2017-12-18 12:17:51 +00:00
chriseth
e2828cfa61
Favour if over switch in ABI coder.
2017-12-15 09:47:34 +01:00
chriseth
3d1830f3f2
Merge pull request #3232 from ethereum/simplifyConstant
...
Simplify ConstantEvaluator.
2017-12-14 16:14:46 +01:00
Leonardo Alt
a1e296e392
[SMTChecker] Helper functions to add an expression to the solver conjoined with or implied by the current path conditions
2017-12-13 17:59:36 +01:00
Leonardo Alt
2af4d7c7dd
[SMTChecker] Keep track of current path conditions
2017-12-13 17:39:10 +01:00
chriseth
54b6739962
Separate expression and statement.
2017-12-13 12:28:15 +01:00
Yoichi Hirai
55e9af2f20
Merge pull request #3310 from ethereum/limitDecl
...
Limit number of secondary source locations.
2017-12-12 11:14:06 +01:00
Yoichi Hirai
14707b27e2
Merge pull request #3183 from federicobond/fix-event-parsing
...
Fix event parsing. Refs #3175
2017-12-12 11:12:18 +01:00
chriseth
e7ed9d878e
Re-use commonType
2017-12-12 10:45:40 +01:00
chriseth
48c7ba72f3
Simplify ConstantEvaluator.
2017-12-12 09:44:18 +00:00
Alex Beregszaszi
7ff9a85592
Reduce the types of errors outputted by ConstantEvaluator
2017-12-12 09:40:29 +00:00
Alex Beregszaszi
5226d54ed1
Improve error message for constant evaluator
2017-12-12 09:39:26 +00:00
chriseth
2d171c25e5
Limit number of secondary source locations.
2017-12-12 10:27:28 +01:00
chriseth
9e36c189e5
Fix struct encoding warning for libraries.
2017-12-11 02:34:42 +00:00
Alex Beregszaszi
e9d256ddf4
Suggest the experimental ABI encoder if using structs as function parameters
2017-12-11 02:34:42 +00:00
Alex Beregszaszi
793537e089
Suggest the "if" statement too instead of jumps
2017-12-05 19:27:12 +00:00
Alex Beregszaszi
bc875f6b9c
Warn for assembly labels too
2017-12-05 19:27:12 +00:00
Alex Beregszaszi
745eefa36f
Split Instruction and FunctionalInstruction in Julia
2017-12-05 14:52:11 +00:00
chriseth
b47e023df1
Merge pull request #3032 from ethereum/division
...
Division and unary operators for SMT checker
2017-12-05 13:59:01 +01:00
chriseth
240c79e614
Merge pull request #3265 from ethereum/rename_args_to_params
...
Rename arguments to parameters.
2017-12-04 06:49:44 -05:00
chriseth
43bb915454
Rename arguments to paramaters and returns to returnVariables.
2017-12-01 16:18:01 +01:00
chriseth
a256983320
Fix expression creation problems.
2017-11-30 01:20:21 +01:00
chriseth
d160ec8595
Fix signed division.
2017-11-30 01:20:21 +01:00
chriseth
19e067465a
Unary operators and division.
2017-11-30 01:20:21 +01:00
Alex Beregszaszi
9f756e3797
Include missing forward declarations in AsmDataForward
2017-11-29 21:43:44 +00:00
Alex Beregszaszi
3576ccf5b3
Simplify target selection code
2017-11-29 20:10:18 +00:00
Alex Beregszaszi
b2023196a2
Rename target selection to use the word artifact
2017-11-29 20:10:18 +00:00
Alex Beregszaszi
bbcec95bac
Add workaround for bytecode/deployedBytecode selection
2017-11-29 20:10:18 +00:00
Alex Beregszaszi
8da245cca3
Limit output according to the selected targets in StandardCompiler
2017-11-29 20:10:18 +00:00
Alex Beregszaszi
d37e6ba1c7
Add target selection helpers to StandardCompiler
2017-11-29 20:10:04 +00:00
chriseth
5a3dbb0269
Cleanup and overflow checks for data pointers.
2017-11-29 17:08:44 +01:00
chriseth
bdc1ff8ec7
ABI decoder.
2017-11-29 17:08:44 +01:00
chriseth
a1f59cbb17
Merge pull request #3220 from ethereum/IuliaIf
...
If statement for Iulia / Inline Assembly
2017-11-27 09:02:46 -05:00
chriseth
0e2a9658d2
Explain IntIntFun and merge assertion.
2017-11-23 19:02:47 +01:00
Federico Bond
14fd647b85
Fix event parsing. Refs #3175
2017-11-22 23:08:12 -03:00
chriseth
6ed4e0632f
Use if statement in abi functions.
2017-11-22 16:25:24 +01:00
chriseth
6dbc34e16e
If statement for Iulia / inline assembly.
2017-11-22 16:25:24 +01:00
chriseth
762d591a47
Introduce sorts for smt expressions.
2017-11-22 15:20:26 +01:00
chriseth
8538a25f8d
Fix problem with non-value-typed variables.
2017-11-22 02:35:34 +00:00
chriseth
19d5c42429
For loop.
2017-11-22 02:35:34 +00:00
chriseth
95a65dc04c
Fix boolean constants.
2017-11-22 02:35:34 +00:00
chriseth
22c689d516
Check for conditions being constant.
2017-11-22 02:35:34 +00:00
chriseth
e5de4a66ed
Tests.
2017-11-22 02:35:34 +00:00
chriseth
b37377641d
Track usage of variables.
2017-11-22 02:35:34 +00:00
chriseth
f62caf587e
Handle branches.
2017-11-22 02:35:34 +00:00
Alex Beregszaszi
455e51a608
Improve cyclic constant error message
2017-11-22 02:11:22 +00:00
Balajiganapathi S
d102deaec9
Detect cyclic constant definitions
2017-11-22 02:07:56 +00:00
Balajiganapathi S
165857b1d4
Allow constant integer variables as array lengths.
2017-11-22 01:41:46 +00:00
Alex Beregszaszi
8d26894841
Show checksummed address always (prepend with 0)
2017-11-17 00:46:45 +00:00
Alex Beregszaszi
1d5dd909b4
Do not try to display checksummed address for too-short/long address literals
2017-11-17 00:46:45 +00:00
wadeAlexC
8a6692b2cf
Improves address literal checksum error message
2017-11-17 00:46:44 +00:00
chriseth
0c1fc594ef
Merge pull request #3209 from ethereum/unimplemented-msgs
...
Add explanation to unimplemented assertions
2017-11-16 04:32:51 -05:00
Alex Beregszaszi
f2e9dea5e7
Merge pull request #3194 from kseo/print-using-for
...
Print using for directive in ASTPrinter
2017-11-15 17:20:49 +00:00
Alex Beregszaszi
c1e202618c
Add explanation to unimplemented assertions
2017-11-15 17:19:29 +00:00
Kwang Yul Seo
02db1ad584
Print using for directive in ASTPrinter
2017-11-16 01:36:57 +09:00
Alex Beregszaszi
08fec146ba
Merge pull request #3206 from kseo/outdated-comment
...
Update outdated comments
2017-11-15 16:35:53 +00:00
Alex Beregszaszi
ed3ce43d6d
Merge pull request #3189 from kseo/unused
...
Remove unused method
2017-11-15 16:31:22 +00:00
Kwang Yul Seo
33664c04a8
Update outdated comments
...
_errors -> _errorReporter.
2017-11-16 00:28:41 +09:00
Kwang Yul Seo
f364529713
Fix a typo
...
A semicolon was mistakenly inserted where a string concatenation
operator was meant.
2017-11-14 21:50:09 +09:00
Kwang Yul Seo
d70ff5f8c3
Remove a redundant check
...
m_type can't be FunctionType::Kind::DelegateCall.
2017-11-13 09:54:55 +09:00
Kwang Yul Seo
486647fd38
Remove unused method
...
The body of Function::functionIdentifier is missing and is not used.
2017-11-12 22:27:05 +09:00
chriseth
dc6b1f02bc
Merge pull request #3092 from rivenhk/b_2885
...
added formatting when source snippets is too long
2017-10-23 10:54:52 +02:00
chriseth
7d0e46bf59
Merge pull request #3030 from ethereum/smt-variable-types
...
SMT enforce variable types
2017-10-20 16:55:09 +02:00
Alex Beregszaszi
3a8324266f
More detailed errors for invalid array lengths (such as division by zero).
2017-10-20 11:59:18 +01:00
rivenhk
950f5ae7d7
updated formatting when source snippets is too long
2017-10-19 20:20:07 +08:00
chriseth
4e7d1440ab
Merge pull request #3101 from ethereum/compilerstack-header
...
Remove the reliance on empty contract name equals "last contract" in CompilerStack
2017-10-19 13:43:17 +02:00
chriseth
0ae4aad8f3
Merge pull request #3108 from ethereum/remove-callcode
...
Turn usage of callcode into an error as experimental 0.5.0 feature
2017-10-19 11:10:10 +02:00
Alex Beregszaszi
10677125ae
Turn usage of callcode into an error as experimental 0.5.0 feature
2017-10-19 02:20:30 +01:00
Alex Beregszaszi
8d3cfa8cff
Simplify contract lookup in CompileStack
2017-10-18 23:54:32 +01:00
Alex Beregszaszi
2ce35b77be
Implement CompilerStack.lastContractName()
2017-10-18 23:54:32 +01:00
Alex Beregszaszi
039cc25b1f
Always require a contract/sourceName in CompilerStack
2017-10-18 23:32:33 +01:00
Alex Beregszaszi
7a4c165518
Remove unused variable in Z3
2017-10-18 23:18:11 +01:00
rivenhk
d53c44a066
updating formatting when source snippets is too long
2017-10-18 22:03:33 +08:00
chriseth
e854da1a8c
Merge pull request #2925 from ethereum/tuple-value-check
...
Validate each tuple literal
2017-10-18 11:59:40 +02:00
chriseth
a3db1fc197
Do not accept truncated function selectors.
2017-10-17 23:17:36 +02:00
rivenhk
b93a5980ed
added formatting when source snippets is too long
2017-10-18 01:59:15 +08:00
chriseth
153ae98878
Catch exception in Z3.
...
Note: This exception might not be the result of resource limitation,
it might also hint towards usage error.
2017-10-17 18:30:10 +01:00
Alex Beregszaszi
a71c6faf0f
Remove duplicate >= in Z3
2017-10-17 18:30:07 +01:00
chriseth
114983e079
Missing forward declaration.
2017-10-17 18:30:04 +01:00
chriseth
1f97c1ea8f
Rename variables in SMT checker.
2017-10-17 18:29:53 +01:00
chriseth
8a8a71de84
Only check tuples for valid rational numbers if they have more than one element.
2017-10-17 19:14:49 +02:00
Alex Beregszaszi
c99d2aae04
Validate each tuple literal
2017-10-17 18:59:01 +02:00
chriseth
6001bd1406
Allocate one byte per memory byte array element instead of 32.
2017-10-16 22:29:31 +02:00
Alex Beregszaszi
372c6693ea
Improve Z3 message in cmake
2017-10-13 13:33:18 +01:00
Alex Beregszaszi
c45e55675c
Force interface functions as external (0.5.0)
2017-10-06 13:48:38 +01:00
Alex Beregszaszi
475b818801
Remove obsolete createTypeError in AST
2017-10-05 20:18:46 +01:00
Alex Beregszaszi
ed62b2583c
Use the proper error reporting interface in ConstantEvaluator
2017-10-05 20:17:54 +01:00
Alex Beregszaszi
81519845bc
Require location keyword for local variables (0.5.0)
2017-10-05 19:02:30 +01:00
chriseth
d0fa56a217
Merge pull request #2981 from ethereum/no-address-overload
...
Do not add members of address to contracts in experimental 0.5.0
2017-10-05 16:12:21 +02:00
Alex Beregszaszi
8b26d65b62
Merge pull request #3020 from ethereum/smt-functioncall
...
SMT should not crash on special function calls (typecast)
2017-10-05 14:04:16 +01:00
Alex Beregszaszi
18ae0c3d78
SMT enforce variable types
2017-10-05 12:29:20 +01:00
Alex Beregszaszi
6ba0c2bba8
Merge pull request #2982 from ethereum/encoderFixes
...
ABI encoder fixes and test.
2017-10-05 11:59:42 +01:00
Alex Beregszaszi
09276cb9d3
Do not add members of address to contracts in experimental 0.5.0
2017-10-05 11:42:34 +01:00
Alex Beregszaszi
10529e994f
SMT should not crash on typecast/structs
2017-10-05 11:41:11 +01:00
Alex Beregszaszi
880be25811
Merge pull request #3029 from ethereum/tanwisgas
...
Send all gas for 0.5.0.
2017-10-05 11:34:17 +01:00
chriseth
11c51de5b9
Merge pull request #2968 from ethereum/calldataencodedsize
...
Add some asserts about calldata encoded size.
2017-10-05 12:16:37 +02:00
chriseth
69ea5c43f3
Send all gas for 0.5.0.
2017-10-05 11:56:36 +02:00
chriseth
54cf15ac4f
Merge pull request #2901 from ethereum/compiler-names
...
Provide optional list of contract names to CompilerStack.compile
2017-10-05 11:23:46 +02:00
Alex Beregszaszi
a0394a1bfa
Restrict contracts compiled via outputSelection (but not the individual output details)
2017-10-04 20:30:14 +01:00
Alex Beregszaszi
f96e932243
Provide optional list of contract names to CompilerStack.compile
2017-10-04 20:30:14 +01:00
Federico Bond
76d3d24842
Do not consider shadowing in variable names inside event declarations
2017-10-04 13:30:26 -03:00
chriseth
19274c7890
Merge pull request #2962 from ethereum/optionalDebugInfoAsm
...
Debugging info in CompilerContext.
2017-10-04 17:01:52 +02:00
chriseth
80cefb9cc8
Rename "compacted" to "fromStack".
2017-10-04 16:56:54 +02:00
Alex Beregszaszi
66b188cce9
Merge pull request #3022 from ethereum/assert
...
Use solAssert and not assert
2017-10-04 14:11:43 +01:00
chriseth
f6fb7d96d3
Merge pull request #2990 from ethereum/someMoreSMTStuff
...
Basic SMT tests.
2017-10-04 14:56:24 +02:00
Alex Beregszaszi
a9847c9551
Use solAssert and not assert
2017-10-04 13:05:55 +01:00
chriseth
364b4dea62
Add some asserts about calldata encoded size.
2017-10-04 13:19:57 +02:00
chriseth
a5fddc9c57
Debugging info in CompilerContext.
2017-10-04 13:18:33 +02:00
wadeAlexC
73f17876e9
Better error message when using fractional number as array size expressions
2017-10-03 22:01:58 +01:00
Federico Bond
2b82352692
Disallow non-pure constant state variables in 0.5.0
2017-10-03 15:30:16 +01:00
Alex Beregszaszi
e7a1e1abe7
Merge pull request #2997 from federicobond/duplicate-events
...
Emit error when declaring event with same name and arguments twice
2017-10-02 20:21:16 +01:00
Alex Beregszaszi
8a32d7c3d7
Add helpers for isPush/isDup/isSwap
2017-10-02 10:34:54 +01:00
Federico Bond
1e7b6875b7
Extract duplicate function or event finding logic
2017-09-29 19:45:56 -03:00
Federico Bond
6d95447955
Emit error when declaring event with same name and arguments twice
2017-09-29 19:17:31 -03:00
Rhett Aultman
e434437eb7
Unary + now a synax error (experimental 0.5.0)
...
The unary + was deprecated with a warning, but will be elevated to an
error in 0.5.0. This adds the syntax error for the 0.5.0 pragma, and
for a true 0.5.0 release we should consider removing the operator from
the parser.
2017-09-29 17:50:25 +01:00
Alex Beregszaszi
b1741b7735
Validate array length in type checker
2017-09-29 16:44:00 +01:00
chriseth
5ee3ceaef7
Remove leftover couts.
2017-09-29 12:44:39 +02:00
Alex Beregszaszi
d5d1a08b09
Pull out helper to apply address member to contract members
2017-09-28 14:54:15 +01:00
Alex Beregszaszi
aa6de49457
Simplify address overloading
2017-09-28 14:53:41 +01:00
Alex Beregszaszi
7cb4d714c7
Fix overload resolution when conflict is with members of address (balance, transfer, etc)
2017-09-28 13:57:19 +01:00
Alex Beregszaszi
010189d58e
Merge pull request #2986 from ethereum/fixsourcelocationofvariabledecsatement
...
Fix source location of VariableDeclarationStatement.
2017-09-28 13:50:23 +01:00
chriseth
639b85f498
Fix source location of VariableDeclarationStatement.
2017-09-27 19:27:36 +02:00
chriseth
3ebe29a031
Better readable encoder assembly.
2017-09-27 15:59:59 +02:00
chriseth
2940964044
ABI encoder fixes and test.
2017-09-27 15:57:39 +02:00
Alex Beregszaszi
3f783c8dad
Merge pull request #2975 from ethereum/encode-memory
...
Split encodeToMemory into packedEncode and abiEncode
2017-09-27 13:04:37 +01:00
Alex Beregszaszi
204214f070
Split encodeToMemory to packedEncode and abiEncode
2017-09-27 11:32:19 +01:00
Alex Beregszaszi
0dda5eeca3
Order GlobalContext entries
2017-09-27 11:19:53 +01:00
Alex Beregszaszi
82673b7b3f
Format GlobalContext for readability
2017-09-27 11:19:53 +01:00
Alex Beregszaszi
a657d3b1a1
Make most of the parameters mandatory in encodeToMemory
2017-09-27 11:15:27 +01:00
chriseth
9c62647f19
Merge pull request #2978 from ethereum/infer-location
...
Report correct location for inferred types in packed encoding
2017-09-27 12:13:01 +02:00
Alex Beregszaszi
dcb61352f6
Report correct location for inferred types in packed encoding
2017-09-27 10:21:24 +01:00
Alex Beregszaszi
ee65ecfb3b
Ensure that address types are always declared as 160bit
2017-09-26 22:46:33 +01:00
chriseth
af4d8779bb
Merge pull request #2934 from ethereum/fallthrough
...
Remove last two instances of switch fall-through
2017-09-26 11:38:22 +02:00
Alex Beregszaszi
cb6cdfe780
Simplify switch statements by refactoring internal break statements
2017-09-25 10:57:21 +01:00
Alex Beregszaszi
74972f5fa6
Avoid switch fallthrough in ExpressionCompiler
2017-09-25 10:51:58 +01:00
Alex Beregszaszi
3e5d81578a
Avoid switch fallthrough in CompilerUtils
2017-09-25 10:51:58 +01:00
wadeAlexC
0099911ace
Better error message for unexpected trailing comma in parameter lists
2017-09-25 10:42:01 +01:00
chriseth
2530223ab5
More verbose errors for generated assembly.
2017-09-22 15:18:32 +02:00
chriseth
8af298ade3
Merge pull request #2902 from ethereum/warn-obsolete
...
Warn about obsolete sha3/suicide calls
2017-09-20 18:00:40 +02:00
Alex Beregszaszi
6948758156
Limit parser recursion depth further (needed by increased assembly data structure size)
2017-09-20 11:16:23 +02:00
Alex Beregszaszi
3b813ed295
Support multiple assignment in inline assembly
2017-09-20 11:16:23 +02:00
Alex Beregszaszi
efa4598c23
Mark functions static
2017-09-20 01:23:21 +01:00
Alex Beregszaszi
1c0c5d923a
Mark constructors explicit
2017-09-20 01:23:21 +01:00
Alex Beregszaszi
aad829948a
Ensure parameter names match between headers and implementation
2017-09-20 01:23:21 +01:00
Alex Beregszaszi
ed1fd49ab0
Warn about obsolete sha3/suicide calls
2017-09-19 11:11:19 +01:00
chriseth
ff275e369c
Allow constant byte arrays.
2017-09-18 19:49:27 +01:00
chriseth
3a9a9db6d6
Merge pull request #2910 from ethereum/fallback-restrict-external
...
Force fallback to be external (experimental 0.5.0 change)
2017-09-18 16:38:55 +02:00
Alex Beregszaszi
a3380ea8d0
Force fallback to be external (experimental 0.5.0 change)
2017-09-18 11:58:37 +01:00
chriseth
0696545808
Check for interface types of members and cache recursion check.
2017-09-16 12:31:13 +01:00