## Natural Semantics and Some of its Meta-Theory in Elf (1991)

### Cached

### Download Links

Venue: | PROCEEDINGS OF THE SECOND INTERNATIONAL WORKSHOP ON EXTENSIONS OF LOGIC PROGRAMMING |

Citations: | 44 - 14 self |

### BibTeX

@INPROCEEDINGS{Michaylov91naturalsemantics,

author = {Spiro Michaylov and Frank Pfenning},

title = {Natural Semantics and Some of its Meta-Theory in Elf},

booktitle = {PROCEEDINGS OF THE SECOND INTERNATIONAL WORKSHOP ON EXTENSIONS OF LOGIC PROGRAMMING},

year = {1991},

pages = {299--344},

publisher = {Springer-Verlag LNAI}

}

### Years of Citing Articles

### OpenURL

### Abstract

Operational semantics provide a simple, high-level and elegant means of specifying interpreters for programming languages. In natural semantics, a form of operational semantics, programs are traditionally represented as first-order tree structures and reasoned about using natural deduction-like methods. Hannan and Miller combined these methods with higher-order representations using Prolog. In this paper we go one step further and investigate the use of the logic programming language Elf to represent natural semantics. Because Elf is based on the LF Logical Framework with dependent types, it is possible to write programs that reason about their own partial correctness. We illustrate these techniques by giving type checking rules and operational semantics for Mini-ML, a small functional language based on a simply typed -calculus with polymorphism, constants, products, conditionals, and recursive function definitions. We also partially internalize proofs for some meta-theoretic properti...

### Citations

1309 | A Structural Approach to Operational Semantics
- Plotkin
- 1981
(Show Context)
Citation Context ...CTION 4 1 Introduction Operational semantics provide a simple, high-level and elegant means of specifying interpreters for programming languages. Natural semantics was inspired by the work of Plotkin =-=[19]-=- on operational semantics and extended by G. Kahn [12] and others. Programs are traditionally represented as first-order tree structures and reasoned about using natural deduction-like methods. This m... |

864 |
A formulation of the simple theory of types
- Church
- 1940
(Show Context)
Citation Context ...tural) semantics. 4.1 Higher-Order Abstract Syntax Now we are ready to develop a scheme for expressing Mini-ML programs in Elf, using higherorder abstract syntax. This approach was inspired by Church =-=[2]-=- and Martin-Lof [15] and is used pervasively in many applications of Prolog and Elf. In each case, a -calculus-based metalanguage (here Elf) is used to represent expressions of the object language (he... |

706 | A framework for defining logics
- Harper, Plotkin
- 1993
(Show Context)
Citation Context ... based on the simply typed -calculus with products, conditionals, and recursive function definitions. In this paper we use Elf [16, 17], a logic programming language based on the LF Logical Framework =-=[10]-=-, as an implementation language for natural semantics. Elf embodies the same features that make Prolog so suitable for implementing natural semantics. Additionally, the dependent types of LF make it p... |

309 | Natural semantics
- Kahn
- 1987
(Show Context)
Citation Context ... simple, high-level and elegant means of specifying interpreters for programming languages. Natural semantics was inspired by the work of Plotkin [19] on operational semantics and extended by G. Kahn =-=[12]-=- and others. Programs are traditionally represented as first-order tree structures and reasoned about using natural deduction-like methods. This method was extended and refined by Burstall and Honsell... |

309 |
Higher-order abstract syntax
- Pfenning, Elliott
- 1988
(Show Context)
Citation Context ...ans that we might have to ff-convert one to the other in order to obtain the concrete Mini-ML syntax for a letrec expression. For a more general solution in the presence of meta-language pairing, see =-=[18]-=-. As an example of how the representation works, the addition program from section 2 would be expressed as: (letrec ([add] (lam [x] (lam [y] (if (app zerop x) y (app s (app (app add (app pred x)) y)))... |

265 |
Programming in Martin-Lof's Type Theory: An Introduction
- Nordstrom, Petersson, et al.
- 1990
(Show Context)
Citation Context ....1 Higher-Order Abstract Syntax Now we are ready to develop a scheme for expressing Mini-ML programs in Elf, using higherorder abstract syntax. This approach was inspired by Church [2] and Martin-Lof =-=[15]-=- and is used pervasively in many applications of Prolog and Elf. In each case, a -calculus-based metalanguage (here Elf) is used to represent expressions of the object language (here Mini-ML). This en... |

238 |
Principal type schemes for functional programs
- Damas, Milner
- 1982
(Show Context)
Citation Context ...y that \Pi(x) =sif the rightmost occurrence of x in \Pi is assigneds. Type assignment in an environment is written as x :s. Harper [9] studied several formulations for the Damas-Milner fragment of ML =-=[4]-=-, with a view toward their formalization in LF, and discussed their suitability for direct execution. We use a simpler encoding that is sufficient for our purposes. The idea for this also goes back to... |

177 |
An overview of >'Prolog
- Nadathur, Miller
- 1988
(Show Context)
Citation Context ...hetical judgments) and parameters (for expressing generic or universal judgments) to this setting of natural semantics. Thus it was natural that Hannan and Miller's implementation language was Prolog =-=[14]-=-. Prolog was a particularly appropriate tool because its embedded implication mechanism is suitable for expressing hypothetical judgments in natural deduction, and it's higher-order features make it s... |

175 | Logic programming in the LF logical framework
- Pfenning
- 1991
(Show Context)
Citation Context ...-ML was introduced by Cl'ement et al. [3] as a small programming language based on the simply typed -calculus with products, conditionals, and recursive function definitions. In this paper we use Elf =-=[16, 17]-=-, a logic programming language based on the LF Logical Framework [10], as an implementation language for natural semantics. Elf embodies the same features that make Prolog so suitable for implementing... |

102 | An Overview of λProlog
- Nadathur, Miller
- 1988
(Show Context)
Citation Context ...etical judgments) and parameters (for expressing generic or universal judgments) to this setting of natural semantics. Thus it was natural that Hannan and Miller’s implementation language was λProlog =-=[14]-=-. λProlog was a particularly appropriate tool because its embedded implication mechanism is suitable for expressing hypothetical judgments in natural deduction, and it’s higher-order features make it ... |

97 |
A Simple Applicative Language: Mini-ML
- Clément, Despeyroux, et al.
- 1986
(Show Context)
Citation Context ...othetical judgments in natural deduction, and it's higher-order features make it suitable for representing programs in terms of higher-order abstract syntax. Mini-ML was introduced by Cl'ement et al. =-=[3]-=- as a small programming language based on the simply typed -calculus with products, conditionals, and recursive function definitions. In this paper we use Elf [16, 17], a logic programming language ba... |

78 | Elf: a language for logic definition and verified metaprogram- ming
- Pfenning
- 1989
(Show Context)
Citation Context ...-ML was introduced by Cl'ement et al. [3] as a small programming language based on the simply typed -calculus with products, conditionals, and recursive function definitions. In this paper we use Elf =-=[16, 17]-=-, a logic programming language based on the LF Logical Framework [10], as an implementation language for natural semantics. Elf embodies the same features that make Prolog so suitable for implementing... |

56 | Uni of simply typed lambda-terms as logic programming
- Miller
- 1991
(Show Context)
Citation Context .... All other cases are mere congruence cases, descending into the subcomponents where the necessary substitutions might eventually be performed. An exposition of this general technique can be found in =-=[13]-=- in the context of the simply-typed -calculus. These ideas can be applied here, too. We discuss a couple of cases. sbstt : sbst ([x] [d] oft) P oft. In the base case, the assumption d is not used, and... |

26 |
Investigating a Proof-Theoretic Meta-Language for Functional Programs
- Hannan
(Show Context)
Citation Context ...raditionally represented as first-order tree structures and reasoned about using natural deduction-like methods. This method was extended and refined by Burstall and Honsell [1] and Hannan and Miller =-=[6, 7]-=-. Using higher-order abstract syntax, programs are represented by simply-typed -terms and schema variables in inference rules become higher-order variables. Further, they applied methods for introduci... |

14 |
From operational semantics to abstract machines: Preliminary results
- Hannan, Miller
- 1990
(Show Context)
Citation Context ...representing operational semantics. All the examples in the paper have been tested with the current prototype implementation of Elf. Many tasks remain to be done to complete this line of research. In =-=[8]-=-, Hannan and Miller systematically transform a high-level description of a language related to Mini-ML in terms of inference rules into two low-level abstract machines. We believe that most, if not al... |

14 |
Systems of polymorphic type assignment in LF
- HARPER
- 1990
(Show Context)
Citation Context ...ing bound variables as necessary to avoid capture. Furthermore, we say that \Pi(x) =sif the rightmost occurrence of x in \Pi is assigneds. Type assignment in an environment is written as x :s. Harper =-=[9]-=- studied several formulations for the Damas-Milner fragment of ML [4], with a view toward their formalization in LF, and discussed their suitability for direct execution. We use a simpler encoding tha... |

8 | A declarative alternative to “assert” in logic programming
- Dietzen, Pfenning
- 1991
(Show Context)
Citation Context ...these free variables cannot be statically predetermined. Thus, if Mini-ML type unification is to be represented by Elf unification, such abstraction cannot be represented in Elf. Dietzen and Pfenning =-=[5]-=- show how this problem can be overcome for Prolog by adding a special construct called rule to the language, and a similar extension to Elf seems to be possible. For a number of variants of declarativ... |

8 |
Enriching a meta-language with higher-order features
- Hannan, Miller
- 1988
(Show Context)
Citation Context ...raditionally represented as first-order tree structures and reasoned about using natural deduction-like methods. This method was extended and refined by Burstall and Honsell [1] and Hannan and Miller =-=[6, 7]-=-. Using higher-order abstract syntax, programs are represented by simply-typed -terms and schema variables in inference rules become higher-order variables. Further, they applied methods for introduci... |

1 |
Burstall and Furio Honsell. A natural deduction treatment of operational semantics
- Rod
- 1988
(Show Context)
Citation Context ...and others. Programs are traditionally represented as first-order tree structures and reasoned about using natural deduction-like methods. This method was extended and refined by Burstall and Honsell =-=[1]-=- and Hannan and Miller [6, 7]. Using higher-order abstract syntax, programs are represented by simply-typed -terms and schema variables in inference rules become higher-order variables. Further, they ... |

1 |
Modularity in the LF logical framework. Talk given at
- Harper, Pfenning
- 1991
(Show Context)
Citation Context ... the complete formalization of the metatheoretic properties of languages implemented in Elf. We have begun to investigate such possibilities based on the preliminary design of a module system for Elf =-=[11]-=-. Acknowledgements We are grateful to Bob Harper for commenting on some preliminary drafts. Thanks also to the Max-Planck-Institute for Computer Science in Saarbrucken, where the second author complet... |