Commit Graph

1069 Commits

Author SHA1 Message Date
Rob Dockins
5e989309cb Fix the behavior of 'memoMap' to save more work.
Previously, there was a mistake in this definition that was throwing
away potentially-useful work.  We now preserve that work and get a bit
performance improvement as a result.
2016-05-15 09:13:06 -07:00
Rob Dockins
0893de3683 Merge branch 'master' of /home/robert/work/cryptol into new-eval 2016-05-15 00:19:11 -07:00
Rob Dockins
9018cceba5 Tweak substituions again to avoid expensive flattening operations 2016-05-15 00:13:19 -07:00
Rob Dockins
98eee0a0ef Fix some bugs with the new substitution representation 2016-05-14 20:39:53 -07:00
Rob Dockins
c94e4b5b07 Change the representation of type substitutions.
Now, substitions are explicitly a sequence of maps from variables
to types.  This means that composing substitions is nearly trivial
because the structure of maps does not need to be rebuilt.  Instead,
we traverse the sequence of maps when substituions are applied.

This significantly reduces the garbage produced by type substituion.
2016-05-14 19:40:49 -07:00
Rob Dockins
28890090dd Change the representation of type substitutions.
Now, substitions are explicitly a sequence of maps from variables
to types.  This means that composing substitions is nearly trivial
because the structure of maps does not need to be rebuilt.  Instead,
we traverse the sequence of maps when substituions are applied.

This significantly reduces the garbage produced by type substituion.
2016-05-14 19:36:06 -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
Iavor S. Diatchki
48642ea282 Fix bogus simplification. 2016-05-12 15:43:31 -07:00
Brian Huffman
70459264ab Use hang and sep instead of hsep to print counterexamples.
Fixes #329.
2016-05-11 09:26:57 -07:00
Robert Dockins
9d11fd4485 Fix typo in error constructor name 2016-05-06 14:33:02 -07:00
Robert Dockins
64b8a17c7b Fall back onto unification in more cases when typechecking explicit sequences.
Fixes #274
2016-05-06 13:29:49 -07:00
Robert Dockins
92c3b43db8 Add keywords to the REPL autocompletion list.
In particular, the following keywords will now be suggested by
the REPL autocompletion:
  else, if, let, then, where

These, I believe, are the only keywords which can be entered at
the command line.

Fixes #144
2016-05-05 13:54:49 -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
b6a83d7cb8 Make a friendlier, non-panic error message for cases where patterns
introduce nontrivial constraints.

Fixes #290
2016-05-04 17:38:16 -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
Robert Dockins
59cfe03e54 Update the parser to handle '#' patterns as a special case.
This partially addresses issue #304.
2016-05-04 13:54:00 -07:00
Robert Dockins
94f29f46d5 Add Fixity information to Name and the PPName class.
This allows access to fixity information when pretty-printing
Parser AST, even after the rearranging that is done by the renamer.

Fixes #318
2016-05-03 17:45:10 -07:00
Robert Dockins
bcb9b1dac1 Fix a boneheaded syntax error 2016-05-03 17:06:32 -07:00
Robert Dockins
21f5993730 Load the Prelude even if a command-line module fails to load.
Fixes #313
2016-05-03 15:24:34 -07:00
Robert Dockins
53eef3ed4a Improve the printing of some panic messages. 2016-05-03 12:00:37 -07:00
Dylan McNamee
ab279f01d5 incorporating typos and other improvements to docs 2016-04-27 11:52:09 -07:00
Dylan McNamee
b92cdcccda file cleanup 2016-04-21 13:54:52 -07:00
Dylan McNamee
04e22d8dd6 command appendix 2016-04-21 13:53:02 -07:00
Dylan McNamee
623b847094 merging changes to docs 2016-04-19 11:41:55 -07:00
Joseph Kiniry
0ba8d97c8a Removed extra 's'. 2016-04-18 15:16:39 -07:00
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