Commit Graph

2348 Commits

Author SHA1 Message Date
Jared Weakly
677097310c Avoid pinning hsc2hs so that windows builds 2020-07-01 18:15:09 -07:00
Jared Weakly
99d563790f Run cabal update unconditionally before configure 2020-07-01 16:43:33 -07:00
Jared Weakly
79c9049730 Remove GHC 8.4 from CI 2020-07-01 16:43:33 -07:00
Brett Boston
6de2283ace
Merge pull request #794 from GaloisInc/module-doc-clarification
Clarify that each file can only contain a single module
2020-07-01 13:34:35 -07:00
Iavor Diatchki
332450ebb2 Switch to using libBF from hackage 2020-07-01 11:35:45 -07:00
Kevin Quick
745dc77f19
Added arrayPrim to generate PrimIdent, alongside prelPrim and floatPrim. 2020-07-01 10:38:10 -07:00
Iavor Diatchki
f6213aff33 Improve error messages when we know a constraint will always fail.
This changes the way the special "Error" type is used. The error
message now contains only an explanation of what happened,
and the actual malformed type is the parameter of the error function,
which is always used at kind `k -> k` where `k` is the malformed kind.

This fixes (or at least improves) #768
2020-06-30 20:03:50 -07:00
Brett Boston
a87684aad4 Clarify that each file can only contain a single module 2020-06-30 19:10:33 -07:00
Iavor Diatchki
670982254b Some improvement on issue #768.
The error messages are better but still need a bit of work,
especially when there are malformed types, such as `0 - 1`
2020-06-30 18:09:23 -07:00
Rob Dockins
ea5508a638 Add some additional conveniences to RecordMap and
address review comments.
2020-06-30 12:34:50 -07:00
Rob Dockins
ac85c25389 Doc typos 2020-06-30 12:34:50 -07:00
Rob Dockins
249ad85d27 Add unit test to make sure we reject records with repeated fields 2020-06-30 12:34:50 -07:00
Rob Dockins
6c6cb94d46 Implement and use a new RecordMap type.
This type stores records as a finite map from field names to
values, while also remembering the original order of the fields
from when the record was generated (usually, from the program source).
For all "semantic" purposes, the fields are treated as appearing in
a canoical order (in sorted order of the field names).  However, for
user display purposes, records are presented in the order in which
the fields were originally stated.

In the course of implementing this, I discovered that we were not
previously checking for repeated fields in the parser or typechecker,
which would result in some rather strange situations and could probably
be used to break the type safety. This is now fixed and repeated fields
will result in either a parse error or a panic (for records generated
internally).

Fixes #706
2020-06-30 12:34:50 -07:00
robdockins
87d5edab00
Documentation updates (#779)
* Add docstrings for all prelude functions and fix minor style issues.

Fixes #771

* Update `CryptolPrims` documentation

* Minor updates to the prelude

* Update CHANGES

* Updates to the cryptol book and CryptolPrims

* Fix several additional docstrings

* Specify and document properties of signed bitvector division.

Fixes #677

* Fixup test

* typos and style

* Regenerate PDFs
2020-06-30 10:58:25 -07:00
Iavor Diatchki
e291e8c827 Change dependency again 2020-06-29 15:31:34 -07:00
Iavor Diatchki
a0da7d7f97 Update to latest master 2020-06-29 15:31:34 -07:00
Iavor Diatchki
0047eaf77a Initial support for floating point computation 2020-06-29 15:31:34 -07:00
Brett Boston
7caf72abb4
Merge pull request #785 from GaloisInc/syntax-polynomial-docs
Document polynomial syntax + escape pipes in Version2Table
2020-06-29 14:40:28 -07:00
Jared Weakly
625ea505fd
Merge pull request #783 from GaloisInc/actions/disable-ghc-8.8.3-windows
Disable builds on windows for which there's a memory leak
2020-06-29 09:44:28 -07:00
Rob Dockins
07b81b3b9c Add a command-line option to disable unicode characters in the REPL logo
Fixes #659
2020-06-29 08:36:19 -07:00
Brett Boston
f742b1614a Document polynomial syntax + escape pipes in Version2Table 2020-06-26 15:32:47 -07:00
Rob Dockins
d2490e724f Implement roundToEven and roundAway.
The old `round` operation is renamed into `roundAway` to make its
semantics more obvious.
2020-06-25 13:52:36 -07:00
Jared Weakly
f915b118da disable builds on windows for which there's a memory leak 2020-06-24 13:36:49 -07:00
Rob Dockins
6a05e86658 unit test for issue 712 2020-06-23 12:42:03 -07:00
Rob Dockins
a95fab29c5 Be more careful about using fromInteger in the parser.
Fixes #712
2020-06-23 12:42:03 -07:00
Brett Boston
f54f671731
Merge pull request #773 from GaloisInc/doc-fixes-brett-dev
Minor typo fixes in Cryptol documentation
2020-06-19 14:42:41 -07:00
Jared Weakly
144a54c6de
Merge pull request #761 from GaloisInc/actions/improve-nightlies
Improve nightlies and add cvc4
2020-06-19 12:40:43 -07:00
Rob Dockins
dea6c9f633 Regression test for new :safe feature. 2020-06-19 12:11:29 -07:00
Rob Dockins
6a0fe05d78 Add a new :safe command that attempts to prove that a term
is safe for all inputs.

This is similiar to the `:prove` command, except that it ignores
the computed value and only checks for safety condition violations.
Because the value is ignored, a wider variety of types can be
checked with `:safe`.  Instead of just `Bit`, any finite return
type is allowed.
2020-06-19 12:11:29 -07:00
Rob Dockins
8641baa599 Add a new "ignore-safety" flag that causes :prove and :sat
calls to ignore safety predicates on terms.
2020-06-19 12:11:29 -07:00
Rob Dockins
f52d30e829 Refactor the way :prove counterexamples are represented and printed.
This allows us to distinguish cases where counterexamples find inputs
that violate safety conditions from cases where inputs cause the
predicate to be false.
2020-06-19 12:11:29 -07:00
Rob Dockins
332a0a3fdc Add an assert combinator to the prelude.
Fix up fragile test outputs.
2020-06-19 12:11:29 -07:00
Rob Dockins
8a0e92bf6e Remove the ordering operations on Z_n 2020-06-19 12:00:12 -07:00
Rob Dockins
6bedcbb4b3 Add a new Eq typeclass for types that have equality tests.
The `(==)` and `(!=)` operators move into the new `Eq` typeclass,
which becomes a superclass of `Cmp` and `SignedCmp`.
2020-06-19 12:00:12 -07:00
Rob Dockins
4248560e39 Minor fix to test case 2020-06-19 11:55:58 -07:00
Rob Dockins
ff199bf43e Add regression tests for superclass inference and solving 2020-06-19 11:55:58 -07:00
Rob Dockins
22e2e483d4 The new superclass inference sometimes casues minor changes in
error output in the test suite.
2020-06-19 11:55:58 -07:00
Rob Dockins
8922d4f743 Add superclass information to the typechecker.
This teaches the typechecker about superclass information
so that, e.g., the constraint `Ring a` implies the constraint `Zero a`.
We do this by computing sets of constraints that are saturated under
the the superclass rules.  These are used during inference type to
compute the minimal collection of constraints necessary to imply
all the found goals, and at solving time to discharge goals that
are implied by constraints listed in type signatures.

Fixes #738
2020-06-19 11:55:58 -07:00
Brett Boston
b136902476 Correct definition of rotate in Section 3.3
Closes #758
2020-06-18 17:44:38 -07:00
Brett Boston
8b6581f263 Fix typo in definition of distributed property of gf28DotProduct
Closes #762
2020-06-18 17:37:17 -07:00
Jared Weakly
16b2c96231 fix version in release drafter 2020-06-18 13:26:40 -07:00
Jared Weakly
cd4673373e allow failure for docker job in nightly build 2020-06-18 12:26:43 -07:00
Jared Weakly
c22a2e1e9c fix tag in artifact upload 2020-06-18 12:24:14 -07:00
Jared Weakly
5f86556c5c correct artifact upload command. Don't upload unneeded windows artifact 2020-06-18 11:46:01 -07:00
Jared Weakly
f43959a1bd add version to entire bundle job 2020-06-18 10:33:33 -07:00
Jared Weakly
d30f7e15aa Fix missing env variable 2020-06-17 17:20:07 -07:00
Jared Weakly
bdbebdff16 correctly reference branch in conditions 2020-06-17 16:43:29 -07:00
Jared Weakly
30fa67a0cc remvoe unnecessary push 2020-06-17 16:09:00 -07:00
Jared Weakly
0a231880f5 prevent duplicate runs if actions/ has a PR 2020-06-17 15:30:04 -07:00
Jared Weakly
a023b4de5a fix undefined runner variable in build.yml 2020-06-17 13:32:18 -07:00