Commit Graph

1316 Commits

Author SHA1 Message Date
Iavor Diatchki
e5fa174cbb Add some axioms about width.
Fixes #387
2017-07-10 16:59:03 -07:00
Iavor Diatchki
b5d6715b21 Add support for comments; panic on completely bogus inputs.
Note that we still do not check for errors in commands, perhaps we should?
2017-07-10 16:58:33 -07:00
Iavor Diatchki
affcc25156 Don't crash when we detect and error, tell the user instead!
Also, improve the printing of the errors a bit.
2017-07-10 11:59:39 -07:00
Iavor Diatchki
771c2deaa1 Slightly different error messages, should be OK. 2017-07-10 11:06:14 -07:00
Iavor Diatchki
1e4fb89f4c Fix test, due to changes in the Prelude. 2017-07-10 11:05:59 -07:00
Iavor Diatchki
0f825daf2f Bug fix: remember to pop-off the solver's context. 2017-07-10 11:05:47 -07:00
Iavor Diatchki
5a885e9f5a Check for consistency before improving.
We may want to do this more often, but it may have a performance penalty.

Anyway, we need this check here, because previously the code was assuming
that the goals are known to be consistent, and we are just wanting to
default them, which should never make them inconsistent, just more instantiated.

The current solution is a bit of a stop-gap, until we redo the defaulting
story, and separate it form improvement.
2017-07-10 10:59:40 -07:00
Iavor Diatchki
89f0af891a Report inconsistent constraints together. 2017-07-10 10:56:56 -07:00
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
Eric Mullen
92d9049082 correctly print out uids for type variables 2017-07-06 16:52:11 -07:00
Eric Mullen
3eab3eb6cb lots of running examples 2017-07-06 16:51:25 -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
Eric Mullen
f80d791c97 HMAC example now loads into cryptol 2017-06-27 14:00:45 -07:00
Eric Mullen
3dfb3e147e adding some examples 2017-06-26 15:27:36 -07:00
Eric Mullen
a67e350175 got rid of the pesky ascii logo 2017-06-26 13:32:31 -07:00
Eric Mullen
b456831602 give better names to type variables,and include a tool to print the AST 2017-06-26 13:23:08 -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
Eric Mullen
76dacbe1cd types print out correctly 2017-06-20 12:20:56 -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
Eric Mullen
e28c0c43db explicit printing of decl groups 2017-06-16 17:37:54 -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
Eric Mullen
ab0926e4eb print out all the declarations, not just current module 2017-06-15 17:20:32 -07:00
Eric Mullen
237a1bac7e don't print out proof things for now 2017-06-15 17:01:17 -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
Eric Mullen
a0cf0543c0 no longer defining new versions of Show, using different typeclass 2017-06-15 14:32:40 -07:00