Commit Graph

23879 Commits

Author SHA1 Message Date
Martin Blicha
b9c41c21bf
Merge 475cfe2532 into 64a0f62700 2023-09-11 11:58:07 -07:00
Kamil Śliwak
64a0f62700
Merge pull request #14506 from ethereum/extracted-natspec-json-tests
Replace Boost-based Natspec test case with one derived from `SyntaxTest`
2023-09-11 19:28:31 +02:00
Kamil Śliwak
b63a94031f Generate expectations for moved Natspec syntax tests 2023-09-11 18:06:42 +02:00
Kamil Śliwak
dc68480f72 Move Natspec syntax tests to natspecJSON 2023-09-11 18:06:42 +02:00
Kamil Śliwak
d083925bed natspecJSON: Generate missing expectations (including errors) 2023-09-11 18:06:42 +02:00
Kamil Śliwak
481c7256cb natspecJSON: Include version and kind fields in expectations where missing 2023-09-11 18:06:42 +02:00
Kamil Śliwak
99bfdf930a SolidityNatspecJSON: Convert Boost-based test cases into natspectJSON/*.sol tests 2023-09-11 18:06:42 +02:00
Kamil Śliwak
ba019e5a01 SolidityNatspecJSON: Manual conversion of two test cases that would not be handled correctly by the script
- dev_multiple_params_mixed_whitespace has whitespace that is not completely preserved
- dev_explicit_inherit_complex is a multi-file test
2023-09-11 18:06:42 +02:00
Kamil Śliwak
1041f071f0 SolidityNatspecJSON: A few tweaks and small fixes before automatic conversion
- Expectation order matching the order of contracts in the source
- Typos in test names
- Redundant prefixes in test names
- Wrong 'king' in some expectations (it's not checked by the test suite)
2023-09-11 18:06:42 +02:00
Kamil Śliwak
91cc72bcd4 NatspecJSONTest based on SyntaxTest 2023-09-11 18:06:42 +02:00
r0qs
34c86d90be
Merge pull request #14556 from ethereum/homebrew-update
Upgrade homebrew packages
2023-09-11 13:34:56 +02:00
r0qs
1cb04e84d9
Upgrade homebrew packages
Co-authored-by: Kamil Śliwak <kamil.sliwak@codepoets.it>
2023-09-11 12:49:32 +02:00
Martin Blicha
475cfe2532 Ignore standard error output from solvers 2023-09-05 12:39:20 +02:00
Martin Blicha
a4b4e70b67 Get invariants from eldarica 2023-09-05 12:39:20 +02:00
Martin Blicha
d8c1a124e7 Bring back solving with temporary file for Eldarica 2023-09-05 12:39:19 +02:00
Martin Blicha
497ca183b4 Small cleanup 2023-09-05 12:39:19 +02:00
Martin Blicha
1b68b5764d SMTChecker: Ignore model checking without callback 2023-09-05 12:39:19 +02:00
Martin Blicha
b6326f4d4d Do not stop reading solver's output after it terminated 2023-09-05 12:39:19 +02:00
Martin Blicha
8e0e2cb1ae Throw when trying to read past the end of SMTLib stream 2023-09-05 12:39:19 +02:00
Martin Blicha
d3bbc51ee9 Update test after change in variable names 2023-09-05 12:39:19 +02:00
Martin Blicha
4101c67cba Update to let inlining 2023-09-05 12:39:19 +02:00
Martin Blicha
bbd7ef447f Updates to command-line tests 2023-09-05 12:39:19 +02:00
Martin Blicha
ec10f46acb Parse BMC counterexample properly 2023-09-05 12:39:19 +02:00
Martin Blicha
af1acaba64 Refactor SMTLib parser to separate file 2023-09-05 12:39:19 +02:00
Martin Blicha
3a01b432c4 Hack to get around problem in Z3 2023-09-05 12:39:19 +02:00
Martin Blicha
8c99c125c4 Add support for parsing invariants 2023-09-05 12:39:19 +02:00
Martin Blicha
b8f89fa45d SMTSolverCommand: Use pipe instead of temporary file for the query 2023-09-05 12:39:19 +02:00
Martin Blicha
3f22118bbe More checks 2023-09-05 12:39:19 +02:00
Martin Blicha
01ed412714 Stronger checks 2023-09-05 12:39:19 +02:00
Martin Blicha
0c13b7ee8f Turn asserts into solAsserts 2023-09-05 12:39:19 +02:00
Martin Blicha
83b60754a9 Update to the tests to combat nondeterminism 2023-09-05 12:39:19 +02:00
Martin Blicha
342df8a515 Ensure SMT-LIB file is complete 2023-09-05 12:39:19 +02:00
Martin Blicha
5569aaee78 Fix coding style 2023-09-05 12:39:19 +02:00
Martin Blicha
ecded11833 Tests: Disable checking CEX
In this case I observed brittle behaviour with Z3, which behaved
differently on two equivalent queries with only variables renamed.
The reason for different versions was that in isoltest, we add version
pragma to the source code and this changes the ids of AST nodes. These
are in turn used to generate uniques names for SMT variables.
2023-09-05 12:39:19 +02:00
Martin Blicha
799f418bef Make counterexample deterministic 2023-09-05 12:39:19 +02:00
Martin Blicha
4ecaa476fd Handle custom tuple sorts in a general way 2023-09-05 12:39:19 +02:00
Martin Blicha
742642ebae Use answer from second Z3 call only when solved 2023-09-05 12:39:19 +02:00
Martin Blicha
0fbeb3a69d Throw exception on unhandled cases in SMT-LIB Expression conversion 2023-09-05 12:39:19 +02:00
Martin Blicha
4b50f26834 Negative numbers do not have to be atoms 2023-09-05 12:39:19 +02:00
Martin Blicha
779db2d84f Use shared pointers, not raw pointers, for caching sorts 2023-09-05 12:39:19 +02:00
Martin Blicha
b65c37029d Fix parsing array expressions from SMT-LIB proof 2023-09-05 12:39:19 +02:00
Martin Blicha
d773e76704 Remove outdated FIXME 2023-09-05 12:39:19 +02:00
Martin Blicha
451b6f8ced Fix handling of structs in SMT-LIB CEX 2023-09-05 12:39:19 +02:00
Martin Blicha
9339b7074a Fix parsing of let expression to allow shadowing values 2023-09-05 12:39:19 +02:00
Martin Blicha
92689e4256 Fix code style problems 2023-09-05 12:39:19 +02:00
Martin Blicha
8ea8a1eb99 Cache sorts already in SMTLib2Interface
This allows us to ask for a sort of a sort from its string
representation parsed from an SMT-LIB solver response
2023-09-05 12:39:19 +02:00
Martin Blicha
6acbe2ec35 Towards translating proof from SMT-LIB response 2023-09-05 12:39:19 +02:00
Martin Blicha
479bb9c3de Fix missing std 2023-09-05 12:39:19 +02:00
Martin Blicha
2195b5e57a Solve UNSAT queries again with proof production enabled 2023-09-05 12:39:19 +02:00
Martin Blicha
c90b48af02 Update to the tests 2023-09-05 12:39:19 +02:00