Commit Graph

897 Commits

Author SHA1 Message Date
Adam C. Foltzer
fdfb94c120 fix warnings and update stackage snapshot 2016-01-19 18:19:35 -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
1b1cdebdd3 set user path with Windows installer
Closes #198
2016-01-19 18:18:03 -08:00
Adam C. Foltzer
321a9e6f6e allow user to change install location in msi 2016-01-19 18:18:03 -08:00
Adam C. Foltzer
ee99873e43 fix FoxChickenCorn example
The new type signature for popCount is simpler, and more importantly
passes the typechecker. The old one really _ought_ to typecheck, though,
so a shrunken version of it is now in the test suite for #126
2016-01-19 18:18:03 -08:00
Adam C. Foltzer
4029b6c15c add a test for #126 2016-01-19 18:18:03 -08:00
Adam C. Foltzer
07da2018b7 switch to more portable seeding for random
The `random` primitive previously took a `[32]` seed, but this causes
inconsistency between 32-bit and 64-bit platforms when the seed is large
enough to wrap around in GHC's representation of an `Int`. This patch
switches to an API that seeds directly with four 64-bit words, and so
should behave the same way on our supported platforms.
2016-01-19 18:17:34 -08:00
Thomas M. DuBuisson
68f71ed3b3 Add some Haskell-like prelude functions.
Implication  (==>), not, and, or, all, any, map, foldl, sum, scanl, extend,
extendSigned, foldr, scanr, zip, zipWith, repeat, curry, uncurry, and elem.

Rationale:

I've had to implement these functions several times for different problems.
While my problems were admittedly toy, not cryptographic, the functions are
generally applicable and unlikely to clash with many, if any, preexisting
operations of different semantic meaning.
2016-01-19 18:15:49 -08:00
Thomas M. DuBuisson
46599a03b5 make SHA1 typecheck with Cryptol 2.3
There were some spurious constraints to help the previous typechecker figure
things out that now confuse the new one... ugh.
2016-01-12 17:22:22 -08:00
Thomas M. DuBuisson
fc04e415d7 Don't expose internal type in the Function API.
I've found that exposing helper types that are only of internal concern to the
function to be bad form.  These values should be in where clauses both to help
the type checker not get distracted and to keep the user-facing API as clean as
possible.
2016-01-12 16:52:40 -08:00
Adam C. Foltzer
ac85cec175 update test with counterexample that z3 produces
These sorts of tests are inherently unstable, but since Z3 seems to
agree across our platforms on this one, this should help make tests quieter.
2016-01-12 16:50:22 -08:00
Adam C. Foltzer
9e179d14bc finally add Even-Mansour example; closes #124 2016-01-12 16:49:47 -08:00
Adam C. Foltzer
1d2a135e44 spawn fewer solver instances during typechecking
This appears to increase performance of the test and benchmark suites
substantially, but there may be more opportunities to cut down on the
number of solver instances.
2016-01-11 15:50:14 -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
Brian Huffman
e87d0469ab Fix incorrect docstrings for polynomial operations
pmult, pdiv, and pmod are not specific to GF(2^^8);
they work on polynomials of arbitrary size with
elements drawn from GF(2).
2015-12-31 09:46:13 -08:00
Adam C. Foltzer
a0bc860c78 Merge branch 'TomMD-writeFile' 2015-12-28 15:29:55 -08:00
Adam C. Foltzer
4439daf344 style tweaks 2015-12-28 15:10:33 -08:00
Thomas M. DuBuisson
752310cd0d Merge branch 'master' into writeFile 2015-12-25 21:39:01 -08:00
Adam C. Foltzer
3c524e2cb3 fix import collision for GHCs 7.8 2015-12-24 17:30:21 -08:00
Adam C. Foltzer
f712a17a0d expose the new check API through the server 2015-12-24 15:45:42 -08:00
Adam C. Foltzer
9c07fe1006 merge in the 2.2.6 changes, including z3 switch 2015-12-23 16:10:56 -08:00
Adam C. Foltzer
f1828ca3d4 update stackage files for multiple GHCs 2015-12-23 15:11:24 -08:00
Adam C. Foltzer
3ae0dda7ac switch to Z3 for typechecking and proving
Note: the hardcoding in this patch is only for the 2.2 hotfix branch; in
the 2.3 branch we will only have to change the default setting for the
typechecker.
2015-12-23 14:59:10 -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
Adam C. Foltzer
aeefab69a1 refactor :check and :exhaust
This is to set up improvements to the cryptol-server, and therefore
pycryptol interface.

This patch also fixes a regression in pretty-printing output caused by a
previous error in fixity of the `<>` operator
2015-12-22 18:17:20 -08:00
Adam C. Foltzer
f87ea62646 Merge branch 'server-interrupts' into HEAD 2015-12-14 13:56:52 -08:00
Thomas M. DuBuisson
1ffc086ed4 Update for SBV 5.6 2015-12-10 12:38:26 -08:00
Thomas M. DuBuisson
3afdae127a Add known failure notice for issue 212 2015-12-10 12:36:06 -08:00
Thomas M. DuBuisson
04ba8f8871 Remove 'Wrote Prelude' debug leftovers (?) 2015-12-10 12:30:26 -08:00
Thomas M. DuBuisson
6848a834fd Handle quoting, tilde, in :writeByteArray 2015-12-10 00:38:21 -08:00
Adam C. Foltzer
ba318b7a9c use compat prelude in Haskeline module 2015-12-08 15:28:09 -08:00
Adam C. Foltzer
04d62ae221 refine interrupt behavior
In order to prevent Ctrl-Cs in, e.g. Python from bringing down the
server, there's now an option to swallow SIGINT when launching the server.
2015-12-04 15:53:51 -08:00
Adam C. Foltzer
563efcc25b start improving handling of interrupts in server
This notably adds a `MonadBaseControl` instance for the `REPL` monad so
that we can catch asynchronous exceptions in the middle of `REPL`
computations. Since this is a generalization of Haskeline's exception
support, that orphan instance for the console executable is now in terms
of this new instance.
2015-12-03 15:36:43 -08:00
Daniel Wagner
fa780dbd1a skip the quotation marks when reporting temp file location 2015-11-30 16:35:40 -08:00
Thomas M. DuBuisson
fd2421dfad Rename write -> writeByteArray
huh? I thought these were already committed.  Weird.
2015-11-20 09:39:49 -08:00
Adam C. Foltzer
4796b0a75a tweak how the prelude is loaded
This removes the `self-contained` flag, since it is fine for all builds
to have the baked-in prelude as a last resort. Tinkerers can still
change the prelude as long as it's in the search path.

Also removes some unnecessary extra prelude loading by the Cryptol
server by means of a new command
2015-11-16 12:56:36 -08:00
Thomas M. DuBuisson
b355dedcf8 Test files for read/write bytearray command. 2015-11-15 10:42:04 -08:00
Thomas M. DuBuisson
a7f9b0c40d Fix merge issue with :read command. 2015-11-15 10:24:01 -08:00
Thomas M. DuBuisson
0d18bc821c Merge branch 'writeFile' of github.com:TomMD/cryptol into tommd/writeFile 2015-11-15 10:16:16 -08:00
Adam C. Foltzer
6203eedf3a bump SBV lower bound 2015-11-11 15:11:19 -08:00
Adam C. Foltzer
9f3d42344d require new aeson 2015-10-27 16:10:50 -07:00
Adam C. Foltzer
f34145282d relax aeson dependency for stackage 2015-10-27 15:00:23 -07:00
Adam C. Foltzer
18d0588d81 adapt server to new name API 2015-10-27 14:21:05 -07:00
Adam C. Foltzer
92c328f108 fix benchmarks for name API changes 2015-10-22 13:32:37 -07:00
Adam C. Foltzer
3f4e884a79 add missing Prelude.Compat 2015-10-21 13:45:54 -07:00
Adam C. Foltzer
afa90656e9 update stackage files for multiple GHCs 2015-10-21 13:32:31 -07:00