skip to main content
10.1145/1111037.1111059acmconferencesArticle/Chapter ViewAbstractPublication PagespoplConference Proceedingsconference-collections
Article

Hybrid type checking

Published:11 January 2006Publication History

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.

References

  1. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  2. 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 ScholarGoogle ScholarCross RefCross Ref
  3. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  4. L. Augustsson. Cayenne --- a language with dependent types. In Proceedings of the ACM International Conference on Functional Programming, pages 239--250, 1998. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  6. 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 ScholarGoogle Scholar
  7. V. Breazu-Tannen, T. Coquand, C. A. Gunter, and A. Scedrov. Inheritance as implicit coercion. Inf. Comput., 93(1):172--221, 1991. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. 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 ScholarGoogle Scholar
  9. L. Cardelli. Phase distinctions in type theory. Manuscript, 1988.Google ScholarGoogle Scholar
  10. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  11. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  12. D. Detlefs, G. Nelson, and J. B. Saxe. Simplify: a theorem prover for program checking. J. ACM, 52(3):365--473, 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. R. B. Findler. Behavioral Software Contracts. PhD thesis, Rice University, 2002. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  15. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  16. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  17. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  18. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  19. B. Gomes, D. Stoutamire, B. Vaysman, and H. Klawitter. A language manual for Sather 1.1, 1996.Google ScholarGoogle Scholar
  20. J. Gosling, B. Joy, G. Steele, and G. Bracha. The Java Language Specification (3rd Edition). Addison-Wesley, 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  22. F. Henglein. Dynamic typing: Syntax and proof theory. Science of Computer Programming, 22(3):197--230, 1994. Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  24. R. C. Holt and J. R. Cordy. The Turing programming language. Communications of the ACM, 31:1310--1424, 1988. Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. M. Kölling and J. Rosenberg. Blue: Language specification, version 0.94, 1997.Google ScholarGoogle Scholar
  26. G. T. Leavens and Y. Cheon. Design by contract with JML, 2005. avaiable at http://www.cs.iastate.edu/~leavens/JML/#.Google ScholarGoogle Scholar
  27. D. Luckham. Programming with specifications. Texts and Monographs in Computer Science, 1990. Google ScholarGoogle ScholarDigital LibraryDigital Library
  28. M. Fagan. Soft Typing. PhD thesis, Rice University, 1990.Google ScholarGoogle Scholar
  29. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  30. B. Meyer. Object-oriented Software Construction. Prentice Hall, 1988. Google ScholarGoogle ScholarDigital LibraryDigital Library
  31. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  32. G. C. Necula. Proof-carrying code. In Proceedings of the ACM Symposium on Principles of Programming Languages, pages 106--119, 1997. Google ScholarGoogle ScholarDigital LibraryDigital Library
  33. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  34. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  35. 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 ScholarGoogle ScholarCross RefCross Ref
  36. D. L. Parnas. A technique for software module specification with examples. Communications of the ACM, 15(5):330--336, 1972. Google ScholarGoogle ScholarDigital LibraryDigital Library
  37. Reynolds, J.C. Definitional interpreters for higher-order programming languages. In Proc. ACM Annual Conference, pages 717--740, 1972. Google ScholarGoogle ScholarDigital LibraryDigital Library
  38. S. Thatte. Quasi-static typing. In Proceedings of the ACM Symposium on Principles of Programming Languages, pages 367--381, 1990. Google ScholarGoogle ScholarDigital LibraryDigital Library
  39. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  40. 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 ScholarGoogle ScholarCross RefCross Ref
  41. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  42. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  43. A. Wright and M. Felleisen. A syntactic approach to type soundness. Info. Comput., 115(1):38--94, 1994. Google ScholarGoogle ScholarDigital LibraryDigital Library
  44. H. Xi. Imperative programming with dependent types. In Proceedings of the IEEE Symposium on Logic in Computer Science, pages 375--387, 2000. Google ScholarGoogle ScholarDigital LibraryDigital Library
  45. 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 ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Hybrid type checking

      Recommendations

      Comments

      Login options

      Check if you have access through your login credentials or your institution to get full access on this article.

      Sign in

      PDF Format

      View or Download as a PDF file.

      PDF

      eReader

      View online with eReader.

      eReader
      About Cookies On This Site

      We use cookies to ensure that we give you the best experience on our website.

      Learn more

      Got it!