Commit Graph

25 Commits

Author SHA1 Message Date
Robert Dockins
e0611c250d More explict comments for the 'trace' and 'traceVal' Prelude operations. 2016-07-13 14:16:33 -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
2c428804bc remove splitBy and update documentation
Closes #291
2016-07-05 09:58:49 -07:00
Robert Dockins
e31b4ba57d WIP. Improve performance of the new evaluator.
To get acceptable performance, we need to be pretty aggressive about
using word representations instead of list-of-bits.  Unfortunately,
with the new evaluator, this means we force things to be more strict
than is correct.

We are also still slower than the current evaluator.  It is not
clear where the problems are.
2016-05-13 17:21:51 -07: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
Robert Dockins
38946745c3 Add the 'lg2' type function as a synonym.
Fixes #248
2016-05-04 17:54:08 -07:00
Robert Dockins
c620cbf237 Update the parser to allow prefix operators in more places.
This allows us to define (~) as a prefix operator symbol synonym
for `complement`.

Fixes #296.
2016-05-04 16:26:36 -07:00
Brian Huffman
1322156d28 Remove trailing whitespace 2016-02-19 10:08:20 -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
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
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
Thomas M. DuBuisson
6a7477ba6c Half-fix but not quite issue #256 (Bool ~> Bit).
We should probably discuss why we want to call things "Bool" if this was
more concious than incidental.  That and change the documentation to
match.
2015-07-03 14:19:56 -07:00
Trevor Elliott
9b7e46724c Give 100 fixity levels, and fix prelude fixity again
Also fix issue198, which had been accidentally updated while failing
2015-06-10 11:55:54 -07:00
Trevor Elliott
9305e769d4 Properly resolve constraint fixity 2015-06-09 14:18:25 -07:00
Trevor Elliott
3fc9d66fc1 Change the precedence of xor 2015-06-09 09:35:35 -07:00
Trevor Elliott
e119b72efd More fixity, and add back special error messages 2015-06-08 17:54:02 -07:00
Trevor Elliott
0eefd18437 More consistent output in the REPL 2015-06-08 17:36:41 -07:00
Trevor Elliott
4b323b8446 Remove primitives 2015-06-08 16:00:14 -07:00
Trevor Elliott
745ea639af Start migrating primitives to the prelude 2015-06-05 15:47:12 -07:00
Trevor Elliott
a736f740f9 Parse doc strings, and attach them to declarations 2015-06-04 18:35:12 -07:00
Trevor Elliott
b96859ba5f Implement + as a primitive in the prelude 2015-06-03 22:29:36 -07:00
Adam C. Foltzer
0536d0f15a update copyright years 2015-03-24 11:19:52 -07:00
Adam C. Foltzer
ba0a0e8576 Initial import from internal repo 2014-04-17 15:34:25 -07:00