# A modal analysis of staged computation

@inproceedings{Davies1996AMA,
title={A modal analysis of staged computation},
author={Rowan Davies and F. Pfenning},
booktitle={POPL '96},
year={1996}
}
• Published in POPL '96 1996
• Computer Science
We show that a type system based on the intuitionistic modal logic S4 provides an expressive framework for specifying and analyzing computation stages in the context of functional languages. Our main technical result is a conservative embedding of Nielson & Nielson's two-level functional language in our language Mini-ML, thus proving that binding-time correctness is equivalent to modal correctness on this fragment. In addition Mini-ML can also express immediate evaluation and sharing of code… Expand
214 Citations
On a Modal -calculus for S4 ?
• 1995
We present !2 , a concise formulation of a proof term calculus for the intuitionistic modal logic S4 that is well-suited for practical applications. We show that, with respect to provability, it isExpand
A Modal Language for Effects
• Computer Science
• 2004
A modal language which can be used as a framework for practical programming languages with effects, whose characteristic feature is a syntactic distinction between terms and expressions, where terms denote values and expressions denote computations is proposed. Expand
A Computational Formalization for Partial Evaluation (Extended Version)
• Computer Science
• 1996
It is proved that the binding-time improvements given by "continuation-based specialization" can be expressed in the metalanguage via monadic laws. Expand
A Computational Formalization for Partial Evaluation
• Computer Science
• Math. Struct. Comput. Sci.
• 1997
It is proved that the binding-time improvements given by ‘continuation-based specialization’ can be expressed in the metalanguage via monadic laws. Expand
Multi-Stage Programming: Axiomatization and Type Safety
• Computer Science
• ICALP
• 1998
A multi-stage language is introduced and its axiomatic semantics is an extension of the call-by-value $\lambda$-calculus with staging constructs, and a proof of the soundness of this type system with respect to the reduction semantics is presented. Expand
On the Logical Foundations of Staged Computation (Abstract of Invited Talk)
This talk provides a logical foundation for staged computation which is consistent with the operational intuition and yields new insights into issues of language design and leads to a static type system in which staging errors become type errors. Expand
Multi-Stage Programming : Axiomatization and Type
Multi-staged programming provides a new paradigm for constructing eecient solutions to complex problems. Techniques such as program generation, multi-level partial evaluation, and run-time codeExpand
A Sound Reduction Semantics for Untyped CBN Multi-stage Computation. Or, the Theory of MetaML is Non-trivial (Extended Abstract)
The reduction semantics demonstrates that non-trivial equalities hold for object-code, even in the untyped setting, and can be used to formally justify some optimization performed by a CBN MetaML implementation. Expand
A Type Theoretic Specification of Partial Evaluation
• Computer Science
• PPDP '14
• 2014
A type theoretic specification of offline partial evaluation for the simply-typed lambda calculus in the dependently-typing programming language Agda is developed and the correctness of the specification is established by proving termination, typing preservation, and semantics preservation using logical relations. Expand
Categorical and Kripke Semantics for Constructive S4 Modal Logic
• Computer Science
• CSL
• 2001
Duality results are proved which show how to relate Kripke models to algebraic models and these in turn to the appropriate categorical models for these logics. Expand

#### References

SHOWING 1-10 OF 107 REFERENCES
On a Modal -calculus for S4 ?
• 1995
We present !2 , a concise formulation of a proof term calculus for the intuitionistic modal logic S4 that is well-suited for practical applications. We show that, with respect to provability, it isExpand
Multi-Stage Programming: Axiomatization and Type Safety
• Computer Science
• ICALP
• 1998
A multi-stage language is introduced and its axiomatic semantics is an extension of the call-by-value $\lambda$-calculus with staging constructs, and a proof of the soundness of this type system with respect to the reduction semantics is presented. Expand
On a Modal λ-Calculus for S41 1This work is supported by NSF Grant CCR-9303383 and the Advanced Research Projects Agency under ARPA Order No. 8313.
• Computer Science, Mathematics
• 1995
Abstract We present λ→□, a concise formulation of a proof term calculus for the intuitionistic modal logic S4 that is well-suited for practical applications. We show that, with respect toExpand
Computational Types from a Logical Perspective
• Computer Science
• J. Funct. Program.
• 1998
This paper shows that the computational lambda calculus also arises naturally as the term calculus corresponding to a novel intuitionistic modal propositional logic and gives natural deduction, sequent calculus and Hilbert-style presentations of this logic and proves strong normalisation and confluence results. Expand
On computational interpretations of the modal logic S4. I. Cut elimination
This paper analyzes how cut-elimination works in the standard sequent system for minimal S4, and where problems arise, and shows that a good answer is given by augmenting ML's type system, which is basically intuitionistic logic, to the intuitionistic version of the logic S4. Expand
The notion of an l-strong monad is introduced which is a generalization of strong monads which can generalize Moggi's semantics-preserving soundness and completeness with respect to his equational logic and is shown to give a sound and complete semantics of a constructive version of S4 modal logic. Expand
Propositional Lax Logic
• Computer Science, Mathematics
• Inf. Comput.
• 1997
This paper investigates a peculiar intuitionistic modal logic, called Propositional Lax Logic (PLL), which has promising applications to the formal verification of computer hardware, and investigates some of its proof-theoretic properties and defines a new class of fallible two-frame Kripke models for PLL. Expand
A Computational Interpretation of Modal Proofs
• Mathematics
• 1996
Proof theory of modal logics, though largely studied since the fifties, has always been a delicate subject, the main reason being the apparent impossibility to obtain elegant, natural systems forExpand
Multi-stage programming with explicit annotations
• 1997
A thesis of this paper is that multi-stage languages are useful as programming languages in their own right, and should support features that make it possible for programmers to write staged computations without significantly changing their normal programming style. Expand
Multi-Stage Programming with Explicit Annotations
• Computer Science
• PEPM
• 1997
A thesis of this paper is that multi-stage languages are useful as programming languages in their own right, and should support features that make it possible for programmers to write staged computations without significantly changing their normal programming style. Expand