Commit Graph

96 Commits

Author SHA1 Message Date
Tristan Ravitch
6b490a8193 Update the crucible submodule
The only real code change required is that simulation failure messages have an
extra argument.  The goal with this update is to pull in some fixes to the
solver feature detection for yices in the latest crucible.
2019-12-19 15:03:09 -08:00
Andrew Kent
587aa7ea6b
Update crux/crucible code to use float mode reprs; bump submodules 2019-11-05 15:23:51 -08:00
Joe Hendrix
4369c712ba
Fix macaw-x86-symbolic errors. 2019-10-22 08:28:16 -07:00
Joe Hendrix
7d7ec5ff01
Fix style; add comments 2019-10-22 08:07:50 -07:00
Joe Hendrix
1596e9ca19
Update macaw-x86-symbolic for divmod changes. 2019-10-21 20:24:35 -07:00
Joe Hendrix
744424d28b
Remove unused X86PrimLoc. 2019-09-20 15:19:37 -07:00
Joe Hendrix
8a0510572c
Add GetSegmentSelector placeholder for macaw-x86-symbolic 2019-09-20 14:43:57 -07:00
Joe Hendrix
5e834122d1
Segment register updates; stack offset calculation. 2019-09-20 13:58:05 -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
Tristan Ravitch
0c3ea57a62 Update the macaw-x86-symbolic tests 2019-08-09 10:56:50 -07:00
Kevin Quick
40eff5802c
[x86_symbolic] updates for crucible nonce change from (ST h) to IO
Changes for compatibility with Crucible pull request
285 (https://github.com/GaloisInc/crucible/pull/285) and the
corresponding changes in macaw symbolic.
2019-07-19 13:15:44 -07:00
Joe Hendrix
4267dca987
Get x86_symbolic test cases in runable state. 2019-03-25 20:29:35 -07:00
Joe Hendrix
e204724358
Merge pull request #27 from GaloisInc/jhx/vec
Add vector type and operations.
2019-02-27 08:57:50 -08:00
Joe Hendrix
89ffdf088a
Fix macaw-x86-symbolic and update crucible. 2019-02-27 01:43:53 -08:00
Joe Hendrix
e8d2efcaae
Implement bitcast changes to macaw-symbolic 2019-02-26 17:53:34 -08:00
Kevin Quick
70657ee811
[x86_symbolic] Use stable value for generating x86 register name.
Relying on the underlying Show instance representation for the
register name is more brittle, especially if the Show becomes a
structural representation (e.g. "X86_GP 14") that introduces spaces
and other elements that can cause problems.  Generate the register
name in a more reliable manner for the symbolic variable use case
here.
2019-02-23 21:52:36 -08:00
Joe Hendrix
3b7e12de16
Update to fix build process. 2019-02-15 00:28:35 -08:00
Andrei Stefanescu
f7f7b6cac3 Merge branch 'master' into refinement 2019-02-04 15:39:19 -08:00
Andrei Stefanescu
2620993d3c Add register lookup and update functions in X86 ArchVals. 2019-01-29 01:22:27 -08:00
Luke Maurer
5a8fba6d08 Cache TypeRepr and Position values
Generating the type of the register structure on demand was causing
`TypeRepr` to be the biggest chunk of the heap.  Similarly, we only need
to create a new `Position` when we change the offset.
2019-01-28 14:47:06 -08:00
Tristan Ravitch
cc85cfe657 Clean up and document the macaw-symbolic API
This cleanup consolidates the interface to macaw symbolic into two (and a half)
modules:

 - Data.Macaw.Symbolic for clients who just need to symbolically simulate
   machine code
 - Data.Macaw.Symbolic.Backend for clients that need to implement new
   architectures
 - Data.Macaw.Symbolic.Memory provides a reusable example implementation of
   machine pointer to LLVM memory model pointer mapping

Most functions are now documented and are grouped by use case.  There are two
worked (compiling) examples in the haddocks that show how to translate Macaw
into Crucible and then symbolically simulate the results (including setting up
all aspects of Crucible).  The examples are included in the symbolic/examples
directory and can be loaded with GHCi to type check them.

The Data.Macaw.Symbolic.Memory module still needs a worked example.

There were very few changes to actual code as part of this overhaul, but there
are a few places where complicated functions were hidden behind newtypes, as
users never need to construct the values themselves (e.g., MacawArchEvalFn and
MacawSymbolicArchFunctions).  There was also a slight consolidation of
constraint synonyms to reduce duplication.  All callers will have to be updated.

There is also now a README for macaw-symbolic that explains its purpose and
includes pointers to the new haddocks.

This commit also fixes up the (minor) breakage in the macaw-x86-symbolic
implementation from the API changes.
2019-01-10 18:20:54 -08:00
Kevin Quick
98807daee2
Added -Wcompat for warnings about future compatibility. 2019-01-10 13:43:27 -08:00
Luke Maurer
46cdd8be82 Adapt to Nonce-based registerized CFGs 2019-01-03 12:10:24 -08:00
Andrei Stefanescu
3f39c614e9 Add support for RepMovs and RepStos. 2018-11-27 02:23:36 -08:00
Kevin Quick
3c7e222676
Add missing import for previous change. 2018-11-26 11:26:01 -08:00
Kevin Quick
b92f008676
Merge branch 'master' of github.com:GaloisInc/macaw 2018-11-25 23:53:28 -08:00
Kevin Quick
3f8769a424
[x86_symbolic] add semantics for X86Div, X86Rem, X86IDiv, and X86IRem. 2018-11-25 22:02:18 -08:00
Kevin Quick
01b8175e7f
[x86_symbolic] Update cabal specification for compliance. 2018-11-25 22:01:40 -08:00
Kevin Quick
0ee3f7df2d
[x86_symbolic] more info for unimplemented statement and termstmt semantics. 2018-11-25 22:00:19 -08:00
Kevin Quick
3f77e763e9
Implement NoStarIsType for GHC 8.6. 2018-11-21 18:27:42 +00:00
Kevin Quick
6212a69233
[x86] Add semantics for sqrtss and sqrtsd. 2018-10-31 11:46:01 -07:00
Tristan Ravitch
563547fee5 Add semantics for minss, maxss, minsp, and maxsp (x86) 2018-10-23 15:18:40 -07:00
Andrei Stefanescu
59b756c185 Add symbolic semantics for X86 sse_ucomis and sse_cvttsx2si. 2018-09-19 18:47:47 -07:00
Andrei Stefanescu
c5f0806751 Add symbolic semantics to X86 SSE floats. 2018-09-18 22:07:17 -07:00
Brian Huffman
a3d7376179 Adapt to changed crucible-llvm exports. 2018-08-27 16:16:32 -07:00
Brian Huffman
c29d4c924a Merge branch 'master' into saw-script 2018-08-27 10:27:00 -07:00
Kevin Quick
5f4ca911e0
Update for interleave and Endian from Data.Parameterized. 2018-08-25 16:18:57 -07:00
Brian Huffman
a33202b583 Adapt to changes in crucible-llvm package. 2018-08-20 16:38:20 -07:00
Joe Hendrix
3ec8a34893
Fix Crucible symbol name error. 2018-07-21 14:14:42 -07:00
Joe Hendrix
564c94a744
Fix missing case. 2018-07-21 14:14:31 -07:00
Joe Hendrix
dc4a4f0f5f
Merge remote-tracking branch 'public/stable' into jhx-x86-improvements 2018-07-20 20:32:09 -07:00
Rob Dockins
f14222e4a4 Update to track crucible API changes 2018-07-20 18:41:54 -07:00
Joe Hendrix
2184fab0bc
Update macaw-symbol tests so they at least compile. 2018-07-20 10:07:49 -07:00
Joe Hendrix
494f6c176d
Updates to Macaw. 2018-06-06 11:48:45 -07:00
Rob Dockins
f74d999896 Bump crucible submodule again 2018-05-17 14:06:24 -07:00
Rob Dockins
c382b59bed Bump crucible submodule to pull in crucible/what4 split refactor,
and update macaw-symbolic and macax-x86-symbolic.
2018-05-15 15:58:14 -07:00
Tristan Ravitch
aee0e1dee6 x86-symbolic: Translate statements and terminators into crucible
Note: the interpretations for symbolic execution are *not* implemented yet
2018-05-10 07:58:29 -04:00
Rob Dockins
643989f4b6 Update Macaw libraries for recent Crucible changes 2018-05-02 17:21:26 -07:00
Joe Hendrix
9047cb41fb
Fix warnings in macaw-base; Fix errors in macaw-symbolic.
This also makes some changes to eliminate a couple redundent
type-class constraints in CrucGen.hs which propagated to other changes.
2018-04-24 01:17:03 -07:00
Joe Hendrix
265f61e206
Merge branch 'master' of github.com:GaloisInc/macaw 2018-03-29 16:30:29 -07:00