Commit Graph

1245 Commits

Author SHA1 Message Date
Trevor Elliott
7976026789 Update test output renamer errors 2016-05-27 18:50:27 -07:00
Trevor Elliott
a490600df5 Fix overlap errors in the renamer
* The MultipleSyms error should only show up when the import environment
  contains duplicate symbols, and should be triggered lazily.
* Environments that have had errors reported should be rewritten to no longer
  produce those errors during renameVar/renameType

Fixes #337
2016-05-27 18:37:57 -07:00
Trevor Elliott
2f21dd509a Remove the generic-trie dependency 2016-05-27 17:05:16 -07:00
Brian Huffman
c6144bd332 Update output for tests 256 and 335
The :t command now parenthesizes the term when needed.
2016-05-27 16:25:14 -07:00
Brian Huffman
f6a2462306 :t prints un-renamed parsed AST. Fixes #336. 2016-05-27 16:01:55 -07:00
Brian Huffman
d7b117a8ce Use a type-appropriate function argument name 2016-05-27 16:00:59 -07:00
Brian Huffman
bfc8062c69 Avoid extra shadowing warnings when renaming comprehensions
Fixes #286.
2016-05-27 15:39:41 -07:00
Aaron Tomb
3658c0962b Fix build with GHC 7.8
Hide an extra symbol from MonadLib.
2016-05-25 13:44:51 -07:00
Trevor Elliott
0393c8c54d Fixes #335
The local type bindings from type annotations in patterns were not being
processed correctly, and built-in type/type-functions were getting shadowed in
binders.
2016-05-24 11:58:55 -07:00
Brian Huffman
e0e382aa22 Fix typo in comment 2016-05-24 08:22:28 -07:00
Brian Huffman
df27f577a4 Fix typo in comment, whitespace 2016-05-24 08:21:55 -07:00
Ryan Scott
f1a45163a4 Put bench/data/*.cry in extra-source-files 2016-05-20 15:04:53 -04:00
Rob Dockins
bdc4bae638 Update (<<) and (>>) in the symbolic evaluator 2016-05-16 14:52:18 -07:00
Rob Dockins
7415e06c72 Back out changes that delayed applying substituions when composing.
Although this does reduce garbage produced when evaluating, it is a
major slowdown on some typechecking tasks (in particular, the typechecking
of large arrays of literals).
2016-05-16 14:00:08 -07:00
Rob Dockins
3209e59fc5 Back out changes that delayed applying substituions when composing.
Although this does reduce garbage produced when evaluating, it is a
major slowdown on some typechecking tasks (in particular, the typechecking
of large arrays of literals).
2016-05-16 13:58:06 -07:00
Rob Dockins
3f5877e9de Start reimplementing the symbolic interpreter primitives based
on the generalized operations from the concrete simulator.
2016-05-15 22:40:01 -07:00
Rob Dockins
1b51f0edf4 generalize the 'zero' operation 2016-05-15 22:34:06 -07:00
Rob Dockins
da4a458aed Generalize unary logic operations. Also fix a bug where
complement was not poperly truncating bitvector values.
2016-05-15 22:31:40 -07:00
Rob Dockins
0b2189a0cf generalize logic binary operations 2016-05-15 22:24:07 -07:00
Rob Dockins
31105f23b7 Generalize unary arithmetic operations 2016-05-15 22:19:23 -07:00
Rob Dockins
8a2a06fabc Generalize binary arithmetic operations 2016-05-15 22:14:50 -07:00
Rob Dockins
cecdb08179 Further generalize evaluation code for use in both the concrete
and symbolic evaluators.
2016-05-15 21:55:41 -07:00
Rob Dockins
122a147085 Start generalizing evaluator code to be used in both the
concrete and symbolic evaluators.
2016-05-15 21:28:21 -07:00
Rob Dockins
6d681f5bb5 Make bitwise and shifting operations less aggressive about forcing
bitsequences.

This fixes some over-stricness bugs.  It does have a mesaurable
performance impact on some programs, but seems acceptable.
2016-05-15 10:03:44 -07:00
Rob Dockins
94be64747b Have enumeration primitives directly calculate their values
instead of computing a list and indexing into it.
2016-05-15 09:47:07 -07:00
Rob Dockins
637c7599a8 Minor cleanup in Cryptol.Eval 2016-05-15 09:38:33 -07:00
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