Commit Graph

440 Commits

Author SHA1 Message Date
Iavor S. Diatchki
77a9f7135a Better errors 2015-02-25 15:43:35 -08:00
Iavor S. Diatchki
d11cc88633 Merge remote-tracking branch 'origin/master' into wip/cs 2015-02-25 14:21:20 -08:00
Iavor S. Diatchki
55a3a56659 Merge branch 'master' of github.com:GaloisInc/cryptol 2015-02-25 14:19:35 -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
Iavor S. Diatchki
688e5cfebf Fix test. 2015-02-25 13:44:29 -08:00
Iavor S. Diatchki
22abf73fe0 Allow for negatives in linear relations. 2015-02-25 13:12:33 -08:00
Iavor S. Diatchki
25bf376a01 Run linear relation improvement, even (especially!) then the values differ. 2015-02-25 11:23:58 -08:00
Iavor S. Diatchki
d85a5d5aa0 Just debugging improvements. 2015-02-25 11:21:56 -08:00
Iavor S. Diatchki
ce09d23d74 Hook in and improve linear relations.
There is still an issue with the encoding of finitness.
For example, if we know:

a = 1 + min b a

And we know that `b`z is finite, we SHOULD know that `a` is finite too,
but apparently we don't.
2015-02-24 18:19:01 -08:00
Iavor S. Diatchki
e70e1153fb Generalize anyJust 2015-02-24 18:17:17 -08:00
Iavor S. Diatchki
037726f0fa Comments, and some small changes:
1. Preserve order of TODO list, os that we prefer unification variables
  2. Stop early when looking for `x = y`.

So if we have 'a = b = c` now we'll get:

a = b
b = c

Before we would get:
a = b
a = c
2015-02-24 18:17:07 -08:00
Trevor Elliott
a0f60c3f55 Merge pull request #172 from bryant/issue-167
Issue 167
2015-02-24 15:47:52 -08:00
bryant
e73c35bcf4 add empty module test 2015-02-24 18:00:59 -05:00
bryant
9b3619cc34 insert end-of-layout-block early when eof 2015-02-24 16:17:49 -05:00
Iavor S. Diatchki
0b0c94e489 Add flag to support division by constant. 2015-02-23 14:22:43 -08:00
Iavor S. Diatchki
ac965519e6 Add a rewrite for a common pattern involving width 2015-02-23 14:22:13 -08:00
Iavor S. Diatchki
43d4adf90a Fix the non-linearity test 2015-02-23 14:21:49 -08:00
Iavor S. Diatchki
46718d710f Be queit 2015-02-23 11:40:19 -08:00
Iavor S. Diatchki
e85c1610a5 Fix the location of fin constriaints when exporting to SMT 2015-02-23 11:39:56 -08:00
Iavor S. Diatchki
4fb370c8ec When declaring non-linear variables, assert their finatness also. 2015-02-20 17:35:34 -08:00
Iavor S. Diatchki
62c5f04589 Disable some of the NL code; get back to a somewhat working state. 2015-02-20 15:38:11 -08:00
Iavor S. Diatchki
0b4611c3fd Use Map instead of Trie for the moment (Tries take too long to build) 2015-02-20 10:51:28 -08:00
Trevor Elliott
6d2f26785a Add the filename to parser errors
Closes #168
2015-02-18 15:37:15 -08:00
Trevor Elliott
b08ed758fb Fix a typo 2015-02-18 13:52:52 -08:00
Trevor Elliott
af0f0fb3b5 Always pack the zero literal 2015-02-18 13:51:59 -08:00
Iavor S. Diatchki
2fe2949e10 Merge remote-tracking branch 'origin/master' into wip/cs 2015-02-18 11:41:25 -08:00
Adam C. Foltzer
0b500d79d9 move issue218 test to issue116
218 was an issue number on our old trac wiki; #116 (and #2) are the
corresponding tickets on GitHub. Pointed out by @weaversa in #170
2015-02-18 10:43:03 -08:00
Adam C. Foltzer
deb6f62d2c update (failing) test case for 0-based tuple index
Between this and the fix for #117, this fixes #170
2015-02-18 10:34:59 -08:00
Adam C. Foltzer
67b4e5f39f correction: 49030290 fixes #117 2015-02-18 10:27:33 -08:00
Adam C. Foltzer
49030290e9 fix #93
Revised how we do output for `:sat` and `:prove` without arguments,
making it more clear what properties are being checked in each case.

Also reworded the output of `:check` slightly in the case where the
property has no inputs. It would be nice to make `:check` output more
consistent with the others.
2015-02-18 10:25:46 -08:00
Adam C. Foltzer
3d275ea44c add load targets to search path
Fixes a bug pointed out by @weaversa:
https://github.com/GaloisInc/cryptol/issues/127#issuecomment-64464455

In addition to the other search path changes in #127, we now will add
the directory containing files to be loaded to the search path. This
applies to:

- files loaded with a command line argument, like in the original
  comment
- arguments to `:l`, so for example `:l examples/DES.cry` would work
- batch file arguments, so for example running `cryptol -b
  /some/path/bar.cry` adds `/some/path` to the search path.
2015-02-17 15:27:59 -08:00
Iavor S. Diatchki
6206267f7a Merge remote-tracking branch 'origin/master' into wip/cs 2015-02-17 11:03:10 -08:00
Adam C. Foltzer
30dd6d0c26 configuration depends on cryptol.cabal 2015-02-16 14:40:24 -08:00
Adam C. Foltzer
64d3d1353f add warnShadowing REPL option
Conflicts:
	cryptol/REPL/Command.hs
2015-02-16 14:40:06 -08:00
Adam C. Foltzer
025ad73411 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:38:32 -08:00
Iavor S. Diatchki
b77b5c6b3c Checkpoint: More on integration with non-linear constraints. 2015-01-30 17:57:12 -08:00
Iavor S. Diatchki
d92960eaaf More debugging code 2015-01-29 15:04:08 -08:00
Iavor S. Diatchki
01c58b5fe6 Avoid warning 2015-01-29 15:03:53 -08:00
Iavor S. Diatchki
551ffab720 Improve pretty printing 2015-01-29 15:03:39 -08:00
Iavor S. Diatchki
9cf1231bc2 Add LANGUAGE pragmas 2015-01-29 15:03:29 -08:00
Iavor S. Diatchki
67ba18bbcc Merge remote-tracking branch 'origin/master' into wip/cs
Conflicts:
	cryptol.cabal
2015-01-29 10:54:33 -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
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