Commit Graph

2256 Commits

Author SHA1 Message Date
Rob Dockins
d816d8820a Tweak the test suite. Apparently echo works differently on Windows 2020-05-27 13:50:00 -07:00
Rob Dockins
e5d60efeec Merge remote-tracking branch 'origin/master' into split-arith 2020-05-27 12:56:29 -07:00
Rob Dockins
12814bd688 Update reference interpreter to match changes in the split-arith branch. 2020-05-27 12:53:30 -07:00
brianhuffman
63bfdb2c06
Merge pull request #720 from GaloisInc/fromInteger
Avoid using `fromInteger`.
2020-05-27 10:56:28 -07:00
Jared Weakly
ebca4d7329
Merge pull request #741 from GaloisInc/serialize-windows-builds
Serialize nightly windows builds
2020-05-27 10:37:58 -07:00
Jared Weakly
221e411b68 Serialize nightly windows builds 2020-05-27 10:26:44 -07:00
Rob Dockins
066cbd492e Post-merge test suite fixups 2020-05-26 17:45:42 -07:00
Rob Dockins
23f22bbab7 Treat the Unsupported exception in the same way as the EvalErr
exception in the REPL.
2020-05-26 17:38:58 -07:00
Rob Dockins
bbba626052 Merge remote-tracking branch 'origin/master' into split-arith 2020-05-26 17:37:00 -07:00
Rob Dockins
da83c813b2 Additional code comments 2020-05-26 17:08:20 -07:00
Rob Dockins
c1b641c420 Add a test case for issue725 2020-05-26 17:08:20 -07:00
Rob Dockins
06584f4d10 Refactor and comment the Cryptol.Symbolic.SBV module 2020-05-26 17:08:20 -07:00
Rob Dockins
aaf78e23ec Add a bit more output for the Satisfiable/Counterexample cases 2020-05-26 17:08:20 -07:00
Rob Dockins
1b584d9567 typo 2020-05-26 17:08:20 -07:00
Rob Dockins
60dcbd1d40 Make SBV backends behave the same as What4 backends WRT safety predicates.
For now, we always include the safety predicate as part of `:sat` and `:prove`
queries.  Eventually, we will make this more configurable and have the
UI indicate if the property or the safety condition failed on proof counterexamples,
etc.
2020-05-26 17:08:20 -07:00
Rob Dockins
dbbd8607a0 Invoke a more severe exception throwing mechanism when we cannot
symbolicly translate an operation in the SBV backend.

This matches the behavior of the What4 backends.
2020-05-26 17:08:20 -07:00
Rob Dockins
e817f5c777 Update test suite 2020-05-26 15:33:46 -07:00
Rob Dockins
fd13055eb6 Remove UnsupportedSymbolicOp from the EvalErr type.
Instead, add a new `Unsupported` data type.  This requires
that we throw the unsupported exception instead of using `raiseError`.
2020-05-26 15:15:21 -07:00
Rob Dockins
8c6f8dcbe9 Reimplement (^^) as a primitive taking the exponent in class Integral 2020-05-26 15:13:08 -07:00
Rob Dockins
ca74fc8e98 Remove the vestigial intLg2 method from the Backend class 2020-05-26 14:10:55 -07:00
Rob Dockins
7f7fc813e6 Add a Literal first a constraint to fromTo.
This more clearly communicates the intent, which is that both
endpoints of the enumeration must be literals of the type
being enumerated.
2020-05-26 11:43:48 -07:00
Rob Dockins
e78757199e remove Z n types from class Integral 2020-05-26 11:38:59 -07:00
Rob Dockins
85e49a92db Rearrange the Cryptol prelude according to the new typeclass system 2020-05-22 15:39:38 -07:00
brianhuffman
780b1bcecc
Merge pull request #733 from GaloisInc/issue731
Issue731
2020-05-22 14:38:15 -07:00
Rob Dockins
53eb50cf71 typo 2020-05-19 11:57:30 -07:00
Brian Huffman
37f1fd8b4b Add regression test for #731. 2020-05-18 17:17:58 -07:00
Brian Huffman
e1fb6e940d Pretty-print Prop constructor PAnd using tuple-style syntax.
This matches the syntax used for parsing type constraint synonyms.

Fixes #731.
2020-05-18 17:15:13 -07:00
Brian Huffman
5c44ac6221 Properly parenthesize type applications in pretty printer for type Prop.
Special cases for PArith, PCmp, PSignedCmp, and PLiteral are removed,
as they are covered correctly by the fallback case.
2020-05-18 17:14:13 -07:00
brianhuffman
5cc3e11e78
Merge pull request #726 from GaloisInc/singleSubst
Enforce datatype invariants when creating `Subst` values
2020-05-18 15:51:15 -07:00
Brian Huffman
0cf21ace93 Check for kind mismatch in singleSubst.
If there is a kind mismatch, it returns the new `SubstKindMismatch`
constructor of the `SubstError` type.

Also change `bindVar` to rely on `singleSubst` for kind checking.
2020-05-18 12:34:01 -07:00
Brian Huffman
2c72419b1a Document kind-correctness invariant for Subst datatype. 2020-05-18 12:31:19 -07:00
Rob Dockins
2cb904ec46 Update documentation 2020-05-15 15:28:44 -07:00
Rob Dockins
dcbd70bf2b Update CHANGES and bumb version number 2020-05-15 10:42:45 -07:00
Rob Dockins
f6e0342afa Partially update the test suite 2020-05-15 09:33:32 -07:00
Rob Dockins
b2241c5885 Merge remote-tracking branch 'origin/master' into split-arith 2020-05-15 09:13:44 -07:00
Rob Dockins
e7470ec7e1 Implement the Round operations for Rational 2020-05-15 09:06:59 -07:00
Brian Huffman
700b31803c Add regression test for #723. 2020-05-15 07:36:11 -07:00
Brian Huffman
df4af1af3b Make singleSubst perform checks and return Either type.
The old `singleSubst` has been renamed to `uncheckedSingleSubst`.

Fixes #723.
2020-05-15 07:30:48 -07:00
Brian Huffman
08db8868e5 Make extendSubst re-use freeParams function. 2020-05-15 07:28:13 -07:00
Brian Huffman
6ea73cdf39 Move function freeParams into a different module. 2020-05-15 07:20:38 -07:00
Brian Huffman
c0ebf1132c Introduce convenience function singleTParamSubst. 2020-05-15 07:10:15 -07:00
Brian Huffman
2f21e65d0e Document additional invariant on 'Subst' type. 2020-05-15 07:06:15 -07:00
Rob Dockins
6b961929a6 Add properties for rationals that specify correctness for the
various properties of the Q and it's operations.
2020-05-14 17:50:56 -07:00
Rob Dockins
6e812221f2 Print concrete rationals in reduced form 2020-05-14 17:49:22 -07:00
Rob Dockins
cfe790c13b Implement a new primitive type Rational.
Rational numbers are implemented as a pair of integers via the usual construction.
2020-05-14 17:48:54 -07:00
Rob Dockins
3eb31b904a Tweak the prelude 2020-05-14 16:08:01 -07:00
Rob Dockins
7053c98257 Update the update and updateBack primitives to work over Integral 2020-05-14 16:06:51 -07:00
Rob Dockins
442d9eec4b Generalize >>$ to accept Integral shift amounts. 2020-05-14 14:59:54 -07:00
Rob Dockins
8da51d3eb0 Rearrange evaluation backends to follow new typeclass structures 2020-05-14 14:58:12 -07:00
Jared Weakly
1c38465ca8
Implement GitHub actions (#722)
* Builds nightly binary tarballs on Linux, macOS, and Windows
* Runs tests on every PR and merge to master
* Includes GitHub Actions status in README instead of Travis
* Makes the GitRev recompile hack less fragile
* Makes the Makefile Cabal v3 compatible
* Builds the manual as part of the CI process
2020-05-14 10:50:22 -07:00