Commit Graph

1245 Commits

Author SHA1 Message Date
Iavor Diatchki
ae3e0ea106 Add some functionality for simple checking of the consistency of goals. 2017-07-10 10:55:49 -07:00
Iavor Diatchki
04fbc4c1c2 Notice the fin inf is impossible. 2017-07-10 09:41:15 -07:00
Aaron Tomb
2d6dac4a23 Another Travis typo... 2017-07-07 15:28:52 -07:00
Aaron Tomb
ac214563f2 Put Z3 in $HOME/bin on Travis/Linux 2017-07-07 15:25:20 -07:00
Aaron Tomb
80faaa4819 Fix typo in Travis config 2017-07-07 15:11:25 -07:00
Aaron Tomb
aeeb938e18 Update Travis config to install Z3 2017-07-07 15:09:40 -07:00
Andrey Chudnov
6bdce04727 Extend built-in library caching to Cryptol::Extras 2017-07-07 14:25:22 -07:00
Aaron Tomb
48c4d764e1 Use built-in diff on Travis 2017-07-05 16:25:58 -07:00
Aaron Tomb
aa0d5179b8 Specify the diff program to use on Travis 2017-07-05 11:51:41 -07:00
Aaron Tomb
b6a0e7e3f6 Fix typo in Travis OS X script 2017-07-05 11:51:07 -07:00
Aaron Tomb
72592041f0 Back to make for AppVeyor 2017-07-05 11:26:30 -07:00
Aaron Tomb
28f037b17b Use install instead of build for AppVeyor 2017-07-05 11:16:52 -07:00
Aaron Tomb
84e0687df6 Fix typo in Travis config 2017-07-05 11:14:38 -07:00
Aaron Tomb
16e3ed809c Use cabal build instead of make for AppVeyor 2017-07-05 11:01:52 -07:00
Aaron Tomb
4a2f2f50e9 Add AppVeyor configuration 2017-07-05 10:57:46 -07:00
Aaron Tomb
e8a8b5292b Add OS X configuration for Travis 2017-07-05 10:27:08 -07:00
Aaron Tomb
16876426aa Run cabal update on Travis 2017-07-05 10:18:08 -07:00
Aaron Tomb
c5e44f694b Another attempt at Travis 2017-07-05 09:58:04 -07:00
Aaron Tomb
06ad707b61 Bump Travis GHC version 2017-07-05 09:39:35 -07:00
Aaron Tomb
d63c68351a Track both original and canonical module paths
Using canonical paths in error messages makes testing a pain. This
allows comparing canonical paths *and* passing all our tests. How about
that.
2017-06-28 16:18:34 -07:00
Aaron Tomb
9bbf422407 Canonicalize module path names earlier
This largely reverts 54831eace2 and takes
a different approach. This way path names are normalized before feeding
them to the parser, rather than when comparing the module to be loaded
with the module already loaded. This works better because it takes into
account the current directory at the time when `loadModuleByPath` is
called.
2017-06-28 15:50:02 -07:00
Aaron Tomb
54831eace2 Use canonical paths to check if module is loaded
Since multiple modules may import the same module, the module loading
process keeps track of whether a given module has been loaded already.
To do this, it looks up the module by name and, if found, compares the
paths of the two modules to check that they come from the same file.
However, these paths are not guaranteed to be normalized, so it can
sometimes print an error message when attempting to load the same module
from a file named in two different ways. This commit normalizes the file
paths before comparing them. Alternatively, it may make sense to enforce
an invariant throughout that module file paths are normalized, though
this may require care to avoid overly verbose messages.
2017-06-28 14:17:29 -07:00
Aaron Tomb
49e847387e Simplify some type signatures in examples
These examples weren't type checking, and now do, with type constraints
that are no more awkward, and arguably less awkward, than before.
2017-06-22 10:09:13 -07:00
Aaron Tomb
e282c65a7e Fix test failures from latest type checker changes
Recent changes resolved issue 002, so we no longer need to indicate that
it's expected to fail. Other small changes to the type checker have
made things like type variable numbers change slightly.
2017-06-20 10:08:36 -07:00
Iavor S. Diatchki
39b1e84dd3 When solving selectors, keep trying if any unifications happened 2017-06-16 16:05:51 -07:00
Iavor S. Diatchki
38f3a54a36 Comments, + apply the correct substitution 2017-06-16 16:04:56 -07:00
Iavor S. Diatchki
0985508bbc Add fin constraints on the message mart of trace. 2017-06-16 09:58:11 -07:00
Iavor S. Diatchki
509ef089c0 change in normalization of Min
Previously, we would factor out constants from `min`, now we push them in.

Thus:  `3 + min a b` becomes `min (3 + a) (3 + b)`.
This allows nested `min` to flow next to each other and interact.

We also add rules for moving constants out of nested `min`:

min a (min K b) ~> min K (min a b)

and another useful rule, which sort of factors out the constants again,
but notice that the result does not have a `min` in it.

min (K1 + a) (K2 + a) ~> min K1 K2 + a
2017-06-15 16:55:38 -07:00
Iavor S. Diatchki
fab66bbf36 New rule: min K1 a >= K2 ~> a >= K2 if K1 >= K2, and False otherwise 2017-06-15 16:51:16 -07:00
Iavor S. Diatchki
627d5aa269 Some code that is useful for tracing the simplifier when debugging. 2017-06-15 16:50:18 -07:00
Iavor S. Diatchki
7a42065a94 Just some comments that make it easy to disable defaulting. 2017-06-15 16:49:46 -07:00
Brian Huffman
13fef57cca Updated with latest changes to Eval/Reference.lhs (5d9d8ba7) 2017-06-05 09:52:03 -07:00
Brian Huffman
9a267b1f0c Removed definition of binary infix (~) from Cryptol prelude. Fixes #423.
This change partially reverts changeset c620cbf2, which fixed #296,
which was about supporting `:t (~)` in the REPL.

As of this change, `:t (~)` will no longer work in the REPL.
The regression test for issue #296 is removed.
2017-05-24 09:39:50 -07:00
Brian Huffman
007c74cd97 Update doc-strings to mention syntactic sugar for complement and sequences. 2017-05-24 09:09:28 -07:00
Brian Huffman
5d9d8ba733 Avoid using copyByValue with the wrong type. Fixes #420. 2017-05-15 17:51:22 -07:00
Robert Dockins
d891fde0c7 Fix a corner case for join on 0-length inner sequences.
Both the standard and the reference interpreter were producing
incorrect behaviors.  The correct behavior is to return an
empty sequence.

Fixes #395.
2017-05-10 17:49:37 -07:00
Robert Dockins
24d542c5c2 Ignore stack and cabal new-build build artifacts 2017-05-10 16:57:52 -07:00
Robert Dockins
7add78ec3c Implement a missing case in the definition of 'transpose'.
Fixes issue #407
2017-05-10 16:54:26 -07:00
Brian Huffman
f5aa763988 Reference interpreter: update raises run-time error on invalid index.
Fixes #415.
2017-05-08 12:10:07 -07:00
Brian Huffman
e23a8175cc Add regression tests for #406, #408, and #410. 2017-05-05 14:17:45 -07:00
Brian Huffman
d9146efe81 Merge branch 'robdockins-master' 2017-05-05 14:05:47 -07:00
Brian Huffman
7284821020 Merge branch 'master' of https://github.com/robdockins/cryptol into robdockins-master
# Conflicts:
#	src/Cryptol/Eval/Reference.lhs
2017-05-05 13:59:52 -07:00
Brian Huffman
d02ac0764d Fix type sanity checker problems on list comprehensions.
Fixes #410.
2017-05-05 12:01:49 -07:00
Brian Huffman
617dfb0c93 Reference interpreter: fix bug in tuple comparisons 2017-05-05 10:28:46 -07:00
Brian Huffman
0d2e36a18a Reference interpreter: Fix strictness of enumeration, shift/rotate, indexing
Fixes #406.
2017-05-05 09:57:37 -07:00
Brian Huffman
f67480fae2 Reference interpreter: Fix strictness of Arith and polynomial functions 2017-05-05 09:02:29 -07:00
Rob Dockins
6a3f51b34f Perform more careful handling of divide-by-0 conditions.
Make values lazier with respect to when they produce divide-by-0
errors.  Divide-by-0 should now propigate in the same way that
user errors do.

In addition, fix a bug in the reference evaluator with respect to
divide-by-0 handling of pmod and pdiv.  Previously, the `polyDivMod`
function would raise a division by zero error, in contravariance
to the reference implementation invariant that errors may only
occur when forcing values at type `Bit`.
2017-05-04 23:21:16 -07:00
Aaron Tomb
9add6a4b2f Clarify which prover finished first
With `:set prover=any`, and when prover stats are enabled, the prover
that finished first is now prefixed with a "*".
2017-03-31 14:02:41 -07:00
Aaron Tomb
aeff31d0c0 Add rendered semantics document to repository 2017-03-31 08:28:04 -07:00
Trevor Elliott
7fc50a9cbb Write out the typechecker prelude when necessary
Bundle the typechecker prelude (CryptolTC.z3) with the executable, so
that it's able to write it out and re-use it when necessary.

Fixes #404
2017-03-28 16:30:40 -07:00