## Logic Programming in the LF Logical Framework (1991)

### Cached

### Download Links

Citations: | 175 - 50 self |

### BibTeX

@MISC{Pfenning91logicprogramming,

author = {Frank Pfenning},

title = {Logic Programming in the LF Logical Framework},

year = {1991}

}

### Years of Citing Articles

### OpenURL

### Abstract

this paper we describe Elf, a meta-language intended for environments dealing with deductive systems represented in LF. While this paper is intended to include a full description of the Elf core language, we only state, but do not prove here the most important theorems regarding the basic building blocks of Elf. These proofs are left to a future paper. A preliminary account of Elf can be found in [26]. The range of applications of Elf includes theorem proving and proof transformation in various logics, definition and execution of structured operational and natural semantics for programming languages, type checking and type inference, etc. The basic idea behind Elf is to unify logic definition (in the style of LF) with logic programming (in the style of Prolog, see [22, 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. An alternative approach to logic programming in LF has been developed independently by Pym [28]. Here are some of the salient characteristics of our unified approach to logic definition and metaprogramming. First of all, the Elf search process automatically constructs terms that can represent object-logic proofs, and thus a program need not construct them explicitly. This is in contrast to logic programming languages where executing a logic program corresponds to theorem proving in a meta-logic, but a meta-proof is never constructed or used and it is solely the programmer's responsibility to construct object-logic proofs where they are needed. Secondly, the partial correctness of many meta-programs with respect to a given logic can be expressed and proved by Elf itself (see the example in Section 5). This creates the possibilit...

### Citations

785 | Constraint Logic Programming
- Jaffar, Lassez
- 1987
(Show Context)
Citation Context ...mming languages. In particular, proof search and unification become intertwined and unification is no longer a simple subroutine. This phenomenon is already familiar from constraint logic programming =-=[17, 24]-=-, but Elf has at least one additional complication: goals are identified with logic variables (see Section 4). This set of circumstances calls for a new approach to describe the operational semantics ... |

695 | A framework for defining logics
- Harper, Honsell, et al.
- 1993
(Show Context)
Citation Context ...ion ........................ 21 5.5 Type Reconstruction for Elf ................................ 22 6 Conclusion and Future Work 22 1sLogic Programming in the LF Logical Framework 2 1 Introduction In =-=[12]-=-, Harper, Honsell, and Plotkin present LF (the Logical Framework) as a general framework for the definition of logics. LF provides a uniform way of encoding a logical language, its inference rules and... |

374 | Uniform Proofs as a Foundation for Logic Programming
- Miller, Nadathur, et al.
- 1991
(Show Context)
Citation Context ...tics for programming languages, type checking and type inference, etc. The basic idea behind Elf is to unify logic definition (in the style of LF) with logic programming (in the style of λProlog, see =-=[22, 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. An alternative approac... |

332 | An efficient unification algorithm
- Martelli, Montanari
- 1982
(Show Context)
Citation Context ... First-Order Unification Logic with Quantifier Dependencies The unification logic arises most naturally from a generalization of the usual view of unification as transformations of a set of equations =-=[19, 31]-=-. There we are given set of equations with some free variables. This set is unifiable if there is a substitution for the free variables such that all the equations become true. A unification algorithm... |

287 | A logic programming language with lambda-abstraction, function variables, and simple unification
- Miller
- 1991
(Show Context)
Citation Context ...ise of designing a logic programming language based on LF, given that unification is such a central operation. However, inspired by Miller’ssLogic Programming in the LF Logical Framework 3 work on Lλ =-=[21]-=-, we design an algorithm which solves the “easy” unification problems (without branching, for example) and postpones all other equalities which may arise as constraints. Since dependent types and expl... |

177 | An overview of >'Prolog - Nadathur, Miller - 1988 |

169 | A unification algorithm for typed -calculus - Huet - 1975 |

132 |
The undecidability of the second-order unification problem
- Goldfarb
- 1981
(Show Context)
Citation Context ...ry. 3.4 A Generalization of Lλ Unification to LF The general problem of higher-order unification is undecidable even for the second-order simplytyped λ-calculus with only one binary function constant =-=[10]-=-. This result notwithstanding, a complete pre-unification algorithm for the simply-typed λ-calculus with generally good operationalsLogic Programming in the LF Logical Framework 8 behavior has been de... |

124 | Unification under a mixed prefix
- Miller
- 1992
(Show Context)
Citation Context ...such a meta-logic for unification over a number of different term languages and type theories, but a further exploration of this possibility is beyond the scope of this paper. Miller’s mixed prefixes =-=[20]-=- and the existential variables considered by Dowek [4] perform a function similar to our unification logic. Though Dowek deals with a more expressive logical framework (the Calculus of Constructions) ... |

114 |
A unification algorithm for typed λ-calculus
- Huet
- 1975
(Show Context)
Citation Context ...notwithstanding, a complete pre-unification algorithm for the simply-typed λ-calculus with generally good operationalsLogic Programming in the LF Logical Framework 8 behavior has been devised by Huet =-=[15]-=-. Extensions to LF have been developed independently by Elliott [5, 7] and Pym [28]. “Pre-unification” here refers to the fact that the algorithm will not enumerate unifiers, but simply reduce the ori... |

107 |
An algorithm for testing conversion in type theory
- Coquand
- 1991
(Show Context)
Citation Context ...ormulate definitional equality only with β-conversion and conjecture that the system resulting from adding the η-rule would have the properties we list below. This has recently been proved by Coquand =-=[3]-=- and independently by Salvesen [30]. For practical purposes the formulation including the η-rule is superior, since every term has an equivalent canonical form. Thus, for us, ≡ is the least congruence... |

99 | An Overview of λProlog
- Nadathur, Miller
- 1988
(Show Context)
Citation Context ...tics for programming languages, type checking and type inference, etc. The basic idea behind Elf is to unify logic definition (in the style of LF) with logic programming (in the style of λProlog, see =-=[22, 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. An alternative approac... |

83 | Using typed lambda calculus to implement formal systems on a machine
- Avron, Honsell, et al.
- 1987
(Show Context)
Citation Context ...l, and Plotkin present LF (the Logical Framework) as a general framework for the definition of logics. LF provides a uniform way of encoding a logical language, its inference rules and its proofs. In =-=[2]-=-, Avron, Honsell, and Mason give a variety of examples for encoding logics in LF. In this paper we describe Elf, a meta-language intended for environments dealing with deductive systems represented in... |

77 | Elf: A language for logic definition and verified meta-programming
- Pfenning
- 1989
(Show Context)
Citation Context ...age, we only state, but do not prove here the most important theorems regarding the basic building blocks of Elf. These proofs are left to a future paper. A preliminary account of Elf can be found in =-=[26]-=-. The range of applications of Elf includes theorem proving and proof transformation in various logics, definition and execution of structured operational and natural semantics for programming languag... |

71 | Proofs in higher-order logic
- Miller
- 1983
(Show Context)
Citation Context ...isfiable set of constraints (so-called flex-flex pairs) whose unifiers are difficult to enumerate. While this unification algorithm has proven quite useful in the context of automated theorem proving =-=[1, 13]-=-, as the basis for a a logic programming language it has some drawbacks. In particular, the potentially high branching factor and the possibility of non-termination make it difficult to exploit the fu... |

53 |
Higher-order unification revisited: Complete sets of transformations
- Gallier, Snyder
- 1989
(Show Context)
Citation Context ... First-Order Unification Logic with Quantifier Dependencies The unification logic arises most naturally from a generalization of the usual view of unification as transformations of a set of equations =-=[19, 31]-=-. There we are given set of equations with some free variables. This set is unifiable if there is a substitution for the free variables such that all the equations become true. A unification algorithm... |

46 | Specifying and Implementing Theorem Provers in a Higher-Order Logic Programming Language
- Felty
- 1989
(Show Context)
Citation Context ...orithmic” version of an inference system and implement it in Elf with very little additional work. Moreover, it is possible to implement tactics and tacticals in Elf along the lines proposed by Felty =-=[8]-=-. Such tactics are also often easier to write and understand than tactics written in a functional style, since they inherit a notion of meta-variable (the logic variable, in logic programming terminol... |

37 |
Computational Metatheory in Nuprl
- Howe
- 1988
(Show Context)
Citation Context ... and proved by Elf itself (see the example in Section 5). This creates the possibility of deriving verified meta-programs through theorem proving in Elf (see Knoblock & Constable [18] or Allen et al. =-=[14]-=- for other approaches). Elf is quite different in look and feel to the standard meta-programming methodology of writing tactics and tacticals in ML [11]. On the positive side, Elf programs tend to be ... |

28 | Hereditary Harrop formulas and uniform proof systems - Miller, Nadathur, et al. - 1987 |

26 | Isabelle tutorial and user’s manual
- Paulson, Nipkow
- 1990
(Show Context)
Citation Context ...he logic variable, in logic programming terminology), a notion of unification, and nondeterminism and backtracking in a uniform way from the underlying logic programming language. The Isabelle system =-=[25]-=- also provides support for meta-variables and higher-order unification in tactics, but they are generally not as accessible as in Elf. On the negative side we encounter problems with efficiency when m... |

25 |
Formalized metareasoning in type theory
- Knoblock, Constable
- 1986
(Show Context)
Citation Context ...ogic can be expressed and proved by Elf itself (see the example in Section 5). This creates the possibility of deriving verified meta-programs through theorem proving in Elf (see Knoblock & Constable =-=[18]-=- or Allen et al. [14] for other approaches). Elf is quite different in look and feel to the standard meta-programming methodology of writing tactics and tacticals in ML [11]. On the positive side, Elf... |

25 | Extensions and Applications of Higher-Order Unification - Elliott - 1990 |

24 |
Higher-order unification with dependent types
- Elliott
- 1989
(Show Context)
Citation Context ...-typed λ-calculus with generally good operationalsLogic Programming in the LF Logical Framework 8 behavior has been devised by Huet [15]. Extensions to LF have been developed independently by Elliott =-=[5, 7]-=- and Pym [28]. “Pre-unification” here refers to the fact that the algorithm will not enumerate unifiers, but simply reduce the original problem to a satisfiable set of constraints (so-called flex-flex... |

18 |
and Computation in General Logic
- Proofs
- 1990
(Show Context)
Citation Context ...retation, much the same way that Prolog gives certain formulas (Horn-clauses) an operational interpretation. An alternative approach to logic programming in LF has been developed independently by Pym =-=[28]-=-. Here are some of the salient characteristics of our unified approach to logic definition and metaprogramming. First of all, the Elf search process automatically constructs terms that can represent o... |

14 | Encoding a Dependent-Type -Calculus in a Logic Programming Language. Rapport de recherche 1259, Inria - Felty, Miller - 1990 |

11 |
The Church-Rosser theorem for LF with βη-reduction. Unpublished notes to a talk given at
- Salvesen
- 1990
(Show Context)
Citation Context ...y with β-conversion and conjecture that the system resulting from adding the η-rule would have the properties we list below. This has recently been proved by Coquand [3] and independently by Salvesen =-=[30]-=-. For practical purposes the formulation including the η-rule is superior, since every term has an equivalent canonical form. Thus, for us, ≡ is the least congruence generated by βη-conversions in the... |

11 | The Church-Rosser theorem for LF with fij-reduction. Unpublished notes to a talk given at the First Workshop on Logical Frameworks in - Salvesen - 1990 |

10 |
Encoding a dependent-type λ-calculus in a logic programming language
- Felty, Miller
- 1990
(Show Context)
Citation Context ...r example). The way dependent types can be used to impose constraints on logic variables is one of the attractive features of Elf. The feature is missing if one follows the proposal by Felty & Miller =-=[9]-=- to interpret LF signatures in Hereditary Harrop logic. While their encoding is adequate on the declarative level, it is inadequate on the operational level, since typing constraints are expressed as ... |

8 |
Investigations into proof-search in a system of first-order dependent function types
- Pym, Wallen
- 1990
(Show Context)
Citation Context ...rational behavior of Elf. This meta-logic was called state logic in [26], since it is used to describe the states of an abstract interpreter for Elf. An alternative approach was taken by Pym & Wallen =-=[29]-=- who give a sequent presentation for LF which allows free meta-variables to appear in the sequents. We begin with the discussion of unification which will be extended to a logic strong enough to descr... |

6 | Goal directed proof construction in type theory - Helmink - 1991 |

6 |
The Calculus of Constructions, documentation and user’s guide
- Huet
- 1989
(Show Context)
Citation Context ...slation succeeds. 5.5 Type Reconstruction for Elf The method of type reconstruction for Elf is different from what is used in LEGO [27] or the implementation of the Calculus of Constructions at INRIA =-=[16]-=- in that (1) argument synthesis and type and term reconstruction are completely decoupled, and (2) there is no restriction on which types and terms can be omitted in the input. We only sketch the algo... |

5 |
A proof synthesis algorithm for a mathematical vernacular in a restriction of the Calculus of Constructions. Unpublished manuscript
- Dowek
- 1991
(Show Context)
Citation Context ...erent term languages and type theories, but a further exploration of this possibility is beyond the scope of this paper. Miller’s mixed prefixes [20] and the existential variables considered by Dowek =-=[4]-=- perform a function similar to our unification logic. Though Dowek deals with a more expressive logical framework (the Calculus of Constructions) we believe that our meta-logic is more expressive, sin... |

4 |
eLP: A Common Lisp implementation of λProlog in the Ergo Support System. Available via ftp over the Internet
- Elliott, Pfenning
- 1989
(Show Context)
Citation Context ...comparable: each willsLogic Programming in the LF Logical Framework 10 postpone some equations as constraints which could have been solved by the other algorithm. In the eLP implementation of λProlog =-=[6]-=- a combination of the two algorithms is used. The remaining transitions we consider have a left-hand side of the form ∃x :Πu1:A1...Πun:An.A . F[∀y1:A ′ 1 .G1[...∀yp:A ′ p .Gp[xy φ(1) ...y φ(n) . =M]..... |

3 | eLP: A Common Lisp implementation of Prolog in the Ergo Support System. Available via ftp over the Internet - Elliott, Pfenning - 1989 |

2 |
Extensions and Applications of Higher-Order
- Elliott
- 1990
(Show Context)
Citation Context ...-typed λ-calculus with generally good operationalsLogic Programming in the LF Logical Framework 8 behavior has been devised by Huet [15]. Extensions to LF have been developed independently by Elliott =-=[5, 7]-=- and Pym [28]. “Pre-unification” here refers to the fact that the algorithm will not enumerate unifiers, but simply reduce the original problem to a satisfiable set of constraints (so-called flex-flex... |

1 |
Implicit syntax. Unpublished notes to a talk given at
- Pollack
- 1990
(Show Context)
Citation Context ...anteed that P is an equivalence proof for M and N only when this translation succeeds. 5.5 Type Reconstruction for Elf The method of type reconstruction for Elf is different from what is used in LEGO =-=[27]-=- or the implementation of the Calculus of Constructions at INRIA [16] in that (1) argument synthesis and type and term reconstruction are completely decoupled, and (2) there is no restriction on which... |