Skip to main content

Interactive Programs in Dependent Type Theory

  • Conference paper
  • First Online:
Computer Science Logic (CSL 2000)

Part of the book series: Lecture Notes in Computer Science ((LNCS,volume 1862))

Included in the following conference series:

Abstract

We propose a representation of interactive systems in dependent type theory. This is meant as a basis for an execution environment for dependently typed programs, and for reasoning about their construction. The inspiration is the ‘I/O-monad’ of Haskell. The fundamental notion is an I/O-tree; its definition is parameterised over a general notion of dependently typed, command-response interactions called a world. I/O-trees represent strategies for one of the parties in a command/response interaction - the notion is not confined to functional programming. We present I/O-trees in two forms. The first form, which is simpler, is suitable for Turing-complete functional programming languages with general recursion, but is non-normalising. The second is definable within (ordinary) normalising type theory and we identify programs written in it as ‘normalising I/O-programs’. We define new looping constructs (while and repeat), and a new refinement construct (redirect), which permits the implementation of libraries. We introduce a bisimulation relation between interactive programs, with respect to which we prove the monad laws and defining equations of while. Most definitions in this article make essential use of the expressive strength of dependent typing.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 84.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 109.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. L. Augustsson. Cayenne — a language with dependent types. In Proc. of the International Conference on Functional Programming (ICFP’98). ACM Press, September 1998.

    Google Scholar 

  2. L. Hallnäs. An intensional characterization of the largest bisimulation. Theoretical Computer Science, 53:335–343, 1987.

    Article  MATH  MathSciNet  Google Scholar 

  3. P. Hancock and A. Setzer. The IO monad in dependent type theory. DTP’99, http://www.md.chalmers.se/Cs/Research/Semantics/APPSEM/dtp99/proceedings.html, 1999.

  4. J. Hughes. The design of a pretty-printing library. In J. Jeuring and E. Meijer, editors, Advanced Functional Programming, volume 925 of LNCS, pages 53–93. Springer, 1995.

    Google Scholar 

  5. I. Lindström. A construction of non-well-founded sets within Martin-Löf’s type theory. Journal of Symbolic Logic, 54(1):57–64, 1989.

    Article  MATH  MathSciNet  Google Scholar 

  6. P. Martin-Löf. Constructive mathematics and computer programming. In J. L. Cohen, J. H Loś, H. Pfeiffer, and K.-D. Podewski, editors, Proceedings 6th Intl. Congress on Logic, Methodology and Philosophy of Science, Hannover, FRG, 22–29 Aug 1979, pages 153–175. North Holland, Amsterdam, 1982.

    Google Scholar 

  7. P. Martin-Löf. Intuitionistic Type Theory, volume 1 of Studies in Proof Theory: Lecture Notes. Bibliopolis, Napoli, 1984.

    Google Scholar 

  8. E. Moggi. Notions of computation and monads. Information and Computation, 93(1):55–92, 1991.

    Article  MATH  MathSciNet  Google Scholar 

  9. B. Nordström, K. Petersson, and J. M. Smith. Programming in Martin-Löf’ s Type Theory: An Introduction. Clarendon Press, Oxford, 1990.

    MATH  Google Scholar 

  10. S. L. Peyton Jones and P. Wadler. Imperative functional programming. In 20’th ACM Symposium on Principles of Programming Languages, Charlotte, North Carolina, January 1993.

    Google Scholar 

  11. A. Setzer. Well-ordering proofs for Martin-Löf type theory. Annals of Pure and Applied Logic, 92:113–159, 1998.

    Article  MATH  MathSciNet  Google Scholar 

  12. P. Wadler. The essence of functional programming. In 19’th Symposium on Principles of Programming Languages, Albuquerque, volume 19. ACM Press, January 1992.

    Google Scholar 

  13. P. Wadler. Monads for functional programming. In J. Jeuring and E. Meijer, editors, Advanced Functional Programming, volume 925 of LNCS. Springer Verlag, 1995.

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2000 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Hancock, P., Setzer, A. (2000). Interactive Programs in Dependent Type Theory. In: Clote, P.G., Schwichtenberg, H. (eds) Computer Science Logic. CSL 2000. Lecture Notes in Computer Science, vol 1862. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-44622-2_21

Download citation

  • DOI: https://doi.org/10.1007/3-540-44622-2_21

  • Published:

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-67895-3

  • Online ISBN: 978-3-540-44622-4

  • eBook Packages: Springer Book Archive

Publish with us

Policies and ethics