2014 · 83 citations · 25 references
ComputingComputer ScienceCompilersFormal MethodsProgramming LanguagesCompiler ConstructionData TypesSoftware ConstructionType CheckingType SystemsCode ReuseGradual TypingJavascriptSoundnessSoundness TheoremsType SafetyType SoundnessVirtual Machines
Current proposals for adding gradual typing to JavaScript, such as Closure, TypeScript and Dart, forgo soundness to deal with issues of scale, code reuse, and popular programming patterns. We show how to address these issues in practice while retaining soundness. We design and implement a new gradual type system, prototyped for expediency as a 'Safe' compilation mode for TypeScript. Our compiler achieves soundness by enforcing stricter static checks and embedding residual runtime checks in compiled code. It emits plain JavaScript that runs on stock virtual machines. Our main theorem is a simulation that ensures that the checks introduced by Safe TypeScript (1) catch any dynamic type error, and (2) do not alter the semantics of type-safe TypeScript code.
25
The design and implementation of typed scheme
Sam Tobin-Hochstadt, Matthias Felleisen · 2008 · 313 citations
Robert Cartwright, Mike Fagan · 1991 · 302 citations · Full text
Sam Tobin-Hochstadt, Matthias Felleisen · 2006 · 207 citations