Commit Graph

59 Commits

Author SHA1 Message Date
Iavor Diatchki
b8780ab68f Add some tests. 2017-10-18 14:33:41 -07:00
Brian Huffman
e15e8ee8bb Makefile looks for .lhs source files 2017-03-28 14:18:52 -07:00
Aaron Tomb
13b704f840 Remove references to sbv repository 2017-02-01 09:09:59 -08:00
Iavor S. Diatchki
10cf6f16e3 Print stats about the prover. Fixes #392 2017-01-27 16:14:37 -08:00
Adam C. Foltzer
2f64119440 split benchmark XML into separate files
This will hopefully yield better scale in the graphs on the Jenkins job
2016-08-09 14:05:30 -04:00
Adam C. Foltzer
3c25c096a7 clean up build a bit 2016-07-06 16:20:01 -07:00
Adam C. Foltzer
20965a0b0b fully qualify cygpath to avoid weird hemlock error 2016-06-08 16:56:22 -07:00
Adam C. Foltzer
bf294a60b8 integrate MiniLock example 2016-01-19 18:19:35 -08:00
Adam C. Foltzer
58a605e8ff update examples and documentation 2016-01-19 18:19:35 -08:00
Adam C. Foltzer
1b1cdebdd3 set user path with Windows installer
Closes #198
2016-01-19 18:18:03 -08:00
Adam C. Foltzer
1d2a135e44 spawn fewer solver instances during typechecking
This appears to increase performance of the test and benchmark suites
substantially, but there may be more opportunities to cut down on the
number of solver instances.
2016-01-11 15:50:14 -08:00
Adam C. Foltzer
4796b0a75a tweak how the prelude is loaded
This removes the `self-contained` flag, since it is fine for all builds
to have the baked-in prelude as a last resort. Tinkerers can still
change the prelude as long as it's in the search path.

Also removes some unnecessary extra prelude loading by the Cryptol
server by means of a new command
2015-11-16 12:56:36 -08:00
Trevor Elliott
2cec1e3782 Revert to the original makefile 2015-09-29 14:04:57 -07:00
Trevor Elliott
2a202fd60a Makefile wibbles 2015-09-28 13:58:39 -07:00
Trevor Elliott
bc5759f867 Try to have make test rebuild cryptol less frequently 2015-09-27 18:02:26 -05:00
Trevor Elliott
4839de6048 Makefile fix
Something wasn't happening correctly with the PKG target, so I altered it to
run everything in one shell.
2015-09-26 13:15:00 -05:00
Adam C. Foltzer
5eb5f00d0a change how the book is built 2015-09-15 13:38:06 -07:00
Adam C. Foltzer
ef2fd808ee add junit-style output for make bench target 2015-08-12 15:47:50 -07:00
Adam C. Foltzer
b6d6691ab0 start benchmarking suite with a Prelude parse test 2015-08-10 11:24:36 -07:00
Adam C. Foltzer
d2393de268 add server flag to deps install step 2015-07-28 13:30:20 -07:00
Adam C. Foltzer
900e4acf8b clean up cryptol-server for merging 2015-07-21 11:52:17 -07:00
Trevor Elliott
c04446b53a Adds more support for UTF-8 in identifiers
Also:

- Improves the `lexical error` message, changing it to `unrecognized
  character`, and only displaying the one character that caused the
  problem.

- Adds more relevant text when showing a lexical error, which should
  address #219

- Switches parser to operate over lazy `Data.Text` rather than `String`
2015-05-26 14:29:36 -07:00
Trevor Elliott
3ca8746eb3 Allow expected failures to be ignored 2015-03-30 16:58:33 -07:00
Adam C. Foltzer
6cb0da9dfe clean up doc distribution 2015-03-25 13:25:32 -07:00
Adam C. Foltzer
dd312bd218 clean up how license files are included in dist 2015-03-23 10:42:10 -07:00
Adam C. Foltzer
a46b4c31c2 switch to TH solution for GitRev
This helps with #18 and should also reduce the number of unnecessary
recompiles that were triggered by the Makefile and/or cabal. The cabal
build type is now Simple.

Most of the complication in the TH.hs module is due to the various
places the current git hash might be stored:

1. Detached HEAD: the hash is in `.git/HEAD`
2. On a branch or tag: the hash is in a file pointed to by `.git/HEAD`
in a location like `.git/refs/heads`
3. On a branch or tag but in a repository with packed refs: the hash is
in `.git/packed-refs`

These situations all arise under normal development workflows and on the
Jenkins build machines, but there might be further scenarios that cause
problems. The tradeoff seems worthwhile though as now projects that
build Cryptol as a dependency wind up having to rebuild Cryptol far less
frequently.
2015-03-16 13:18:28 -07:00
Adam C. Foltzer
489a926589 clean up cabal file for Hackagability
Fixes #18
2015-03-09 15:17:26 -07:00
Adam C. Foltzer
0c7b21674c add "self-contained" mode for Cryptol-as-a-Library
Many of our projects that depend on Cryptol break because we forgot to
drag along `Cryptol.cry` or it just can't work out where it is from the
perspective of the other executable.

There's now a new flag `self-contained` in `cryptol.cabal` that is on by
default that bakes the contents of the Prelude into the library, so that
it can be reproduced on demand.

This is really a hack at this point because the module system bakes in
the assumption that a module has an associated file path, so we actually
have to write the contents to a tmp file before reading them back
in. Let's do better than this in the future.

This option is disabled for targets in the Makefile because we want the
standalone interpreter to be using the distribution's `Cryptol.cry`.
2015-03-05 15:18:18 -08:00
Adam C. Foltzer
11405230aa tweak to Makefile for Windows dist 2015-03-04 14:53:59 -08:00
Adam C. Foltzer
6e1abbd2c3 adjust path on windows for relocatable build 2015-03-04 09:19:22 -08:00
Adam C. Foltzer
528a7d516d add an install target
meant to make distribution with, eg., Homebrew an easier task
2015-03-03 17:21:29 -08:00
Adam C. Foltzer
72dcea9262 tweak how often we generate GitRev.hs 2015-03-03 16:27:40 -08:00
Adam C. Foltzer
ba9c1461ca distribution tweaks
Makefile now has two modes depending on whether PREFIX is set. If it's
not, we try to make the distribution as relocatable as possible, meaning
we don't rely on the baked-in-by-cabal data directory. If it is set, we
do use that path.
2015-03-03 16:22:14 -08:00
Adam C. Foltzer
993961c2a4 remove icry directory from dist target 2015-03-03 13:42:00 -08:00
Adam C. Foltzer
3e6579a24d Merge branch 'master' into feature/issue75
Conflicts:
	Makefile
	cryptol/Main.hs
	src/Cryptol/REPL/Command.hs
	src/Cryptol/REPL/Monad.hs
2015-03-03 11:41:34 -08:00
Adam C. Foltzer
9923b6f11a split out notebook into separate package
This involved:

- Moving a couple REPL modules into the Cryptol library hierarchy (those
  that don't depend on console libraries)
- Splitting up the Makefile, which unfortunately resulted in a lot of
  not-quite-duplication between the two Makefiles. Let's look into
  better abstraction...
2015-03-02 15:46:21 -08:00
Iavor S. Diatchki
be546b4261 Modify testrunniner to figure out on its own if we have a dir or a test.
This means we don't need -d anymore, and now we can run individual tests
from the comman line.
2015-02-25 14:19:11 -08:00
Adam C. Foltzer
30dd6d0c26 configuration depends on cryptol.cabal 2015-02-16 14:40:24 -08:00
Adam C. Foltzer
2e0f0f0dc5 remove submodule; EasyKernel is on hackage 2015-02-12 08:54:35 -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
9f61032289 update notebook build mechanisms 2015-02-05 16:12:36 -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
22df9717cb properties and cleanup for new contrib examples 2015-01-18 12:46:03 -08:00
Adam C. Foltzer
193e6595ff serialize alex and happy targets
Fixes #161
2015-01-18 11:39:04 -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
Trevor Elliott
b1eae187e5 Make the cryptol binary depend on the sources
Instead of making the cryptol binary .PHONY, use find to locate all the
sources to depend on.
2014-12-09 11:20:31 -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
Adam C. Foltzer
1cd5526bfe update WiX installer version
Moved from 3.7 to 3.8, and also changed the Program Files path as we're using a 64-bit machine now on the build farm.
2014-10-16 14:51:46 -07:00