Commit Graph

64 Commits

Author SHA1 Message Date
Joe Hendrix
ad6573556b Cleanups, formatting changes, and remove unused functionality. 2021-06-10 14:09:04 -07:00
Joe Hendrix
8216088158 Invariant inference changes.
This refactors demand analysis so we export assignment inferred values
and also no longer compute demands for assigments when inference
infers a value for them.

This exposes more information but requires changes to consumers of
information.
2021-05-24 14:03:24 -07:00
Joe Hendrix
e2ae54cd04 Add error messages and generalize function argument analysis. 2021-04-27 23:54:11 -07:00
Joe Hendrix
1dd776b636 Introduce incremental computation monad; use in discovery. 2021-04-21 11:27:27 -07:00
Joe Hendrix
7f32ea5b42 Vector operations; widthEqSym 2021-03-23 21:58:37 -07:00
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
Joe Hendrix
cbd16ed481 Update dwarf parsing to increase laziness and robustness. 2020-11-06 13:56:37 -08:00
Joe Hendrix
da3d43d805 Update elf-edit; export additional capabilities for Reopt.
This adds a mechanism for filtering out function addressses.  Used by
Reopt for the PLT table.
2020-11-06 13:48:26 -08: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
Joe Hendrix
46be7aa52b Implement new registerUse analysis.
The new registerUse analysis uses a three phase process:

Phase 1 computes invariants about the start state of each block.  It
will indicate when registers/stack locations store stack offsets, and
where callee saved registers are stashed.  It also memoizes
information about stack reads and writes to simplify later passes.

Phase 2 is a demand analysis that computes which registers and stack
locations must be available to execute the program.  It then
propagates those constraints across blocks in the function.

Phase 3 combines the information into a form relevant for function
recovery.
2020-02-06 19:26:46 -08:00
Joe Hendrix
9433737292 Bump macaw base version 2020-02-06 19:16:23 -08:00
Joe Hendrix
0236aa5d9a Introduce separate stack-analysis algorithm. 2020-02-06 19:16:23 -08:00
Joe Hendrix
145bca4591
Add reopt dependency analysis to macaw. 2019-12-04 15:23:44 -08:00
Joe Hendrix
cf8c33398e
Additional exports; bounds pretty printing. 2019-10-28 13:47:59 -07:00
Joe Hendrix
d5a51ff9c3
Cleanups to jump bounds. 2019-10-17 23:33:57 -07:00
Joe Hendrix
94549ef6cb
Update minor version for precondition addition. 2019-09-04 23:29:14 -07:00
Joe Hendrix
28e3624ca6
Bump parameterized-utils version 2019-08-30 00:02:23 -07:00
Joe Hendrix
821d434370
Add support for equalities in jump table bounds. 2019-08-27 16:39:41 -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
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
a99d999fd0
Update for android compatibility 2019-07-29 11:41:50 -07:00
Joe Hendrix
f2249ffc23
Bump macaw-base version for export 2019-07-01 16:47:46 -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
Joe Hendrix
4368ed6239
Fix parameterized-utils and bump version. 2019-06-05 09:50:12 -04:00
Joe Hendrix
c3f747aa86
Update dependencies/minor corrections. 2019-06-05 09:02:25 -04:00
Joe Hendrix
f0f5d0e123
Improve jump table bounds accuracy.
This adds functionality to the jump table bounds to work with trunc
that was deliberately removed in the last patch due to buggy code.
2019-05-14 21:03:08 -07:00
Joe Hendrix
0b7dae7add
Merge remote-tracking branch 'origin/jhx/no-branch' into jhx/no-branch 2019-05-14 17:48:37 -07:00
Joe Hendrix
1607e83eef
Minor refactoring; improved branch abstract state propagation.
This primarily refines the abstract state propagated to branch
pairs.  It was needed on the ARM platform to support the IT blocks
with the changes to the Core representation in macaw-base 0.3.6.

This also includes a few simplifications added and comment
improvements.
2019-05-14 17:45:30 -07:00
Joe Hendrix
ca2ca7d130
Merge remote-tracking branch 'origin/master' into jhx/no-branch 2019-05-06 10:54:35 -07:00
Joe Hendrix
56cadae3ae
Update submodules 2019-05-02 14:29:10 -07:00
Joe Hendrix
d20a3a9820
Update elf loader to use dynamic symbol table. 2019-05-02 12:36:43 -07:00
Joe Hendrix
581a01b5ef
Delete BlockLabel now that it is unused. 2019-04-29 21:57:41 -07:00
Joe Hendrix
3331a19571
Drop support for branches within blocks. 2019-04-28 13:19:20 -07:00
Joe Hendrix
89f89e9ce6
This adds a conditional memory write to macaw. 2019-04-17 11:15:12 -07:00
Joe Hendrix
62d27d629d
Update to latest elf-edit; bump other submodules. 2019-04-08 16:21:08 -07:00
Kevin Quick
98807daee2
Added -Wcompat for warnings about future compatibility. 2019-01-10 13:43:27 -08:00
Joe Hendrix
ebc5d9575e
Merge remote-tracking branch 'public/master' into jhx/plt-support 2018-12-04 08:04:32 -08:00
Joe Hendrix
a0a89083e8
Support X86 Relative; other minor changes. 2018-12-03 20:52:44 -08:00
Kevin Quick
7a64cb614f
Explicit NoStarIsType with Data.Kind.Type and increasing do indentation (for GHC 8.6) 2018-11-20 09:43:48 +00:00
Joe Hendrix
c4b7252c77
Add specialized terminal statement for PLT stubs. 2018-11-16 13:40:40 -05:00
Joe Hendrix
bb63f9f859
This fixes tail call detection, and allows architecture-specific checks. 2018-11-12 11:56:44 -05:00
Joe Hendrix
c886c19b03
Rename Memory exports.
This update renames many of the declarations exported by
Data.Macaw.Memory so that we have more consistent names.

The majority of the existing names are now exported with DEPRECATION
warnings.  Some of the symbol declarations that were not used by the
Memory datatype have been moved to other modules.

The minor version of macaw-base has been incremented.
2018-10-18 10:07:20 -07:00
Joe Hendrix
73d24d42f9
Bump elf-edit compat 2018-09-17 15:32:18 -07:00
Joe Hendrix
e180b996ce
Merge branch 'master' of github.com:GaloisInc/macaw 2018-09-10 15:34:14 -07:00
Joe Hendrix
4104191b54
Fix relocation handling; update for elf-edit/binary-symbols changes. 2018-09-10 15:33:35 -07:00
Andrei Stefanescu
0314c12908 Add float type to Macaw. 2018-08-27 11:37:01 -07:00
Joe Hendrix
230b318dcf
Updates to discovery 2018-08-14 23:29:02 -07:00