Commit Graph

2761 Commits

Author SHA1 Message Date
Robby Findler
8499a4e65d added a test suite for the hangman teachpack 2010-09-21 15:27:49 -05:00
Eli Barzilay
ee138cf2cb Some repeated "and and"s and "the the"s, and two more typos.
Closes PR 11229.
2010-09-20 15:38:18 -04:00
Kevin Tew
faa0c86f50 Places: fix asynchronous receive 2010-09-20 08:42:55 -06:00
Matthew Flatt
fa7dd9b522 rename file to avoid :, which is not allowed under Windows 2010-09-20 03:31:18 -06:00
Stevie Strickland
3325350026 At Robby's request, remove the check for proxy-of?.
Due to the bad interaction between procedure-rename and getting the
contract info from the proxy/chaperone, this will cause a failure in
the contract test cases.  I'm submitting a bug report for that issue.
2010-09-18 13:55:09 -04:00
Matthew Flatt
d92c4e44e2 fix make-reader-graph on proxied vectors 2010-09-17 18:42:29 -06:00
Ryan Culpepper
0d76f8ecbf added data/order, docs
changed splay-tree, skip-list constructors to take orders
2010-09-17 16:54:54 -06:00
Ryan Culpepper
b74f3461e1 added general order functions 2010-09-17 16:54:54 -06:00
Matthew Flatt
f663307252 fix problem with procedure-chaperone, keywords, and proxy properties 2010-09-17 16:29:15 -06:00
Matthew Flatt
3866c3e450 generalize `flvector-copy' to support start and end indices 2010-09-17 13:35:01 -06:00
Will M. Farr
beb2175456 Added flvector-copy (with tests and docs). 2010-09-17 13:35:01 -06:00
Robby Findler
c6fc7137ee Adjusts the contract system so that it preserves the names of functions.
closes PR 11220

Altho, this does not fix the case where a function is being passed thru
another contracted function. Eg, when you give the identity function
this contract: (-> (-> integer? integer?) (-> integer? integer?))
if you pass some function with a name in there, it won't come
back with a name anymore (indeed, it won't even have the name
anymore in the body of the function).

For that, the fix would have to be put into each of the function
contract combinators.
2010-09-17 11:30:04 -05:00
Matthew Flatt
232a580e53 add prop:proxy-of'; Fix chaperone-of' on keyword-accepting procedures 2010-09-17 08:55:46 -06:00
Jay McCarthy
2447d8d07c Adding test case to clarify student's error 2010-09-16 21:00:05 -06:00
Jay McCarthy
01a41a812e Closing pr11216. Adding one armed check-error to teaching languages.
[It will not bother me if we revert this commit. I liked SK's idea and found it easy to implement. I wonder if others will be worried that it is easy to unintentionally leave off the second argument to check-error. I also wonder if it is problematic to add new string constants, like I've done.]

Here is an example:

(check-error (/ 1 0) "/: division by zero")
(check-error (/ 1 0) "divide by zero")
(check-error (/ 1 0))
(check-error 1)

Here is the output:

Ran 4 tests.
2 of the 4 tests failed.

No signature violations.

Check failures:
	check-error encountered the following error instead of the expected divide by zero
   :: /: division by zero
in ex.rkt, line 2, column 0
	check-error expected an error, but instead received the value 1.
in ex.rkt, line 4, column 0
2010-09-16 21:00:05 -06:00
Stevie Strickland
a930719a87 Add the contract information to chaperoned boxes, hashes, and vectors. 2010-09-16 20:49:04 -04:00
Jay McCarthy
afcc7c818d Fixing redirectget test 2010-09-16 13:42:47 -06:00
Ryan Culpepper
1a03a47842 updated splay-tree & skip-list interfaces, docs, tests, performance tests 2010-09-16 13:20:07 -06:00
Ryan Culpepper
19be445d89 contracts for gvector, skip-list
reorganized tests
2010-09-16 13:20:06 -06:00
Stevie Strickland
2677cbf1a4 Cleanups to first-order checking for box/vector/hash contracts.
* We no longer capture a contination when we have blame information.
 * We perform first-order checks more eagerly in the mutable case.
2010-09-16 15:04:41 -04:00
Stevie Strickland
b416b7e5bb Now migrate vector/c and vector-immutable/c.
Also add old-style vector/c to mzlib/contract.
2010-09-16 15:04:41 -04:00
Stevie Strickland
3028f2d142 Convert vectorof/vector-immutableof to the new regime.
Also add old-style vectorof to mzlib/contract.
2010-09-16 15:04:41 -04:00
Blake Johnson
c88eb704c7 removing indirects from zo handling 2010-09-16 12:45:37 -06:00
Jay McCarthy
4f49658835 Fixing problem reported by Robby.
Contracts intefere with safety marks.
2010-09-16 12:45:37 -06:00
Jay McCarthy
ab5a9ff1e8 Removing extra run-tests 2010-09-16 12:45:37 -06:00
Jay McCarthy
1f4c525245 Fixing pr11214 2010-09-16 12:45:37 -06:00
Jay McCarthy
4a89ccea5d Fixing an annoyance with eli-tester when the error string contains ~ 2010-09-16 12:45:36 -06:00
Vincent St-Amour
7e2094f2d7 Added a test for optional let annotations. 2010-09-16 13:24:10 -04:00
Vincent St-Amour
e03e53b1cb Fix some optimizer test logs to reflect racket changes. 2010-09-16 10:48:28 -04:00
Vincent St-Amour
9f87b5a7e6 Made some type annotations optional in the for: macros. 2010-09-15 20:21:51 -04:00
Vincent St-Amour
8b60085a17 Removed useless requires. 2010-09-15 20:21:51 -04:00
Vincent St-Amour
a10d145f25 Added annotated versions of the for macros that generate vectors.
They are purposedly left out of the documentation since the typchecker
can't currently handle their expansion.
2010-09-15 20:21:50 -04:00
Vincent St-Amour
65c502f9d7 Added a test to make sure derived lists accessors don't get optimized then they shouldn't. 2010-09-15 20:21:50 -04:00
Stevie Strickland
e3678a937e Change box-immutable/c to use box/c with #:immutable #t. 2010-09-15 17:05:34 -04:00
Stevie Strickland
99e5d6fd6c Add appropriate syntax properties to uses of box/c. 2010-09-15 16:57:17 -04:00
Stevie Strickland
994ad6d10f Now change box/c to use proxies or chaperones appropriately.
Create a mzlib/contract compatible version of the old box/c and use that
for mzlib/contract.  Change the docs so that the docs for mzlib/contract
contain the right information.

Fix the typed-scheme implementation to only force flat box (or hash)
contracts when it already is required to be flat.  Otherwise, allow
non-flat contracts for the element contract (or domain/range contracts).
2010-09-15 16:57:17 -04:00
Stevie Strickland
4a48da022b Adding syntax properties for contract obligations to uses of hash/c. 2010-09-15 15:01:27 -04:00
Stevie Strickland
56b83e4a96 Add chaperone-based hash/c contracts.
* Domain contracts must be either flat or chaperone contracts.
 * When the domain is a chaperone contract, hash/c must check
   that the hash is equal?-based.
2010-09-15 13:57:50 -04:00
Stevie Strickland
d2b3ee8892 Code and test fixes for new chaperone-based hash/c contracts. 2010-09-15 13:37:37 -04:00
Robby Findler
3121ab0fce I agree with Stevie that 1 is the right answer here. 2010-09-15 08:23:34 -05:00
Stevie Strickland
ec0711bf49 Add chaperone contract-related properties.
* Flat contracts are chaperone contracts, and chaperone contracts
    are (proxy) contracts.
  * Check in chaperone contracts that a chaperone (or chaperone-friendly
    value) is indeed returned.
2010-09-14 18:29:39 -04:00
Stevie Strickland
56a5a2627e Enforce that flat contracts return the original value.
Also fix up tail call contract handling, which was affected by this change.
2010-09-14 18:28:46 -04:00
Ryan Culpepper
ae645a18c1 added dict-*-contract to racket/dict
added experimental ordered-dict generics (not public yet, no docs)
2010-09-14 12:31:26 -06:00
Ryan Culpepper
58aa6873fe added data/heap tests
doc fixes
2010-09-14 12:31:26 -06:00
Matthew Flatt
b601aa1ca3 fix pretty-print graph bug 2010-09-14 08:05:35 -06:00
Ryan Culpepper
999c33827c tests for splay-tree and skip-list 2010-09-13 13:21:04 -06:00
Jay McCarthy
43d527818e Fixing pr11196 and fixing bug in hash-eqv serialization 2010-09-13 10:44:21 -06:00
Robby Findler
1dc555e0af fixes _ in contract-names for ->i
closes PR 11185
2010-09-11 07:48:50 -05:00
Robby Findler
93ecaa0535 fixed object-contract name tests 2010-09-11 07:36:21 -05:00
Robby Findler
d8a495de94 fixed first half of PR 11185 2010-09-11 07:12:17 -05:00
Sam Tobin-Hochstadt
979561354d Fix internal error when single value expected. 2010-09-10 18:29:34 -04:00
Blake Johnson
1cb11ce6cc re-enabling tests 2010-09-10 14:46:04 -06:00
Blake Johnson
407a36c9d2 Changing memory limit 2010-09-10 14:46:04 -06:00
Blake Johnson
e94823b82c Removing pieces of zo-test-worker we dont care about 2010-09-10 14:46:03 -06:00
Blake Johnson
0d136ba4c7 never sharing hashes and trace debugging 2010-09-10 14:46:03 -06:00
Blake Johnson
32a9e60abe traversing inside closures and using a seen set for lists 2010-09-10 14:46:03 -06:00
Blake Johnson
2dfaab00f4 fixing closure problem 2010-09-10 14:46:03 -06:00
Blake Johnson
ecc9ceb842 zo-marshal fixes and switching back to prefabs 2010-09-10 14:46:03 -06:00
Blake Johnson
54f2d34a2e encoding wraps and fixes for zo-marshal sharing 2010-09-10 14:46:02 -06:00
Blake Johnson
9599304ca9 zo-marshal fixes and read.c fix for hash tables in symbol table 2010-09-10 14:46:02 -06:00
Blake Johnson
f27fe3d5c9 zo-parse debugging and read in zo-exs 2010-09-10 14:46:01 -06:00
Matthew Flatt
ff9b535dc6 fix hash proxying in the case that proxied key has no value 2010-09-10 12:46:58 -06:00
Robby Findler
44fe632da5 fixed two bugs in ->i:
- when optional arguments didn't also have rest args,
    it generated the wrong wrapper function
  - the object-contract interaction was broken;
    it was not adding the this argument in
Also removed the hack added earlier this eve.
closes PR 11180
2010-09-09 21:42:41 -05:00
Vincent St-Amour
0166ece180 Extended pair optimization to the rest of the standard derived pair accessors. 2010-09-09 18:54:34 -04:00
Vincent St-Amour
7450821068 Refactoring. 2010-09-09 18:54:34 -04:00
Vincent St-Amour
024f873947 Extended pair optimizations to some derived pair accessors. 2010-09-09 18:54:33 -04:00
Vincent St-Amour
7f546434ed Included expected optimization logs in the test files. 2010-09-09 18:54:33 -04:00
Will M. Farr
81b1ed6e8b New updates to for/vector, for*/vector, for/flvector and for*/flvector.
Now use for/fold to thread the index through the iteration form, so
that all variants can take advantage of the optional #:length
argument.  Previously, only the for/vector and for/flvector used the

The behavior when #:length does not match the number of iterations has
changed: iteration stops when either the vector is full, or the
requested number of iterations has been achieved, whichever comes
first.  If #:length is larger than the number of iterations performed,
then the remaining slots in the vector are filled with the default
argument of (make-vector ...), which is currently 0.
2010-09-09 16:23:04 -04:00
Will M. Farr
3d016150a3 Updates to for/vector, for/flvector forms and documentation.
- Now the faster forms take a #:length keyword to designate the length
  of the vector to pre-allocate.

- The for/[fl]vector forms take multiple body expressions and set the
  vector component to the value of the last one.

- When given a #:length argument, the for/vector and for/flvector
  forms check that the iteration is not exceeding the given length,
  raising exn:fail if it does.

- Test cases for the multiple body expressions and the exception for
  excessive iterations have been added.

- Doc modifications to bring the docs in line with the new forms.

- Doc modifications to note that the #:length versions of the form
*may* all the computation to be performed more efficiently, and
stating that it "is an error" if the given length-expr does not
produce a valid length for a vector that matches the number of
iterations for the loop.

- Note that no test is made for a number of loop iterations that is
  smaller than the given vector length.  Also, the for*/[fl]vector
  forms do not optimize when given a #:length argument.  These are
  areas for future improvement.
2010-09-09 16:22:53 -04:00
Sam Tobin-Hochstadt
00a8a85f9d Fix typechecker tests for new environment setup. 2010-09-09 16:08:04 -04:00
Sam Tobin-Hochstadt
b6b840076b Lots more laziness, and useless require removal. 2010-09-09 16:08:03 -04:00
Casey Klein
a773471b7e Strengthens the definition-finder tests 2010-09-09 13:42:15 -05:00
Robby Findler
72afa3d7b3 fixed the teachpack test suite for the new teachpack dialog 2010-09-09 13:17:27 -05:00
Casey Klein
f1be76f2e2 Special-cases DrRacket's definition-finder to find Redex metafunction definitions 2010-09-09 12:07:24 -05:00
Kevin Tew
324a0ce815 Places: check arguments 2010-09-09 10:28:34 -06:00
Kevin Tew
732c62b2a5 Places: benchmarks 2010-09-09 10:28:34 -06:00
Eli Barzilay
ee587ce327 Move the contract stress tests into their proper place. 2010-09-09 12:22:03 -04:00
Robby Findler
ba78b8389b added a test to show a performance problem in the contract library 2010-09-09 09:29:42 -05:00
Mike Sperber
9d35548997 Unbreak `list-of'. 2010-09-09 13:17:22 +02:00
Sam Tobin-Hochstadt
a0e77705e5 Propogate #:mutable for polymorphic structs.
Closes PR 11127
2010-09-08 10:47:51 -04:00
Sam Tobin-Hochstadt
91fefa055e Make syntax of #{} less accepting of errors. 2010-09-08 10:24:58 -04:00
Vincent St-Amour
14097dd90e Fix broken tests that depended on an unsafe optimization. 2010-09-07 20:11:44 -04:00
Stevie Strickland
6d7be2bab3 Fix expected result from contract test that fails due to sorting. 2010-09-07 11:47:14 -04:00
Ryan Culpepper
cf47297a07 gvector tests, fixed bugs, added for/gvector docs 2010-09-06 22:15:29 -06:00
Jay McCarthy
f440332768 Fixing confusing printing from Arjun 2010-09-06 17:03:16 -06:00
Jay McCarthy
f2b5a454bd Fixing problem reported by Nadeem Abdul Hamid 2010-09-06 10:35:03 -06:00
Robby Findler
a2b11a0329 unbroke the test suite ... 2010-09-04 11:18:39 -05:00
Robby Findler
994c28d8b0 started a test suite for the check syntax coloring annotations that the contract system leaves behind 2010-09-04 11:18:38 -05:00
Matthew Flatt
26e0ad955a fix `unsafe-set-box*!' 2010-09-03 15:44:34 -06:00
Robby Findler
ad9548db7d added a README 2010-09-02 15:41:02 -05:00
Robby Findler
a12f47f506 moved the teaching language test suites to their own directory 2010-09-02 15:41:02 -05:00
Jay McCarthy
f272acec5f Correcting bug discovered by Arjun 2010-09-02 07:04:22 -06:00
Matthew Flatt
962ceb6b63 fix interaction between copy prop and once-used binding elimination
in the bytecode compiler, which could cause an expression to be
 duplicated
2010-09-01 15:22:32 -06:00
Matthew Flatt
69658697b1 add proxies and rename chaperone properties to proxy properties
where a proxy is less constrained in its conversions but more
 constrained in where it can be used
2010-08-31 19:15:20 -06:00
Ryan Culpepper
bfb1eed2e9 updated test 2010-08-31 17:15:36 -06:00
Ryan Culpepper
712a8f60e9 updated syntax/parse/exp./splicing, updated honu use
fixed stress.rkt
2010-08-31 16:21:44 -06:00
Ryan Culpepper
d7a87c79e0 Merged changes to syntax/parse
Changed backtracking algorithm, runtime representations
    - syntax classes, ~describe no longer implicitly commit
    - ~describe no longer delimits effect of cut
  Added keyword & optional args for stxclasses
  Added ~do and #:do, ~post, ~commit and #:commit,
    ~delimit-cut and #:no-delimit-cut
  Added syntax/parse/debug, syntax/parse/experimental/*
    - expr/c for contracting macro sub-expressions
      moved from syntax/parse to syntax/parse/experimental/contract
    - syntax class reflection (~reflect, ~splicing-reflect)
    - eh-alternative-sets (~eh-var)
    - provide-syntax-class/contract
      (only for params, not attrs so far)
  Changed ~fail to not include POST progress (#:fail still does)
    old (~fail _) is now (~post (~fail _))
  Made msg argument of ~fail optional
  Removed generic "repetition constraint violated" msg
  Removed atom-in-list stxclass
  Removed unnecessary datum->syntax on cdr of pair pattern
    massive improvements to long-list microbenchmarks
  Optimization: integrable syntax classes (id, expr, keyword)
    need better measurements
  Optimization: ad hoc elimination of head/tail choice point
    for (EH ... . ()) patterns
  Added unstable/wrapc (proc version of expr/c)
2010-08-31 10:55:58 -06:00
Matthew Flatt
76c3c76214 fix yet more ss<->rkt problems that interfered with *SL executables
Closes PR 11106
2010-08-30 14:35:18 -06:00
Kevin Tew
bc5d1c2011 Places: added shared-flvector and shared-byte string 2010-08-30 08:50:07 -06:00
Robby Findler
cfa1c9bf43 fixed a bug in the test suite (so that now the language is only changed when needed) 2010-08-30 09:23:34 -05:00
Robby Findler
35de0b22d0 added a test coverage test suite 2010-08-30 09:23:34 -05:00
Robby Findler
ab839f9efd minor rackety 2010-08-30 09:23:34 -05:00
Robby Findler
eb75edfaa1 renamed drracket test suite 2010-08-30 09:23:33 -05:00
Jay McCarthy
f899e03b59 Moving stress tests 2010-08-30 06:39:12 -06:00
Jay McCarthy
6a43e379e1 Correct test usage of port 2010-08-30 06:39:11 -06:00
John Clements
4d1d1e5b0e removed new stepper test from automatic testing (until fixed). 2010-08-29 10:38:27 -07:00
Vincent St-Amour
e1fd445fa4 Ignored a rounding error between PPC and x86. 2010-08-29 10:17:56 -04:00
Robby Findler
23739a21d8 fixed indentation 2010-08-29 05:17:41 -05:00
Robby Findler
454f8772ab unbroke Eli's change 2010-08-29 05:17:41 -05:00
Jay McCarthy
bc15f398f2 Increasing FTP test stability 2010-08-28 18:52:39 -06:00
Jay McCarthy
c24d6f94e7 Supporting empty programs in datalog languages, fixes pr11140 2010-08-28 15:54:38 -06:00
Robby Findler
36c2eea571 an attempt to be more windows friendly 2010-08-28 14:06:01 -05:00
Jay McCarthy
33d7eb40e3 Fixing pr11136 and adding tests and fixing old tests re extension change 2010-08-28 08:30:14 -06:00
John Clements
3b94602e2e added test case for PR 11120 2010-08-27 16:42:32 -07:00
Vincent St-Amour
b386f01ee4 Improved sandboxing with code from Eli. 2010-08-27 18:18:51 -04:00
Vincent St-Amour
f06c2d4926 Removed obsolete comment. 2010-08-27 18:18:51 -04:00
Vincent St-Amour
9f540bce01 Better way to setup the sandbox input. 2010-08-27 14:43:22 -04:00
Vincent St-Amour
1c9e8e05b0 Cleanup of the test harness. 2010-08-27 13:29:43 -04:00
Vincent St-Amour
7cfba9f02d Renamed tests directory to make more sense with the new structure. 2010-08-27 13:29:43 -04:00
Vincent St-Amour
ca16ac4db5 Improved logging since it's now used for testing. 2010-08-27 13:29:42 -04:00
Vincent St-Amour
18af26ec9b Test expected optimizations by comparing optimizer logs instead of expanded code. 2010-08-27 13:29:42 -04:00
Robby Findler
c8e68e5e31 updated the docs to reflect that the various checks return void. Also added in some tests to that effect. 2010-08-27 11:27:29 -05:00
Jay McCarthy
7190d423f7 Fixing pr11125 2010-08-26 17:14:09 -06:00
Jay McCarthy
d4e3946ba2 Adding apply stress test from Will M. Farr 2010-08-26 17:14:09 -06:00
Sam Tobin-Hochstadt
0635fc6d75 Create data/ collection.
- Initially populated with queues, skip-lists, and interval-maps from unstable/
 - Tests in tests/data, docs in data/scribblings
2010-08-26 18:22:28 -04:00
Vincent St-Amour
46b2a2113a Use sandboxes instead of duplicate files to test results when optimizing. 2010-08-26 18:08:41 -04:00
Vincent St-Amour
eadc2a7e4c Exclude directories when testing TR's optimizer. 2010-08-26 17:46:59 -04:00
Vincent St-Amour
ea472a9d57 Added with-asserts, from code from Neil Toronto. 2010-08-26 17:46:58 -04:00
Sam Tobin-Hochstadt
7fc38693ec Fix tests for new output. 2010-08-26 16:59:12 -04:00
Sam Tobin-Hochstadt
3e4ddde808 Tests for new optimizer additions. 2010-08-26 16:59:12 -04:00
Sam Tobin-Hochstadt
fd2d37a710 Add optimization for `magnitude', fix handling of functions that return floats, not complexes. 2010-08-26 16:59:12 -04:00
Eli Barzilay
8e0f8dd39c More "~n" -> "\n" changes 2010-08-26 12:11:00 -04:00
Eli Barzilay
7dc4d2e5a6 Change a bunch of "~%" and "~n" in format strings to "\n". 2010-08-25 17:17:01 -04:00
Eli Barzilay
606b7f60dc Lots of "~e" to "~.s" changes. 2010-08-25 17:17:01 -04:00
Eli Barzilay
e179449d0e Switch to `racket/base', change some "~e"s to "~.s"s, also reformat and
a few minor improvements.
2010-08-25 17:17:01 -04:00
Eli Barzilay
da083f05e8 avoid relying on bash 2010-08-25 17:17:01 -04:00
Kevin Tew
19a00d887e Places: allow channels in compound data communications 2010-08-25 15:10:15 -06:00
Jay McCarthy
45a8854398 Adding immutable hash operations to ASL 2010-08-25 10:36:36 -06:00
Jay McCarthy
368d711ae2 Optional arguments to hash table constructors in ASL 2010-08-25 10:36:34 -06:00
Sam Tobin-Hochstadt
b08de170bc Add Futureof' type, types for future' and `touch' 2010-08-25 10:27:07 -04:00
Matthew Flatt
cf300b91b9 JIT-inline even?' and odd?' on fixnums 2010-08-24 19:29:20 -06:00
Robby Findler
5de6ff2ada Adjusts the prompt handling so that it submits expressions that signal
arbitrary read errors, but does not submit those that raise eof errors.
closes PR 11126
2010-08-24 20:06:45 -05:00
Kevin Tew
b86e48a567 Places: benchmark tests 2010-08-24 10:39:07 -06:00
Jon Rafkind
e077b87d50 fix PR 11123: 0-ary generator yield 2010-08-24 00:11:22 -06:00
Jon Rafkind
4bca9842f5 Make in-generator work when yield returns multiple values 2010-08-23 12:50:08 -06:00
Mike Sperber
a4e7ef3594 Push mixed' contracts down into lazy struct' contracts. 2010-08-23 14:40:21 +02:00
Sam Tobin-Hochstadt
72f31ffec0 Use current-readtable as the base for the TR readtable.
Closes PR 1115.
2010-08-21 14:05:46 -04:00
Robby Findler
32f1f1d8f1 the error window for check syntax now goes away when you Run or edit the definitions window
closes PR 11101
2010-08-20 17:39:45 -05:00
Robby Findler
d93fc805f3 maybe this will help with some of the race conditions showing up in drdr 2010-08-20 17:39:45 -05:00
Jay McCarthy
54e16b18ff Fixing error message on different root installations 2010-08-20 10:35:36 -06:00