© 1995 by Oxford University Press
Original Articles |
Efficient Verified Programs in a Type Theory with Mixed Constructivity
Computer Science Department, University of Maryland Baltimore County, C atonsville, MD 21228, USA. E-mail: sasaki{at}cs.umbc.edu
We define a programming logic Sp1, a mixed-constructive type theory. Sp1 combines computational/constructive and non-computational/classical logic so that proofs in the logic can be understood as efficient verified applicative programs. The theory is obtained by adding an explicit notion of virtual value and computation to a simple typed
-calculus version of constructive type theory. Virtual values are used as part of a Heyting-like denotational semantics for proof terms. In particular, they are used to provide semantics for computations suppressed for efficiency (for example, bounds of termination for recursive functions). In addition, virtual values are used to provide semantics for proof terms that use classical reasoning: they are understood as standing for virtual values that can appeal to an oracle for Pierce's law and hence cannot be evaluated at runtime. The advantages of this approach over approaches that use lazy evaluation or compile-time code optimization are that suppression of evidence is explicit and under user control; suppressed programs have a natural syntax; the logic is more expressive because one can quantify over suppressed values; and classical, constructive, and mixed-constructive types can be built from one unified syntax and semantics, as can classical, constructive, and mixed expressions.
Keywords: Constructive type theory; verified programming; intuitionistic logic; mixed constructivity; evidence semantics