Hybrid type checking

Traditional static type systems are effective for verifying basic interface specifications. Dynamically checked contracts support more precise specifications, but these are not checked until runtime, resulting in incomplete detection of defects. Hybrid type checking is a synthesis of these two approaches that enforces precise interface specifications, via static analysis where possible, but also via dynamic checks where necessary. This article explores the key ideas and implications of hybrid type checking, in the context of the λ-calculus extended with contract types, that is, with dependent function types and with arbitrary refinements of base types.

[1]  Mariangiola Dezani-Ciancaglini,et al.  Intersection Types and Computational Rules , 2003, WoLLIC.

[2]  David C. Luckham Programming with Specifications: An Introduction to ANNA, A Language for Specifying Ada Programs , 1990 .

[3]  Lennart Augustsson,et al.  Cayenne—a language with dependent types , 1998, ICFP '98.

[4]  Matthias Felleisen,et al.  Contracts for higher-order functions , 2002, ICFP '02.

[5]  Robert Cartwright,et al.  Soft typing , 1991, PLDI '91.

[6]  Martín Abadi,et al.  Dynamic typing in a statically-typed language , 1989, POPL '89.

[7]  Cormac Flanagan,et al.  Unifying Hybrid Types and Contracts , 2007, Trends in Functional Programming.

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

[9]  Jan Vitek,et al.  A Semantic Framework for Designer Transactions , 2004, ESOP.

[10]  David Detlefs,et al.  Simplify: a theorem prover for program checking , 2005, JACM.

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

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

[13]  Rahul Agarwal,et al.  Type Inference for Parameterized Race-Free Java , 2004, VMCAI.

[14]  George C. Necula,et al.  Proof-carrying code , 1997, POPL '97.

[15]  Karl Crary,et al.  From system F to typed assembly language , 1999, TOPL.

[16]  Guy L. Steele,et al.  The Java Language Specification , 1996 .

[17]  David A. McAllester,et al.  Sound and complete models of contracts , 2006, Journal of Functional Programming.

[18]  Richard Statman,et al.  Logical Relations and the Typed lambda-Calculus , 1985, Inf. Control..

[19]  Thomas R. Gross,et al.  Object race detection , 2001, OOPSLA '01.

[20]  Kenneth Knowles,et al.  Type Reconstruction for General Refinement Types , 2007, ESOP.

[21]  David Luckham,et al.  Programming with Specifications , 1990, Texts and Monographs in Computer Science.

[22]  Frank Pfenning,et al.  Intersection types and computational effects , 2000, ICFP '00.

[23]  Peter Lee,et al.  TIL: a type-directed, optimizing compiler for ML , 2004, SIGP.

[24]  David Lorge Parnas,et al.  A technique for software module specification with examples , 1972, CACM.

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

[26]  Patrick Maxim Rondon,et al.  Liquid types , 2008, PLDI '08.

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

[28]  Giuseppe Castagna,et al.  Semantic subtyping , 2002, Proceedings 17th Annual IEEE Symposium on Logic in Computer Science.

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

[30]  Luca Cardelli,et al.  Typechecking Dependent Types and Subtypes , 1986, Foundations of Logic and Functional Programming.

[31]  David Walker,et al.  Dynamic Typing with Dependent Types , 2004, IFIP TCS.

[32]  Matthias Felleisen,et al.  Behavioral contracts and behavioral subtyping , 2001, ESEC/FSE-9.

[33]  Frank Pfenning,et al.  Dependent types in practical programming , 1999, POPL '99.

[34]  簡聰富,et al.  物件導向軟體之架構(Object-Oriented Software Construction)探討 , 1989 .

[35]  Richard C. Holt,et al.  The Turing programming language , 1988, CACM.

[36]  Luca Cardelli,et al.  Phase Distinctions in Type Theory , 1988 .

[37]  Gary T. Leavens,et al.  Design by Contract with JML , 2006 .

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

[39]  George C. Necula,et al.  CCured: type-safe retrofitting of legacy code , 2002, SIGP.

[40]  Jong-Deok Choi,et al.  Hybrid dynamic data race detection , 2003, PPoPP '03.

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

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

[43]  Michael D. Ernst,et al.  An overview of JML tools and applications , 2003, Electron. Notes Theor. Comput. Sci..

[44]  Mark Lillibridge,et al.  Extended static checking for Java , 2002, PLDI '02.

[45]  Ewen Denney Refinement types for specification , 1998, PROCOMET.

[46]  J. Gregory Morrisett,et al.  Composing first-class transactions , 1994, TOPL.

[47]  Thierry Coquand,et al.  Inheritance as Implicit Coercion , 1991, Inf. Comput..

[48]  Hongwei Xi,et al.  Imperative programming with dependent types , 2000, Proceedings Fifteenth Annual IEEE Symposium on Logic in Computer Science (Cat. No.99CB36332).

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

[50]  David Walker,et al.  An effective theory of type refinements , 2003, ICFP '03.

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

[52]  Koushik Sen,et al.  DART: directed automated random testing , 2005, PLDI '05.