Commit Graph

296 Commits

Author SHA1 Message Date
Trevor Elliott
2401954532 The goals are equivalent 2014-12-16 17:56:07 -08:00
Adam C. Foltzer
284338c938 Add the mono-binds flag
When `:set mono-binds=on`, any local definitions lacking type
signatures will not be generalized (i.e., will be monomorphic). This
reduces what is in most cases unnecessary polymorphism that can give
rise to constraints that are difficult to solve. This also improves
the performance of the Cryptol interpreter by lifting many polymorphic
type applications out of the inner loops that are commonly defined as
bindings in `where` clauses.

The flag is on by default in the Cryptol REPL, and in most cases makes
it possible to leave out more type signatures in `where` clauses than
before. However, some programs really do rely on inferring polymorphic
types for local variables; in this case adding an explicit polymorphic
type signature to the local binding in question will make the program
typecheck.
2014-12-15 17:48:25 -08:00
Brian Huffman
b88e2d1a11 Add test cases for issue #58. 2014-12-11 15:50:22 -08:00
Trevor Elliott
28fdd44100 Fix #140
The Smtlib solver was translating Fin constraints to True, as it didn't know
how to handle them.  They should have been skipped, and returned back as
unsolved goals instead.
2014-12-11 15:12:14 -08:00
Adam C. Foltzer
9abc779340 update random values after changing random generation 2014-12-05 17:38:00 -08:00
Adam C. Foltzer
969c96e8e1 Don't do fancy progress bars for :check in batch mode 2014-12-05 17:18:29 -08:00
Trevor Elliott
465b0eb103 Add a stdout file for the failing test, issues/T146 2014-12-05 16:52:45 -08:00
Trevor Elliott
b3341c02c9 Allow make test to output the diff results 2014-12-05 16:49:58 -08:00
Trevor Elliott
c2821da104 Make the diff command line absolute 2014-12-05 16:27:08 -08:00
Trevor Elliott
ee3647b814 Update renamer errors to clarify some funny situations
This tries to address #125 by making the errors from the renamer a little bit
more clear.

Squashed commit of the following:

commit 8afd3d7961b58df042fe801c3c5e1b9787f813bc
Author: Trevor Elliott <trevor@galois.com>
Date:   Wed Dec 3 19:33:59 2014 -0800

    Update tests for new renamer errors

commit 7cac01836d8943cf3b08d6715ac328e3b6658cef
Author: Trevor Elliott <trevor@galois.com>
Date:   Wed Dec 3 19:33:49 2014 -0800

    Add `at` on errors and warnings to be more consistent

commit 308908ba318a4cdc839710f66f1a487543f8c07e
Author: Trevor Elliott <trevor@galois.com>
Date:   Wed Dec 3 19:06:57 2014 -0800

    More consistent renamer warnings

commit be8100a78e9eaba6d554591121c24ed5dcd3c780
Author: Trevor Elliott <trevor@galois.com>
Date:   Wed Dec 3 18:56:53 2014 -0800

    More consistent error formatting from the renamer

commit 26c45c3b51e0bdbcf6a1431cab8e1eb8760ea0bb
Author: Trevor Elliott <trevor@galois.com>
Date:   Wed Dec 3 18:56:36 2014 -0800

    Remove an un-triggerable error

commit ccdb93e036ba1e111ccd977c8b3b35523f3c1bf0
Author: Trevor Elliott <trevor@galois.com>
Date:   Wed Dec 3 16:38:44 2014 -0800

    Try to give better errors for unbound identifiers

commit eb5784145985bb55c761088eaba27c67d08c1326
Author: Trevor Elliott <trevor@galois.com>
Date:   Wed Dec 3 16:38:23 2014 -0800

    Remove old TODOs about located errors

commit b984bb5f451f3aa7b4fc8f15167483c5142ee9a3
Author: Trevor Elliott <trevor@galois.com>
Date:   Wed Dec 3 14:37:34 2014 -0800

    Differentiate missing type and expression symbols

commit b9e6f13856db6765dced3cb9565cdc8387a7976d
Author: Trevor Elliott <trevor@galois.com>
Date:   Wed Dec 3 14:36:52 2014 -0800

    Remove a shadowing warning
2014-12-03 19:36:06 -08:00
Iavor S. Diatchki
358d3fc554 Add an example where we can get capture when substituting. 2014-12-02 15:50:40 -08:00
Brian Huffman
0352dca57a Add regression test for github issue #133.
Renamed old "issue133" to "trac133", indicating that it uses a different
numbering system.
2014-11-04 16:10:48 -08:00
Adam C. Foltzer
b05ddd5e54 Partially fixes #73
Due to the limitations of the GHC runtime, we can't get around the
possibility of out-of-memory errors, but we can prevent individual
bitvectors from being too large for the libgmp-backed bignums.

There is now an architecture-dependent check whenever creating a new
`BV` value in the concrete evaluator to ensure the width does not
exceed the GMP limits. If a width is too large, the evaluation returns
to the REPL much like diving by zero.
2014-11-04 14:18:42 -08:00
Adam C. Foltzer
761fb4076d add tests for #73 2014-11-04 14:08:23 -08:00
Brian Huffman
0a7b39f944 Add regression tests for issue #135. 2014-11-04 12:03:07 -08:00
Brian Huffman
14b9399e33 fix expected test output for issue #128. 2014-10-23 15:02:42 -07:00
Brian Huffman
5ec364680d Add regression test for issue #130. 2014-10-23 15:00:34 -07:00
Thomas M. DuBuisson
f16a297e90 wrt #132 update the expected output for the tests. 2014-10-23 14:28:01 -07:00
Brian Huffman
234aa3230c Add regression test for issue #128. 2014-10-23 14:20:04 -07:00
Adam C. Foltzer
901e642085 Remove .fails file for #94 2014-10-01 14:32:20 -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
Adam C. Foltzer
e9642e5809 add test case for #103 2014-09-25 16:52:25 -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
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
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
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
Adam C. Foltzer
17ee75ea6a add (failing) test case for #81 2014-09-02 16:29:55 -07:00
Adam C. Foltzer
9346db2d0c Bind sat/prove results to a single type for both unsat and sat, use more record fields
See #66 for more discussion. Basically we don't want the type of `it` to be different for unsat or sat results, so we put undefined values in there instead. Also, instead of using tuples and different field names to distinguish formula arguments of various arities, we use a convention of fields `arg1`, `arg2`, ...
2014-08-21 15:02:35 -07:00
Adam C. Foltzer
1cf61e12c3 reword :sat and :prove results as records
Per @weaversa's suggestions in #66, we now bind records to `it` for sat results, leading to less ambiguity about the meaning of those results. There is still some weirdness to this; the fields present in the record change based on the result and the arity of the formula, but this seems like a reasonable approach given that it's not an expression that needs a type.
2014-08-20 17:10:40 -07:00
Adam C. Foltzer
46bcc188f4 fix external bindings not being in scope in let bodies
The renamer was being run on let bindings without including the NamingEnv of the overall module context. Fixed and added a test case for this.
2014-08-20 11:18:26 -07:00
Adam C. Foltzer
b78062eafe bind it even when no counterexample/sat is available; add tests
Similar to what @weaversa requested in #66, we bind `it` to `False`
when we can't find a sat assignment, and `it` to `True` when we've
proved a theorem.

Also adds some simple tests for the sat/prove result binding, and let
binding at the repl.
2014-08-19 17:11:43 -07:00
Adam C. Foltzer
d409116160 Merge branch 'devel'
This was the branch I originally set up for git flow, but we're moving
to production=release and develop=master, so this branch is obsolete.
2014-08-19 10:31:31 -07:00
Brian Huffman
c2859d579b Update output for regression test 226 2014-07-21 16:18:47 -07:00
Brian Huffman
c8b3b8c134 Update output for regression test 086.
(cf. revision 0ee396d434)
2014-07-21 16:13:56 -07:00
Brian Huffman
ffebd5c330 Update output for regression test number 290 2014-07-21 16:02:38 -07:00
Brian Huffman
ec0395e9d0 Update regression test number 289, which now runs successfully.
This test works as of revision db08bfafa9.

Versions of SBV prior to 3.1 did not distinguish the boolean type from
the size-1 bitvector type; this example uses literals like "0b0" and
"0b1", so it triggered the SBV bug, which manifested as a type error from
the external SMT solver.
2014-07-21 16:01:43 -07:00
Brian Huffman
4f28f4bfed Update regression tests for :prove and :sat output
As of ee8685e4f2, :sat and :prove now
parse and then pretty print the given predicate with appropriate
parenthesization.
2014-07-15 16:26:37 -07:00
Adam C. Foltzer
3919ebeab7 fix expected output for tests after fix in #10 2014-04-29 11:43:19 -07:00
Dylan McNamee
b7cad1c5b0 fixing issue290 - it was a bug in the brain of the reporter.
imports need to be qualified to support this behavior.
2014-04-22 17:03:24 -07:00
Adam C. Foltzer
ba0a0e8576 Initial import from internal repo 2014-04-17 15:34:25 -07:00