# A proposal for modules in λProlog

## Abstract

Higher-order hereditary Harrop formulas, the underlying logical foundation of λProlog [NM88], are more expressive than first-order Horn clauses, the logical foundation of Prolog. In particular, various forms of scoping and abstraction are supported by the logic of higherorder hereditary Harrop formulas while they are not supported by firstorder Horn clauses. Various papers have argued that the scoping and abstraction available in this richer logic can be used to provide for modular programming [Mil89b], abstract data types [Mil89a], and state encapsulation [HM90]. None of these papers, however, have dealt with the problems of *programming-in-the-large*, that is, the essentially linguistic problems of putting together various different textual sources of code found, say, in different files on a persistent store into one logic program. In this paper, I propose a module system for λProlog and shall focus mostly on its static semantics.

## Keywords

Logic Program Logic Programming Horn Clause Sequent Calculus Static Semantic## References

- [BLM94]M. Bugliesi, E. Lamina, and P. Mello. Modularity in logic programming.
*Journal of Logic Programming*, 1994. To appear.Google Scholar - [BR92]Pascal Brisset and Olivier Ridoux. The architecture of an implementation of λProlog: Prolog/Mali. In Dale Miller, editor,
*Proceedings of the 1992 λProlog Workshop*, 1992.Google Scholar - [Dyc92]Roy Dyckhoff. Contraction-free sequent calculi for intuitionistic logic.
*Journal of Symbolic Logic*, 57(3), September 1992Google Scholar - [EP89]Conal Elliott and Frank Pfenning. eLP, a Common Lisp Implementation of λProlog. Implemented as part of the CMU ERGO project, May 1989.Google Scholar
- [Gen69]Gerhard Gentzen. Investigations into logical deductions, 1935. In M. E. Szabo, editor,
*The Collected Papers of Gerhard Gentzen*, pages 68–131. North-Holland Publishing Co., Amsterdam, 1969.Google Scholar - [GMR88]L. Giordano, A. Martelli, and G. F. Rossi. Local definitions with static scope rules in logic languages. In
*Proceedings of the FGCS International Conference, Tokyo*, 1988.Google Scholar - [GR84]D. M. Gabbay and U. Reyle. N-Prolog: An extension of Prolog with hypothetical implications. I.
*Journal of Logic Programming*, 1:319–355, 1984.Google Scholar - [Gun91]Elsa L. Gunter. Extensions to logic programming motivated by the construction of a generic theorem prover. In Peter Schroeder-Heister, editor,
*Extensions of Logic Programming: International Workshop*,*Tübingen FRG*,*December 1989*, volume 475 of*Lecture Notes in Artificial Intelligence*, pages 223–244. Springer-Verlag, 1991.Google Scholar - [HM90]Joshua Hodas and Dale Miller. Representing objects in a logic programming language with scoping constructs. In David H. D. Warren and Peter Szeredi, editors,
*1990 International Conference in Logic Programming*, pages 511–526. MIT Press, June 1990.Google Scholar - [HM94]Joshua Hodas and Dale Miller. Logic programming in a fragment of intuitionistic linear logic.
*Journal of Information and Computation*, 1994. (To appear). Available from ftp.cis.upenn.edu, pub/papers/miller/ic92.dvi.Z.Google Scholar - [Hud89]Jörg Hudelmaier.
*Bounds for cut elimination in intuitionistic propositional logic*. PhD thesis, University of Tübingen, Tubingen, 1989. To appear in Archive of Mathematical Logic.Google Scholar - [KNW93]Keehang Kwon, Gopalan Nadathur, and Debra Sue Wilson. Implementing a notion of modules in the logic programming language λprolog. In E. Lamma and P. Mello, editors,
*Proceedings of the 1992 Workshop on Extensions to Logic Programming*, number 660 in Lecture Notes in Computer Science. Springer-Verlag, 1993.Google Scholar - [McC88a]L. T. McCarty. Clausal intuitionistic logic I. fixed point semantics.
*Journal of Logic Programming*, 5:1–31, 1988.Google Scholar - [McC88b]L. T. McCarty. Clausal intuitionistic logic II. tableau proof procedure.
*Journal of Logic Programming*, 5:93–132, 1988.Google Scholar - [Mil86]Dale Miller. A theory of modules for logic programming. In Robert M. Keller, editor,
*Third Annual IEEE Symposium on Logic Programming*, pages 106–114, Salt Lake City, Utah, September 1986.Google Scholar - [Mil89a]Dale Miller. Lexical scoping as universal quantification. In
*Sixth International Logic Programming Conference*, pages 268–283, Lisbon, Portugal, June 1989. MIT Press.Google Scholar - [Mil89b]Dale Miller. A logical analysis of modules in logic programming.
*Journal of Logic Programming*, 6(1–2):79–108, January 1989.Google Scholar - [Mil90]Dale Miller. Abstractions in logic programming. In Piergiorgio Odifreddi, editor,
*Logic and Computer Science*, pages 329–359. Academic Press, 1990.Google Scholar - [Mil92]Dale Miller. Abstract syntax and logic programming. In
*Logic Programming: Proceedings of the First and Second Russian Conferences on Logic Programming*, number 592 in Lecture Notes in Artificial Intelligence, pages 322–337. Springer-Verlag, 1992.Google Scholar - [MN88]Dale Miller and Gopalan Nadathur. λProlog Version 2.7. Distribution in C-Prolog and Quintus sources, July 1988.Google Scholar
- [MNPS91]Dale Miller, Gopalan Nadathur, Frank Pfenning, and Andre Scedrov. Uniform proofs as a foundation for logic programming.
*Annals of Pure and Applied Logic*, 51:125–157, 1991.Google Scholar - [NM88]Gopalan Nadathur and Dale Miller. An Overview of λProlog. In
*Fifth International Logic Programming Conference*, pages 810–827, Seattle, Washington, August 1988. MIT Press.Google Scholar - [NP92]Gopalan Nadathur and Frank Pfenning. The type system of a higher-order logic programming language. In Frank Pfenning, editor,
*Types in Logic Programming*, pages 245–283. MIT Press, 1992.Google Scholar