The Racket repository
Go to file
Dan Feltey a0fdee59b4
Add support for collapsible contracts (#2367)
* Add support for space-efficient vector and arrow contracts.

When an eleventh contract would be applied to a function or vector,
switch representation for the wrapper and try eliding redundant
checks. The resulting value keeps a constant number of
chaperone/impersonator wrappers regardless of the number of contracts
applied to it, and won't run any (provably) redundant checks.

This avoids a pathological case where, e.g., a function crosses a
boundary inside a loop, and gets wrapped N times (or worse, 2^N).

The optimization for function contracts currently only applies for
fixed-arity functions and contracts, and only for functions with known
result-arity of 1. These limitations are not fundamental.

Checking specific checks is not as optimized as for regular arrow
contracts yet. (Specifically: arity-specific wrappers and
tail-marks-match support is missing.) Again, not a fundamental
limitation.

Further described in the OOPSLA 2018 Paper: "Collapsible Contracts: Fixing a Pathology of Gradual Typing"

In collaboration with Ben Greenman, Christophe Scholliers, Robby Findler, and Vincent St-Amour.
2018-12-13 14:58:56 -06:00
.github/ISSUE_TEMPLATE_DRAFT Don't set this up quite yet. 2018-11-29 21:49:16 -05:00
pkgs Add support for collapsible contracts (#2367) 2018-12-13 14:58:56 -06:00
racket Add support for collapsible contracts (#2367) 2018-12-13 14:58:56 -06:00
.gitattributes Don't include git files in archives. 2010-05-12 01:46:05 -04:00
.gitignore Additional files to ignore. 2018-11-21 12:39:56 -05:00
.mailmap mailmap updates & fixes. 2013-04-03 18:10:22 -04:00
.travis.yml Build cs variant on Travis, but allow failure. 2018-12-02 20:16:05 -05:00
appveyor.yml use VS 2013 on AppVeyor 2018-05-15 11:07:06 -06:00
azure-pipelines.yml Add mac tests on Azure. 2018-09-15 12:43:54 -04:00
INSTALL.txt maefile: adjust SERVER_COMPILE_MACHINE convention 2018-11-27 10:34:52 -07:00
Makefile raco setup: remove -M/--compile-any 2018-12-05 17:31:37 -07:00
README.md reorganize and update "README.txt"s about sources and builds 2018-11-16 07:49:53 -07:00

This is the source code for the core of Racket. See "INSTALL.txt" for full information on building Racket.

To build the full Racket distribution from this repository, run make in the top-level directory. To build minimal Racket, run make base.

The rest of the Racket distribution source code is in other repositories, mostly under the Racket GitHub organization.

Contribute to Racket by submitting a pull request, joining the development mailing list, or visiting the IRC channel.

License

Racket is distributed under the GNU Lesser General Public License (LGPL). This implies that you may link Racket into proprietary applications, provided you follow the rules stated in the LGPL. You can also modify Racket; if you distribute a modified version, you must distribute it under the terms of the LGPL, which in particular states that you must release the source code for the modified software.

See racket/src/COPYING_LESSER.txt for more information.