##
###
Classical logic, continuation semantics and abstract machines

Th. STREICHER, B. REUS

1998
*
Journal of functional programming
*

One of the goals of this paper is to demonstrate that denotational semantics is useful for operational issues like implementation of functional languages by abstract machines. This is exemplified in a tutorial way by studying the case of extensional untyped call-byname λ-calculus with Felleisen's control operator C. We derive the transition rules for an abstract machine from a continuation semantics which appears as a generalization of the ¬¬-translation known from logic. The resulting abstract
## more »

... machine appears as an extension of Krivine's machine implementing head reduction. Though the result, namely Krivine's machine, is well known our method of deriving it from continuation semantics is new and applicable to other languages (as e.g. call-by-value variants). Further new results are that Scott's D ∞ -models are all instances of continuation models. Moreover, we extend our continuation semantics to Parigot's λµ-calculus from which we derive an extension of Krivine's machine for λµ-calculus. The relation between continuation semantics and the abstract machines is made precise by proving computational adequacy results employing an elegant method introduced by Pitts. Capsule Review In this paper the authors employ a "proof-relevant" version of a double negation translation (due to Krivine and Girard) giving rise to a so-called "category of negative domains" N R which is the full subcategory of the category of predomains on objects of the form R X for some predomain X where R is a domain (i.e. a predomain with ⊥) chosen in advance. The idea behind this is that a "classical proposition" is simply an intuitionistic negation of an intuitionistic proposition. The category N R is a well-pointed cartesian closed category with least fixpoints. Moreover, it allows to interpret "control features" as Felleisen's control operator C and Parigot's λµcalculus (which can be seen as calculi whose terms represent proofs of classical (propositional) logic). Moreover, in N R one may find models of the untyped λ-calculus with control, namely the negative domain R C where C is the solution of the domain equation C ∼ = R C × C.I ti s observed in the paper that D. Scott's D ∞ -models of untyped λ-calculus are subsumed amongst these by putting D = R. The main point made in this paper is that, when unfolding the interpretation of untyped λcalculus in R C , the ensuing semantic equations correspond to the transition rules of Krivine's machine for computing weak head normal forms of λ-terms. This extends to λ-calculi with 544 Th. Streicher and B. Reus control. This observation is made precise by extending denotational semantics to the abstract machines and proving correctness and computational adequacy (for the case where R is the two element lattice). The paper gives a reconstruction of well-known operational results (Krivine's machine) based on continuation semantics where continuations constitute the denotational analogue of evaluation contexts. But, moreover, these results are extended to Parigot's λµ-calculus providing a machine for it that appears to be new in the literature (but has been found independently by Ph. deGroote by purely proof-theoretic methods).

doi:10.1017/s0956796898003141
fatcat:zj4uo6lwejehrotgvdc4ncpccm