mirror of
https://github.com/GaloisInc/macaw.git
synced 2024-11-25 21:54:51 +03:00
1a758c70eb
This adds the necessary plumbing to simulate Macaw-lifted RISC-V binaries using `macaw-symbolic`. This proves relatively straightforward, given that RISC-V does not have a lot of special primitive functions or statements to deal with. I have also added a basic test suite to ensure that `macaw-riscv-symbolic` works on end-to-end examples. Fixes #409.
145 lines
3.6 KiB
Plaintext
145 lines
3.6 KiB
Plaintext
Cabal-version: 2.2
|
|
Name: macaw-riscv-symbolic
|
|
Version: 0.1
|
|
Author: Galois Inc.
|
|
Maintainer: rscott@galois.com
|
|
Build-type: Simple
|
|
License: BSD-3-Clause
|
|
License-file: LICENSE
|
|
Category: Language
|
|
Synopsis: A symbolic reasoning backend for RISC-V
|
|
-- Description:
|
|
extra-doc-files: README.md
|
|
|
|
common shared
|
|
-- Specifying -Wall and -Werror can cause the project to fail to build on
|
|
-- newer versions of GHC simply due to new warnings being added to -Wall. To
|
|
-- prevent this from happening we manually list which warnings should be
|
|
-- considered errors. We also list some warnings that are not in -Wall, though
|
|
-- try to avoid "opinionated" warnings (though this judgement is clearly
|
|
-- subjective).
|
|
--
|
|
-- Warnings are grouped by the GHC version that introduced them, and then
|
|
-- alphabetically.
|
|
--
|
|
-- A list of warnings and the GHC version in which they were introduced is
|
|
-- available here:
|
|
-- https://ghc.gitlab.haskell.org/ghc/doc/users_guide/using-warnings.html
|
|
|
|
-- Since GHC 8.10 or earlier:
|
|
ghc-options:
|
|
-Wall
|
|
-Werror=compat-unqualified-imports
|
|
-Werror=deferred-type-errors
|
|
-Werror=deprecated-flags
|
|
-Werror=deprecations
|
|
-Werror=deriving-defaults
|
|
-Werror=dodgy-foreign-imports
|
|
-Werror=duplicate-exports
|
|
-Werror=empty-enumerations
|
|
-Werror=identities
|
|
-Werror=inaccessible-code
|
|
-Werror=incomplete-patterns
|
|
-Werror=incomplete-record-updates
|
|
-Werror=incomplete-uni-patterns
|
|
-Werror=inline-rule-shadowing
|
|
-Werror=missed-extra-shared-lib
|
|
-Werror=missing-exported-signatures
|
|
-Werror=missing-fields
|
|
-Werror=missing-home-modules
|
|
-Werror=missing-methods
|
|
-Werror=overflowed-literals
|
|
-Werror=overlapping-patterns
|
|
-Werror=partial-fields
|
|
-Werror=partial-type-signatures
|
|
-Werror=simplifiable-class-constraints
|
|
-Werror=star-binder
|
|
-Werror=star-is-type
|
|
-Werror=tabs
|
|
-Werror=typed-holes
|
|
-Werror=unrecognised-pragmas
|
|
-Werror=unrecognised-warning-flags
|
|
-Werror=unsupported-calling-conventions
|
|
-Werror=unsupported-llvm-version
|
|
-Werror=unticked-promoted-constructors
|
|
-Werror=unused-imports
|
|
-Werror=warnings-deprecations
|
|
-Werror=wrong-do-bind
|
|
|
|
if impl(ghc >= 9.2)
|
|
ghc-options:
|
|
-Werror=ambiguous-fields
|
|
-Werror=operator-whitespace
|
|
-Werror=operator-whitespace-ext-conflict
|
|
-Werror=redundant-bang-patterns
|
|
|
|
if impl(ghc >= 9.4)
|
|
ghc-options:
|
|
-Werror=forall-identifier
|
|
-Werror=misplaced-pragmas
|
|
-Werror=redundant-strictness-flags
|
|
-Werror=type-equality-out-of-scope
|
|
-Werror=type-equality-requires-operators
|
|
|
|
ghc-prof-options: -O2 -fprof-auto-top
|
|
default-language: Haskell2010
|
|
|
|
library
|
|
import: shared
|
|
|
|
build-depends:
|
|
base >= 4.13,
|
|
containers,
|
|
crucible,
|
|
crucible-llvm,
|
|
exceptions,
|
|
grift,
|
|
lens,
|
|
macaw-base,
|
|
macaw-riscv,
|
|
macaw-symbolic,
|
|
panic,
|
|
parameterized-utils,
|
|
what4
|
|
|
|
hs-source-dirs: src
|
|
|
|
exposed-modules:
|
|
Data.Macaw.RISCV.Symbolic
|
|
other-modules:
|
|
Data.Macaw.RISCV.Symbolic.AtomWrapper
|
|
Data.Macaw.RISCV.Symbolic.Functions
|
|
Data.Macaw.RISCV.Symbolic.Panic
|
|
Data.Macaw.RISCV.Symbolic.Repeat
|
|
|
|
test-suite macaw-riscv-symbolic-tests
|
|
import: shared
|
|
|
|
type: exitcode-stdio-1.0
|
|
main-is: Main.hs
|
|
|
|
build-depends:
|
|
base >= 4,
|
|
bytestring,
|
|
containers,
|
|
crucible,
|
|
crucible-llvm,
|
|
elf-edit,
|
|
filepath,
|
|
Glob >= 0.9 && < 0.11,
|
|
grift,
|
|
lens,
|
|
macaw-base,
|
|
macaw-riscv,
|
|
macaw-riscv-symbolic,
|
|
macaw-symbolic,
|
|
parameterized-utils,
|
|
prettyprinter,
|
|
tasty,
|
|
tasty-hunit,
|
|
text,
|
|
what4,
|
|
vector
|
|
|
|
hs-source-dirs: tests
|