A spectrum of type soundness and performance

The literature on gradual typing presents three fundamentally different ways of thinking about the integrity of programs that combine statically typed and dynamically typed code. This paper presents a uniform semantic framework that explains all three approaches, illustrates how each approach affects a developer's work, and adds a systematic performance comparison for a single implementation platform.

[1]  André Murbach Maidl,et al.  Typed Lua: An Optional Type System for Lua , 2014, Dyla'14.

[2]  Jan Vitek,et al.  Integrating typed and untyped code in a scripting language , 2010, POPL '10.

[3]  Walid Taha,et al.  Exploring the Design Space of Higher-Order Casts , 2009, ESOP.

[4]  Sam Tobin-Hochstadt,et al.  Optimization coaching: optimizers learn to communicate with programmers , 2012, OOPSLA '12.

[5]  Guy L. Steele,et al.  Common LISP: the language, 2nd Edition , 1990 .

[6]  T. Stephen Strickland,et al.  The ruby type checker , 2013, SAC '13.

[7]  Fritz Henglein,et al.  Dynamic Typing: Syntax and Proof Theory , 1994, Sci. Comput. Program..

[8]  Gilad Bracha,et al.  Strongtalk: typechecking Smalltalk in a production environment , 1993, OOPSLA '93.

[9]  Marcus Denker,et al.  Gradual typing for Smalltalk , 2014, Sci. Comput. Program..

[10]  Fabio Mascarenhas,et al.  A formalization of typed lua , 2015, DLS.

[11]  Philip Wadler,et al.  Blame for all , 2011, POPL '11.

[12]  Atsushi Igarashi,et al.  On polymorphic gradual typing , 2017, Proc. ACM Program. Lang..

[13]  Sam Tobin-Hochstadt,et al.  Sound gradual typing: only mostly dead , 2017, Proc. ACM Program. Lang..

[14]  Robert Bruce Findler,et al.  Fine-grained interoperability through mirrors and contracts , 2005, OOPSLA '05.

[15]  Jan Vitek,et al.  KafKa: Gradual Typing for Objects , 2018, ECOOP.

[16]  Xavier Leroy,et al.  Dynamics in ML , 1991, FPCA.

[17]  Sam Tobin-Hochstadt,et al.  Complete Monitors for Behavioral Contracts , 2012, ESOP.

[18]  Philip Wadler,et al.  Threesomes, with and without blame , 2010, POPL '10.

[19]  Jan Vitek,et al.  How to evaluate the performance of gradual type systems , 2019, Journal of Functional Programming.

[20]  John C. Reynolds,et al.  Types, Abstraction and Parametric Polymorphism , 1983, IFIP Congress.

[21]  Gilles Barthe,et al.  Implicit Coercions in Type Systems , 1995, TYPES.

[22]  Avik Chaudhuri,et al.  The ins and outs of gradual type inference , 2012, POPL '12.

[23]  Sam Tobin-Hochstadt,et al.  Gradual typing for first-class classes , 2012, OOPSLA '12.

[24]  Sophia Drossopoulou,et al.  Towards Type Inference for JavaScript , 2005, ECOOP.

[25]  Peter Thiemann,et al.  The interaction of contracts and laziness , 2012, High. Order Symb. Comput..

[26]  Nevin Heintze,et al.  Set-based analysis of ML programs , 1994, LFP '94.

[27]  Sam Tobin-Hochstadt,et al.  Chaperones and impersonators: run-time support for reasonable interposition , 2012, OOPSLA '12.

[28]  Jan Vitek,et al.  Concrete Types for TypeScript , 2015, ECOOP.

[29]  Jeremy G. Siek,et al.  Big types in little runtime: open-world soundness and collaborative blame for gradual type systems , 2017, POPL.

[30]  Fritz Henglein,et al.  Safe polymorphic type inference for a dynamically typed language: translating Scheme to ML , 1995, FPCA '95.

[31]  Ravi Chugh,et al.  Dependent types for JavaScript , 2012, OOPSLA '12.

[32]  Robert Bruce Findler,et al.  Operational semantics for multi-language programs , 2009 .

[33]  Roel Wuyts,et al.  Fast type reconstruction for dynamically typed programming languages , 2009, DLS '09.

[34]  Sam Tobin-Hochstadt,et al.  Practical Optional Types for Clojure , 2016, ESOP.

[35]  Alexander Aiken,et al.  Soft typing with conditional types , 1994, POPL '94.

[36]  Guy L. Steele,et al.  Common Lisp the Language , 1984 .

[37]  Robin Milner,et al.  A Theory of Type Polymorphism in Programming , 1978, J. Comput. Syst. Sci..

[38]  Cormac Flanagan,et al.  Space-efficient gradual typing , 2010, High. Order Symb. Comput..

[39]  Sam Tobin-Hochstadt,et al.  Monotonic References for Efficient Gradual Typing , 2015, ESOP.

[40]  Gavin M. Bierman,et al.  A theory of typed coercions and its applications , 2009, ICFP.

[41]  Joe Gibbs Politz,et al.  Progressive types , 2012, Onward! 2012.

[42]  Sam Tobin-Hochstadt,et al.  Typing the Numeric Tower , 2012, PADL.

[43]  Norihisa Suzuki,et al.  Inferring types in Smalltalk , 1981, POPL '81.

[44]  Sam Tobin-Hochstadt,et al.  Pycket: a tracing JIT for a functional language , 2015, ICFP.

[45]  Sam Tobin-Hochstadt,et al.  Migratory Typing: Ten Years Later , 2017, SNAPL.

[46]  Thomas S. Heinze,et al.  Type safety analysis for Dart , 2016, DLS.

[47]  Ross Tate,et al.  Sound gradual typing is nominally alive and well , 2017, Proc. ACM Program. Lang..

[48]  Daniel R. Licata,et al.  Call-by-name Gradual Type Theory , 2018, FSCD.

[49]  Philip Wadler,et al.  A practical subtyping system for Erlang , 1997, ICFP '97.

[50]  Jeremy G. Siek,et al.  The gradualizer: a methodology and algorithm for generating gradual type systems , 2016, POPL.

[51]  John Tang Boyland,et al.  Refined Criteria for Gradual Typing , 2015, SNAPL.

[52]  Michael Greenberg,et al.  Space-Efficient Manifest Contracts , 2014, POPL.

[53]  Jeffrey S. Foster,et al.  Static type inference for Ruby , 2009, SAC '09.

[54]  Jim Baker,et al.  Design and evaluation of gradual typing for python , 2014, DLS.

[55]  Jan Vitek,et al.  Thorn: robust, concurrent, extensible scripting on the JVM , 2009, OOPSLA 2009.

[56]  Matthias Felleisen,et al.  Modular set-based analysis from contracts , 2006, POPL '06.

[57]  Norman Ramsey,et al.  Embedding an interpreted language using higher-order functions and types , 2003, IVME '03.

[58]  Anne Rogers,et al.  Lazy Contract Checking for Immutable Data Structures , 2008, IFL.

[59]  Éric Tanter,et al.  Gradual refinement types , 2017, POPL.

[60]  Kazuhiko Kato,et al.  Semantics for communication primitives in a polymorphic language , 1993, POPL '93.

[61]  Matthias Felleisen,et al.  Correct blame for contracts: no more scapegoating , 2011, POPL '11.

[62]  Robert Bruce Findler,et al.  Operational semantics for multi-language programs , 2007, POPL '07.

[63]  Matthias Felleisen,et al.  A Syntactic Approach to Type Soundness , 1994, Inf. Comput..

[64]  Sam Tobin-Hochstadt,et al.  The design and implementation of typed scheme , 2008, POPL '08.

[65]  Éric Tanter,et al.  Confined gradual typing , 2014, OOPSLA.

[66]  Gavin M. Bierman,et al.  Safe & Efficient Gradual Typing for TypeScript , 2015, POPL.

[67]  Robert Cartwright,et al.  A practical soft type system for scheme , 1997, TOPL.

[68]  Philip Wadler,et al.  Mixed Messages: Measuring Conformance and Non-Interference in TypeScript , 2017, ECOOP.

[69]  Sam Tobin-Hochstadt,et al.  Interlanguage migration: from scripts to programs , 2006, OOPSLA '06.

[70]  Sam Tobin-Hochstadt,et al.  Logical types for untyped languages , 2010, ICFP '10.

[71]  Jan Vitek,et al.  Is sound gradual typing dead? , 2016, POPL.

[72]  Satish R. Thatte Quasi-static typing , 1989, POPL '90.

[73]  Sabrina Eberhart,et al.  Common Lisp The Language , 2016 .

[74]  Robert Bruce Findler,et al.  Selectors Make Set-Based Analysis Too Hard , 2005, High. Order Symb. Comput..

[75]  HeintzeNevin Set-based analysis of ML programs , 1994 .

[76]  Sam Tobin-Hochstadt,et al.  Towards Practical Gradual Typing , 2015, ECOOP.

[77]  FelleisenMatthias,et al.  A spectrum of type soundness and performance , 2018 .

[78]  Kenneth Knowles,et al.  Hybrid type checking , 2010, TOPL.

[79]  Matthias Felleisen,et al.  Catching bugs in the web of program invariants , 1996, PLDI '96.

[80]  Philip Wadler,et al.  Blame and coercion: together again for the first time , 2015, Journal of Functional Programming.

[81]  Jeremy G. Siek Gradual Typing for Functional Languages , 2006 .

[82]  Gavin M. Bierman,et al.  Adding Dynamic Types to C# , 2010, ECOOP.

[83]  Henk Barendregt,et al.  The Lambda Calculus: Its Syntax and Semantics , 1985 .

[84]  Éric Tanter,et al.  Abstracting gradual typing , 2016, POPL.

[85]  Alexi Turcotte,et al.  The VM already knew that: leveraging compile-time knowledge to optimize gradual typing , 2017, Proc. ACM Program. Lang..

[86]  Éric Tanter,et al.  Cast insertion strategies for gradually-typed objects , 2013, DLS '13.

[87]  Martín Abadi,et al.  Understanding TypeScript , 2014, ECOOP.

[88]  Ben Greenman,et al.  On the cost of type-tag soundness , 2017, PEPM.

[89]  Matthias Felleisen,et al.  On contract satisfaction in a higher-order world , 2011, TOPL.