ABSTRACT
Traditional static type systems are very effective for verifying basic interface specifications, but are somewhat limited in the kinds specifications they support. Dynamically-checked contracts can enforce more precise specifications, but these are not checked until run time, 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 paper explores the key ideas and implications of hybrid type checking, in the context of the simply-typed λ-calculus with arbitrary refinements of base types.
- M. Abadi, L. Cardelli, B. Pierce, and G. Plotkin. Dynamic typing in a statically-typed language. In Proceedings of the ACM Symposium on Principles of Programming Languages, pages 213--227, 1989. Google Scholar
Digital Library
- R. Agarwal and S. D. Stoller. Type inference for parameterized race-free Java. In Proceedings of the Conference on Verification, Model Checking, and Abstract Interpretation, pages 149--160, 2004.Google Scholar
Cross Ref
- A. Aiken, E. L. Wimmers, and T. K. Lakshman. Soft typing with conditional types. In Proceedings of the ACM Symposium on Principles of Programming Languages, pages 163--173, 1994. Google Scholar
Digital Library
- L. Augustsson. Cayenne --- a language with dependent types. In Proceedings of the ACM International Conference on Functional Programming, pages 239--250, 1998. Google Scholar
Digital Library
- T. Ball, R. Majumdar, T. Millstein, and S. Rajamani. Predicate abstraction of C programs. In Proceedings of the Conference on Programming Language Design and Implementation, pages 203--213, June 2001. Google Scholar
Digital Library
- D. Blei, C. Harrelson, R. Jhala, R. Majumdar, G. C. Necula, S. P. Rahul, W. Weimer, and D. Weitz. Vampyre. Information available from http://www-cad.eecs.berkeley.edu/rupak/Vampyre/, 2000.Google Scholar
- V. Breazu-Tannen, T. Coquand, C. A. Gunter, and A. Scedrov. Inheritance as implicit coercion. Inf. Comput., 93(1):172--221, 1991. Google Scholar
Digital Library
- L. Burdy, Y. Cheon, D. Cok, M. Ernst, J. Kiniry, G. Leavens, K. Leino, and E. Poll. An overview of JML tools and applications, 2003.Google Scholar
- L. Cardelli. Phase distinctions in type theory. Manuscript, 1988.Google Scholar
- L. Cardelli. Typechecking dependent types and subtypes. In Lecture notes in computer science on Foundations of logic and functional programming, pages 45--57, 1988. Google Scholar
Digital Library
- R. Davies and F. Pfenning. Intersection types and computational effects. In Proceedings of the ACM International Conference on Functional Programming, pages 198--208, 2000. Google Scholar
Digital Library
- D. Detlefs, G. Nelson, and J. B. Saxe. Simplify: a theorem prover for program checking. J. ACM, 52(3):365--473, 2005. Google Scholar
Digital Library
- R. B. Findler. Behavioral Software Contracts. PhD thesis, Rice University, 2002. Google Scholar
Digital Library
- R. B. Findler and M. Felleisen. Contracts for higher-order functions. In Proceedings of the International Conference on Functional Programming, pages 48--59, 2002. Google Scholar
Digital Library
- C. Flanagan, M. Flatt, S. Krishnamurthi, S. Weirich, and M. Felleisen. Finding bugs in the web of program invariants. In Proceedings of the ACM Conference on Programming Language Design and Implementation, pages 23--32, 1996. Google Scholar
Digital Library
- C. Flanagan, K. R. M. Leino, M. Lillibridge, G. Nelson, J. B. Saxe, and R. Stata. Extended static checking for Java. In Proceedings of the ACM Conference on Programming Language Design and Implementation, pages 234--245, 2002. Google Scholar
Digital Library
- T. Freeman and F. Pfenning. Refinement types for ML. In Proceedings of the ACM Conference on Programming Language Design and Implementation, pages 268--277, 1991. Google Scholar
Digital Library
- P. Godefroid, N. Klarlund, and K. Sen. DART: Directed automated random testing. In Proceedings of the ACM Conference on Programming Language Design and Implementation, pages 213--223, 2005. Google Scholar
Digital Library
- B. Gomes, D. Stoutamire, B. Vaysman, and H. Klawitter. A language manual for Sather 1.1, 1996.Google Scholar
- J. Gosling, B. Joy, G. Steele, and G. Bracha. The Java Language Specification (3rd Edition). Addison-Wesley, 2005. Google Scholar
Digital Library
- N. Haines, D. Kindred, J. G. Morrisett, S. Nettles, and J. M. Wing. Composing first-class transactions. In ACM Transactions on Programming Languages and Systems, volume 16(6), pages 1719--1736, 1994. Google Scholar
Digital Library
- F. Henglein. Dynamic typing: Syntax and proof theory. Science of Computer Programming, 22(3):197--230, 1994. Google Scholar
Digital Library
- T. A. Henzinger, R. Jhala, R. Majumdar, G. C. Necula, G. Sutre, and W. Weimer. Temporal-safety proofs for systems code. In Proceedings of the IEEE Conference on Computer Aided Verification, pages 526--538, 2002. Google Scholar
Digital Library
- R. C. Holt and J. R. Cordy. The Turing programming language. Communications of the ACM, 31:1310--1424, 1988. Google Scholar
Digital Library
- M. Kölling and J. Rosenberg. Blue: Language specification, version 0.94, 1997.Google Scholar
- G. T. Leavens and Y. Cheon. Design by contract with JML, 2005. avaiable at http://www.cs.iastate.edu/~leavens/JML/#.Google Scholar
- D. Luckham. Programming with specifications. Texts and Monographs in Computer Science, 1990. Google Scholar
Digital Library
- M. Fagan. Soft Typing. PhD thesis, Rice University, 1990.Google Scholar
- Y. Mandelbaum, D. Walker, and R. Harper. An effective theory of type refinements. In Proceedings of the International Conference on Functional Programming, pages 213--225, 2003. Google Scholar
Digital Library
- B. Meyer. Object-oriented Software Construction. Prentice Hall, 1988. Google Scholar
Digital Library
- G. Morrisett, D. Walker, K. Crary, and N. Glew. From System F to typed assembly language. ACM Transactions on Programming Languages and Systems, 21(3):527--568, 1999. Google Scholar
Digital Library
- G. C. Necula. Proof-carrying code. In Proceedings of the ACM Symposium on Principles of Programming Languages, pages 106--119, 1997. Google Scholar
Digital Library
- G. C. Necula, S. McPeak, and W. Weimer. CCured: type-safe retrofitting of legacy code. In Proceedings of the ACM Symposium on Principles of Programming Languages, pages 128--139, 2002. Google Scholar
Digital Library
- R. O'Callahan and J.-D. Choi. Hybrid dynamic data race detection. In ACM Symposium on Principles and Practice of Parallel Programming, pages 167--178, 2003. Google Scholar
Digital Library
- X. Ou, G. Tan, Y. Mandelbaum, and D. Walker. Dynamic typing with dependent types. In IFIP International Conference on Theoretical Computer Science, pages 437--450, 2004.Google Scholar
Cross Ref
- D. L. Parnas. A technique for software module specification with examples. Communications of the ACM, 15(5):330--336, 1972. Google Scholar
Digital Library
- Reynolds, J.C. Definitional interpreters for higher-order programming languages. In Proc. ACM Annual Conference, pages 717--740, 1972. Google Scholar
Digital Library
- S. Thatte. Quasi-static typing. In Proceedings of the ACM Symposium on Principles of Programming Languages, pages 367--381, 1990. Google Scholar
Digital Library
- D. Tarditi, G. Morrisett, P. Cheng, C. Stone, R. Harper, and P. Lee. TIL: A type-directed optimizing compiler for ML. ACM SIGPLAN Notices, 31(5):181--192, 1996. Google Scholar
Digital Library
- J. Vitek, S. Jagannathan, A. Welc, and A. L. Hosking. A semantic framework for designer transactions. In Proceedings of European Symposium on Programming, pages 249--263, 2004.Google Scholar
Cross Ref
- C. von Praun and T. Gross. Object race detection. In Proceedings of the ACM Conference on Object-Oriented Programming, Systems, Languages and Applications, pages 70--82, 2001. Google Scholar
Digital Library
- A. Wright and R. Cartwright. A practical soft type system for scheme. In Proceedings of the ACM Conference on Lisp and Functional Programming, pages 250--262, 1994. Google Scholar
Digital Library
- A. Wright and M. Felleisen. A syntactic approach to type soundness. Info. Comput., 115(1):38--94, 1994. Google Scholar
Digital Library
- H. Xi. Imperative programming with dependent types. In Proceedings of the IEEE Symposium on Logic in Computer Science, pages 375--387, 2000. Google Scholar
Digital Library
- H. Xi and F. Pfenning. Dependent types in practical programming. In Proceedings of the ACM Symposium on Principles of Programming Languages, pages 214--227, 1999. Google Scholar
Digital Library
Index Terms
Hybrid type checking
Recommendations
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 ...
Hybrid type checking
Proceedings of the 2006 POPL ConferenceTraditional static type systems are very effective for verifying basic interface specifications, but are somewhat limited in the kinds specifications they support. Dynamically-checked contracts can enforce more precise specifications, but these are not ...
Polymorphic Manifest Contracts, Revised and Resolved
Manifest contracts track precise program properties by refining types with predicates—for example, {x:Int∣ x > 0} denotes the positive integers. Contracts and polymorphism make a natural combination: programmers can give strong contracts to abstract ...







Comments