Commit Graph

315 Commits

Author SHA1 Message Date
Adam C. Foltzer
aa787b366a support :prove, :sat, and others in notebook
Fixes @weaversa's comment in
https://github.com/GaloisInc/cryptol/issues/163#issuecomment-74121085
2015-02-12 15:00:27 -08:00
Adam C. Foltzer
3f401b4321 bump version constraint for ipython-kernel 2015-02-12 08:57:18 -08:00
Adam C. Foltzer
2e0f0f0dc5 remove submodule; EasyKernel is on hackage 2015-02-12 08:54:35 -08:00
Adam C. Foltzer
6bdbbfae30 clarify the name of the icryptol script 2015-02-11 17:54:42 -08:00
Adam C. Foltzer
c8a764b4cd remove bit about cloning IHaskell from README 2015-02-11 17:46:03 -08:00
Adam C. Foltzer
59aacf02fd document the make run target
This is a convenience for getting the library path right when running
from the staged dist area
2015-02-11 17:36:12 -08:00
Adam C. Foltzer
f04a2547af document notebook branch and add submodule
These changes should almost completely disappear once `ipython-kernel`
is on Hackage.
2015-02-11 17:35:14 -08:00
Adam C. Foltzer
adcd96fa47 make notebook distributable
This commit brings the notebook into the rest of the distribution
infrastructure set up for cryptol. The main points are:

- new icryptol-kernel executable
- new icryptol shell script that wraps ipython and makes sure the
  cryptol profile is set up
- Makefile target for friendly local testing (`make notebook`)
- moved example notebooks to examples subdirectory
2015-02-11 16:21:43 -08:00
Adam C. Foltzer
62d8277574 add just enough strictness to evalCmd 2015-02-05 17:05:11 -08:00
Adam C. Foltzer
3180d12740 Merge branch 'master' into feature/issue75 2015-02-05 16:28:56 -08:00
Adam C. Foltzer
9f61032289 update notebook build mechanisms 2015-02-05 16:12:36 -08:00
Adam C. Foltzer
705230f24b another sdist fix 2015-01-28 11:28:52 -08:00
Adam C. Foltzer
92edf47dbd fix cabal sdist by including configure 2015-01-28 11:01:53 -08:00
David Raymond Christiansen
7cd2739831 Make notebook use iPython Haskell library
Now, the notebook interface runs its own ZeroMQ interface using the
EasyKernel module that is now exported from IHaskell's underlying
ipython-kernel library. This eliminates the line protocol with the
Python wrapper, and it should work on Windows (though it is not tested
there).

Part of this involved making the REPL monad able to change the IO action
used to print strings.

Continuing issues and improvment possibilities are in the issue tracker
- see issue #75 for a starting point.
2015-01-27 17:38:24 -08:00
David Raymond Christiansen
ae0b2f8416 Make NB in notebook into an Applicative instance
This improves GHC 7.10 compatibility and eliminates warnings.
2015-01-27 16:24:53 -08:00
David Raymond Christiansen
b76141c661 Make IPython notebook build again. 2015-01-27 16:24:52 -08:00
Trevor Elliott
e338574ea1 Remove reloaded modules from the cache
Loading modules explicitly that were already loaded would cause the previous,
cached module to be kept, and the new checked one to be thrown away.
2015-01-27 15:13:26 -08:00
Trevor Elliott
ca06580fc6 Remove the dependency on mtl 2015-01-27 15:12:35 -08:00
Brian Huffman
64d53546fe Remove custom fork of SBV library in favor of the official SBV-4.0.
Fixes #35.
2015-01-23 14:22:18 -08:00
Adam C. Foltzer
7d650526cd Update book pdf with changes from a15fb75 2015-01-21 15:49:25 -08:00
Adam C. Foltzer
13a385d8c5 Fixes #172
There's now a more sensible hierarchy of locations that Cryptol uses to
look for modules. By default, in order it looks for libraries in:

1. The directories specified in the CRYPTOLPATH environment variable
2. The current directory
3. The user data directory (something like `$HOME/.cryptol`)
4. Relative to the executable's install directory
5. The static path used when building the executable (cabal's data-dir)

There is also a new command-line flag for the interpreter:
`--cryptolpath-only` which makes the interpreter ignore locations 2-5.

This commit also reworks the Makefile and build/release process. These
are bunched together because they play off each other quite a bit; the
build/release process determines the location of the `Cryptol.cry`,
which must be found when looking for modules.

Rather than leaning on `cabal install`, we now use a combination of
`cabal configure`, `cabal build`, and `cabal copy`. A couple of upshots
to this:

- More of the release staging is handled by cabal -- we don't have to go
  in and manually copy things out of the sandbox. In fact, the `cryptol`
  executable never goes into the sandbox.

- The testing infrastructure runs on executables that are in place in
  the staging directory, rather than in the sandbox. This should be more
  hygienic and realistic.

- The `Cryptol.cry` prelude file is now in `/share/cryptol` in order to
  better reflect the common POSIX structure. This means Cryptol will
  play nicer in global installs, and mirrors what other interpreted
  languages do.

- The default build settings use a prefix of `/usr/local` rather than
  using the sandbox directory. This makes them more relocatable for
  binary distributions. Set PREFIX= before making to change this.
2015-01-21 15:03:16 -08:00
Adam C. Foltzer
a15fb75856 update book with allSat 2015-01-18 17:03:43 -08:00
Adam C. Foltzer
2b2c3e5ff6 Merge branch 'yuuko-master' 2015-01-18 16:16:54 -08:00
Adam C. Foltzer
a5cf80c570 Merge @yuuko's allsat pull requests
Cryptol's invocation of proof tools has changed quite a bit since this
PR was first opened, so this took a fair amount of work to
integrate. However we now have the :satNum option, and multiple sat
results are correctly bound to `it`.
2015-01-18 16:13:56 -08:00
Adam C. Foltzer
22df9717cb properties and cleanup for new contrib examples 2015-01-18 12:46:03 -08:00
Adam C. Foltzer
d7e9b9b3c6 add README for contrib 2015-01-18 12:45:39 -08:00
Adam C. Foltzer
473b175922 move RC4 to contrib directory 2015-01-18 11:47:40 -08:00
orchid
1f3c9b8203 RC4 2015-01-18 11:47:40 -08:00
Adam C. Foltzer
85e1725b29 Merge pull request #69 from mknight-tag/master
Add MKRAND RBG to contrib
2015-01-18 11:42:21 -08:00
Adam C. Foltzer
193e6595ff serialize alex and happy targets
Fixes #161
2015-01-18 11:39:04 -08:00
Brian Huffman
ae219c2e90 Fix definitions of sbvRotate{Left,Right} for large rotation amounts;
Also add regression tests for symbolic rotations.

Fixes #160.
2015-01-16 11:06:12 -08:00
Brian Huffman
811dc0f816 Add regression test for issue #158. 2015-01-15 16:24:21 -08:00
Brian Huffman
5f8b8947d4 Merge changes from latest SBV version (3.5 pre-release)
Includes changes after LeventErkok/sbv@6468f41bde (Dec 5)
and up to LeventErkok/sbv@49375110c5 (Jan 14)
2015-01-15 10:31:01 -08:00
brianhuffman
59fb642486 Merge pull request #157 from dmwit/master
canonicalize records during comparison in :prove
2015-01-14 16:33:11 -08:00
Daniel Wagner
44c2a1f709 canonicalize records during comparison in :prove 2015-01-13 19:09:50 -08:00
Brian Huffman
30b255a740 Avoid importing private modules from sbv package 2015-01-13 14:27:41 -08:00
Iavor S. Diatchki
faab3aee1f Import Applicative for pre 7.10 2015-01-08 09:19:20 -08:00
Iavor S. Diatchki
e217600b61 Changes to make things work with GHC 7.10 2015-01-06 09:21:47 -08:00
Trevor Elliott
57c6580b5b Give FM an Alternative instance 2014-12-31 14:58:51 -08:00
Trevor Elliott
f29078f341 Change the precedence of xor (^)
Move xor in the precedence table to be between comparisons and (#), which
reflects where it lives in the haskell hierarchy.
2014-12-31 11:12:54 -08:00
Trevor Elliott
1eac4a3b9d Switch from always inferring to checking when possible 2014-12-30 10:49:43 -08:00
Trevor Elliott
ec368fe6af Fix #16
Propagating type signatures down when they're given seems to fix this bug.
2014-12-30 10:49:01 -08:00
Trevor Elliott
41ca73ffaa Update tests for changes to inference
The changes didn't alter the behavior of the typechecker, only the
warning/error output, and the order of some variables when generalizing.
2014-12-30 10:43:38 -08:00
Trevor Elliott
12e0d8605c Remove unused inferFun function 2014-12-29 23:27:31 -08:00
Trevor Elliott
46e176ed5b Avoid redundant cases 2014-12-29 23:27:03 -08:00
Adam C. Foltzer
80b3102512 Add support for .cryptol files
Fixes #97
2014-12-23 17:48:26 -08:00
Trevor Elliott
ea01ec4aaf Fix a bug with comprehension checking
Wasn't relating the size of the goal type to the size of the arms of the
comprehension.
2014-12-22 14:59:52 -08:00
Trevor Elliott
881f397a48 Check instead of infer
We can take advantage of information from signatures if we check instead of
infer.  I'm not sure if this is actually paying off, but it should mean that we
unify less when signatures are present, and generate goals that are a little
more specific.
2014-12-19 17:33:16 -08:00
Trevor Elliott
8f06d2eaf4 Avoid re-applying the substitution to goals 2014-12-18 17:28:55 -08:00
Trevor Elliott
ca6cead8f0 Update the output for test 225 2014-12-18 17:28:34 -08:00