Commit Graph

1925 Commits

Author SHA1 Message Date
Iavor Diatchki
47d118ecf5 A TEMPORARY hack to force rebuilding GitRev.hs so we get the correct hashes. 2019-01-08 17:14:53 -08:00
Iavor Diatchki
58eb799ec9 Indicate in the logo, if the repo has been modified. 2019-01-08 17:14:05 -08:00
Iavor Diatchki
60c1baebfd Indent goals to be shown a bit further, to line up with assumptions. 2019-01-08 16:42:34 -08:00
Iavor Diatchki
d8b1a7a601 Improve some of the error messages. 2019-01-03 11:28:59 -08:00
Iavor Diatchki
d331d16128 Add a command to run the locally built Cryptol 2019-01-03 11:10:29 -08:00
Iavor Diatchki
efe0b7ce7a Add some bullets and rephrase error a bit. 2019-01-02 17:16:48 -08:00
Iavor Diatchki
8caf3f7438 Remove unused error message 2019-01-02 17:16:09 -08:00
Aaron Tomb
f5318d3379 Bump Travis GHC and cabal-install versions 2018-12-13 08:54:28 -08:00
Aaron Tomb
bf3aa4dc01 Adapt Travis to new scripts 2018-12-13 08:39:04 -08:00
Iavor Diatchki
2bd9d3aecf A Bash script to automate common cabal (v2) tasks 2018-12-12 16:59:00 -08:00
Iavor Diatchki
d377f38c9d Use the factored-out test-runner. 2018-12-11 16:30:02 -08:00
Iavor Diatchki
349bb6b355 Ignore all .ghc.envi* stuff 2018-12-11 16:16:39 -08:00
Brian Huffman
9b7597c4fd Update changed test output. 2018-12-11 15:52:19 -08:00
Brian Huffman
f96e1e49fb Add special case to speed up type checking of decimal literals.
This yields a huge (almost 100x) speedup to the
typechecker/BigSequence benchmark.
2018-11-16 11:02:30 -08:00
Brian Huffman
3584a97e8b Factor out new function listParamSubst. 2018-11-15 16:47:35 -08:00
Iavor Diatchki
2e4adccccb Just a note 2018-11-05 15:11:27 -08:00
Brian Huffman
2994ef9143 Symbolic + and - on Z n reduce mod n when arguments are concrete.
Fixes #554.
2018-11-05 11:24:08 -08:00
Brian Huffman
ac13b5e4bd Symbolic * on type Z n reduces mod n when arguments are concrete.
This helps with #554.
2018-11-05 10:26:36 -08:00
Aaron Tomb
231fe95a40 Add note in manual about satNum and Integer 2018-11-01 08:25:23 -07:00
Aaron Tomb
dede87609e
Merge pull request #552 from LeventErkok/master
Fix satNum
2018-10-31 14:00:03 -07:00
Levent Erkok
b801e6677e Fix satNum
Since SBV 7.0; allSat is no longer lazy. So, Cryptol's current
implementation is buggy:

   Cryptol> :set satNum=2
   Cryptol> :sat \x -> x >(3:Integer)
   .. Runs forever ..

This pull request fixes the issue:

   Cryptol> :set satNum=2
   Cryptol> :sat \x -> x>(3:Integer)
   (\x -> x > (3 : Integer)) 4 = True
   (\x -> x > (3 : Integer)) 5 = True
   (Total Elapsed Time: 0.000s, using Z3)

Note that if you set `satNum` to be `all` and if there are indeed an
infinite number of satisfying models, SBV (and thus Cryptol) will still
loop forever. There's really no good way to solve that problem,
unfortunately.
2018-10-28 14:16:52 -07:00
Brian Huffman
20b9b1c193 Rename prelude function width to length, and generalize its type.
Fixes #550.
2018-10-10 16:21:38 -07:00
Iavor Diatchki
a8eab11b31 Changes to avoid irrefutable patterns.
This is to make things build with GHC 8.6, which requires a MonadFail
instance.

Pretty much all of these should end up being `panic`, so perhaps we should
rewrite more of them to call `panic` (instead of using lazy patterns)
2018-10-08 13:50:25 -07:00
Brian Huffman
515642328a Make :browse handle shadowing of names from dynamic environment.
Fixes #538.
2018-09-17 11:04:45 -07:00
Brian Huffman
634c5a03e7 Suppress REPL instantiation messages when warnDefaulting = off.
Fixes #543.
2018-09-17 09:46:00 -07:00
Iavor Diatchki
ad766b3aa7 Reformulate the property, so that Z3 can still find models.
With the other formulation, Z3  became really bad at finding any kind
of model.  Basically, it would always answer `unsat` or `unknown`.

This is undesirable, because we use models when instantiating things
at the command line.  In those cases, however, we probably don't
need the rule at all...  Perhaps, we should provide a way to disable
the axioms when we are looking for models?
2018-09-15 11:04:37 +03:00
Iavor Diatchki
a8d5963bfa Add another property of width.
Fixes #548
2018-09-14 22:50:30 +03:00
Iavor Diatchki
4e843a3435 More consistent statement of axioms for cryWidthUnknown 2018-09-14 10:21:08 +03:00
Aaron Tomb
3caa3a8e82 Use 32-bit GMP size limit on unknown architectures
There doesn't seem to be a general-purpose way to determine architecture
word sizes from CPP as invoked by GHC, so we now fall back on the 32-bit
GMP size limit for unknown architectures. This is always safe, and can
be amended to allow larger words on other architectures as needed.

Closes #542.
2018-09-12 11:28:24 -07:00
Aaron Tomb
0d0eb2cbc3 Fix path names of .md files during tests 2018-09-04 16:31:36 -07:00
Kevin Quick
96cdcf76aa
Add checkE to Cryptol.TypeCheck.Infer exports (for crucible-server). 2018-08-27 13:45:04 -07:00
Kevin Quick
0616c72017
Raise base-compat upper constraint to < 0.11. 2018-08-24 16:45:28 -07:00
Iavor Diatchki
e0557d1694 Do not use parameterized modules when proving.
It turns out this is not the same probelm as #545, which appears
to be working as expected.  It is, however, a related problem,
so we'll say it fixes #545
2018-08-16 10:56:46 +03:00
Iavor Diatchki
c52ae7466a Correct printing of "parameterized" on the REPL.
We only print it when the current module is parameterized.
2018-08-15 20:53:44 +03:00
Iavor Diatchki
72009435c2 Fix script, to deal with multiple versions of Cryptol 2018-08-15 20:26:56 +03:00
Iavor Diatchki
b7b1baa25b Fix test, to account for changes to eval context checking 2018-08-15 20:26:25 +03:00
Iavor Diatchki
5a9a3b4ff1 Change the check for valid evaluation context, and add missing checks.
Parameterized modules are not part of the evaluation context at all,
so now we check that we don't depend on *any* values from them.

Also, now we check both expressions and the schema, and also do
the check when proving not just evaluating.

Hopefully this fixes issue #545
2018-08-15 19:53:23 +03:00
Iavor Diatchki
3b6b183999 Make it more obvious when we've loaded a parameterized module. 2018-08-15 18:16:14 +03:00
Brian Huffman
77db0bd32f Add documentation and comments for Subst module. 2018-08-10 11:54:19 -07:00
Brian Huffman
c047273565 Reimplement type substitutions using IntMap instead of Map.
This speeds up the test suite by about 10%, and makes the example
file from issue #544 typecheck about 7x faster.
2018-08-08 10:54:54 -07:00
Brian Huffman
f2c1946633 Factor out new function tCon in SimpType module. 2018-08-08 10:10:14 -07:00
Brian Huffman
607a55c76a Fix warnings about unused import and declarations. 2018-08-02 17:31:52 -07:00
Aaron Tomb
45ee929b2d Bump Cabal version to 2.6.1 now that 2.6.0 is out 2018-08-01 14:39:56 -07:00
Aaron Tomb
cfeef862e1 Disable warnings about fixity of &&, ||
Fixes #241.
2018-08-01 14:38:44 -07:00
Aaron Tomb
6b926b1b3c Update Cabal file copyright 2018-08-01 09:05:39 -07:00
Aaron Tomb
70fa2033d5 Update Cabal file for Hackage acceptance 2018-08-01 09:01:30 -07:00
Brian Huffman
9b97c74b48 Polishing of :help output.
:help with primitive types now uses vertical whitespace to match
the :help output for other types.

Help text for REPL commands can now contain linebreaks.

For quoted Cryptol syntax in docstrings, consistently use singlequotes
(') instead of backquotes (`). Backquotes are sometimes used within
the quoted code, so it's probably best to avoid using them for quotes.

Consistently capitalize and put a period at the end of docstrings.
2018-07-31 11:33:50 -07:00
Brian Huffman
2e1dbad005 Improve tab completion for :set command. Fixes #154.
Tab now completes option names after `:help :set`.

Tab also completes `:help` with names of primitive types
and type classes (cf. #504).
2018-07-30 18:11:14 -07:00
Aaron Tomb
ba140fb70a Update Programming in Cryptol PDF 2018-07-30 16:36:04 -07:00
Aaron Tomb
4ab7399ef9 Bump frozen SBV versions to 7.10 2018-07-30 16:26:25 -07:00