Interactive Programs in Dependent Type Theory

  • Authors:
  • Peter Hancock;Anton Setzer

  • Affiliations:
  • -;-

  • Venue:
  • Proceedings of the 14th Annual Conference of the EACSL on Computer Science Logic
  • Year:
  • 2000

Quantified Score

Hi-index 0.00

Visualization

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.