Commit Graph

154 Commits

Author SHA1 Message Date
Brian Huffman
a9de74ed5d Implement module-name completion and validation for :browse.
Fixes #396.
2017-10-04 19:17:42 -07:00
Iavor Diatchki
5208739653 Don't print directly to stdout. Fixes #166 2017-10-04 15:50:31 -07:00
Rob Dockins
f02a3c783b Bump simple-smt version bounds to pull in a bug fix.
Fixes #457
2017-10-03 10:20:15 -07:00
Iavor Diatchki
60523d5986 Delete old solver stuff.
The main user visible effect of this might be that sometime things on
the Cryptol command line are instantiated in a slightly different way:
we get `inf` sometimes when we got a finite example before.

We could work around this if it is an issue, but I am not sure which
behavior is more reasonable.
2017-09-26 14:02:52 -07:00
Aaron Tomb
c05281d390 Fix spurious failures due to lazy I/O
Regression test check31 was failing somewhat unpredictably due to the
use of lazy I/O when loading the Z3 prelude for the type checker. Using
the `strict` package seems to fix it.
2017-09-13 15:31:43 -07:00
Eric Mertens
28bc4f81de Work around happy bug by adding type signature on ipat 2017-09-11 10:36:59 -07:00
Eric Mertens
bf571569fa Add upper bound on happy
A bug introduced in happy-1.19.6 causes incorrect type signatures
to be generated in the parser source file which lead to type
checker errors
2017-09-11 10:20:22 -07:00
Iavor S. Diatchki
ca2136fab9 Merge pull request #440 from sliverdragon37/master
Adds the :ast and :extract-coq commands for printing out a parseable AST
2017-08-15 10:25:08 -07:00
Eric Mullen
05b8f0f3c1 more polished 2017-08-14 15:45:37 -07:00
Aaron Tomb
010540c4b4 Comment out cryptol-server from Cabal file 2017-07-24 15:26:49 -07:00
Aaron Tomb
69e49d4245 Bump version to 2.5.0 2017-07-24 09:16:40 -07:00
Aaron Tomb
de80a9c2f5 Update copyright dates in Cabal file 2017-07-24 09:01:34 -07:00
Levent Erkok
5857477ab2 Modifications to make cryptol compile with SBV 7.0
Also, bumped up the version to 2.4.1
2017-07-18 10:25:00 -07:00
Aaron Tomb
d76f21f89e Update benchmarks to find Prelude and CryptolTC.z3
Since they don’t run in the normal REPL environment, they need to know
about where to find the Prelude and CryptolTC.z3 more directly.
2017-03-21 12:31:04 -07:00
Iavor S. Diatchki
41131fe7ed Redo the export to SMT story in a much simpler way. 2017-02-16 16:46:38 -08:00
Iavor S. Diatchki
3c15d086d1 Merge branch 'master' into wip/solver 2017-02-08 16:24:46 -08:00
Iavor S. Diatchki
710355176a More rules and things; external solver disabled; we can at least load ChaCha 2017-02-08 15:08:50 -08:00
Brian Huffman
140ab21f11 Add new unoptimized reference interpreter; use in REPL with ":eval <expr>" 2017-02-03 09:02:25 -08:00
Iavor S. Diatchki
f3db823f3e Checkpoint: (broken, but builds) 2017-02-01 11:43:01 -08:00
Iavor S. Diatchki
b788079244 More aggressive goal simplification. 2017-01-31 14:12:53 -08:00
Iavor S. Diatchki
12bb2c30c8 Merge branch 'master' into wip/solver 2017-01-31 10:15:49 -08:00
Iavor S. Diatchki
ee1c8c796b Switch to using the official sbv release. 2017-01-31 10:04:34 -08:00
Iavor S. Diatchki
baa19ce362 Checkpoint. 2017-01-30 18:14:10 -08:00
Iavor S. Diatchki
c3ce33f5a6 Remove old stuff 2017-01-30 10:54:45 -08:00
Robert Dockins
dae3ab11b1 Change the representation and caching of sequences for better performance.
There are two major changes in this patch.  The first is that sequence maps
now have special representations for point updates, of the sort produced by
the 'update' and 'updateEnd' primtives.  These updates are stored in a
finite map, rather than as a functional-update thunk using lambdas; this
reduces memory usage and improves time efficecy of sequences defined by
sequences of updates.

The second change is that the caching policy for sequences is changed
to retain all previously-calculated values.  This is a change from the
previous LRU policy, which retained only a small finite number of previous
values.  Benchmarking showed that unbounded memoization was better for
performance in essentially all cases over both an LRU and an adaptive
caching strategy.  The potential downside is that we may retain values
longer than necessary.  If this becomes a problem, we may need to revisit
this decision.
2016-08-12 12:10:49 -07:00
Robert Dockins
2e15d4f443 Increase the size of the garbage collector nursery to 64m.
This greatly increases mutator productivity, and thus provides
significant speedups on some examples.  The tradeoff with
larger nurseries is the potential for long GC pause times.
This is probably acceptable tradeoff for a tool like Cryptol,
despite the potential for unresponsiveness at the REPL.
2016-07-20 15:55:05 -07:00
Robert Dockins
998bddc7a7 Merge remote-tracking branch 'origin/master' into new-eval
Fix some minor conflicts in the test suite.
Conflicts:
	tests/issues/issue002.icry.fails
	tests/issues/issue148.icry.stdout
	tests/issues/issue198.icry.stdout
	tests/issues/issue214.icry.stdout
	tests/issues/issue290v2.icry.stdout
	tests/issues/issue312.icry.fails
2016-07-12 14:58:53 -07:00
Adam C. Foltzer
3c25c096a7 clean up build a bit 2016-07-06 16:20:01 -07:00
Adam C. Foltzer
78cacc4d3e Merge pull request #333 from RyanGlScott/master
Put bench/data/*.cry in extra-source-files
2016-07-05 08:49:53 -07:00
Robert Dockins
c3c1bb2c74 Merge branch 'master' into new-eval-merge 2016-06-13 16:29:36 -07:00
Robert Dockins
b95b734b74 Refactoring of how bits and words are handled in the interpreters.
The major change in this patch is to add a new type of 'WordValue'
which is always used to represent finite sequences of bits.  A word
value is either a packed word, or a sequence of lazy bits.  The 'VSeq'
constructor, in constrast, is now never used for a finite sequence of
bits.

This avoids certain thorny problems that arise when trying to faithfully
implement the lazy semantics of Cryptol.  We now do not have to commit
to a value at type '[n]' being represented as a packed word or as an
unpacked word until relatively late.  This allows us to perform type-directed
eta-expansion at every recursive call before we know how words will be represented.

This patch fixes all the outstanding strictness bugs that I know of.

Unfortunately, we seem to lose some ground on performance.  The new evaluator
is now about 5% slower than the old one on the AES benchmark, and quite a bit
slower on the SHA1 benchmark.  Fortunately, the use if LRU caches for memoization
of sequences seems to keep heap usage to manageable levels; so programs generally
complete, even if they take a long time.
2016-06-09 08:31:23 -04:00
Adam C. Foltzer
76be770d83 clean up 7.8-isms 2016-06-07 13:40:15 -07:00
Robert Dockins
99526f5700 Merge branch 'master' of github.com:GaloisInc/cryptol into new-eval 2016-06-01 15:22:09 -07:00
Thomas M. DuBuisson
363651c907 Fixes #320 Use -N1, not -N, as the default RTS option. 2016-05-31 10:38:13 -07:00
Rob Dockins
bdcfdd39a1 Update benchmarks for new interpreters 2016-05-30 23:07:05 -07:00
Rob Dockins
b518336885 Merge branch 'master' of cryptol into new-eval 2016-05-30 17:25:10 -07:00
Trevor Elliott
2f21dd509a Remove the generic-trie dependency 2016-05-27 17:05:16 -07:00
Ryan Scott
f1a45163a4 Put bench/data/*.cry in extra-source-files 2016-05-20 15:04:53 -04:00
Robert Dockins
7e968d2d18 WIP. New monadic Cryptol interpreter.
The concrete evaluator now seems to be working correctly,
but seems to suffer from major performace problems.
2016-05-12 18:44:06 -07:00
Sergei Trofimovich
ab43c275d4 tweak for deepseq-generics-0.2
deepseq-generics-0.2 stopped reexporting NFData from deepseq.
Patch imports it explicitly.

Signed-off-by: Sergei Trofimovich <siarheit@google.com>
2016-03-25 14:35:55 +00:00
Adam C. Foltzer
feb9d22a88 version bump & housekeeping
Bumped to version 2.4.0 and dropped the minor version from the GHC710
etc variables
2016-01-26 12:09:54 -08:00
Adam C. Foltzer
4d3fc9a413 Update copyright dates and add missing headers 2016-01-19 18:19:35 -08:00
Adam C. Foltzer
da6916702b split new Prelude definitions into Extras module
The definitions added in #299 cause a regression in Prelude typechecking
performance. Until we sort out the performance, we'll keep these
definitions in the module `Cryptol::Extras`.
2016-01-19 18:19:24 -08:00
Adam C. Foltzer
31176993e0 add lower bound for optparse-applicative
With the newer `transformers-compat` release, cabal was resolving this
dependency all the way back to `0.0.1`
2016-01-19 18:18:03 -08:00
Adam C. Foltzer
5c80fc2e1c temporary upper bound for deepseq-generics
We're only using this package for 7.8 compatibility, which will end when
GHC 8.0 is released soon. For now, just limit to the older version to
avoid import errors.
2016-01-08 11:53:01 -08:00
Thomas M. DuBuisson
752310cd0d Merge branch 'master' into writeFile 2015-12-25 21:39:01 -08:00
Adam C. Foltzer
9c07fe1006 merge in the 2.2.6 changes, including z3 switch 2015-12-23 16:10:56 -08:00
Thomas M. DuBuisson
1c36537d78 Update for SBV 5.7
Conflicts:
	cryptol.cabal
	src/Cryptol/Symbolic.hs
	src/Cryptol/Symbolic/Prims.hs
2015-12-23 14:13:59 -08:00
Adam C. Foltzer
579ccc96a0 backport prover command interface
Conflicts:
	src/Cryptol/REPL/Command.hs
	src/Cryptol/Symbolic.hs
2015-12-23 14:03:59 -08:00
Adam C. Foltzer
917cc27145 version bump to 2.2.6 2015-12-23 11:33:36 -08:00