Gradual Typing for Annotated Type Systems

Annotated type systems include additional information in types to make them more expressive and to gather intensional information about programs. Gradual types enable a seamless transition between statically and dynamically checked properties of values. Gradual annotation typing applies the ideas of gradual typing to the annotation part of a type system. We present a generic approach to transform a type system with annotated base types into a system which gradualizes the information contained in the annotations. We prove generic type safety for the gradualized extensions and similar generic versions of the blame theorem for a calculus with run-time annotations. We relate this calculus to a more efficient calculus which elides run-time annotations in the statically annotated parts. We further introduce and prove correct a syntactic transformation that eliminates run-time annotation tests by enlarging the statically annotated parts.

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

[2]  Andrew Kennedy,et al.  Dimension Types , 1994, ESOP.

[3]  Jon G. Riecke,et al.  The SLam calculus: programming with secrecy and integrity , 1998, POPL '98.

[4]  François Pessaux,et al.  Type-based analysis of uncaught exceptions , 1999, POPL '99.

[5]  Jan Vitek,et al.  Static checking of safety critical Java annotations , 2010, JTRES '10.

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

[7]  Cormac Flanagan,et al.  Hybrid type checking , 2006, POPL '06.

[8]  Philip Wadler,et al.  Well-Typed Programs Can't Be Blamed , 2009, ESOP.

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

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

[11]  Dave Clarke,et al.  Gradual Ownership Types , 2012, ESOP.

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

[13]  Daniel Jackson Aspect: detecting bugs with abstract dependences , 1995, TSEM.

[14]  Andrew Kennedy,et al.  Relational parametricity and units of measure , 1997, POPL '97.

[15]  Éric Tanter,et al.  Gradual Typestate , 2011, ECOOP.

[16]  Peter Thiemann,et al.  Gradual Security Typing with References , 2013, 2013 IEEE 26th Computer Security Foundations Symposium.

[17]  Andrew D. Gordon,et al.  Bisimilarity as a theory of functional programming , 1999, MFPS.

[18]  Frank Pfenning,et al.  Refinement types for ML , 1991, PLDI '91.

[19]  Daan Leijen,et al.  Domain specific embedded compilers , 1999, DSL '99.

[20]  Walid Taha,et al.  Gradual Typing for Objects , 2007, ECOOP.

[21]  Douglas J. Howe Proving Congruence of Bisimulation in Functional Programming Languages , 1996, Inf. Comput..

[22]  Mikael Rittri,et al.  Dimension inference under polymorphic recursion , 1995, FPCA '95.

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

[24]  Martín Abadi,et al.  Types for safe locking: Static race detection for Java , 2006, TOPL.

[25]  James H. Morris,et al.  Lambda-calculus models of programming languages. , 1969 .

[26]  Ian F. Darwin,et al.  AnnaBot: A Static Verifier for Java Annotation Usage , 2010, Adv. Softw. Eng..

[27]  François Pessaux,et al.  Type-based analysis of uncaught exceptions , 2000, TOPL.

[28]  Kirsten Lackner Solberg,et al.  Annotated Type Systems for Program Analysis , 1995 .

[29]  Jens Palsberg,et al.  Inference of User-Defined Type Qualifiers and Qualifier Rules , 2006, ESOP.

[30]  Flemming Nielson Annotated type and effect systems , 1996, CSUR.

[31]  Stephen N. Freund,et al.  Type-based race detection for Java , 2000, PLDI '00.

[32]  Atsushi Igarashi,et al.  Gradual typing for generics , 2011, OOPSLA '11.