Advertisement

Dynamic Typing with Dependent Types

  • Xinming Ou
  • Gang Tan
  • Yitzhak Mandelbaum
  • David Walker
Part of the IFIP International Federation for Information Processing book series (IFIPAICT, volume 155)

Abstract

Dependent type systems are promising tools programmers can use to increase the reliability and security of their programs. Unfortunately, dependently-typed programming languages require programmers to annotate their programs with many typing specifications to help guide the type checker. This paper shows how to make the process of programming with dependent types more palatable by defining a language in which programmers have fine-grained control over the trade-off between the number of dependent typing annotations they must place on programs and the degree of compile-time safety. More specifically, certain program fragments are marked dependent, in which case the programmer annotates them in detail and a dependent type checker verifies them at compile time. Other fragments are marked simple, in which case they may be annotation-free and dependent constraints are verified at run time.

References

  1. [1]
    Martín Abadi, Luca Cardelli, Benjamin C. Pierce, and Gordon Plotkin. Dynamic typing in a statically typed language. ACM Transactions on Programming Languages and Systems, 13(2):237–268, April 1991.CrossRefGoogle Scholar
  2. [2]
    Alex Aiken, Edward L. Wimmers, and T. K. Lakshman. Soft typing with conditional types. In Twenty-First ACM Symposium on Principles of Programming Languages, pages 163–173, January 1994.Google Scholar
  3. [3]
    R. Cartwright and M. Fagan. Soft typing. In ACM Conference on Programming Language Design and Implementation, pages 278–292, 1991.Google Scholar
  4. [4]
    R. Cartwright and M. Fagan. A practical soft type system for Scheme. ACM transactions on programming languages and systems, 19(1):87–152, January 1997.Google Scholar
  5. [5]
    Rob Deline and Manuel Fähndrich. Enforcinghigh-level protocols in low-level software. In ACM Conference on Programming Language Design and Implementation, pages 59–69, Snowbird, Utah, June 2001. ACM Press.Google Scholar
  6. [6]
    Robert Bruce Findler and Matthias Felleisen. Contracts for higher-order functions. In ACM International Conference on Functional Programming, pages 48–59, Pittsburgh, October 2002. ACM Press.Google Scholar
  7. [7]
    Robert Harper and Mark Lillibridge. A type-theoretic approach to higher-order modules with sharing. In Twenty-First ACM Symposium on Principles of Programming Languages, pages 123–137, Portland, OR, January 1994.Google Scholar
  8. [8]
    George C. Necula, Scott McPeak, and Westley Weimer. Ccured: Type-safe retrofitting of legacy code. In ACM Symposium on Principles of Programming Languages, London, January 2002. ACM Press.Google Scholar
  9. [9]
    Xinming Ou, Gang Tan, Yitzhak Mandelbaum, and David Walker. Dynamic typing with dependent types. Technical Report TR-695-04, Department of Computer Science, Princeton University, 2004.Google Scholar
  10. [10]
    S. Thatte. Quasi-static typing. In Seventeenth ACM Symposium on Principles of Programming Languages, pages 367–381, January 1990.Google Scholar
  11. [11]
    David Walker. A type system for expressive security policies. In Twenty-Seventh ACM Symposium on Principles of Programming Languages, pages 254–267, Boston, January 2000.Google Scholar
  12. [12]
    Hongwei Xi and Frank Pfenning. Eliminating array bound checking through dependent types. In ACM Conference on Programming Language Design and Implementation, pages 249–257, Montreal, June 1998.Google Scholar
  13. [13]
    Christoph Zenger. Indexed types. In Theoretical Computer Science, volume 187, pages 147–165. Elsevier, November 1997.CrossRefMATHMathSciNetGoogle Scholar

Copyright information

© Springer Science + Business Media, Inc. 2004

Authors and Affiliations

  • Xinming Ou
    • 1
  • Gang Tan
    • 1
  • Yitzhak Mandelbaum
    • 1
  • David Walker
    • 1
  1. 1.Department of Computer SciencePrinceton UniversityUSA

Personalised recommendations