Title
The Design and Implementation of Typed Scheme: From Scripts to Programs
Abstract
When scripts in untyped languages grow into large programs, maintaining them becomes difficult. A lack of explicit type annotations in typical scripting languages forces programmers to must (re)discover critical pieces of design information every time they wish to change a program. This analysis step both slows down the maintenance process and may even introduce mistakes due to the violation of undiscovered invariants. This paper presents Typed Scheme, an explicitly typed extension of PLT Scheme, an untyped scripting language. Its type system is based on the novel notion of occurrence typing, which we formalize and mechanically prove sound. The implementation of Typed Scheme additionally borrows elements from a range of approaches, including recursive types, true unions and subtyping, plus polymorphism combined with a modicum of local inference. The formulation of occurrence typing naturally leads to a simple and expressive version of predicates to describe refinement types. A Typed Scheme program can use these refinement types to keep track of arbitrary classes of values via the type system. Further, we show how the Typed Scheme type system, in conjunction with simple recursive types, is able to encode refinements of existing datatypes, thus expressing both proposed variations of refinement types.
Year
Venue
Keywords
2011
CoRR
scripting language,polymorphism,type system,programming language
Field
DocType
Volume
Type system,Programming language,Simply typed lambda calculus,Typed lambda calculus,Computer science,Type inference,Theoretical computer science,Strong and weak typing,Type constructor,Recursion,Scripting language
Journal
abs/1106.2575
Citations 
PageRank 
References 
0
0.34
18
Authors
2
Name
Order
Citations
PageRank
Sam Tobin-Hochstadt139124.82
Matthias Felleisen23001272.57