Iavor S. Diatchki
37c475056c
Start on intergrating with type checker.
2014-12-02 17:36:15 -08:00
Iavor S. Diatchki
99c3547a08
Record the parameters of the current scheama into fresh variables generated during kind checking.
2014-12-02 15:50:40 -08:00
Iavor S. Diatchki
358d3fc554
Add an example where we can get capture when substituting.
2014-12-02 15:50:40 -08:00
Iavor S. Diatchki
f8c431aee2
Add applicative instances.
2014-12-02 15:50:40 -08:00
Brian Huffman
7420b27785
Add Parser AST constructor EInfFrom to represent [x...] and [x,y...]
...
As a result, parsed terms including [x...] or [x,y...] now pretty-print
back out using the same syntax.
2014-12-02 14:47:01 -08:00
Brian Huffman
ccfbd1f2de
Fix symbolic simulator implementations of (!!) and (@@)
...
Now these operations correctly set the is-bit flag on
the VSeq constructor when the result type is a list of bits.
Fixes #148 .
2014-12-02 14:07:23 -08:00
Iavor S. Diatchki
c983dbfe5d
Split-up CrySat
into multiple modules.
2014-12-01 16:28:29 -08:00
Iavor S. Diatchki
f889b0bd59
Some "improvement" functionality.
2014-11-14 14:58:25 -08:00
Iavor S. Diatchki
f9f1c8ba02
Use the same name for duplicated non-linear expressions.
2014-11-14 11:21:17 -08:00
Iavor S. Diatchki
d36bcda474
First integration with SMT solver, and fix bug in Non-lin
2014-11-14 11:13:26 -08:00
Iavor S. Diatchki
81fe4410ce
Render using SimpleSMT
2014-11-14 09:50:39 -08:00
Brian Huffman
88983488fc
Share more code between interpreter and symbolic simulator
...
Some interpreter/simulator operations are now overloaded using
a newly introduced 'BitWord' type class.
2014-11-13 13:17:31 -08:00
Brian Huffman
6368bcbe38
Make evaluation of lists of bits non-strict in the elements.
...
This means that e.g. [True, error "foo"]@0 evaluates to True,
similar to how [0x1, error "foo"]@0 evaluates to 0x1.
2014-11-12 13:27:49 -08:00
Iavor S. Diatchki
736a5a09ee
Add decclarations.
2014-11-11 13:51:02 -08:00
Brian Huffman
7e099a5236
Speed up implementation of 'width' function
...
Fixes #139 .
2014-11-10 15:45:34 -08:00
Iavor S. Diatchki
3719800318
Add a function to run linearization pass.
2014-11-10 15:27:48 -08:00
Iavor S. Diatchki
7e7ebb6849
Desugar to SmtLib format.
2014-11-10 15:22:04 -08:00
Brian Huffman
7adf5b2f6c
Speed up lexing of large integer literals
...
This partially addresses issue #139 .
2014-11-10 14:56:29 -08:00
Iavor S. Diatchki
5b5abfb6f7
Name non-linear parts of expressions.
2014-11-10 14:03:20 -08:00
Iavor S. Diatchki
b02527117a
A couple of additional simplification (maybe slow!)
2014-11-05 13:32:34 -08:00
Iavor S. Diatchki
8a1a5e259d
Replace CrySAT1. Implement information propagation. Hook debug output in solver.
2014-11-05 12:48:46 -08:00
Iavor S. Diatchki
6c0200d236
Propagate x = inf
in conjunctions and disjunctions.
2014-11-04 18:23:47 -08:00
Brian Huffman
0352dca57a
Add regression test for github issue #133 .
...
Renamed old "issue133" to "trac133", indicating that it uses a different
numbering system.
2014-11-04 16:10:48 -08:00
Iavor S. Diatchki
ae6caeb86a
Capture some of the invariants for the simplfier.
2014-11-04 14:31:41 -08:00
Adam C. Foltzer
b05ddd5e54
Partially fixes #73
...
Due to the limitations of the GHC runtime, we can't get around the
possibility of out-of-memory errors, but we can prevent individual
bitvectors from being too large for the libgmp-backed bignums.
There is now an architecture-dependent check whenever creating a new
`BV` value in the concrete evaluator to ensure the width does not
exceed the GMP limits. If a width is too large, the evaluation returns
to the REPL much like diving by zero.
2014-11-04 14:18:42 -08:00
Adam C. Foltzer
761fb4076d
add tests for #73
2014-11-04 14:08:23 -08:00
Iavor S. Diatchki
9ceec4d62e
Propagate '> 0' through expressions.
2014-11-04 14:06:22 -08:00
Iavor S. Diatchki
6151ae3b89
Cosmetics: rewrite using anyJust
.
2014-11-04 14:05:44 -08:00
Iavor S. Diatchki
000d84640b
Adjust cryDefined
to ensure that first argument fits.
2014-11-04 14:05:09 -08:00
Iavor S. Diatchki
b9ffd47e00
Fix cryNoInf
: the second argument of Mod
does not need to be finite.
2014-11-04 14:04:36 -08:00
Iavor S. Diatchki
e1c34672a2
Check that the first element of nLefFromThen
fits in the result.
...
See comment for explanation.
2014-11-04 14:03:44 -08:00
Adam C. Foltzer
794017ecf5
add guards for bit vector widths during concrete evaluation
...
Tested on my 64-bit machine; will run tests on Jenkins slaves
2014-11-04 12:11:24 -08:00
Brian Huffman
0a7b39f944
Add regression tests for issue #135 .
2014-11-04 12:03:07 -08:00
Brian Huffman
80ec38fcf5
Merge changes from latest version of SBV
...
Includes changes after LeventErkok/sbv@55a9405954 (Aug 28)
and up to LeventErkok/sbv@67656c6aba (Nov 3)
Fixes #135 .
2014-11-04 11:48:02 -08:00
Iavor S. Diatchki
335832f8ec
Comments and desugar Width into Lg2
2014-11-03 18:02:52 -08:00
Iavor S. Diatchki
753c4f4bbc
Comment
2014-11-03 16:31:27 -08:00
Iavor S. Diatchki
a42ea5d611
Cosmetics: re-arrange, add export list, use panic
.
2014-11-03 16:29:37 -08:00
Iavor S. Diatchki
3c770a742d
Cosmetics.
2014-11-03 16:15:31 -08:00
Iavor S. Diatchki
d242681734
Refactor cryIsEq
to indicate that it should always be eliminated.
2014-11-03 16:14:06 -08:00
Iavor S. Diatchki
d8bac24282
Propagate Fin
constraints across :||
2014-11-03 16:13:39 -08:00
Iavor S. Diatchki
61fb9bf3da
0 mod
x == 0
2014-11-03 15:28:33 -08:00
Iavor S. Diatchki
fe0f2f2cfc
x / 1 == x
2014-11-03 15:27:43 -08:00
Iavor S. Diatchki
d5ac027a61
Substition
2014-11-03 15:27:28 -08:00
Iavor S. Diatchki
1459b85b39
Make sure that we generate valid terms, when removing @inf@.
2014-11-03 14:12:36 -08:00
Iavor S. Diatchki
4a362809c6
Computing free variables, plus some generic traversals.
2014-11-03 13:08:56 -08:00
Adam C. Foltzer
9ef8c54919
Working draft of "hacking" document
...
Merge branch 'feature/issue054'
Closes #54
2014-11-03 11:32:27 -08:00
Adam C. Foltzer
09395fffac
add wip branch info to HACKING.md
2014-11-03 11:20:06 -08:00
Iavor S. Diatchki
88b698adf0
Bugfix: typo
2014-11-03 10:35:23 -08:00
Iavor S. Diatchki
fdcfa4bb36
Remember to call the finite constructors.
2014-11-03 10:35:04 -08:00
Iavor S. Diatchki
7154d09f23
Eliminate (:==) completely.
2014-11-03 10:02:08 -08:00