Robby Findler
561d33fddd
improved the name printing for between contracts
2010-08-07 14:35:08 -05:00
Robby Findler
98fb0e5b3a
moved a bunch of tests into the official test suite.
2010-08-07 14:35:08 -05:00
Robby Findler
9d98533e23
cleaned up a few little things here and there to pass the last of the existing tests
2010-08-07 14:35:08 -05:00
Robby Findler
b5fad95e58
make the optimizer give up more agressively when it starts out with a completely unknown thing
2010-08-07 14:35:08 -05:00
Robby Findler
306ae096eb
Fixed a bug in the eres handing (contracts where the dependent range variables are underscores)
2010-08-07 14:35:07 -05:00
Robby Findler
73177ceddc
moving machines
2010-08-07 14:35:07 -05:00
Robby Findler
2347568a6c
minor bug fixes
2010-08-07 14:35:07 -05:00
Robby Findler
9bc1b63ed4
added support for _ in range contracts
...
fixed a bug in blame assignment
2010-08-07 14:35:07 -05:00
Robby Findler
da9f5bd61a
fixed a few bugs in the ->i implementation and the test suite.
2010-08-07 14:35:07 -05:00
Robby Findler
10b6e58dd0
added support for rest arguments
2010-08-07 14:35:07 -05:00
Robby Findler
c31de06cc0
added result contract checking (after refactoring argument checking to make that more straightforward), prepared for #:post condition checking
2010-08-07 14:35:07 -05:00
Robby Findler
88aafb52eb
clarified the order of evaluation for contract expressions in ->i
2010-08-07 14:35:07 -05:00
Robby Findler
67f2a44fec
changed the parsed structs to better exploit similarity between arguments and results
2010-08-07 14:35:07 -05:00
Robby Findler
6d9066eb22
got #:pre conditions working
2010-08-07 14:35:06 -05:00
Robby Findler
5922ceda74
improved parsing of #:pre and #:post for ->i (fixed bugs and added more checks to the syntax)
2010-08-07 14:35:06 -05:00
Robby Findler
c1b558e1a3
adjusted the syntax of ->i so that #:post and #:pre get a list of variables now
2010-08-07 14:35:06 -05:00
Robby Findler
3b431c6ff2
->i now evaluates the arguments in the proper order
2010-08-07 14:35:06 -05:00
Robby Findler
d2894e7a8e
added in a use of Shu-yu's opt/c to see if it helps (which it does for complex contracts)
2010-08-07 14:35:06 -05:00
Robby Findler
40cde743a9
Got to the point where I can run some timings to see how well ->i does.
...
Here are the results, each contract put on the same function, namely:
(λ (x y) (+ x y))
1: (-> number? (<=/c 0) any)
2: (->i ([x number?] [y (<=/c 0)]) any)
3: (->i ([x number?] [y (x) (<=/c x)]) any)
4: (->d ([x number?] [y (<=/c 0)]) any)
5: (->d ([x number?] [y (<=/c x)]) any)
Taking f1 as the baseline, these are the relative times for calling
that thing over and over in a loop, supplying -1 as both of the
arguments:
f2: 1.01x
f3: 4.15x
f4: 21.1x
f5: 21.5x
2010-08-07 14:35:06 -05:00
Robby Findler
599fe85a16
Got the first example of indy blame working
2010-08-07 14:35:06 -05:00
Robby Findler
9fcc157b0d
this checkpoint causes racket to crash, with a segfault. run racket racket/contract/scratch.rkt to
...
see the error.
2010-08-07 14:35:06 -05:00
Robby Findler
4c240f2307
moving machines
2010-08-07 14:35:06 -05:00
Robby Findler
457248e9cc
moving to a different machine (some progress on optional & keyword args)
2010-08-07 14:35:05 -05:00
Robby Findler
d14796c276
got first example working
2010-08-07 14:35:05 -05:00
Robby Findler
5217744740
rename
2010-08-07 14:35:05 -05:00
Robby Findler
efd72af3d6
switching machines
2010-08-07 14:35:05 -05:00
Robby Findler
d75536161c
fixed bug in dependency checking for #:rest variables (and removed printfs)
2010-08-07 14:35:05 -05:00
Robby Findler
8f6080733f
fixed some bad ->i test cases
2010-08-07 14:35:05 -05:00
Robby Findler
9e92a976a7
added in checking that dependent variables are all sensible
2010-08-07 14:35:05 -05:00
Robby Findler
8b05829717
switching machines
2010-08-07 14:35:05 -05:00
Robby Findler
64a1ddcda9
adjusted the syntax for ->i so that #:rest is not ambiguous anymore (added extra parens, deviating from ->d a little bit) and updated the test suite
2010-08-07 14:35:05 -05:00
Robby Findler
7352d86f1f
improved check syntax's jump-to-definition so it scrolls to a more natural place
2010-08-07 14:35:04 -05:00
Robby Findler
79d0c581d4
moving machines
2010-08-07 14:35:04 -05:00
Robby Findler
561ac12a91
got started on the ->i parser
2010-08-07 14:35:04 -05:00
Robby Findler
3c70b9d2ab
improved docs for ->i, added docs for the-unsupplied-arg and exported
...
and added docs for unsupplied-arg?.
2010-08-07 14:35:04 -05:00
Robby Findler
18e9d886e2
added an ->i test suite, based on the ->d one (doesn't test for indy-ness tho)
2010-08-07 14:35:04 -05:00
Robby Findler
a66fd7574d
fixed a bug in the annotations for things like listof when they were used in a non-function position
2010-08-07 14:35:04 -05:00
Robby Findler
a524595af2
docs for ->i
2010-08-07 14:35:04 -05:00
Robby Findler
2b2fb3c07e
renamed the contract obligation properties and added options to a few more contract combinators
2010-08-07 14:35:04 -05:00
Robby Findler
8e4b169583
check syntax now remembers the mode it was in last time and uses that next time
...
also, fixed a bug in the way modes were switch around (colors would not
be reset if there was nothing new to color)
2010-08-07 14:35:04 -05:00
Robby Findler
482481fff5
made a bunch of the contract combinators also propogate blame information
...
for use in check syntax
2010-08-07 14:35:03 -05:00
Robby Findler
18b8cde3e2
adjusted the annotations so that contracts can declare multiple parts
...
of themselves to be colored and then used that so that the #:pre-cond
and #:post-cond keywords on ->i contracts are colored.
2010-08-07 14:35:03 -05:00
Robby Findler
b664b04999
added property for internal contract dependencies to ->i
2010-08-07 14:35:03 -05:00
Robby Findler
74a0e49a4b
Added properties so that the ->i contract now shows its obligation information
2010-08-07 14:35:03 -05:00
Robby Findler
1fd82ee28e
adjusted the syntax checking to allow the new syntax of ->i (but still has the old ->d semantics)
2010-08-07 14:35:03 -05:00
Robby Findler
f5a190bf80
made a copy of the ->d contract implementation as a starting point for an implementation of ->i (sometimes, paper deadlines can be a Bad Thing...)
2010-08-07 14:35:03 -05:00
Robby Findler
4eb3df7094
various cleanups, including finishing up the client mode, string constants, and coloring of (known) identifiers
2010-08-07 14:35:03 -05:00
Robby Findler
b9ff546e83
now traverses from the bound occurrences to the binding ones for contract annotations
2010-08-07 14:35:03 -05:00
Robby Findler
e7bd94f2d2
adjusted check syntax to record the right-hand side of binding forms (when they are there)
2010-08-07 14:35:03 -05:00
Robby Findler
5a5da11314
added in unioning and a bit more coloring; checking in to prepare for some changes to the original check syntax (to support contract obligations better)
2010-08-07 14:35:02 -05:00