Commit Graph

32254 Commits

Author SHA1 Message Date
Asumu Takikawa
745c6532d1 Restore optimization for two DrRacket TR files
Commit 2b9b16b165 fixed the issue
with the send expansion, so this can be re-enabled.
2014-02-20 15:02:41 -05:00
Asumu Takikawa
d35fb82f4a Make TR's for/hash form more flexible 2014-02-20 14:13:41 -05:00
Asumu Takikawa
58a3d12f0c Add TR case-lambda with optional type annotations 2014-02-20 13:54:32 -05:00
Asumu Takikawa
ed98404aaf TR: move helper syntax classes to helper file 2014-02-20 12:05:11 -05:00
Matthew Flatt
90f371a06a Another makefile CFLAGS/CPPFLAGS adjustment
Missed a spot in c97184b581.
2014-02-20 07:11:30 -07:00
Matthew Flatt
c97184b581 makefiles: adjust definition and handling of CFLAGS and CPPFLAGS
Try to make the makefiles work better if CFLAGS and/or CPPFLAGS
is defined externally.
2014-02-20 07:01:35 -07:00
Asumu Takikawa
8d4b3ee396 Add test for PR 13937
The actual bug was already fixed by enabling multi-valued
sequence syntax in TR `for` loop forms.

Closes PR 13937
2014-02-20 00:06:45 -05:00
Asumu Takikawa
a17e457840 Document legacy forms with a : suffix
Also don't export internal macros
2014-02-19 21:20:48 -05:00
Asumu Takikawa
768d04fa97 Revise TR Reference for new :-less forms 2014-02-19 16:40:40 -05:00
Asumu Takikawa
37b09521ac Provide :-less versions of all for forms.
Modify the forms as needed to accept non-annotated
bindings to match the untyped versions. Also fixes
bugs in syntax classes found along the way.
2014-02-19 16:40:40 -05:00
Asumu Takikawa
35ef2f90eb Accept polydots rest in TR lambda and define
Also accept type variables before formals in all cases
2014-02-19 16:40:40 -05:00
Asumu Takikawa
3d177e454e Enable mixed type annotations for define 2014-02-19 16:40:40 -05:00
Asumu Takikawa
967490cb22 Support polymorphism in both TR let and lambda 2014-02-19 16:40:40 -05:00
Asumu Takikawa
45d36579d3 Add :-less versions of struct macros 2014-02-19 16:40:40 -05:00
Asumu Takikawa
a941f95c2e Add a :-less do for TR 2014-02-19 16:40:40 -05:00
Asumu Takikawa
e6e3ab4e74 Make :-less versions of let variants in TR 2014-02-19 16:40:40 -05:00
Asumu Takikawa
a3d818c748 Add support for rest arguments in TR plain lambda
Two caveats:
  * in some positions : is not accepted as a formal
    when used in combination with * as a formal
  * the quality of parse error messages for rest
    argument types is traded for better optional argument
    error messages
2014-02-19 16:40:40 -05:00
Asumu Takikawa
ad4f6e1ea1 Better error messages for TR lambda parsing 2014-02-19 16:40:40 -05:00
Asumu Takikawa
aef37edae4 Incorporate PR feedback 2014-02-19 16:40:40 -05:00
Asumu Takikawa
eb7a0f8797 Improve type-checker for optional arg functions 2014-02-19 16:40:40 -05:00
Asumu Takikawa
7e09362986 Allow TR lambda to have a result type annotation 2014-02-19 16:40:39 -05:00
Asumu Takikawa
8ea32c68f6 Improve TR lambda to accommodate type annotations
The new `lambda` form allows all combinations of arguments
with optional type annotations for all cases.
2014-02-19 16:40:39 -05:00
Robby Findler
19ad9918ec add some tests and start a "known bugs" test suite for the contract system 2014-02-19 14:46:31 -06:00
Asumu Takikawa
26204cf505 Fix TR double cast bug
In some cases, TR tried to typecheck the contents of a quote-syntax
form that contains unexpanded syntax.

Closes PR 14355
2014-02-18 23:28:49 -05:00
chrdimo
23f02e4575 updating option contract tests 2014-02-18 21:57:25 -05:00
Asumu Takikawa
0c0befac07 Add typed/pict which exports part of pict
Does not cover all of the bindings yet, but it
should just be a SMOP after the last extra-env-lang
feature additions.
2014-02-18 18:43:57 -05:00
Asumu Takikawa
db51fdb8fd Improve TR's extra-env-lang
Instead of parsing the module's body like env-lang,
export a `type-environment` form instead. That way
the module may contain any auxiliary definitions
or expressions that are needed.

Additionally allow #:opaque and #:struct clauses
for opaque and struct types in the base type environment.

Update typed/syntax/stx for the new API.
2014-02-18 18:43:57 -05:00
Asumu Takikawa
d16572f003 Add missing child fields in pict
Closes PR 14358
2014-02-18 18:43:57 -05:00
Burke Fetscher
c47828601a redex: add enum to benchmark plotting
also filter -base files correctly in run-muts
2014-02-18 11:52:31 -06:00
Matthew Flatt
1d0e4bedde setup/unixstyle-install: fix up only installed ".desktop" files
Closes PR 14354
2014-02-18 06:48:55 -07:00
Vincent St-Amour
1d1d8bacad Swap remaining unsafe and chaperone-unsafe operation in the TR optimizer.
Fixes the fix in aba046a92d.
2014-02-17 18:41:18 -05:00
Burke Fetscher
3d282eba29 redex: fix some more benchmark paths 2014-02-17 16:30:12 -06:00
Matthias Felleisen
2d3c25bc16 world changes for bitmaps as images in universe 2014-02-17 17:24:42 -05:00
Matthias Felleisen
f944251099 tests for bitmaps as images in universe 2014-02-17 17:24:42 -05:00
Burke Fetscher
0010a8ebae add enum generation to stlc 2014-02-17 14:57:56 -06:00
Burke Fetscher
10de717cb4 use 'v' in the values non-terminal for cons pairs 2014-02-17 14:57:55 -06:00
Burke Fetscher
04c8aa7722 make path agnostic 2014-02-17 14:57:55 -06:00
Asumu Takikawa
18adcb5b04 Improve type inference for ListDots
This provides better inference for the case when trying
to infer a ListDots in a negative position against a List
type. For example, when trying to apply `time-apply`.
2014-02-16 11:35:55 -05:00
Matthew Flatt
5ada90bfd2 raco setup: fix the way that "stamp" is compiled for avoided files
Instead of claiing "beginning of time" and an empty SHA1, use
`file-stamp-in-paths` to get a proper stamp.

This fixes a problem when installing built packages into user scope
where the built packages refers to an installation-scope library
and SHA1s need to be checked to fix up file timestamps.
2014-02-15 14:45:14 -07:00
Matthew Flatt
7b4ea16bc0 setup/dirs: fix get-apps-dir
Affects the location of ".desktop" file installation, especially in
a Unix-style installation.
2014-02-15 09:38:25 -07:00
Matthew Flatt
576c3885cf fix typo in reference 2014-02-15 09:38:24 -07:00
Asumu Takikawa
bf47523ac9 Fix TR regression and use abstraction recipe
A function like (lambda (x) (lambda (y) y)) would cause TR
to fail in an internal metafunction. The fault was triggered
when the object y is abstracted to (0 0) and then the outer
lambda tries to abstract (0 0) and fails.

The problem was triggered by the new path index changes in
v6.0 because TR did not previously try to abstract objects
that occurs in the target type (now necessary for scope
lifting of path indices), which may contain non-identifier
objects.

This error didn't occur in another nearly identical (except
for one crucial identifier? check) code path, so this commit
also eliminates the duplication by abstracting.
2014-02-15 00:14:47 -05:00
Robby Findler
2e06761531 fix error message 2014-02-14 23:03:00 -06:00
Robby Findler
fff72a21ff clarify object=? 2014-02-14 23:03:00 -06:00
Robby Findler
73bbabe7d4 adjust error message for impersonate-struct to match its actual contract 2014-02-14 23:02:59 -06:00
Asumu Takikawa
d32e0eda7c Update TR doc pkg dependencies 2014-02-14 19:15:42 -05:00
Neil Toronto
30bf673a0f Fixed some problems with 2D plots not rendering due to +nan.0 and +inf.0
The "view" coordinate system for 2D plots used to be the same as the
"plot" coordinate system, except possibly stretched in a way that
preserved endpoints. When the endpoints were close to extreme flonum
values like +min.0 or +max.0, and the 2D plot area determined that
there were enough floating-point numbers within the plot bounds to do
fast floating-point arithmetic without losing visual fidelity, some of
that arithmetic could overflow. Then +inf.0 and +nan.0 values would
passed to `set-clipping-rect', which would promptly throw up, as it
should.

Solution: like the 3D plot area, use a normalized view coordinate
system. Now stretched plot coordinates are translated and scaled to
[0,1]x[0,1], for which floating-point arithmetic won't overflow.
2014-02-14 16:45:41 -07:00
Neil Toronto
b92b6c8337 Sanitized `density' bandwidth calculation for very dense data sets
Now, for example, (plot (density '(0))) works.

Calculated bandwidth is now bounded by both 1e-308, below which
`kde' produces nonsense, and 1e-14 * max absolute value. The latter
bound ensures the bandwidth is wide enough to make a smooth-looking
curve even in the presence of floating-point rounding in the domain,
by ensuring that at least 100 floating-point numbers or so in the
domain get nonzero density.

It's a little weird to use the gap between floating-point numbers
for this, but it ensures density estimates aren't jagged because
of rounding (at least until you zoom in, in some instances), and
it's at least a decent method of estimating bandwidth for single-
sample density estimators.
2014-02-14 16:45:41 -07:00
Neil Toronto
9a6cdf420b Updated types for density' and kde' 2014-02-14 16:45:41 -07:00
Neil Toronto
db05e20980 Added support for weighted samples in density' and kde'
Also improved window width estimate
2014-02-14 16:45:41 -07:00