Commit Graph

32451 Commits

Author SHA1 Message Date
Matthew Flatt
1d8cfea1fc ffi/unsafe: add _stdbool 2014-04-04 09:57:42 -06:00
Robby Findler
3b030e393d adjust the dns tests so they stop failing
also, remove eli-tester use since I got bit, yet one more time,
by the "syntax error on both sides of the => implies the test case
passes" behavior.
2014-04-03 11:35:59 -05:00
Eric Dobson
6b0676ef2b Make it so that handlers lookup arrities other than the first.
Fixes current build breakage.
2014-04-03 09:29:33 -07:00
Matthew Flatt
1cda4e4f83 meta/new-web: fix #:html-only? keyword arguments 2014-04-03 07:16:51 -06:00
Matthew Flatt
120d17fccc fix makefile for MinGW cross-compile 2014-04-03 07:16:50 -06:00
Neil Toronto
efc46ded6d Changed PDF/PS backend to use 1.0 x 1.0 scaling
This makes plotting to a file the same (well, with slight differences)
regardless of file format. Scaling and other PS options are controlled
by a `plot-ps-setup' parameter. Not sure how useful that is, yet, so
it's undocumented.
2014-04-02 23:20:22 -06:00
Neil Toronto
c1550b673b Remove unnecessary use of `remove-duplicates' 2014-04-02 23:20:22 -06:00
Eric Dobson
87cfce97f9 Add a bunch of new check below tests. 2014-04-02 21:45:02 -07:00
Eric Dobson
bddd7a1b53 Add contracts to filters. 2014-04-02 20:58:36 -07:00
Eric Dobson
448c66a7a8 Make open-Result not incorrectly close over rest and keyword arguments. 2014-04-02 20:58:36 -07:00
Eric Dobson
d29df205f7 Make exception handlers smarter about opening the result. 2014-04-02 20:58:19 -07:00
Burke Fetscher
34c3eed615 Add script to find good p-values, adjust models.
The definition of good at this point is that
the average is close to the maximum counterexample
size.
2014-04-02 12:37:56 -05:00
Neil Toronto
3d2a9794b4 Fixed error in drawing connected lines with axis transforms 2014-04-02 11:35:17 -06:00
Neil Toronto
04b49bcdd1 Reduce point3d rendering time by 50-70% by keeping points grouped
The old depth sort hack split up groups of identical points in order
to sort them. Now the BSP tree build keeps them grouped, only splitting
groups of points as needed. Drawing parameters like color and pen
width are set only once for each group instead of once for each point.
The speedup is from reducing the number of calls to set them.
2014-04-02 11:14:12 -06:00
Neil Toronto
e05ec03a6d BSP tree type simplified; added support for no-polygon scenes
Previously, the BSP type had a "negative" and "positive" subtree, and
a collection of unsorted "zero" (on the plane) shapes. Rather than "zero"
being a subtree (which would sort the shapes), it's rolled into "positive",
with corresponding changes to the BSP walk.

BSP tree build now supports scenes without polygons, though it does split
on polygonal planes first. When all such splits fail (usually because there
are no polygons, but might be because all the shapes lie on one polygon's
plane), it tries splitting on planes containing line segments. When that
fails (usually because there are no line segments), it tries splitting
disjointly on all remaining vertexes, then splitting at the midpoint of
the longest axis.

Upshot: it'll draw a double helix created by two `parametric3d' renderers
properly.
2014-04-02 11:14:12 -06:00
Neil Toronto
530d8c16a0 Faster, more precise detection of separating hyperplanes in BSP tree build
The new method finds bounding planes for polygons using their
(approximate) normals and works for any number of them instead of
just two. The algorithm is O(n^2) where n is the number of polygons,
so it is currently applied only when n <= 5; i.e. near the leaves.
2014-04-02 11:14:12 -06:00
Burke Fetscher
f4ce391fab print out check's input on exceptions 2014-04-02 10:27:24 -05:00
Robby Findler
b87ebbfe8f adjust let poly bug #4 so that the check procedure catches
errors and treats them as failing to satisfy the property

This bug disables the occurs check and, thanks to the now
tighter contracts on the uh function, this can cause it to
signal an error. Here's the example:

  (term (unify (x → (list int)) ((list x) → x)))

found by in-order enumeration (so naturally it had ||
variables in it, not 'x's originally)

This leads to this trace in the uh function:

  (uh ((x → (list int)) ((list x) → x) ·) ·)
  (uh (x (list x) ((list int) x ·))       ·)
  (uh ((list int) (list x) ·)             (x (list x) ·))
  (uh (int x ·)                           (x (list x) ·))
  (uh (x int ·)                           (x (list x) ·))
  (uh ·                                   (x int (int (list int) ·)))

whereby the third step sets up a problem (that's where the
occurs check should have aborted the program) but instead, a
few steps later when we get a substitution for 'x', it
causes the second argument to not have the form of
variables-for-types substitution.

I don't think this can happen when the occurs check is in place
because the variable elimination step makes sure that we don't
set ourselves up to change the domain of anything in the second
argument to 'uh' (except possibly when the occurs check fails,
of course).

Here's an example that shows this:

 (unify (q → q) (y → int)))
 (uh ((q → q) (y → int) ·) ·)
 (uh (q y (q int ·))       ·)
 (uh (y int ·)             (q y ·))
 (uh ·                     (y int (q int ·)))

In the second to last step we don't have (q int ·), we have
(y int ·) because the variable elimination step changes the
q to a y.
2014-04-02 07:34:31 -05:00
Eric Dobson
ec77c70b79 Add some HISTORY lines for TR 6.0.1. 2014-04-01 22:02:15 -07:00
Eric Dobson
dd8b646b0b Use filters when typechecking using tc-body.
Closes PR 11920.
2014-04-01 21:44:41 -07:00
Eric Dobson
4a7dd75ffd Add smart constructors for Result and tc-result. 2014-04-01 21:44:41 -07:00
Matthew Flatt
418ee07f4e module: disallow definition skipping
Invoking a non-composable, empty continuation during the right-hand
side of a variable definition skips the definition --- while continuing
the module body. The compiler assumes, however, that variable references
later in the module do not need a check that the variable is undefined.
Fix that mismatch by changing `module` to double-check that defined
variables are really defined before continuing the module body.
(The check and associated prompt are skipped in simple cases, such as
function definitions.)

A better choice is probably to move the prompt to the right-hand
side of a definition, both in a module and at the top level. That's
a much different language, though, so we should consider the point again
in some future variant of Racket.

Closes PR 14427
2014-04-01 18:15:01 -06:00
Matthew Flatt
1273d0fbb3 fix problem with @2x bitmaps on Mac OS X 10.5 2014-04-01 16:38:03 -06:00
Matthew Flatt
0a8b4f573b racket/gui mac os x: fix compatible-bitmap scale on slow path 2014-04-01 16:38:03 -06:00
Asumu Takikawa
636e79d672 Fix TR docs for the addition of typed/racket/class 2014-04-01 18:24:46 -04:00
Robby Findler
20b7d959f3 Changed let-poly's unification algorithm
to be simpler and clearer

This caused bug #6's counterexample to change
because the unification algorithm no longer calls
∨ so we have to find a different way to call it
2014-04-01 16:47:53 -05:00
Burke Fetscher
ea3b5c0742 refactor benchmark loops for clarity 2014-04-01 15:47:47 -05:00
Burke Fetscher
3746e639ae fix extra message on timeouts
and division by 0 that caused null results to not save
2014-04-01 13:34:55 -05:00
Neil Toronto
a515e7cee1 Replaced plot's 3D depth sort hack with a BSP tree
The following should look as expected now:

 * Intersecting or adjacent surfaces, isosurfaces, lines and paths,
   even if they're sampled at different intervals.

 * Rectangles that aren't spaced regularly on the x,y plane (e.g.
   sideways histograms; the rectangles I plot to debug Dr. Bayes).

In general, the rendering should be robust enough to draw arbitrary
3D scenes, and it still produces high-quality PDFs.

Drawing 3D plots still has the same time complexity and seems to be
about as fast as before. Thanks to the fact that sorting objects by
view distance is an O(n) BSP tree walk, rotating 3D plots in
DrRacket is probably a little faster.

This update also adds direct support for connected lines, and
includes a fix that makes contour lines easy to see, even when
plotted on top of a non-contour-interval surface. (This wasn't
possible before.) Further, the 3D plot area no longer requires a
"grid center" vertex by which to sort grid-aligned shapes, making
the rendering API friendlier, and closer to ready for public use.
2014-04-01 01:51:19 -06:00
Neil Toronto
97d20c9d58 Checkpoint 2014-04-01 01:51:19 -06:00
Asumu Takikawa
8a93eeb52b Real fix for the issue in the math docs
Commit 92b0e86ed1 turns
out to have been the wrong approach, because there was no mysterious
performance problem with TR. Instead, TR's `define` expanded to new
code that interacted poorly with a macro used in the math docs.

I've kept the refactoring from that commit because I think it still
makes the code clearer, but I've removed the now extraneous comment.
2014-04-01 00:31:10 -04:00
Robby Findler
9e9cc90af8 add some error checking for when reading in the content of files 2014-03-31 22:00:21 -05:00
Asumu Takikawa
92b0e86ed1 Refactor TR define to avoid a performance bug
After commit 3d177e454e
running the main `math.scrbl` file would show peak memory
usage of around 600-700MB when before it was around 400MB.

The proximal cause appears to be the expansion of TR
definitions, which added an extra `begin` in some cases,
combined with redefinitions at the top-level. I don't
know the core cause yet.

Thanks to Matthew for pointing out the issue and to
Vincent for helping with debugging.
2014-03-31 18:21:04 -04:00
Jens Axel Søgaard
6722b7a71e Fix of PR 14413
Improved type per Ryans suggestion.
2014-03-31 16:53:32 -04:00
J. Ian Johnson
4e20ede1f2 Extend heaps to allow removing arbitrary elements via an additional equality operator. 2014-03-31 15:47:39 -04:00
Sam Tobin-Hochstadt
d3ddd3a0d4 Fix typos spotted by Ambrose Bonnaire-Sergeant. 2014-03-31 11:22:17 -04:00
Manav Rathi
2e68250660 Fix typo in readtables documentation 2014-03-31 11:15:29 -04:00
Sam Tobin-Hochstadt
78987ef608 Add a test for 2dmatch + Typed Racket. 2014-03-31 10:37:03 -04:00
Sam Tobin-Hochstadt
a9428728c5 Add annotations to 2dmatch to help typecheck.
Also use `match*/derived` to get the right error message name.
2014-03-31 10:12:29 -04:00
Sam Tobin-Hochstadt
431ba2e88b Use the form name from match*/derived to improve error messages. 2014-03-31 10:12:29 -04:00
Sam Tobin-Hochstadt
52c5d9fde6 Respect typechecker:called-in-tail-position when calling non-thunks. 2014-03-31 10:12:29 -04:00
Sam Tobin-Hochstadt
70e74b20d9 Turn timing logging on unconditionally. 2014-03-31 10:12:29 -04:00
Robby Findler
eb1fbc8bcf fix let-poly's check function so it always terminates 2014-03-30 21:15:39 -05:00
Robby Findler
d33e6e635b smaller counter example for let-poly-4 2014-03-30 21:08:29 -05:00
Robby Findler
e2fe7c658f fix printout 2014-03-30 21:07:50 -05:00
Robby Findler
cef2d83f75 add missing require 2014-03-30 17:32:00 -05:00
Robby Findler
c7c95b8906 adjust benchmark so that the 'check' functions are required to be
self-contained (and then don't call type-check anymore
from the benchmark scripts)

this fixes a problem in the let-poly models, since some
of the bugs there cause the type-checker to raise an error
2014-03-30 17:25:19 -05:00
Robby Findler
a9d8158133 tweak run-muts to clarify args in help 2014-03-30 15:56:34 -05:00
Robby Findler
33fa2f8654 adjust let-poly check functions so they count exns as failure,
but only for the bugs that are expected to show up that way
2014-03-30 10:15:55 -05:00
Robby Findler
6e29bdad31 adjust check function to properly deal with the store 2014-03-30 10:13:50 -05:00