Commit Graph

269 Commits

Author SHA1 Message Date
Tristan Ravitch
c1d4155f3d
Merge branch 'master' into tr/block-classifier-context-type 2019-12-06 10:56:44 -08:00
Joe Hendrix
145bca4591
Add reopt dependency analysis to macaw. 2019-12-04 15:23:44 -08:00
Tristan Ravitch
5509548372 Change the BlockClassifierContext in Discovery into a datatype (from a tuple)
I'm about to add a new field, and the 7-tuple was a bit confusing.
2019-11-27 11:57:13 -08:00
Joe Hendrix
df9b5bbe27
Support for offset jump tables. 2019-11-19 14:52:58 -08:00
Tristan Ravitch
1c5abc6728 Documentation updates in macaw-base 2019-11-12 17:27:14 -08:00
Joe Hendrix
1cc36b4d0c
Propagate correct stack value after call. 2019-10-28 13:49:00 -07:00
Joe Hendrix
cf8c33398e
Additional exports; bounds pretty printing. 2019-10-28 13:47:59 -07:00
Joe Hendrix
81d0469fbe
Group mod/div x86 functions. 2019-10-21 14:59:43 -07:00
Joe Hendrix
d5a51ff9c3
Cleanups to jump bounds. 2019-10-17 23:33:57 -07:00
Joe Hendrix
26f29f3005
Generalizations to support reopt. 2019-10-16 13:57:19 -07:00
Joe Hendrix
d16f2b2ea0
Remove spurius calls to error in AbsState bvsbb. 2019-10-02 12:32:42 -07:00
Kevin Quick
4536e9d33e
[base] Fix GHC 8.4.4 haddock 2019-10-01 14:09:18 -07:00
Joe Hendrix
5e834122d1
Segment register updates; stack offset calculation. 2019-09-20 13:58:05 -07:00
Joe Hendrix
94549ef6cb
Update minor version for precondition addition. 2019-09-04 23:29:14 -07:00
Joe Hendrix
df95e65987
Various changes to support VCG.
The changes include:

  Clean up elf loading to fix a bug in rel addend parsing.

  Introduce block preconditions for populating reopt-vcg fields.

  Change load options to match reopt's interface.
2019-09-04 23:21:23 -07:00
Joe Hendrix
28e3624ca6
Bump parameterized-utils version 2019-08-30 00:02:23 -07:00
Joe Hendrix
5a8d7d5f07
Update cached fold to use CValue constructor. 2019-08-29 23:50:25 -07:00
Kevin Quick
a2af885b67
Cannot haddock tuple fields, so use pre-type haddock over entire tuple.
This is less satisfying because it separates the documentation from
the fields, but it seems to be necessary for haddock to work.
2019-08-28 10:07:13 -07:00
Kevin Quick
8f32297a35
Haddock works better with constructor pre-documentation.
I believe this is due to an ambiguity of whether the
post-documentation reference is to the previous constructor or just
the last argument of the previous constructor.  By moving the haddocks
to be a pre-doc this seems to work better.
2019-08-28 09:59:15 -07:00
Kevin Quick
bc9d5433ee
Haddock requires indentation to match the constructor argument. 2019-08-28 09:58:35 -07:00
Kevin Quick
f342c9d000
Haddock cannot document constructor fields with strictness annotations.
It also cannot handle the UNPACK pragma, which could probably be
removed since -funbox-small-strict-fields is on by default, but
haddock would still fail for the strictness annotation.

By moving the haddocks to the constructor instead of the individual
fields the strictness restriction can be avoided.
2019-08-28 09:56:01 -07:00
Joe Hendrix
433df7399e
Additional Hashable instances for Macaw/hashtable compatibility. 2019-08-27 16:40:16 -07:00
Joe Hendrix
821d434370
Add support for equalities in jump table bounds. 2019-08-27 16:39:41 -07:00
Joe Hendrix
8376ecbed6
Fix warnings. 2019-08-23 09:57:54 -07:00
Joe Hendrix
c2545b1bb1
Work-in-progres: Cleanups to discovery for jumpbounds improvements. 2019-08-23 01:11:52 -07:00
Joe Hendrix
b1c6fb8b77
Fix parameterized-utils dependency 2019-08-21 23:59:22 -07:00
Joe Hendrix
494aff6ff0
This makes a number of changes to abstract domains.
The goal is to support a jumptable testcase that is not supported by
the current jump bounds check.  The jump bounds check needs to be
augmented so that it understands equality relationships between stack
values and registers, and bounds on both.

This patch tracks when a register points to a concrete stack offset.

As part of this, we droped the AbsDomain instance for AbsBlockState.
Clients should now likely use `fnStartAbsBlockState` in lieu of `top`.

The other client visible change is that the ClassifyFailure
constructor now has an extra argument with details about why
classification failure occured.
2019-08-21 23:29:16 -07:00
Joe Hendrix
e8c4d39840
Introduce MemInt 2019-08-21 23:17:18 -07:00
Kevin Quick
84a14372cd
Fix parse error for haddock. 2019-08-12 22:11:25 -07:00
Joe Hendrix
f03fdce04b
Remove other unpack 2019-08-12 12:51:09 -07:00
Joe Hendrix
68d881c96f
Fix warnings 2019-08-12 11:44:39 -07:00
Joe Hendrix
073e774a43
Introduce CValue; clarify function arguments fields.
This introduces a new datatype CValue for representing constants
in Macaw programs, modifies the existing Value datatype to use then,
and introduces patterns for compatibility with existing datatypes.

The patch also updates the function argument analysis to use more
explicit argument passing rather than monadic updates.  The intent is
to help clarify when data is initialized rather than updated.

Finally this updates a README and does some minor updates.
2019-08-06 09:37:41 -07:00
Joe Hendrix
dfd92b047a
Add support for additional ARM relocations. 2019-08-01 09:43:36 -07:00
Joe Hendrix
a99d999fd0
Update for android compatibility 2019-07-29 11:41:50 -07:00
Joe Hendrix
bb66fd64ec
Merge branch 'master' into jhx/absstate 2019-07-12 00:31:46 +01:00
Kevin Quick
01c2d5d387
Add mhnf rewriting.
The parseFetchAndExecute in Discovery attempts to identify ParsedITE
terminal statements by examining the value of the ip_reg via
valueAsApp and pattern matching on a Mux statement.  This patch adds
specific handling in the Macaw CFG Rewriter to attempt to float Mux
statements upwards (aka "Mux Head Normal Form") so that they will be
the top-most ip_reg value and therefore be recognized as a ParsedITE
terminator.

For macaw-ppc testing of the 988KB gzip binary, this increased the
number of blocks found from 1339 to 37950 (and increased the test
runtime from 1.36s to 88.14s).
2019-07-10 23:59:11 -07:00
Joe Hendrix
a7a145be77
Fix compilation bugs in bcinc. 2019-07-03 13:50:01 -07:00
Joe Hendrix
b604cb28f1
Merge remote-tracking branch 'origin/master' into jhx/absstate 2019-07-03 13:24:46 -07:00
Joe Hendrix
52cf172c69
Minor layout/clarity updates. 2019-07-03 13:22:40 -07:00
Kevin Quick
1d03a7b3b6
[base] update ParsedIte/ParsedBranch reference in comment. 2019-07-02 11:09:16 -07:00
Joe Hendrix
f2249ffc23
Bump macaw-base version for export 2019-07-01 16:47:46 -07:00
Joe Hendrix
17c09c974f
Bump submodules; clarify stack offset abstract values 2019-07-01 16:35:47 -07:00
Joe Hendrix
cbb3814017
Fix warnings. 2019-06-13 09:33:58 -07:00
Joe Hendrix
c4870f9a37
Merge remote-tracking branch 'origin/master' into jhx/funargs 2019-06-12 15:51:55 -07:00
Joe Hendrix
dba7a2e88d
Bump submodules; version dependencies 2019-06-12 15:49:05 -07:00
Joe Hendrix
ee6f1379ae
Additional cleanup to function args; bump versions.
This also provides some exports needed by Reopt.
2019-06-12 15:26:19 -07:00
Kevin Quick
7bacee3e9d
[base] fix haddock syntax error. 2019-06-05 14:40:59 -07:00
Joe Hendrix
d3c23cbe55
Remove CPP extension 2019-06-05 15:55:29 -04:00
Joe Hendrix
ee137cccc4
Cleanup warnings. 2019-06-05 15:31:03 -04:00
Joe Hendrix
4368ed6239
Fix parameterized-utils and bump version. 2019-06-05 09:50:12 -04:00