Commit Graph

168 Commits

Author SHA1 Message Date
Adam C. Foltzer
901e642085 Remove .fails file for #94 2014-10-01 14:32:20 -07:00
Adam C. Foltzer
95bb27ba49 resolve ambiguity when looking up short commands in trie
Previously, if one command was a prefix of another command, that would lead to an ambiguous lookup from the command trie. Now there are two ways to look up: one works like previously, which is good for tab-completion, and the other will only return one result if there is an exact match.

This means we can now have multiple forms of each command, so we can explicitly have short forms like :e -> :edit that won't be changed just based on what names we give to future commands.

This closes #90, and also #94 which was blocked on this due to :exhaust and :edit conflicting.
2014-10-01 14:29:57 -07:00
Iavor S. Diatchki
928f11c601 Change to refer to duplicate ticket. 2014-10-01 14:17:43 -07:00
Iavor S. Diatchki
65c9f1f2bf Add support for marking failing tests as known.
To mark a failing test as a known failure, you should add a file with
a name like this:

   TESTNAME.icry.fails

When the test runs, if it fails, then the contents of this file is displayed.
It is a probably a good idea for the contents to reference the ticket where
the failure was reported.

When the problem is fixed, the `.fails` should be removed.  Failing to do
so will result in test failure (i.e., a test that passes but has a `.fails`
file is considered an error).
2014-10-01 14:13:59 -07:00
Brian Huffman
840e99f563 Pass 'verbose' flag through to SBV for :prove and :sat
This addresses issue #17.
2014-09-26 11:56:32 -07:00
Adam C. Foltzer
e9642e5809 add test case for #103 2014-09-25 16:52:25 -07:00
Adam C. Foltzer
b452855d06 catch exceptions when evaluating random tests
This technically fixes #103, but not in a tremendously satisfying way. What we would like to do is clean up the progress bars for the :check, and report which input gave rise to the exception.
2014-09-25 16:49:16 -07:00
Adam C. Foltzer
b7c33c1e86 add reasonable profiling defaults for library and executable 2014-09-25 16:45:28 -07:00
Adam C. Foltzer
0b5ba9d6bf allow CABAL_FLAGS to be overridden in Makefile 2014-09-25 15:46:58 -07:00
Adam C. Foltzer
e1aa2e7062 fix how we find the directory of the Cryptol distribution
closes #113
2014-09-25 15:04:39 -07:00
Aaron Tomb
92e7f1b783 Add prover "any" yielding first available result
When the prover is set to "any", Cryptol now checks for all available,
supported provers, submits the problem to all of them in parallel, and
uses the result from whichever finishes first.
2014-09-25 10:46:04 -07:00
Dylan McNamee
fb93e5f4b3 fixes for tickets 22, 20, 107, 102, in preparation for merging 26 2014-09-23 13:32:09 -07:00
Thomas M. DuBuisson
2cd1ee3dcc Fix #111 - Use generic index to avoid Integer->Int conversion issues.
While this stops us from leaving the REPL due to negative indicies,
there is an underlying issue we should deal with: absurdly large
indicies.  In this case, `list @ (~zero : [64]) means we'll iterate
through 2^64 elements.
2014-09-23 09:04:42 -07:00
Trevor Elliott
68b64ab083 Don't close layout with commas when not in an explicit block
Fixes #110
2014-09-22 14:14:04 -07:00
Dylan McNamee
9319e0c19c tweaking notice, adding regression test for GitHub issue #110 2014-09-19 13:09:44 -07:00
Brian Huffman
f4e7975767 Update issue152 output to match new implementation of 'random'
As of 1cf1e552df, 'random' uses
generator from tf-random package
2014-09-18 07:06:33 -07:00
Dylan McNamee
c2c1b756cf Merge pull request #109 from rcdickerson/rcdickerson/fix-splitby-doc-ref
Changing some split examples in crash course to use splitBy instead.
2014-09-18 07:04:38 -07:00
Rob Dickerson
8250adfdbe Changing some split examples in crash course to use splitBy instead. 2014-09-18 02:59:11 -05:00
Dylan McNamee
f47351af35 Merge branch 'master' of https://github.com/GaloisInc/cryptol 2014-09-17 12:29:09 -07:00
Dylan McNamee
0e29d1d369 issue 108 from Sean, and a minor tweak to the AES chapter's formatting. 2014-09-17 12:28:30 -07:00
Brian Huffman
dd264efe09 Fix typos in comments 2014-09-16 14:14:53 -07:00
Aaron Tomb
6404597298 Support offline SMT-Lib provers
Setting the prover to "offline" now triggers generation of an SMT-Lib file without invoking a prover on it. If the setting "smtfile" has its default value of "-", the script is printed to standard output. If it has any other value, the value taken as the name of the file to write to. If "smtfile" is set to anything other than "-" during a normal, online proof, the script is saved in the given file after the proof completes, rather than being saved in a temporary file that's subsequently deleted. This behavior can be useful for debugging.
2014-09-16 10:08:32 -07:00
Brian Huffman
fa76ad7e28 Make the symbolic simulator more lazy to avoid non-termination 2014-09-15 17:25:17 -07:00
Brian Huffman
b8ed45de39 Merge changes from latest version of SBV
(SBV revision 55a9405954b02c30bfa0f0f237b157a42a1af63b, Aug 28)
2014-09-15 17:19:06 -07:00
Adam C. Foltzer
6b12984912 bump version for 2.1.0 alpha 2014-09-14 19:35:24 -07:00
Adam C. Foltzer
59bb2b1091 temporarly disable :exhaust to fix :e
Reopens #94; the book talks about using :e to edit files, and having :exhaust in the command trie breaks this. We need to figure out a better way to disambiguate (#90)
2014-09-14 15:45:26 -07:00
Thomas M. DuBuisson
31f0015e8c Merge pull request #29 from TomMD/fnv1a-example
Add an FNV-1a example (non-cryptographic hash).
2014-09-14 15:05:24 -07:00
Adam C. Foltzer
68d1e3d6c6 Add default-language to cabal file. Closes #71 2014-09-14 14:37:43 -07:00
Adam C. Foltzer
9d9b8c83f5 Merge pull request #23 from trofi/master
Setup.hs: unbreak 'runhaskell Setup configure' building mode

Adds autoconf hooks by default; should have no effect for systems building with `make`
2014-09-14 12:02:43 -07:00
Thomas M. DuBuisson
ebb3d9797d Use of CPP implies need for the CPP pragma...
Not sure how it built and gave me the positive result but not
having CPP pragma is clearly wrong.
2014-09-13 17:34:45 -07:00
Brian Huffman
8095862a68 REPL tab completion now works on all words, not just the first one
This addresses issue #99.
2014-09-13 17:13:41 -07:00
Thomas M. DuBuisson
981235118b Fix #101 by defining bitSizeMaybe
intSize was undefined, causing repl terminate.  This is probably because
the incorrect type signature using the scoped type variable (`:: a`
should probably have been `:: SBV a`) either way, bitSize and
bitSizeMaybe should use the same code when the size is finite.
2014-09-13 01:18:59 -07:00
Joseph Kiniry
1cf1e552df Merge pull request #91 from TomMD/master
Use tf-random for higher-quality randoms.
2014-09-12 13:17:09 -07:00
Dylan McNamee
75852a2596 Merge branch 'master' of https://github.com/GaloisInc/cryptol 2014-09-10 14:27:26 -07:00
Dylan McNamee
81adb95a37 tweaks to documentation and Salsa20 fix from Sean 2014-09-10 14:27:08 -07:00
Adam C. Foltzer
86b2a80db4 Add basic support for :exhaust
Fixes #94. We should look into the :exhaust optimization later if necessary
2014-09-10 11:16:07 -04:00
Adam C. Foltzer
b39c6e3702 implicit :prove all properties when no argument given
closes #93
2014-09-09 15:27:46 -04:00
Adam C. Foltzer
15e6fec34d update documentation for #82 2014-09-09 11:59:39 -04:00
Adam C. Foltzer
c3c043cc6b implement 0-based tuple indexing; fixes #82 2014-09-09 11:59:39 -04:00
Adam C. Foltzer
6a79019ef6 fixes #89
Very small change to code, lots of change to expected output of interpreter!
2014-09-09 10:49:29 -04:00
Thomas M. DuBuisson
a2fbf632f5 Use tf-random for higher-quality randoms.
Notice the randoms from StdGen are well-known to be quite bad.  For
example, see comments in issue #86.
2014-09-08 21:47:05 -07:00
Adam C. Foltzer
a0bb572388 add note about solvers for ZUC theorem 2014-09-08 14:45:10 -07:00
Joseph Kiniry
b2f0e3db4e Merge pull request #88 from TomMD/master
Fix #86 - make randomWord produce uniform randoms
2014-09-05 13:42:09 -07:00
Thomas M. DuBuisson
5dfb3e9250 Fix #86 - make randomWord produce uniform randoms
When :check was executed on a function accepting words as arguments
cryptol would generate mostly small words.  This strategy failed to find
counter-examples in formulas such as:

    (\a b -> (((a : [16]) + b) % 17) == ( (a % 17 + b %17) % 17 ) )

This failure is particularly egregious considering 50% of the inputs
result in False.  We now generate a better distribution of words and are
discussing use of a smart-check like strategy or an evaluation of the
logic to tailor generation in a future release (see issue #87).
2014-09-05 11:57:06 -07:00
Brian Huffman
d63bdc750c 'parseDeclsWith' runs parser with appropriate 'cfgModuleScope' flag
In layout mode, setting cfgModuleScope to true ensures that the lexer
will generate virtual open/close braces and virtual semicolons between
decls.

This is a follow-up to c689a15cfc.
2014-09-04 16:43:34 -07:00
Adam C. Foltzer
4622a1d177 add ZUC example, translated from Cryptol 1 2014-09-04 11:05:42 -07:00
Brian Huffman
c689a15cfc 'parseDeclsWith' uses layout or not depending on Config parameter 2014-09-04 10:35:56 -07:00
Adam C. Foltzer
592c4945d7 add test case for #83 2014-09-04 10:16:18 -07:00
Trevor Elliott
a1b7cbc39d Fix a lexer bug, and add a regression
Closing brackets weren't closing virtual layout blocks.
2014-09-03 13:46:47 -07:00
Trevor Elliott
86918fb0f2 New layout processor
Better handling of the interaction between virtual layout blocks and the
tokens that delimit them.
2014-09-03 13:25:14 -07:00