## Elf: A Language for Logic Definition and Verified Metaprogramming (1989)

Venue: | In Fourth Annual Symposium on Logic in Computer Science |

Citations: | 77 - 8 self |

### BibTeX

@INPROCEEDINGS{Pfenning89elf:a,

author = {Frank Pfenning},

title = {Elf: A Language for Logic Definition and Verified Metaprogramming},

booktitle = {In Fourth Annual Symposium on Logic in Computer Science},

year = {1989},

pages = {313--322},

publisher = {IEEE Computer Society Press}

}

### Years of Citing Articles

### OpenURL

### Abstract

We describe Elf, a metalanguage for proof manipulation environments that are independent of any particular logical system. Elf is intended for meta-programs such as theorem provers, proof transformers, or type inference programs for programming languages with complex type systems. Elf unifies logic definition (in the style of LF, the Edinburgh Logical Framework) with logic programming (in the style of Prolog). It achieves this unification by giving types an operational interpretation, much the same way that Prolog gives certain formulas (Horn-clauses) an operational interpretation. Novel features of Elf include: (1) the Elf search process automatically constructs terms that can represent object-logic proofs, and thus a program need not construct them explicitly, (2) the partial correctness of meta-programs with respect to a given logic can be expressed and proved in Elf itself, and (3) Elf exploits Elliott's unification algorithm for a -calculus with dependent types. This research was...

### Citations

785 | Constraint Logic Programming
- Jaffar, Lassez
- 1987
(Show Context)
Citation Context ... underlying logic, will succeed. It is interesting to note that this condition is independent of any notion Elf 4 of unification and thus encompasses constraint logic programming (see Jaffar & Lassez =-=[18]-=-). Here we are in a similar situation, turning a type theory into a programming language. The basic idea is to give types an operational interpretation much in the same way that formulas are given an ... |

696 | A Framework for Defining Logics
- Harper, Honsel, et al.
- 1993
(Show Context)
Citation Context ...uction in a variety of logics and type theories has been the subject of much research (see, for example, Automath [6], LCF [12], HOL [13], Calculus of Constructions [5], Isabelle [25], NuPrl [3]). In =-=[15]-=-, Harper, Honsell, and Plotkin present LF (the Edinburgh Logical Framework) as a general metatheory for the definition of logics. LF provides a uniform way of encoding a logical language, its inferenc... |

471 |
The calculus of constructions
- Coquand, Huet
- 1988
(Show Context)
Citation Context ...logics). Mechanized support for deduction in a variety of logics and type theories has been the subject of much research (see, for example, Automath [6], LCF [12], HOL [13], Calculus of Constructions =-=[5]-=-, Isabelle [25], NuPrl [3]). In [15], Harper, Honsell, and Plotkin present LF (the Edinburgh Logical Framework) as a general metatheory for the definition of logics. LF provides a uniform way of encod... |

374 | Uniform Proofs as a Foundation for Logic Programming
- Miller, Nadathur, et al.
- 1991
(Show Context)
Citation Context ... range of applications of such environments (as indicated above). The basic idea behind Elf is to unify logic definition (in the style of LF) with logic proElf 2 gramming (in the style of Prolog, see =-=[22, 21, 24]-=-). It achieves this unification by giving types an operational interpretation, much the same way that Prolog gives certain formulas (Horn-clauses) an operational interpretation. Here are some of the s... |

302 |
Higher-order abstract syntax
- Pfenning, Elliot
- 1988
(Show Context)
Citation Context ...combined with polymorphism significantly strengthen Elf as a representation and metaprogramming language to handle the common case of a object languages with binding constructs of variable arity (see =-=[27]-=-). For example, a natural encoding of Hoare logic in LF as given in Section 4.10 of [1] must be restricted to a fixed number of registers---a restriction that can be dropped ins\Pi\Sigma with polymorp... |

177 |
An overview of >'Prolog
- Nadathur, Miller
- 1988
(Show Context)
Citation Context ... range of applications of such environments (as indicated above). The basic idea behind Elf is to unify logic definition (in the style of LF) with logic proElf 2 gramming (in the style of Prolog, see =-=[22, 21, 24]-=-). It achieves this unification by giving types an operational interpretation, much the same way that Prolog gives certain formulas (Horn-clauses) an operational interpretation. Here are some of the s... |

147 |
A logical analysis of modules in logic programming
- Miller
- 1989
(Show Context)
Citation Context ...ical examples of term inference rather easily, so a small resource bound should suffice. The additional complexity of types over terms is small and term-inference 3 similar to the ones in Prolog, see =-=[20]-=-. Another related approach to structuring of theories may be found in [16]. can be extended easily to type inference. A more serious practical problem is that of ambiguity: omitted types and terms can... |

124 | Unification under a mixed prefix
- Miller
- 1992
(Show Context)
Citation Context ...e simply typed -calculus and carry over tos\Pi\Sigma in a straightforward way: (1) the dependency of universal and existential quantifiers must be taken into account without Skolemization (see Miller =-=[23]-=-), and (2) the algorithm must deal with products (see Elliott [8]). We write =) for the reflexive and transitive closure of the transition relation =). At this point we are ready to formulate a first ... |

83 | Using typed lambda calculus to implement formal systems on a machine
- Avron, Honsell, et al.
- 1987
(Show Context)
Citation Context ...kin present LF (the Edinburgh Logical Framework) as a general metatheory for the definition of logics. LF provides a uniform way of encoding a logical language, its inference rules and its proofs. In =-=[1]-=-, Avron, Honsell, and Mason give a variety of examples for encoding logics in LF. Griffin's EFS (Environment for Formal Systems, see [14]) is an implementation that allows definition of logics and int... |

81 | Partial polymorphic type inference and higher-order unification
- Pfenning
- 1988
(Show Context)
Citation Context ...C j T j F 1sF 2 j 8x:A : F j 9x:A : F The first line contains the formulas that are considered atomic. Except for atomic : = and oe formulas, this is very close to the unification logic introduced in =-=[26], and-=- it is used in a very similar fashion. The restricted form of implication is used to describe the backchaining in the abstract interpreter. The inference system in Figure 1 defines the judgment "... |

70 |
Specifying theorem provers in a higherorder logic programming language
- Felty, Miller
- 1988
(Show Context)
Citation Context ...roofs. Secondly, Elf avoids the undesirable operational behavior of meta-programs that sometimes arises from encoding a logic in higher-order logic as done in Isabelle [25] and by Felty and Miller in =-=[11]-=- (see the example in Section 5.3). Finally, the partial correctness of meta-programs with respect to a given logic can be expressed and proved by Elf itself (see the example in Section 5.2). This crea... |

63 | HOL — A machine oriented formulation of higher order logic
- Gordon
- 1985
(Show Context)
Citation Context ...er intuitionistic and classical logics). Mechanized support for deduction in a variety of logics and type theories has been the subject of much research (see, for example, Automath [6], LCF [12], HOL =-=[13]-=-, Calculus of Constructions [5], Isabelle [25], NuPrl [3]). In [15], Harper, Honsell, and Plotkin present LF (the Edinburgh Logical Framework) as a general metatheory for the definition of logics. LF ... |

56 |
Constable et al. Implementing Mathematics with the Nuprl Proof Development System
- Robert
- 1986
(Show Context)
Citation Context ...t for deduction in a variety of logics and type theories has been the subject of much research (see, for example, Automath [6], LCF [12], HOL [13], Calculus of Constructions [5], Isabelle [25], NuPrl =-=[3]-=-). In [15], Harper, Honsell, and Plotkin present LF (the Edinburgh Logical Framework) as a general metatheory for the definition of logics. LF provides a uniform way of encoding a logical language, it... |

55 |
de Bruijn. A survey of the project AUTOMATH
- G
- 1980
(Show Context)
Citation Context ...rst- and higher-order intuitionistic and classical logics). Mechanized support for deduction in a variety of logics and type theories has been the subject of much research (see, for example, Automath =-=[6]-=-, LCF [12], HOL [13], Calculus of Constructions [5], Isabelle [25], NuPrl [3]). In [15], Harper, Honsell, and Plotkin present LF (the Edinburgh Logical Framework) as a general metatheory for the defin... |

37 |
Computational Metatheory in Nuprl
- Howe
- 1988
(Show Context)
Citation Context ...see the example in Section 5.2). This creates the possibility of deriving verified meta-programs through theorem proving in Elf (see Constable, Knoblock & Bates [4], Knoblock & Constable [19] or Howe =-=[17]-=- for other approaches) . The base languages\Pi\Sigma for Elf is the LF type theory (a simply typed -calculus extended to allow dependent function types), enriched with strong sums (which we prefer to ... |

28 |
Hereditary Harrop formulas and uniform proof systems
- Miller, Nadathur, et al.
- 1987
(Show Context)
Citation Context ... range of applications of such environments (as indicated above). The basic idea behind Elf is to unify logic definition (in the style of LF) with logic proElf 2 gramming (in the style of Prolog, see =-=[22, 21, 24]-=-). It achieves this unification by giving types an operational interpretation, much the same way that Prolog gives certain formulas (Horn-clauses) an operational interpretation. Here are some of the s... |

25 |
Formalized metareasoning in type theory
- Knoblock, Constable
- 1986
(Show Context)
Citation Context ... Elf itself (see the example in Section 5.2). This creates the possibility of deriving verified meta-programs through theorem proving in Elf (see Constable, Knoblock & Bates [4], Knoblock & Constable =-=[19]-=- or Howe [17] for other approaches) . The base languages\Pi\Sigma for Elf is the LF type theory (a simply typed -calculus extended to allow dependent function types), enriched with strong sums (which ... |

24 |
Writing programs that construct proofs
- Constable, Knoblock, et al.
- 1985
(Show Context)
Citation Context ...be expressed and proved by Elf itself (see the example in Section 5.2). This creates the possibility of deriving verified meta-programs through theorem proving in Elf (see Constable, Knoblock & Bates =-=[4]-=-, Knoblock & Constable [19] or Howe [17] for other approaches) . The base languages\Pi\Sigma for Elf is the LF type theory (a simply typed -calculus extended to allow dependent function types), enrich... |

24 |
Higher-order unification with dependent types
- Elliott
- 1989
(Show Context)
Citation Context ...ification steps or steps in a goaldirected search for a term of the given type. The unification steps are based on an extensions of Elliott's unification algorithm on terms in the LF type theory (see =-=[7]-=- and [8]). The non-deterministic interpreter is made practical by a commitment to depth-first search, a distinction between open and closed judgments and dynamic and static constants, and the addition... |

13 |
Some applications of Gentzen’s proof theory to automated deduction
- Beeson
- 1991
(Show Context)
Citation Context ...ce for such relations is linear and a decision procedure can be given immediately, that is, the signature itself may be used dynamically. Natural deduction theorem provers such as Gentzen (see Beeson =-=[2]-=-) or those proposed by Felty and Miller [11] can also be expressed very naturally in Elf. The extraction of programs from proofs is another example of the kind of algorithm that can easily be implemen... |

12 |
An environment for formal systems
- GRIFFIN
- 1987
(Show Context)
Citation Context ...ding a logical language, its inference rules and its proofs. In [1], Avron, Honsell, and Mason give a variety of examples for encoding logics in LF. Griffin's EFS (Environment for Formal Systems, see =-=[14]-=-) is an implementation that allows definition of logics and interactive theorem proving in LF. EFS provides a nice syntactic environment, but lacks meta-programming support, this is, it lacks a metala... |

12 |
The representation of logics in higher-order logic
- Paulson
- 1987
(Show Context)
Citation Context ...nized support for deduction in a variety of logics and type theories has been the subject of much research (see, for example, Automath [6], LCF [12], HOL [13], Calculus of Constructions [5], Isabelle =-=[25]-=-, NuPrl [3]). In [15], Harper, Honsell, and Plotkin present LF (the Edinburgh Logical Framework) as a general metatheory for the definition of logics. LF provides a uniform way of encoding a logical l... |

8 |
Strong normalization for typed terms with surjective pairing
- Troelstra
- 1986
(Show Context)
Citation Context ...ormalization, we translate both types and terms froms\Pi\Sigma into terms in a simply typed -calculus with products and explicit types. It follows from a the strong normalization theorem by Troelstra =-=[28]-=- for a simply typed -calculus (even including j and surjective pairing) that such terms are strongly normalizing which in turn implies this for the original terms with dependent types. Under strong co... |

5 |
Implementing Theorem Provers in Logic Programming
- Felty
- 1987
(Show Context)
Citation Context ... z (I l (y 1 : 8Ey 1 x)) (Ir (8A))) 5.3 Proof reduction and normalization This next example is the implementation of proof reductions for proofs in a first-order intuitionistic logic. Felty showed in =-=[9]-=- how to implement the reductions in Prolog, but at a very heavy price. Each of her clauses contains a proof-checking subgoal that may be very expensive to execute. If her reductions are combined into ... |

5 |
Andrzej Tarlecki. Structure and representation in LF
- Harper, Sannella
- 1989
(Show Context)
Citation Context ...hould suffice. The additional complexity of types over terms is small and term-inference 3 similar to the ones in Prolog, see [20]. Another related approach to structuring of theories may be found in =-=[16]-=-. can be extended easily to type inference. A more serious practical problem is that of ambiguity: omitted types and terms can often be restored in a number of incompatible ways. Currently, we require... |

3 |
Some Extensions and Applications of Higher-order Unification: A Thesis Proposal
- Elliott
- 1988
(Show Context)
Citation Context ...n steps or steps in a goaldirected search for a term of the given type. The unification steps are based on an extensions of Elliott's unification algorithm on terms in the LF type theory (see [7] and =-=[8]-=-). The non-deterministic interpreter is made practical by a commitment to depth-first search, a distinction between open and closed judgments and dynamic and static constants, and the addition of the ... |

2 |
A metalanguage for type checking and inference
- Felty, Miller
- 1988
(Show Context)
Citation Context ...including ffi -reductions, and the embedding of Elf in a general proof development and transformation environment. We are also considering a sublanguage of Elf along the lines of Felty and Miller's L =-=[10]-=- for which unification would be decidable. Acknowledgments I would like to thank Ken Cline, Conal Elliott, Amy Felty, and Dale Miller for helpful discussions concerning the subject of this paper. Refe... |