Commit Graph

2693 Commits

Author SHA1 Message Date
Aaron Tomb
1ead4f2c1e Include .tar.gz archives on Windows, too 2020-11-18 17:08:24 -08:00
Aaron Tomb
0541bcf559
Preparation for the 2.10 release (#972)
* Update CHANGES for 2.10

* Remove profiling flags from Cabal file

They result in `cabal check` warnings and probably don’t need to be
hard-coded.

* Remove commented-out Cryptol server references

The code no longer exists, so we’ll never uncomment these.

Equivalent functionality is now provided by `cryptol-remote-api`.

* Update references to version numbers in README. Closes #719.
2020-11-18 15:38:44 -08:00
Aaron Tomb
5cbf17b425
Leave Markdown files out of distribution packages (#971) 2020-11-17 14:23:41 -08:00
LisannaAtGalois
0943e98d97
Merge pull request #968 from GaloisInc/lisanna/ci-win-mask
cry: propagate command failure
2020-11-17 11:28:08 -08:00
Iavor S. Diatchki
608ae96a4b
Merge pull request #964 from GaloisInc/tc-errors
Tc errors
2020-11-17 11:04:09 -08:00
Aaron Tomb
692c814776
Don't add an extra copy of Programming Cryptol (#970)
Two different Makefiles each copied it and used different file names.

Closes #969.
2020-11-17 09:26:03 -08:00
Iavor Diatchki
1354cbdf39 Update for changes to errors 2020-11-17 09:06:11 -08:00
Lisanna Dettwyler
65f2abfec8 cry: propagate command failure
Closes #953
2020-11-16 13:57:36 -08:00
Iavor Diatchki
bfad11ba86 Improvements to error messages 2020-11-16 13:29:57 -08:00
LisannaAtGalois
85413b3212
Merge pull request #967 from GaloisInc/lisanna/remote-api-docker
Build and push .github/Dockerfile-remote-api to galoisinc/cryptol-remote-api
2020-11-16 11:32:02 -08:00
Iavor Diatchki
51910d7e8b Just a comment 2020-11-16 10:32:50 -08:00
robdockins
dc55d66b6c
Merge pull request #957 from GaloisInc/uninterp-prims
Uninterpreted primitives
2020-11-16 10:13:50 -08:00
Rob Dockins
1d3b8f2ac2 Add a warnUninterp option to the Cryptol interpreter that controls
if warnings are emitted when the symbolic simulator uses uninterpreted
functions to implement primitives.
2020-11-16 09:16:52 -08:00
Rob Dockins
987d2a0ab7 Print warnings when uninterpreted functions are used
to implement primitives.
2020-11-16 09:16:52 -08:00
Rob Dockins
532299a5f9 Remove some stray debugging code 2020-11-16 09:16:52 -08:00
Rob Dockins
32f7785cf5 Add support for uninterpreted function implementations of the PrimeEC
primitives.
2020-11-16 09:16:52 -08:00
Rob Dockins
40bcec451b Add support for handling the SuiteB SHA primitives as uninterpreted
functions.  This basically abstracts the SHA block primitives
for 256-bit blocks and 512-bit blocks as uninterpreted functions.
2020-11-16 09:15:32 -08:00
Rob Dockins
639e5ee8a9 Add support to the What4 provers for treating the SuiteB AES primitives
as uninterpreted functions.  This allows basic use of `:safe`, and
also allows one to prove basic facts using `:prove`, provided they
don't rely on any interesting properties of the AES primitives.
Proof counterexamples and `:sat` results, however, are very likely
to be spurious.
2020-11-16 09:15:32 -08:00
Rob Dockins
aefc93b9b2 Add some special case handling for ec_twin_mult.
Previously we were computing incorrect answers for `ec_twin_mult j S k T`
in the following 4 special cases: `S == 0`, `T == 0`, `S+T == 0` and
`S-T == 0`. In these cases, we must be more careful about performing
normalization in the twin multiply procedure.
2020-11-16 09:15:32 -08:00
Rob Dockins
10968307e1 Avoid pattern-matching on the What4 data value. 2020-11-16 09:15:32 -08:00
robdockins
65f1414315
Merge pull request #951 from GaloisInc/check-refactor
Check refactor
2020-11-16 09:02:10 -08:00
Lisanna Dettwyler
0d6264a964 Build and push .github/Dockerfile-remote-api 2020-11-14 18:44:07 -08:00
Rob Dockins
b5079bc1e0 Rework testing code so we can catch exceptions during testing
(especially keyboard interrupt exceptions) and report the number
of tests successfully passed.  Meanwhile, simplify somewhat
the testing interface code.

Fixes #98
2020-11-13 16:12:05 -08:00
Rob Dockins
b63886bf7c Simplify the interaction between the random testing module and
the REPL code.  This removes the "TestSpec" type and simplifies
the control flow aspects of this code somewhat.
2020-11-13 16:12:05 -08:00
Rob Dockins
048699df19 Move randomV into Cryptol.Eval.Generic, where it makes more sense 2020-11-13 16:12:05 -08:00
Rob Dockins
15ef783b20 Refactor the random testing code to use TValue instead of
directly examining the syntax of types.
2020-11-13 16:12:05 -08:00
brianhuffman
5c4efbd835
Merge pull request #966 from GaloisInc/issue933
Fix parens in pretty printing of sequence types.
2020-11-13 15:41:51 -08:00
Aaron Tomb
4fed1654a7 Update cryptol-remote-api flags in Dockerfile 2020-11-13 15:33:13 -08:00
Brian Huffman
d3b83b3df8 Add regression test for #933. 2020-11-13 15:13:35 -08:00
Brian Huffman
ade7a53379 Fix parens in pretty printing of sequence types.
The fix required inserting another precedence level for sequence types
`[n]a` (level 4) in between `app_type` (level 3) and `atype` (now
level 5).

Fixes #933.
2020-11-13 15:07:06 -08:00
Andrew Kent
0450cb8f83 Bump Argo submodule for HTTP support; update command lines 2020-11-13 13:16:19 -08:00
David Thrane Christiansen
9c37515ff6 Add threading support to build 2020-11-13 13:16:19 -08:00
Iavor Diatchki
7b4c433531 Nicer pretty printing of unification variables.
This should go some way toward solving #782, although there are still
funny numbers from quantified variables.

Note the tests do not yet work, as the error messages are all different
and I'll change them only when I finalize the new error messages
2020-11-13 11:41:26 -08:00
Andrew Kent
b8d32d63aa cryptol-remote-api feature: use python BV class cryptol bits 2020-11-12 17:49:38 -08:00
brianhuffman
7491038d7b
Merge pull request #947 from GaloisInc/fix-dumptests
Fix bug in `dumpableType` function. Fixes #946.
2020-11-12 17:11:15 -08:00
Iavor Diatchki
6f23c7b08d Checkpoint 2020-11-12 15:48:43 -08:00
Iavor Diatchki
111904d453 Eliminate TCErrorMessage as it was not contributing much.
Tests are broken at this commit
2020-11-12 15:40:54 -08:00
robdockins
d00ff6b9d3
Merge pull request #960 from GaloisInc/issue958
Fix the bit-order convention for `extractWord` in the What4 backend
2020-11-12 09:28:01 -08:00
Iavor S. Diatchki
a7d352b585
Merge pull request #959 from GaloisInc/mod-sys-fixes
Bug fixes to the modules system.
2020-11-12 08:22:46 -08:00
Iavor Diatchki
30928f8ecd Be more aggressive when checking signatures.
When checking a signature we try to solve sub-goals that mention any
of the variables mentioned in the signature's assumptions.  We do this
because these assumptions are local, and if the assumption is not solved
in the current context, we may not be able to solve it later.

This is OK if the goal does not contain free variables.  If it does,
things are a bit flaky as we may reject some programs and accept others
depending on in what order things happened to be instnatiated
2020-11-11 16:32:09 -08:00
Rob Dockins
f730750dd4 Fix the bit-order convention for extractWord in the What4 backend.
Fixes #958
2020-11-11 14:36:30 -08:00
Iavor Diatchki
192b25c508 Bug fixes to the modules system.
This fixes #796.
It also fixes the @bboston7's example on #883, but not the original
example in #883.   The issue there is that `asdf` function generates
a constraint only involving the module parameter.

Normally we don't try to solve constraint that don't mention a schema's
parameters, because they can always be solved "later", and hopefully with
more things instantiated.

The weird thing in this case is that the schema adds *local" constraint to
the module parameters, but we end up ignoring these.
2020-11-11 14:35:33 -08:00
Aaron Tomb
2919e21bdc Add Dockerfile for cryptol-remote-api 2020-11-11 11:57:20 -08:00
robdockins
5a2be86814
Merge pull request #954 from GaloisInc/cabal-fix
Fix some cabal warnings and such
2020-11-10 12:22:08 -08:00
Rob Dockins
9511dd856f Fix some cabal warnings and such 2020-11-10 09:36:05 -08:00
robdockins
131335eef4
Merge pull request #952 from GaloisInc/repl-default
REPL defaulting
2020-11-10 09:25:13 -08:00
Rob Dockins
6f5114d980 Add regression test for REPL defaulting of variables not constrained
by literal constraints.
2020-11-09 10:59:41 -08:00
Rob Dockins
c589f6a712 Add more aggressive defaulting rules for REPL expressions.
If we encounter a type that is not constrained by `Literal` or `FLiteral`
constraint, we will try to default such types to `Integer`, then
`Rational`, then `Bit`, in that order.

Fixes #877
2020-11-09 10:59:35 -08:00
Jared Weakly
8cd1dbb354
Update deprecated add-path workflow command (#950) 2020-11-05 14:26:00 -08:00
Rob Dockins
3233bb8dcd make the trac289 test less dependent on solver versions
by hiding the generated counterexample
2020-11-05 09:56:25 -08:00