Commit Graph

1221 Commits

Author SHA1 Message Date
Ryan Scott
038e948817
Merge pull request #274 from GaloisInc/prepare-1.6.2-release
Prepare 1.6.2 release
2024-09-23 10:06:00 -04:00
Ryan Scott
eebba792e6 Bump what4 development version to 1.6.2.0.99 2024-09-23 08:27:54 -04:00
Ryan Scott
5a0932abed Bump what4 release version to 1.6.2 2024-09-23 08:27:50 -04:00
Ryan Scott
3be7ed5651 CHANGES.md: Mention #273 2024-09-23 08:25:54 -04:00
Ryan Scott
0e226ba7f8
Merge pull request #273 from GaloisInc/T272-ghc-9.10
Support building with GHC 9.10
2024-09-23 07:42:21 -04:00
Kevin Quick
ad0b318358 Add pkg-config binary to nix shell in CI 2024-09-20 16:53:03 -04:00
Kevin Quick
0ae1f2fec3 Ensure pkg-config can find the nix-supplied zlib package 2024-09-20 16:53:03 -04:00
Kevin Quick
c269a192fb Bump cache version and show cabal project configuration during CI 2024-09-20 16:53:03 -04:00
Ryan Scott
351eacb921 CI: Consistently use GHC_NIXPKGS version
This ensures that the `zlib` version is consistent with the rest of the
packages offered by `nixpkgs`.
2024-09-20 16:53:03 -04:00
Ryan Scott
029ee2fddd CI: Test GHC 9.10.1 2024-09-19 10:45:35 -04:00
Ryan Scott
47981eb84c GHC 9.10: Fix -Wunused-imports warnings caused by Prelude.foldl' 2024-09-19 10:42:48 -04:00
Ryan Scott
dbd8304360 Word16String: Avoid conflicting with Prelude.foldl'
`base-4.20` (GHC 9.10) re-exports `foldl'` from the `Prelude`, which conflicts
with the `foldl'` function defined in `What4.Utils.Word16String`. To avoid
conflicts, we re-export `What4.Utils.Word16String.foldl'` using a qualified
export, which avoids warnings in a backwards-compatible fashion.

Fixes #272.
2024-09-19 10:41:31 -04:00
Ryan Scott
bf8938bc30 Bump upper version bounds to allow base-4.20
Bump the upper version bounds on `base` in the various `what4` packages, and
bump the `aig` submodule to bring in the changes from
https://github.com/GaloisInc/aig/pull/18.
2024-09-19 10:40:12 -04:00
Ryan Scott
cb3dddd679 Fix two stray -Wunused-imports warnings 2024-09-19 10:40:12 -04:00
Ryan Scott
9b34eff3d5 Whitespace only 2024-09-17 11:26:22 -04:00
Ryan Scott
385da96d77
Merge pull request #270 from GaloisInc/update-tested-with
Update `tested-with` versions
2024-09-04 13:48:05 -04:00
Ryan Scott
530c3f5c68 what4.cabal: Updated tested-with versions 2024-09-03 11:25:38 -04:00
Ryan Scott
23e89e2b3b CI: Remove untested GHC version from test.yml 2024-09-03 11:24:28 -04:00
Ryan Scott
94613390a1
Merge pull request #269 from GaloisInc/new-release-for-crucible-1246
1.6.1 release prep
2024-09-03 10:51:02 -04:00
Ryan Scott
d966e4b2fe Bump what4 development version to 1.6.1.0.99 2024-09-03 10:17:39 -04:00
Ryan Scott
0cdce4130e Bump what4 release version to 1.6.1 2024-09-03 10:17:12 -04:00
Ryan Scott
37a1adeb8c CHANGES.md: Mention #268 2024-09-03 10:16:04 -04:00
Ryan Scott
d0acbd90fc CHANGES.md: Mention #265 2024-09-03 10:16:04 -04:00
Langston Barrett
494ac6416e
Inject ground values back into symbolic expressions (#268) 2024-06-07 10:02:01 -04:00
Ryan Scott
85e68eba85 CI: Use CVC5 1.1.2
CVC5 1.0.2 appears to suffer from a bug that causes it to hang when run on the
`expr-builder-smtlib2` test suite. Let's upgrade to a more recent version that
does not suffer from this bug.
2024-06-03 12:08:08 -04:00
Ryan Scott
bcbfd9d3eb CVC5: Don't use Tuple workaround when declaring structs
Due to a bug in CVC4 (https://github.com/cvc5/cvc5/issues/3402), the What4
bindings to CVC4 avoid user-defined datatypes and instead use CVC4's built-in
`Tuple` datatype. This same `Tuple` workaround was applied to the CVC5 bindings
(added in #204), but they don't really work properly, as CVC4 and CVC5 use
completely different syntaxes for tuples. See #265.

We could attempt to update the CVC5 bindings to use the modern tuple syntax,
but this is somewhat non-trivial, as the syntax for 1-tuples changed in
`cvc5-1.0.9` from `Tuple` to `UnitTuple` (see
https://github.com/cvc5/cvc5/pull/10012). As such, we would have to generate
different code for different versions of CVC5, which would be unpleasant.

Thankfully, we need not worry about tuples at all when it comes to CVC5. This
is because the original CVC4 issue (https://github.com/cvc5/cvc5/issues/3402)
does not affect CVC5. As such, we can drop the tuple workaround entirely and
just generate user-defined datatypes to represent What4 structs, exactly like
the other solver bindings do. This means that we can fix #265 by simply
deleting code, which is nice.

This is regression-tested as part of the `expr-builder-smtlib2` test suite
(which includes several tuple-related tests), after a previous commit made it
so that the tests are run with both CVC4 and CVC5.

Fixes #265.
2024-06-03 12:08:08 -04:00
Ryan Scott
e5712726ff expr-builder-smtlib2: Actually run tests with CVC5
Due to a silly oversight, we weren't actually running the
`expr-builder-smtlib2` tests on CVC4. Instead, we were simply defining `let
cvc5Tests = cvc4Tests`, which meant that running `cvc5Tests` would simply
re-run the CVC4 tests.

This patch tweaks the tests to _actually_ run the tests separately with CVC5.
Doing so reveals some test failures with CVC5 specifically, all of which are
caused by the bug described in #265. I will fix this bug in a follow-up commit.
2024-06-03 12:08:08 -04:00
Ryan Scott
fcb0e38f1f expr-builder-smtlib2: Fix shadowed name warning 2024-06-03 12:08:08 -04:00
Ryan Scott
60cb3b8efe
Merge pull request #263 from GaloisInc/1.6
1.6 release prep
2024-05-15 11:26:21 -04:00
Ryan Scott
09e2a8a84d Bump what4 development version to 1.6.0.0.99 2024-05-15 10:12:17 -04:00
Ryan Scott
9324120977 Bump what4 release version to 1.6 2024-05-15 10:12:17 -04:00
Ryan Scott
e97989c069 CHANGES.md: Mention #258 2024-05-15 10:09:09 -04:00
Ryan Scott
97643c4a86 CHANGES.md: Mention #250 2024-05-15 10:06:34 -04:00
Ryan Scott
6c7a676a1d CHANGES.md: Mention #255 2024-05-15 09:59:43 -04:00
Ryan Scott
eb19778cf9 CHANGES.md: Mention #245 2024-05-15 09:59:10 -04:00
Ryan Scott
8c9401b5d2
Merge pull request #256 from GaloisInc/push-mux-ops-setting
Guard mux-pushing simplifications behind option
2024-05-14 10:05:59 -04:00
Ryan Scott
fa36855a8c Review comments 2024-05-14 06:52:06 -04:00
Ryan Scott
512eca6637 Document pushMuxOps in Haddocks and CHANGELOG 2024-05-13 16:41:55 -04:00
Ryan Scott
7c90b6a36b Merge branch 'master' into push-mux-ops-setting 2024-05-13 16:36:43 -04:00
Langston Barrett
30309b5d86
Add bv{Zero,One} helpers, hlint config (#258)
Fixes #257. The HLint configuration only checks that these helpers are
used where appropriate. I used it to find places where they would be
useful. It may also serve as a template for downstream repos. I added
HLint checking to CI as well.
2024-04-03 15:02:40 -04:00
Ryan Scott
c011f5b9fd
Merge pull request #255 from GaloisInc/ghc-9.8
Allow building with GHC 9.8
2024-03-04 15:08:03 -05:00
Ryan Scott
33f95836cd Refactor code to avoid needing unsnoc
The previous code, defined in terms of `unsnoc`, required multiple `panic`
cases, which was somewhat unsightly. This new implementation is functionally
equivalent, does not require any `panic` fall-through cases, and is much nicer
to look at.
2024-03-04 13:56:22 -05:00
Ryan Scott
11309c4843 Comment the length operands > 2 case 2024-03-04 12:46:51 -05:00
Ryan Scott
4a25bc2332 CI: Test GHC 9.8.1 2024-03-04 09:38:02 -05:00
Ryan Scott
86bbf67fb3 Allow building with GHC 9.8
This patch contains a variety of fixes needed to build the libraries in the
what4 repo with GHC 9.8:

* Bump the upper version bounds on `base` and `text` to allow building with the
  versions that are bundled with GHC 9.8 (`base-4.19.*` and `text-2.1.*`,
  respectively).
* Replace uses of `head` and `tail` (which trigger `-Wx-partial` warnings with
  GHC 9.8) with total functions or `panic`s, depending on what is appropriate.
* Bump the `aig` submodule to bring in the changes from GaloisInc/aig#16 and
  GaloisInc/aig#17.
2024-03-04 09:37:43 -05:00
Ryan Scott
72dd5ff574 Guard mux-pushing simplifications behind option 2024-03-01 11:16:40 -05:00
Ryan Scott
f1317962f6 Remove redundant import 2024-03-01 10:11:19 -05:00
Vekhir
735bac81af Bump text dependency
Builds fine
2024-02-01 11:17:18 -05:00
Andrei Stefanescu
670c8aca55
BV <> LIA translation for CHC solvers (#250)
* Fix SMTWriter fn name lookup.

* Add Pred and SymFn transformer.

* Translate Z3 CHC from bitvectors to integers.

* Always unfold functions to enable translation to saw core.

* Parse SMTLib extract and associative operators.

* Support bvlshr, bvudiv, bvurem in transformExprBV2LIA.

* More constant expression simplifications.

* More simplifications.

* Remove arrayIte concrete updates extraction.

* Address comments.
2024-01-18 19:54:05 -08:00
Andrei Stefanescu
d3b5907d78
More simplifications (#252)
* More constant expression simplifications.

* More simplifications.

* Remove arrayIte concrete updates extraction.
2024-01-17 21:07:15 -08:00