Commit Graph

2804 Commits

Author SHA1 Message Date
Jared Weakly
1b482ba9ed
Fix helm testing and cvc4 url fix to missing locations (#1031)
* Fix helm testing and cvc4 url fix to missing locations

* Update tag for test-cryptol-remote-api in helm tests
2021-01-14 11:18:06 -08:00
robdockins
f55aea6b9f
Merge pull request #1015 from GaloisInc/newtypes
Newtypes
2021-01-12 17:18:41 -08:00
Rob Dockins
301c74cb8f Docs typos 2021-01-12 17:00:24 -08:00
Rob Dockins
1c382634eb More principled errors for the remote API 2021-01-12 16:27:59 -08:00
Rob Dockins
976468dce7 Fix typos 2021-01-12 11:20:57 -08:00
Rob Dockins
e19adee102 Add another regression test for newtypes 2021-01-12 11:19:53 -08:00
Rob Dockins
600f43b5f0 Update the Programming Cryptol book with documentation about newtypes. 2021-01-12 11:19:53 -08:00
Rob Dockins
557b928caf Update syntax and semantics documents with newtype changes 2021-01-12 11:18:58 -08:00
Rob Dockins
e5bc98a59f Make newtype applications check constraints that are implied
by the newtype body.
2021-01-12 11:17:27 -08:00
Rob Dockins
a479deb052 Update the instances regression test with newtypes 2021-01-12 11:17:27 -08:00
Rob Dockins
baf6ac7c72 Make class resolution for newtypes fail early. 2021-01-12 11:17:27 -08:00
Rob Dockins
8241366b13 Tweak counterxample printing for :check and :exhaust and
make it responsive to the `show-examples` option.
2021-01-12 11:17:27 -08:00
Rob Dockins
40def1b760 Add a regression test that exercises newtypes 2021-01-12 11:17:27 -08:00
Rob Dockins
4c53d2e4e0 Remove the NewtypeEnv arguments from various evaluation
functions.  Newtype information is now propigated directly
into types via the typechecker instead of being looked up
separately.
2021-01-12 11:17:27 -08:00
Rob Dockins
252d8080f8 Lift newtypes from a TCon to a full-fledged constructor
of `Type`.  This allows us to directly carry the `Newtype`
instead of having to look it up in a table at use sites.
2021-01-12 11:17:27 -08:00
Rob Dockins
35ea58c1ca Fix a bug where the symbolic backends did not have newtype constructors
in scope.  Also, demote the `NewtypeEnv` to a type synonym, as the
newtype was just annoying.
2021-01-12 11:17:27 -08:00
Rob Dockins
2944f08fac Add newtype to the routines that transfer values back to expressions,
and use `TValue` instead of `Type` in more places.
2021-01-12 11:17:27 -08:00
Rob Dockins
70796c2134 Add type evaluation for newtypes, use the RecordMap type for
the fields of the newtype body, and push newtypes into
various parts of the evaluator, random testing, etc.
2021-01-12 11:17:27 -08:00
Ben Selfridge
7489dbd52e
Doc fixes (#1016)
* Updates all the examples in CrashCourse.tex up to the functions section

This adds more REPL annotations for the exercise checker in the Programming
Cryptol book. There is still more work needed to support many of the examples in
the functions section (and presumably the rest of the book as well), so I think
this is a logical stopping point for now until we add a feature that lets you
write out a file and load it into the repl.

* Updates ProgrammingCryptol.pdf wrt recent changes
2021-01-11 14:52:21 -08:00
Jared Weakly
75211f3dac Switch default in cryptol-remote-api Dockerfile to 8.10.3 2021-01-11 12:16:06 -08:00
Jared Weakly
5971ac3bed
Support ghc 8.10.3 cryptol remote api (#1026)
* Use ghc 8.10.3 for cryptol-remote-api to test SGX compatibility
* Fix cvc4
* Fix test suite for cryptol-remote-api
* Default to putting the heap as low in address space as possible
2021-01-11 11:36:21 -08:00
Aaron Tomb
396cad9363
Fix CVC4 nightly version (#1027)
Fixes CVC4 version used in Docker builds and GitHub actions. This is the update that we currently have to do every few weeks to point to a nightly build that still exists.
2021-01-04 11:13:06 -08:00
Alexander Bakst
0c0fa364bc
Merge pull request #1023 from GaloisInc/expose-qcExpr
Expose `qcExpr` in REPL.Command
2020-12-22 19:26:53 -08:00
Alexander Bakst
296805fe44
Rename TestReport fields. 2020-12-22 13:58:23 -08:00
Alexander Bakst
56e5d7e7dd
Expose qcExpr 2020-12-21 14:50:06 -08:00
robdockins
9d2b7813c7
Merge pull request #1005 from GaloisInc/property-fix
Property fix
2020-12-21 13:13:04 -08:00
Rob Dockins
e1d6c00b82 Test case for issue #639 2020-12-21 12:14:21 -08:00
Rob Dockins
e598a7440d Rearrange the method whereby we :check or :prove, etc all
the loaded properties.  Instead of listing all the loaded properties
and then parsing their names, we instead directly use the internal
names retrieved from the module.  This avoids problems arising from
the names of the properties not being in scope.

Separately, we should add settings for controlling exactly
which properties should be considered; right now it is always
all loaded properties.

Fixes #639
2020-12-21 12:14:21 -08:00
robdockins
57b62d5e99
Merge pull request #993 from GaloisInc/refactor-evopts
Refactor evopts
2020-12-21 12:13:34 -08:00
Rob Dockins
0785f8db44 metadata 2020-12-21 11:18:07 -08:00
Rob Dockins
ab9010f7d7 Update imports in cryptol-remote-api 2020-12-21 11:18:07 -08:00
Rob Dockins
f1c1e29b3a Move EvOpts 2020-12-21 11:00:40 -08:00
Rob Dockins
6e7656f1ab Refactor some pretty-printing related functions.
The `Backend` class is not really the proper place to handle pretty
printing concerns; they have been migrated instead into
`Cryptol.Eval.Value`, where the main pretty printer is defined.
Likewise, the pretty printing options data structures have been
moved to `Cryptol.Utils.PP`.
2020-12-21 11:00:40 -08:00
Rob Dockins
eb0ddf2a53 Do digit level slicing when printing symbolic bitvector values
in bases 2, 8, or 16.
2020-12-21 11:00:40 -08:00
Rob Dockins
169ea1e482 Simplify the interface to evalSel, and update cryptol-remote-api 2020-12-21 11:00:40 -08:00
Rob Dockins
b1c02eb9f0 Move the trace implementation in to the generic primitives table,
so that the concrete and symbolic evaluators all work uniformly.
2020-12-21 10:40:37 -08:00
Rob Dockins
e62e068dab Refactor how EvalOpts are piped into primitives. This makes
`trace` and `traceVal` respect the pretty-printing options
that are in effect when a value is computed, rather than those
that were in effect when the term was declared.
2020-12-21 10:40:37 -08:00
David Thrane Christiansen
0bbdf1cc32
Merge pull request #1017 from GaloisInc/issue/1009
Add an evaluation-only version of cryptol-remote-api
2020-12-16 20:23:59 -08:00
David Thrane Christiansen
c5ce8e5c8c Merge remote-tracking branch 'origin/master' into issue/1009 2020-12-16 19:48:40 -08:00
David Thrane Christiansen
d017a3e157
Merge pull request #1018 from GaloisInc/issue/1004
cryptol-remote-api: Add support for general options
2020-12-16 19:29:43 -08:00
David Thrane Christiansen
b5e86ccd5f Document options field 2020-12-16 18:57:39 -08:00
David Thrane Christiansen
81a655603b cryptol-remote-api: Add support for general options
Now, every method takes an optional parameter field that controls
Cryptol settings like the length of prefixes of infinite data to
display and whether to track call stacks.

RE #1004
2020-12-16 13:57:10 -08:00
David Thrane Christiansen
d93ae31298 cryptol-eval-server: add to CI script 2020-12-15 18:42:07 -08:00
David Thrane Christiansen
3106fed0ca cryptol-eval-server: Even more informative test failure 2020-12-15 18:17:19 -08:00
David Thrane Christiansen
2b12ed6661 cryptol-eval-server: Allow module names instead of filenames 2020-12-15 11:22:11 -08:00
David Thrane Christiansen
cec90a337a cryptol-eval-server: Make test failures more informative 2020-12-15 11:01:11 -08:00
David Thrane Christiansen
1b83257017 Add an evaluation-only version of cryptol-remote-api
This version requires the file that's in scope to be provided as an
argument. It loads that file on startup, and then provides only
commands that don't change that module context. This means that it can
be used in a stateless load-balancing situation.
2020-12-15 10:29:56 -08:00
Ben Selfridge
f45389b8cd Adds "replPrompt" command 2020-12-12 08:47:21 -08:00
robdockins
9eb733d74e
Merge pull request #1013 from GaloisInc/fixio-loop
fixIO loop
2020-12-11 13:08:47 -08:00
Aaron Tomb
6eb8db641c Fix CVC4 download URL in GitHub workflows 2020-12-11 12:52:43 -08:00