A logical framework is a meta-language for the formalization of deductive systems as used in the description of logics and programming languages. It should directly support common notions and techniques of this domain, thereby achieving two related goals: on one hand, it provides a conceptual tool for the concise definition and rigorous reasoning about programming languages and logics; on the other hand, it significantly reduces the effort required to actually implement deductive systems. There are various styles of logical frameworks (see, for example, [Pfe96]) with different strengths and weaknesses. Our starting point is the logical framework LF [HHP93] which supports variable binding and capture-avoiding substitution through higher-order abstract syntax, and parametric and hypothetical judgments through dependently typed functions. In previous work, I. Cervesato and the second author have investigated a conservative extension of LF which allows the natural representation of systems with state via linear functions and additive pairs [CP98, Cer96]. In this paper we explore a further conservative extension with an intrinsic notion of order. The impetus for the development of such a framework came from the observation of certain analogies between ordering properties of CPS terms [DP95, DDP99] and substitution properties of linear λ-calculi. In turn, the coding in a logical framework immediately suggested an improvement in the abstract machines for the execution of CPS terms, namely the merging of a control stack and a data stack. In this paper we sketch the relevant fragment of an ordered logical framework and then show how it supports the representation of CPS terms and an improved machine for their evaluation. The ordering properties of CPS terms which at first appear somewhat ad hoc are directly captured as typing properties in the representation that are preserved during evaluation. Complicated stack invariants can be recognized as uniform substitution properties, providing an example of how the organizing principles of a logical framework can contribute conceptually to our understanding of object languages. In this paper, we do not study the meta-theoretic properties of an ordered logical framework. However, the fragment required for our application here is particularly simple: it is a two-level type theory in the style of [PP99a, PP99b], where quantifiers range over terms from an ordered λ-calculus
[1]
Frank Pfenning,et al.
A Linear Logical Framework
,
2002,
Inf. Comput..
[2]
Furio Honsell,et al.
A framework for defining logics
,
1993,
JACM.
[3]
Olivier Danvy,et al.
On proving syntactic properties of CPS programs
,
1999,
Electron. Notes Theor. Comput. Sci..
[4]
J. Lambek.
The Mathematics of Sentence Structure
,
1958
.
[5]
Frank Pfenning,et al.
The Practice of Logical Frameworks
,
1996,
CAAP.
[6]
Olivier Danvy,et al.
The Occurrence of Continuation Parameters in CPS Terms
,
1995
.
[7]
Frank Pfenning,et al.
A linear logical framework
,
1996,
Proceedings 11th Annual IEEE Symposium on Logic in Computer Science.
[8]
Frank Pfenning,et al.
Natural Deduction for Intuitionistic Non-communicative Linear Logic
,
1999,
TLCA.
[9]
Frank Pfenning,et al.
Relating Natural Deduction and Sequent Calculus for Intuitionistic Non-Commutative Linear Logic
,
1999,
MFPS.