Abstract
Natural semantics, a form of operational semantics, provides a high-level and elegant means of specifying interpreters for programming languages. In this paper we investigate the use of the logic programming language Elf to implement and reason about natural semantics. We illustrate our techniques by giving type checking rules and operational semantics for Mini-ML, a small functional language based on a simply typed λ-calculus with polymorphism, products, conditionals, and recursive function definitions. We also partially internalize proofs for some meta-theoretic properties of Mini-ML, the most difficult of which is subject reduction.
This paper is also intended to serve as a tutorial introduction to Elf, a logic programming language based on the LF Logical Framework.
Preview
Unable to display preview. Download preview PDF.
References
Rod Burstall and Furio Honsell. A natural deduction treatment of operational semantics. In K. V. Nori and S. Kumar, editors, 8th Conference on Foundations of Software Technology and Theoretical Computer Science. Springer-Verlag LNCS 338, December 1988.
Alonzo Church. A formulation of the simple theory of types. Journal of Symbolic Logic, 5:56–68, 1940.
Dominique Clément, JoËlle Despeyroux, Thierry Despeyroux, and Gilles Kahn. A simple applicative language: Mini-ML. In Proceedings of the 1986 Conference on LISP and Functional Programming, pages 13–27. ACM Press, 1986.
Luis Damas and Robin Milner. Principal type schemes for functional programs. In Proceedings of the 9th ACM Symposium on Principles of Programming Languages, pages 207–212. ACM SIGPLAN/SIGACT, 1982.
Scott Dietzen and Frank Pfenning. A declarative alternative to assert in logic programming. In Vijay Saraswat and Kazunori Ueda, editors, International Logic Programming Symposium, pages 372–386. MIT Press, October 1991.
John Hannan. Investigating a Proof-Theoretic Meta-Language for Functional Programs. PhD thesis, University of Pennsylvania, January 1991. Available as MS-CIS-91-09.
John Hannan and Dale Miller. A meta-logic for functional programming. In H. Abramson and M. Rogers, editors, Meta-Programming in Logic Programming, chapter 24, pages 453–476. MIT Press, 1989.
John Hannan and Dale Miller. From operational semantics to abstract machines: Preliminary results. In M. Wand, editor, ACM Conference on Lisp and Functional Programming, pages 323–332. ACM Press, 1990.
John Hannan and Frank Pfenning. Compiler verification in LF. Submitted. Available as POP Report 91-03, School of Computer Science, Carnegie Mellon University, December 1991.
Robert Harper. Systems of polymorphic type assignment in LF. Technical Report CMU-CS-90-144, Carnegie Mellon University, Pittsburgh, Pennsylvania, June 1990.
Robert Harper, Furio Honsell, and Gordon Plotkin. A framework for defining logics. Journal of the ACM, To appear. A preliminary version appeared in Symposium on Logic in Computer Science, pages 194–204, June 1987.
Robert Harper and Frank Pfenning. Modularity in the LF logical framework. Submitted. Available as POP Report 91-01, School of Computer Science, Carnegie Mellon University, November 1991.
G. Kahn. Natural semantics. In Proceedings of the Symposium on Theoretical Aspects of Computer Science, pages 22–39. Springer-Verlag LNCS 247, 1987.
Spiro Michaylov and Frank Pfenning. Natural semantics and some of its metatheory in Elf. Technical Report MPI-I-91-211, Max-Planck-Institute for Computer Science, Saarbrücken, Germany, August 1991.
Dale Miller. Unification of simply typed lambda-terms as logic programming. In K. Furukawa, editor, Proceedings of the Eighth International Conference on Logic Programming, pages 255–269. MIT Press, July 1991.
Gopalan Nadathur and Dale Miller. An overview of λProlog. In Robert A. Kowalski and Kenneth A. Bowen, editors, Logic Programming: Proceedings of the Fifth International Conference and Symposium, Volume 1, pages 810–827, Cambridge, Massachusetts, August 1988. MIT Press.
Bengt Nordström, Kent Petersson, and Jan M. Smith. Programming in Martin-Löf's Type Theory: An Introduction, volume 7 of International Series of Monographs on Computer Science. Oxford University Press, 1990.
Frank Pfenning. Elf: A language for logic definition and verified meta-programming. In Fourth Annual Symposium on Logic in Computer Science, pages 313–322. IEEE, June 1989.
Frank Pfenning. An implementation of the Elf core language in Standard ML. Available via ftp over the Internet, September 1991. Send mail to elf-request@cs.cmu.edu for further information.
Frank Pfenning. Logic programming in the LF logical framework. In Gérard Huet and Gordon Plotkin, editors, Logical Frameworks, pages 149–181. Cambridge University Press, 1991.
Frank Pfenning and Conal Elliott. Higher-order abstract syntax. In Proceedings of the SIGPLAN '88 Symposium on Programming Language Design and Implementation, Atlanta, Georgia, pages 199–208. ACM Press, June 1988.
Frank Pfenning and Ekkehard Rohwedder. Implementing the meta-theory of deductive systems. Submitted. Available as POP Report 91-02, School of Computer Science, Carnegie Mellon University, November 1991.
Gordon D. Plotkin. A structural approach to operational semantics. Technical Report DAIMI FN-19, Computer Science Department, Aarhus University, Aarhus, Denmark, September 1981.
Author information
Authors and Affiliations
Editor information
Rights and permissions
Copyright information
© 1992 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Michaylov, S., Pfenning, F. (1992). Natural semantics and some of its meta-theory in Elf. In: Eriksson, L.H., Hallnäs, L., Schroeder-Heister, P. (eds) Extensions of Logic Programming. ELP 1991. Lecture Notes in Computer Science, vol 596. Springer, Berlin, Heidelberg. https://doi.org/10.1007/BFb0013612
Download citation
DOI: https://doi.org/10.1007/BFb0013612
Published:
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-55498-1
Online ISBN: 978-3-540-47114-1
eBook Packages: Springer Book Archive