Elf: A meta-language for deductive systems [chapter]

Frank Pfenning
1994 Lecture Notes in Computer Science  
Elf is a uniform meta-language for the formalization of the theory of programming languages and logics. It provides means for 1. specifying the abstract syntax and semantics of an object language in a natural and direct way; 2. implementing related algorithms (e.g., for type inference, evaluation, or proof search); and 3. representing proofs of meta-theorems about an object language, its semantics, and its implementation. Its conceptual basis are deductive systems which are used pervasively in
more » ... he study of logic and the theory of programming languages. Logics and type systems for programming languages, for example, are often specified via inference rules. Structured operational semantics and natural semantics also employ deductive systems, and other means for semantic specification (for example, by rewrite rules) can be easily cast into this framework. Many meta-theorems can be proved by induction over the structure of derivations. Elf's formal foundation is the logical framework LF [5] in which systems of natural deduction can be concisely represented. LF employs the judgments-as-types encoding technique for the representation of derivations in a type theory with dependent types. In addition, Elf provides sophisticated type reconstruction and a constraint logic programming interpretation for LF. The latter allows the execution of algorithms when expressed as deductive systems. Proofs of meta-theorems can be represented concisely as higher-level judgments relating derivations. The most complete reference describing the Elf language is [10]. Gentler introductions can be found in [12] and [6]. Elf has also been used in a graduate course on the theory of programming languages. A draft of the course notes may be available from the author upon request. Below we provide a brief overview of how specification, implementation, and meta-theory tasks are supported in the Elf language. The subsequent sections list some case studies and describe the implementation of Elf. Object Language Specification. LF generalizes first-order terms by allowing objects from a dependently typed λ-calculus to represent object language expressions. This allows variables in the object language to be represented by variables in the metalanguage, using the technique of higher-order abstract syntax. Common operations Internet address:
doi:10.1007/3-540-58156-1_66 fatcat:7glq2iymc5fbrkxbe643r63u4m