Commit Graph

943 Commits

Author SHA1 Message Date
Joseph Kiniry
849fecead8 Merge branch 'master' of github.com:GaloisInc/cryptol 2016-04-18 15:15:58 -07:00
Joseph Kiniry
d43fcc9ebe Whitespace tweak. 2016-04-18 15:15:56 -07:00
Thomas M. DuBuisson
8b577828f6 Simplify constraints of Minilock prims.
Cryptol 2.3-alpha couldn't math, but thanks to @yav's hard work, Cryptol 2.3 and
later can math!  So with our new found powers comes great simplification.  Not
all is perfect, much like Dori-Mic's situation, but things are much better.
See the width constraints in SCrypt.cry for areas that could be improved with
some semi-obvious statements (forall x. 1 + width x >= width (x - 1)).
2016-04-12 15:53:12 -07:00
Trevor Elliott
cf979723b7 Fixes #322
Just needed to recurse through the parens and infix cases in `appTys`.
2016-04-07 21:26:21 -07:00
Brian Huffman
b875edae1a Fix typos in comments 2016-04-04 08:54:55 -07:00
Robert Dockins
739755c7ca Squash some space leaks dealing with substituions. 2016-04-01 17:32:15 -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
Trevor Elliott
b8e6f6a43a Change emitS to consume Text 2016-03-18 22:26:05 -07:00
Trevor Elliott
5a82fd07e9 Performance updates in the renamer 2016-03-18 21:15:52 -07:00
Brian Huffman
b77dd2a82a :prove checks properties in the order they appear in the source.
Also add a regression test. Fixes #171.
2016-03-10 11:36:41 -05:00
Trevor Elliott
76c381d245 Remove SupplyM
SupplyM wasn't strictly necessary, so remove it.
2016-03-09 10:10:38 -08:00
Trevor Elliott
f8c29b1789 Stop using SupplyT in InferM 2016-03-08 20:24:20 -08:00
Adam C. Foltzer
31f0607264 adds command args to command line
Closes #316, though we currently don't have a way to automatically
test this
2016-03-08 11:44:30 -08:00
Thomas M. DuBuisson
10acbdbfb8 Add comment in README explaining how to run tests. 2016-03-04 09:05:47 -08:00
Thomas M. DuBuisson
b40c1ce25d Add known failure for issue 314. 2016-03-04 09:05:23 -08:00
Thomas M. DuBuisson
edb9373c4e Add test case for issue #314 2016-03-04 08:58:50 -08:00
Thomas M. DuBuisson
bd593e4ebe
Add hierarchy to the module documentation. 2016-02-25 16:34:30 -08:00
Dylan McNamee
86c3d0ffe2 Module documentation 2016-02-25 15:14:00 -08:00
Brian Huffman
5e5184d5ee Add alternative implementations of bivium and trivium ciphers 2016-02-19 14:24:07 -08:00
Brian Huffman
ab82097033 Fix bug/typo in Trivium example implementation
See also the Trivium specification:
http://www.ecrypt.eu.org/stream/ciphers/trivium/trivium.pdf
2016-02-19 14:04:52 -08:00
Brian Huffman
1953223e9f Add test case for issue #312. 2016-02-19 11:53:33 -08:00
Brian Huffman
1322156d28 Remove trailing whitespace 2016-02-19 10:08:20 -08:00
Aaron Tomb
9809e176eb Add examples from Alexander Semenov
A new Cryptol user! Alexander Semenov from the Russian Academy of
Sciences is the developer of the Transalg tool, which can also translate
cryptographic algorithms (written in imperative form) into SAT problems.
He recently started experimenting with Cryptol, and wrote up
implementations of several stream ciphers, included in this commit.
2016-02-18 15:08:17 -08:00
Robert Dockins
8be10f62bf Update the symbolic simulator to use SBV's svSelect operation when possible.
This can lead to significant improvements, especially in cases where SBV recognizes
that you are selecting from a table of constant values.
2016-02-15 15:00:02 -08:00
Brian Huffman
6def46da69 Add (failing) test for issue #2. 2016-02-12 14:46:06 -08:00
Adam C. Foltzer
9912c17e6c add instance for Maps keyed by Names
This instance throws away a lot of the information in a `Name`, but
since we're not roundtripping that will probably be okay for now. A more
robust future interface should be able to roundtrip, however.
2016-02-09 16:55:20 -08:00
Iavor S. Diatchki
f7823544cf Add a test for ticket #308 2016-02-09 11:56:44 -08:00
Iavor S. Diatchki
a6f83302f0 Fix nested comments.
Fixes #308

Don't eat the forward slashes, as they may be starting a new nested
comment.
2016-02-09 11:52:01 -08:00
Brian Huffman
ab4f113084 Add regression test for issue #256. 2016-02-08 15:09:34 -08:00
Brian Huffman
b2021f8bc2 REPL completion uses names from NamingEnv
Tab can now also be used to complete qualified names.

Fixes #295.
2016-01-27 15:10:38 -08:00
Brian Huffman
9538c59d23 Fix shift/rotate by amounts greater than 2^63 in evaluator
Also added regression tests. This should fix issue #306.
2016-01-27 10:37:55 -08: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
Iavor S. Diatchki
b395265fe4 When lifting selectors, remember to look through type synonyms. 2016-01-22 11:56:49 -08:00
Thomas M. DuBuisson
9b8d153692 Import ::Extras in minilock modules. 2016-01-20 09:45:13 -08:00
Adam C. Foltzer
c776c6896f renamed/updated HACKING so it shows up in PRs 2016-01-19 18:19:35 -08:00
Adam C. Foltzer
bf294a60b8 integrate MiniLock example 2016-01-19 18:19:35 -08:00
Thomas M. DuBuisson
a4e42b8429 Example: miniLock in Cryptol 2016-01-19 18:19:35 -08:00
Adam C. Foltzer
58a605e8ff update examples and documentation 2016-01-19 18:19:35 -08:00
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