Commit Graph

1420 Commits

Author SHA1 Message Date
Kevin Quick
ab64d4698d
[refinement] add initial refinement framework calls. 2019-01-23 10:56:53 -08:00
Kevin Quick
1d9c6d7ae0
[refinement] Add 32-bit PPC support to tests. 2019-01-23 00:02:49 -08:00
Kevin Quick
74f6b11947
[refinement] add run-refinement support for 32-bit PPC. 2019-01-22 23:58:50 -08:00
Kevin Quick
522121b7d8
Update gitignore. 2019-01-22 23:46:33 -08:00
Kevin Quick
97bc56587c
[refinement] add per-block summary output to run-refinement tool. 2019-01-22 23:38:15 -08:00
Kevin Quick
63d24be712
[refinement] add binary versions of test samples. 2019-01-22 23:36:48 -08:00
Kevin Quick
fb869eedf7
[refinement] add some test sources to the test/samples. 2019-01-22 23:35:01 -08:00
Kevin Quick
db53801493 Merge branch 'master' of github.com:GaloisInc/macaw-semmc 2019-01-22 23:18:00 -08:00
Kevin Quick
4e32007436
[ppc] Use pretty representation for IP in error messages. 2019-01-22 23:17:24 -08:00
Tristan Ravitch
b0de116aa8 Update submodules
Includes a minor breaking change from macaw
2019-01-22 21:37:39 -08:00
Kevin Quick
08d4dcd832
[refinement] Add test framework to compare output to expected output. 2019-01-22 20:04:26 -08:00
Joe Hendrix
0451046cab
Merge pull request #22 from GaloisInc/jhx/exports
Additional exports
2019-01-22 16:26:38 -05:00
Joe Hendrix
a5e3ba7247
Additional exports 2019-01-22 15:51:38 -05:00
Joe Hendrix
ed05584dcf
Merge pull request #21 from GaloisInc/jhx/block-addr-removal
block addr removal
2019-01-22 14:21:25 -05:00
Joe Hendrix
3eb92f34e1
Add x86_tests 2019-01-22 13:25:37 -05:00
Joe Hendrix
6d1cc603d0
Merge remote-tracking branch 'public/jhx/minor-additions' into jhx/block-addr-removal
Also fixes some warnings.
2019-01-22 11:32:00 -05:00
Joe Hendrix
ab066e2743
Merge remote-tracking branch 'public/master' into jhx/block-addr-removal 2019-01-22 11:12:25 -05:00
Joe Hendrix
8bf0d00e66
Fix warnings; crucible changes. 2019-01-22 10:25:45 -05:00
Joe Hendrix
23186a4991
Minor comments; fix stack.yaml 2019-01-22 05:36:17 -05:00
Joe Hendrix
0eac4d6b49
Remove blockAddr; update dependencies 2019-01-22 05:07:52 -05:00
Kevin Quick
fa891367ef Merge branch 'master' into refinement 2019-01-21 12:22:53 -08:00
Kevin Quick
7eabf2d01a
Handle additional side conditions returned by loadRawWithSideConditions. 2019-01-21 12:20:48 -08:00
Kevin Quick
f2b98011ce
Use initSimContext to create a Crucible SimContext.
This helps to immunize against changes in SimContext... e.g. the
addition on the profilingMetrics field that initSimContext provides a
default value for.
2019-01-21 12:20:00 -08:00
Nathan Collins
86ef62645d Fill in undefineds with nonsense so pretty printing works 2019-01-17 14:25:59 -08:00
Kevin Quick
82f4b15a02 Merge branch 'master' into refinement 2019-01-16 10:36:44 -08:00
Kevin Quick
190ed07121
[symbolic] add imports for mappend operator for GHC 8.2.2. 2019-01-12 18:10:16 -08:00
Kevin Quick
fb0d5c4776 Merge branch 'master' into refinement 2019-01-12 17:12:57 -08:00
Tristan Ravitch
379f89ee78 Update to the latest crucible version
The llvm memory model was extended with better diagnostics and configurable
handling of undefined behavior.  macaw-symbolic uses no undefined behavior
checking, as those operations are only undefined in C.
2019-01-11 23:01:07 -08:00
Tristan Ravitch
7b57ac0c34 Additional haddocks 2019-01-11 13:58:15 -08:00
Tristan Ravitch
bda8ace256 symbolic: Clean up the memory mapping API
The API is now cleaner and includes more documentation (with an example).  Some
unnecessary types are removed/combined.
2019-01-11 13:21:04 -08:00
Tristan Ravitch
81f8f5a849 Add an extra comment to the backend docs 2019-01-11 13:11:40 -08:00
Kevin Quick
7b50a38d30 Merge branch 'master' into refinement 2019-01-11 09:04:26 -08:00
Tristan Ravitch
fa8a9c5403 Update to the latest macaw
This includes a minor change: a new required field for the blocks returned by
the machine-specific disassembler.  The information was already readily
available in this backend.
2019-01-10 22:26:36 -08:00
Tristan Ravitch
68c5578f03 symbolic: Translate the InstructionStart metadata statement into Crucible
Before, we just discarded them during the translation.  They are useful metadata
for generating diagnostics in Crucible, so this commit translates them.  They
are no-ops during symbolic evaluation.

To make them truly useful, they need to include the address of the block that
they belong to (their data payload in macaw is just an offset from the start of
a block).  This information wasn't available before, so it has to be plumbed
through in macaw-x86.
2019-01-10 22:23:39 -08:00
Tristan Ravitch
694e463e5d symbolic: Export another useful value wrapper in the user-facing API
This is a data wrapper used to convert macaw to crucible values
2019-01-10 22:22:44 -08:00
Tristan Ravitch
cfcc1fc0d4 Update to the latest macaw-symbolic
There was some API churn, mostly a few renames and new modules.
2019-01-10 18:23:19 -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
d87482c949
Add run-refinement --unrefined flag to show pre- and post- refinement. 2019-01-10 17:25:12 -08:00
Kevin Quick
d04bdf9ac3
Add run-refinement tool for cmdline dumping of exe file info.
This tool is similar to run-refurbish but it is intended to dump
information about additional refinements provided by this library.
2019-01-10 14:53:12 -08:00
Kevin Quick
f0087c9ea2
Enable warnings for future compatibility issues. 2019-01-10 14:41:44 -08:00
Kevin Quick
8d3a333cb9 Merge branch 'master' into refinement 2019-01-10 13:56:18 -08:00
Kevin Quick
51efbf6392 Merge branch 'master' into refinement 2019-01-10 13:46:19 -08:00
Kevin Quick
98807daee2
Added -Wcompat for warnings about future compatibility. 2019-01-10 13:43:27 -08:00
Kevin Quick
b5ef20067d
Explicit results checking instead of implicit pattern monad fail. 2019-01-10 13:39:09 -08:00
Kevin Quick
16a867efd2
Haddock and README fixes. 2019-01-08 16:38:38 -08:00
Tristan Ravitch
18a53057d0 Update gitignore 2019-01-08 13:37:55 -08:00
Tristan Ravitch
7e573101b4 Finish porting macaw-ppc to use the unified PPC architecture tag 2019-01-08 13:27:40 -08:00
Tristan Ravitch
be3bc845f9 Change an 'undefined' to a more informative error 2019-01-08 11:22:55 -08:00
Tristan Ravitch
b398db41b2 Merge branch 'master' of github.com:GaloisInc/macaw into HEAD 2019-01-07 20:43:32 -08:00
Tristan Ravitch
9c19e1b37d macaw-symbolic: Export an extra constructor
This constructor is very useful for traversing terms externally
2019-01-07 20:42:52 -08:00