Commit Graph

892 Commits

Author SHA1 Message Date
Adam C. Foltzer
28960c1b68 fixed replicateV during symbolic simulation
Previously this function would always produce a sequence with the
"isWord" bit set to False. It now takes a type argument so that it can
properly set it to True when the elements are Bits.
2015-06-01 15:37:51 -07:00
Adam C. Foltzer
44e1b1e4b0 Merge branch 'hotfix/2.2.4' into releases 2015-06-01 15:35:40 -07:00
Adam C. Foltzer
ebaa98699b bump version 2015-06-01 12:34:33 -07:00
Adam C. Foltzer
19ce4d4c48 fixed replicateV during symbolic simulation
Previously this function would always produce a sequence with the
"isWord" bit set to False. It now takes a type argument so that it can
properly set it to True when the elements are Bits.
2015-06-01 12:33:07 -07:00
Iavor S. Diatchki
d5988338be Wibbles 2015-05-29 10:18:03 -07:00
Iavor S. Diatchki
cd67c61b35 Propagate constants in comparisons 2015-05-29 10:14:15 -07:00
Iavor S. Diatchki
b86e4bba66 Add --rewrite-divk to test 2015-05-29 10:13:57 -07:00
Iavor S. Diatchki
52f3a836b4 Fix test output issues214.
We get one warning per enumeration which seems reasonable.
2015-05-27 15:35:24 -07:00
Iavor S. Diatchki
cd2f4bfc7a Put cast under the quantifiers, fixes test05 in mono-binds 2015-05-27 15:32:17 -07:00
Iavor S. Diatchki
2733102c25 Stick with integers, otherwise we overflow for large lists
Fixes #226
2015-05-27 15:04:17 -07:00
Iavor S. Diatchki
747ad08e2a Fix broken rewrite 2015-05-27 11:56:20 -07:00
Iavor S. Diatchki
9faa70631e Merge branch 'master' of github.com:GaloisInc/cryptol 2015-05-27 11:48:38 -07:00
Iavor S. Diatchki
95c4c8c1d5 More constant propagation when solving 2015-05-27 11:48:30 -07:00
Iavor S. Diatchki
6912c55e22 Functions for computing roots 2015-05-27 11:48:00 -07:00
Trevor Elliott
ecb8ea2aa6 Use Text consistently in the parser interface 2015-05-27 10:42:31 -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
Adam C. Foltzer
1ae907f5d9 version bump to 2.3.0; fix warnings 2015-05-26 14:04:31 -07:00
Trevor Elliott
86ca669154 Fix 7.10/7.8 compatibility with use of mempty 2015-05-22 10:46:49 -07:00
Trevor Elliott
5e92b00789 Fix #177
Add a name mapping environment to the pretty printer to control how qualified
names get printed.
2015-05-21 23:17:15 -07:00
Trevor Elliott
ace54c884f Add a naming environment to the pretty printer 2015-05-21 23:13:04 -07:00
Thomas M. DuBuisson
8776f2c854 Add :read command
Use:

```
File> :read /tmp/x
File> :set ascii=on
File> it
"xyz\n"
File> :t it
it : [4][8]
File>
```
2015-05-21 11:03:05 -07:00
Thomas M. DuBuisson
5e094f3acd Add a ':write' command
The intent here is to allow users to write expressions to disk without
copy and pasting the ASCII representation into some other system (ex: a
Haskell script) to perform the actual file write.

Use:

```
Cryptol> :write /tmp/foo "hello Cryptol!\n"
Cryptol> :!cat /tmp/foo
hello Cryptol!
Cryptol> let var = "Complex computation\n"
Cryptol> :write /tmp/foo var
Cryptol> :!cat /tmp/foo
Complex computation
Cryptol> let var = 32 : [32]
Cryptol> :write /tmp/foo var
Can not write expression of types other than [n][8].  Type was:  [32]
```

Also: Tab completion for FileExprArg commands.

This is rather half-done.  The actual completion should depend on if
the user is inputting the 1st or 2nd argument, but we can't really
determine that without live parsing which is probably a largish change.
Instead, we just assume the completion is wrt the expr, since the file
will likely be new and not be able to tab-complete in real uses.
2015-05-21 10:57:14 -07:00
Iavor S. Diatchki
8bbc6883eb Add option to run-core lint. 2015-05-20 15:26:17 -07:00
Iavor S. Diatchki
bc1dd56720 Import applicative qualified, to make things work on 7.8 2015-05-20 11:18:08 -07:00
Iavor S. Diatchki
6249563fd8 First stab at type-checker sanity checking. 2015-05-19 14:25:56 -07:00
Iavor S. Diatchki
8900a50449 Remember to insert casts when simplifying; don't mess with user-supplied signatures. 2015-05-18 14:04:38 -07:00
Adam C. Foltzer
f822f1104e add announcement venues 2015-05-15 15:32:31 -07:00
Thomas M. DuBuisson
92aa8ffca2 Make 'lg2' actually compute 'lg2'
So this boring bug has seen three patches today... sigh.
2015-05-13 16:15:47 -07:00
Thomas M. DuBuisson
fb6b9b6a3f Remove unintentional string change
Oops, string twiddle I use to ease grepping snuck in,.
2015-05-13 13:35:24 -07:00
Thomas M. DuBuisson
87c265615b Fix #215
We were hitting `x :: Double == inf`.
2015-05-13 13:34:08 -07:00
Thomas M. DuBuisson
d553a33179 Fix #214: Add the test that shows the success.
Notice the actual fix is in commit
342b1cf3ff
2015-05-11 10:25:22 -07:00
Iavor S. Diatchki
342b1cf3ff Fix the exporting of length function to SMT 2015-05-08 16:44:21 -07:00
Iavor S. Diatchki
5edb15ff9e Merge branch 'master' of github.com:GaloisInc/cryptol 2015-05-08 15:47:58 -07:00
Iavor S. Diatchki
af3a8c1a87 Another take on improvements. 2015-05-08 15:40:58 -07:00
Thomas M. DuBuisson
7457f7d5aa Example crash in HEAD (issue #214)
This shows a type error in 2.2.3 but crashes HEAD.
2015-05-08 13:56:53 -07:00
Iavor S. Diatchki
2400c1d300 Split out expression simplification in a separate module 2015-05-08 13:40:35 -07:00
Iavor S. Diatchki
dd27e76753 An extra constraint for well-definedness of LenFromThen 2015-05-08 09:41:35 -07:00
Thomas M. DuBuisson
fd4ed49fe5 @yav Another TC example for #212
So I'm treating this issue as a running conversation centered around
this one topic, let me know if it gets old.
2015-05-07 23:24:41 -07:00
Iavor S. Diatchki
0708e37db6 Simplify things by reusing type-checker names in the solver.
This is simpler and more efficient.
2015-05-07 16:20:59 -07:00
Iavor S. Diatchki
b92c6f62fd Merge branch 'master' of github.com:GaloisInc/cryptol 2015-05-07 11:39:51 -07:00
Iavor S. Diatchki
1b4eaa5379 Start on interval analysis 2015-05-07 11:39:43 -07:00
Iavor S. Diatchki
298aa8ea77 Checkpoint 2015-05-07 10:46:36 -07:00
Thomas M. DuBuisson
94abebdf01 Example type constraint width issues 2015-05-07 09:31:10 -07:00
Iavor S. Diatchki
2508f15b60 Split off in a separate module 2015-05-06 10:19:01 -07:00
Iavor S. Diatchki
9de771299d Checkpoint. 2015-05-05 17:04:12 -07:00
Iavor S. Diatchki
e15cf8ce15 A bit more simplification of types. 2015-05-05 14:32:12 -07:00
Iavor S. Diatchki
c38608126b Merge branch 'master' of github.com:GaloisInc/cryptol 2015-05-05 12:20:27 -07:00
Iavor S. Diatchki
0686a11a6b Fix pretty printing bug 2015-05-05 12:20:08 -07:00
Iavor S. Diatchki
c32e79983e Some more info about non-linear constraints.
Fixes #185
2015-05-05 12:19:55 -07:00
Brian Huffman
f95d3fadb6 Add regression test for issue #211. 2015-05-05 11:49:12 -07:00