Commit Graph

97 Commits

Author SHA1 Message Date
Brian Huffman
2a620d41de Switch from ansi-wl-pprint to the prettyprinter package.
This patch relies on the following submodule updates:
- GaloisInc/what4#77
- GaloisInc/elf-edit#20
- GaloisInc/crucible#586
- GaloisInc/asl-translator#28

This patch updates the following packages:
- macaw-base
- macaw-symbolic
- macaw-x86
- macaw-x86-symbolic
- macaw-aarch32
- macaw-ppc
- macaw-semmc
- macaw-refinement
2020-12-02 11:38:19 -08:00
Joe Hendrix
5aad8ca32e Upgrade to elf-edit 0.39 and other libraries. 2020-11-10 17:15:47 -08:00
Rob Dockins
99f8cb0bdf Update to use new HasLLVMAnn API, which requires an action for
recording (or discarding) annotations rather than a map.
2020-09-11 14:40:02 -07:00
Kevin Quick
fc419e4c18
[refinement] update for badBehaviorMap implicit parameter. 2020-08-10 13:47:44 -07:00
Kevin Quick
f695c4d4c1
[macaw-refinement] updates for app-refactor what4 changes. 2020-07-17 17:30:44 -07:00
Ben Selfridge
039b8497fc
updates what4, crucible, etc. (#146)
* update to bv-sized branch of what4 and other things

* removed parameterized-utils submodule completely

* Updates submodules

* Fixes macaw-symbolic w.r.t. crucible-llvm changes

Co-authored-by: Ben Selfridge <ben@000548-benselfridge.local>
2020-06-16 16:49:55 -07:00
Kevin Quick
0f430d1b38
Update dependencies for GHC 8.4 support. 2020-05-21 23:42:41 -07:00
Daniel Wagner
4ffec20d0a complete the merge 2020-04-03 22:49:34 -04:00
Daniel Wagner
d39ad7a024 Merge branch 'master' into wip/equiv 2020-04-03 00:20:53 -04:00
Andrei Stefanescu
0be59e5815
Update Macaw to use HasLLVMAnn. (#122) 2020-04-02 17:58:47 -07:00
Tristan Ravitch
e024646860
macaw-refinement (#114)
This commit updates macaw-refinement to work with the latest macaw/crucible and makes a few improvements along the way.

The major changes involved in this are:
* Block labels were removed from macaw, so we had to come up with an alternative approach to making synthetic blocks to represent dispatch resolved by macaw-refinement that is not really a jump table. We considered adding a new terminator that encoded "computed IP-based dispatch", but there was concern about the impact on client code. Instead, we added a field to the `DiscoveryFunInfo` that records "external" resolutions to indirect control flow (e.g., as by an SMT solver in macaw-refinement). The hook by which we feed SMT-based resolutions back into macaw was modified accordingly (`addDiscoveredFunctionBlockTargets`).
* Solver invocation changed to allow solver selection and parallel solver application.
* Logging is now done via the `lumberjack` library.
* macaw-symbolic now uses the "external" resolutions in `DiscoveryFunInfo` while building crucible CFGs.
* The path creation code in macaw-refinement was simplified significantly and the approach to path creation has been documented.
* The run-refinement tool is now more featureful.
* The test suite is a bit more structured and no longer depends on the printed output of the discovery process.
2020-03-12 17:15:08 -07:00
Daniel Wagner
10a1fbc24a misc. build fixes 2019-10-17 16:38:16 -04:00
Kevin Quick
898e7bdb95
[refinement] Added newline to end of expected output file. 2019-02-26 14:51:49 -08:00
Kevin Quick
3fe6fdf949
Sort refinement results for test stability and visual convenience. 2019-02-23 21:33:40 -08:00
Kevin Quick
3e7bd01560
[refinement] Disabled PPC switching test.
Attempting to refine the switching test for PPC executables ends up
with a non-terminating Z3 process, so this test is disabled until this
is diagnosed.
2019-02-08 17:32:21 -08:00
Kevin Quick
edb486c6b3
Added toCrucibleEndian in symbolic and use for memory setup in refinement.
Requires updated macaw-loader BinaryFormat information.
2019-02-08 17:30:18 -08:00
Kevin Quick
d3228847f7
[refinement] add PPC tests expected results. 2019-02-08 14:26:17 -08:00
Kevin Quick
6cb0868d1b
[refinement] import cleanup 2019-02-08 14:20:29 -08:00
Kevin Quick
290e33279a
[refinement] Enable PPC testing. 2019-02-08 14:10:08 -08:00
Kevin Quick
3eeaed08a2 Merge branch 'master' of github.com:GaloisInc/macaw 2019-02-08 08:30:26 -08:00
Andrei Stefanescu
c67e474a19 [refinement] Move symbolic execution code in its own module. 2019-02-07 19:43:58 -08:00
Andrei Stefanescu
5b93187d5b [refinement] Update .cabal file. 2019-02-07 17:25:52 -08:00
Andrei Stefanescu
45e4251bf3 [refinement] Add an unbounded memory allocation at the bottom of the allocation stack. 2019-02-07 17:23:02 -08:00
Kevin Quick
33540121f5 Merge branch 'master' of github.com:GaloisInc/macaw 2019-02-07 17:15:24 -08:00
Kevin Quick
3baf55376b
[refinement] update run-refinement for summary and verbose modes. 2019-02-07 17:15:00 -08:00
Andrei Stefanescu
ec9acfc1e1 [refinement] Add llvm compiled ppc64 binary files. 2019-02-07 17:00:10 -08:00
Kevin Quick
e47887a9f1
[refinement] add note to sample input for refinement tests. 2019-02-07 16:43:11 -08:00
Kevin Quick
3c6492b6fb
[refinement] add additional comment and showsearch info to RefinementTests. 2019-02-07 16:41:34 -08:00
Andrei Stefanescu
9121f0a439 [refinement] Add llvm compiled binary files. 2019-02-07 16:20:24 -08:00
Kevin Quick
59b55dd10a
[refinement] Update README for tests/samples. 2019-02-07 16:15:49 -08:00
Kevin Quick
35ff0c18ab
[refinement] Added nested switch/case test source. 2019-02-07 16:14:12 -08:00
Kevin Quick
7bb72b4b19
[refinement] Update expected refined test results for switching.x86.
The tests/samples/switching.c example now gets refined successfully so
this updates the expected file for that output.
2019-02-07 16:09:23 -08:00
Kevin Quick
2454ee25fc
[refinement] Track all solutions and ensure latest function is analyzed.
For each discovered transfer refinement, the Discovery process must be
re-started from scratch for the particular target function in
question.  The implication is that subsequent refinements for the same
nominal function must use the newer version, and that all previous
refinements must be re-applied each time the function Discovery
process is repeated.

These changes ensure that both of these occur during the refinement
iterations.
2019-02-07 15:54:39 -08:00
Andrei Stefanescu
0d66b159e1 [refinement] Map model pointers back to addresses. 2019-02-07 01:09:59 -08:00
Andrei Stefanescu
cca17b1c39 [refinement] Handle a code address as an LLVM pointer. 2019-02-06 20:13:47 -08:00
Kevin Quick
2fadfcc05a
[refinement] Update run-refinement for Refinement use of loaded elf info. 2019-02-06 20:10:11 -08:00
Kevin Quick
13224a91ce
[refinement] updates for merge of Some removal and updateDiscovery. 2019-02-06 17:58:21 -08:00
Kevin Quick
36a8be1c4e
Merge branch 'refinement' of github.com:GaloisInc/macaw into refinement 2019-02-06 17:51:21 -08:00
Kevin Quick
eb3bc794c1
[refinement] Add ability to updateDiscovery for new targets.
After the SMT evaluation has identified possible targets for a
previously unknown transfer TermStmt, the updateDiscovery will update
the DiscoveryState (using a locally-supplied TermStmt rewriter) to
resolve the transfer targets.
2019-02-06 17:47:18 -08:00
Andrei Stefanescu
72c54dcf15 [refinement] Remove traceM statement. 2019-02-05 21:31:13 -08:00
Andrei Stefanescu
3aae34297f [refinement][first version] Get successor candidates for classification failure blocks. 2019-02-05 21:08:13 -08:00
Andrei Stefanescu
f22a33aefe [refinement] Refine one function at a time. 2019-02-01 16:29:13 -08:00
Kevin Quick
beb0f95c0b
[refinement] Provide list of forward path blocks to smt solving.
Currently smt solving just uses the first block of the first path,
which is not correct, but the framework for providing the list of
paths is now present.
2019-02-01 00:17:03 -08:00
Kevin Quick
2cbccd768c Merge branch 'refinement' of github.com:GaloisInc/macaw into refinement 2019-01-31 22:29:59 -08:00
Kevin Quick
f282ac6913
[refinement] remove uneeded case catchall. 2019-01-31 22:29:31 -08:00
Kevin Quick
f60b39162c
[refinement] whitespace formatting. 2019-01-31 22:29:14 -08:00
Kevin Quick
243f70c9e6
[refinement] explicitly import Prelude last to avoid unneeded import errs. 2019-01-31 22:27:59 -08:00
Andrei Stefanescu
1e2e9aaee0 [refinement] Use mkBlockPathCFG. 2019-01-31 21:50:38 -08:00
Kevin Quick
5c2e0edeaa
[refinement] implement getBlock block lookup function. 2019-01-31 17:44:43 -08:00
Kevin Quick
bd0e57cfc1
[refinement] Invoke SMT solution at path-focused framework location.
The previous implementation invoked the SMT solver at the top level
for prototyping.  This version moves the SMT solver invocation to the
intended location in the algorithm where the path is successively
extended and solutions are compared to identify the "best" refinement
solution.
2019-01-31 17:10:48 -08:00