Abstract
A long standing problem in logic programming is how to impose directionality on programs in a safe fashion. The benefits of directionality include freedom from explicit sequential control, the ability to reason about algorithmic properties of programs (such as termination, complexity and deadlock-freedom) and controlling concurrency. By using Girard's linear logic, we are able to devise a type system that combines types and modes into a unified framework, and enables one to express directionality declaratively. The rich power of the type system allows outputs to be embedded in inputs and vice versa. Type checking guarantees that values have unique producers, but multiple consumers are still possible. From a theoretical point of view, this work provides a “logic programming interpretation” of (the proofs of) linear logic, adding to the concurrency and functional programming interpretations that are already known. It also brings logic programming into the broader world of typed languages and types-as-propositions paradigm, enriching it with static scoping and higher-order features.
Preview
Unable to display preview. Download preview PDF.
References
S. Abramsky. Computational interpretation of linear logic. Tutorial Notes, International Logic Programming Symposium, San Diego, 1991.
S. Abramsky. Computational interpretations of linear logic. Research Report DOC 90/20, Imperial College, London, Oct 1990. (available by FTP from theory.doc.ic.ac.uk; to appear in J. Logic and Computation).
J.-M. Andreoli and R. Pareschi. Logic programming with linear logic. In P. Schroeder-Heister, editor, Extensions of Logic Programming, (Lect. Notes in Artificial Intelligence). Springer-Verlag, Berlin, 1991. (LNAI).
A. Asperti, G. L. Ferrari, and R. Gorrieri. Implicative formulae in the “proofs as computations” analogy. In Seventeenth Ann. ACM Symp. on Princ. of Program. Lang., pages 59–71. ACM, 1990.
G. Berry and G. Boudol. The chemical abstract machine. In Seventeenth Ann. ACM Symp. on Princ. of Program. Lang., pages 81–94. ACM, 1990.
C. Brown and D. Gurr. A categorical linear framework for petri nets. In Fifth Ann. Symp. on Logic in Comp. Science, pages 208–218. IEEE, June 1990.
K. L. Clark. Negation as failure. In H. Gallaire and J. Minker, editors, Logic and Data Bases, pages 293–322. Plenum Press, New York, 1978.
K. L. Clark and S. Gregory. Parlog: A parallel logic programming language. Research Report DOC 83/5, Imperial College of Science and Technology, London, May 1983.
A. Colmerauer, H. Kanouri, R. Pasero, and P. Roussel. Un systeme de communication homme-machine en francais. Research report, Groupe Intelligence Artificielle, Universite Aix-Marseille II, 1973.
R. L. Constable, et. al. Implementing Mathematics with the Nuprl Proof Development System. Prentice-Hall, New York, 1986.
H. B. Curry and R. Feys. Combinatory Logic. North-Holland, Amsterdam, 1958.
V. Danos and L. Regnier. The structure of multiplicatives. Archive for Mathematical Logic, 28:181–203, 1989.
Y. Deville. Logic Programming: Systematic Program Development. Addison-Wesley, Wokingham, 1990.
A. Filinski. Linear continuations. In ACM Symp. on Princ. of Program. Lang., pages 27–38. ACM, Jan 1992.
V. Gehlot and C. Gunter. Normal process representatives. In Symp. on Logic in Comp. Science, pages 200–207. IEEE, June 1990.
G. Gentzen. The Collected Papers of Gerhard Gentzen, edited by M. E. Szabo. North-Holland, Amsterdam, 1969.
J.-Y. Girard. Linear logic. Theoretical Comp. Science, 50:1–102, 1987.
J.-Y. Girard. Proof Theory and Logical Complexity, volume 1. Bibliopolis, Napoli, 1987.
J.-Y. Girard. Towards a geometry of interaction. In J. W. Gray and A. Scedrov, editors, Categories in Computer Science and Logic, pages 69–108, Boulder, Colorado, June 1987. American Mathematical Society. (Contemporary Mathematics, Vol. 92).
J-Y. Girard, Y. Lafont, and P. Taylor. Proofs and Types. Cambridge Univ. Press, Cambridge, 1989.
S. Gregory. Parallel Logic Programming in PARLOG: The Language and its Implementation. Addison-Wesley, Reading, Mass., 1987.
C. Gunter and V. Gehlot. Nets as tensor theories. Technical Report MS-CIS-89-68, University of Pennsylvania, Oct 1989.
M. Hanus. Horn clause programs with polymorphic types: Semantics and resolution. Theoretical Comp. Science, 89:63–106, 1991.
J. Harland and D. Pym. The uniform proof-theoretic foundation of linear logic programming. Technical Report ECS-LFCS-90-124, University of Edinburgh, Nov 1990.
M. Hirata. Programming language Doc and its self-description, or x = x considered harmful. In Third Conference of Japan Society of Software Science and Technology, pages 69–72, 1986.
J. Hodas and D. Miller. Logic programming in a fragment of intuitionistic linear logic. In Sixth Ann. Symp. on Logic in Comp. Science. IEEE, 1991.
W. A. Howard. The formulae-as-types notion of construction. In J. R. Hindley and J. P. Seldin, editors, To H. B. Curry: Essays on Combinatory Logic, Lambda Calculus and Formalism, pages 479–490. Academic Press, New York, 1980.
A. Kleinman, Y. Moscowitz, A. Pnueli, and E. Shapiro. Communication with directed logic variables. In Eighteenth Ann. ACM Symp. on Princ. of Program. Lang., pages 221–232. ACM, 1991.
R. A. Kowalski. Algorithm = logic + control. Communications of the ACM, 22:424–431, 1979.
Y. Lafont. Linear logic programming. In P. Dybjer, editor, Porc. Workshop on Programming Logic, pages 209–220. Univ. of Goteborg and Chalmers Univ. Technology, Goteborg, Sweden, Oct 1987.
Y. Lafont. Interaction nets. In Seventeenth Ann. ACM Symp. on Princ. of Program. Lang., pages 95–108. ACM, Jan 1990.
T.K. Lakshman and U. S. Reddy. Typed Prolog: A Semantic Reconstruction of the Mycroft-O'Keefe Type System. In V. Saraswat and K. Ueda, editors, Logic Programming: Proceedings of the 1991 International Symposium, pages 202–217. MIT Press, Cambridge, Mass., 1991.
J.-L. Lassez and M. J. Maher. Closures and fairness in the semantics of programming logic. Theoretical Computer Science, pages 167–184, May 1984.
P. Lincoln. Linear logic. SIGACT Notices, 23(2):29–37, 1992.
J. W. Lloyd. Foundations of Logic Programming. Springer-Verlag, Berlin, second edition, 1987.
N. Marti-Oliet and J. Meseguer. From Petri nets to linear logic. Math. Structures in Comp. Science, 1:69–101, 1991.
P. Martin-Löf. Constructive mathematics and computer programming. In L. J. Cohen, J. Los, H. Pfeiffer, and K.-P. Podewski, editors, Proc. Sixth Intern. Congress for Logic, Methodology and Philosophy of Science, pages 153–175. North-Holland, 1982.
D. A. Miller and G. Nadathur. Higher-order logic programming. In Intern. Conf. on Logic Programming, 1986.
R. Milner. A calculus for communicating systems. (LNCS). Springer-Verlag, 1979.
A. Mycroft and R. A. O'Keefe. A polymorphic type system for Prolog. In Logic Programming workshop, pages 107–122, Universidade Nova de Lisboa, 1983.
L. Naish. Automating control of logic programs. J. Logic Programming, 2(3):167–183, 1985.
U. S. Reddy. Transformation of logic programs into functional programs. In Intern. Symp. on Logic Programming, pages 187–197. IEEE, 1984.
U. S. Reddy. On the relationship between logic and functional languages. In D. DeGroot and G. Lindstrom, editors, Logic Programming: Functions, Relations and Equations, pages 3–36. Prentice-Hall, 1986.
U. S. Reddy. Acceptors as values: Functional programming in classical linear logic. Preprint, Univ. Illinois at Urbana-Champaign, Dec 1991.
V. A. Saraswat., K. Kahn, and J. Levy. Janus: A step towards distributed constraint programming. In S. Debray and M. Hermenegildo, editors, North American Conf. on Logic Programming, pages 431–446. MIT Press, Cambridge, 1990.
V. A. Saraswat and M. Rinard. Concurrent constraint programming. In Seventeenth Ann. ACM Symp. on Princ. of Program. Lang., pages 232–245. ACM, 1990.
A. Scedrov. A brief guide to linar logic. Bulletin of the European Assoc. for Theoretical Computer Science, 41:154–165, June 1990.
E. Shapiro. The family of concurrent logic programming languages. ACM Computing Surveys, 21(3):412–510, 1989.
E. Y. Shapiro. A subset of concurrent prolog and its interpreter. Technical Report TR-003, ICOT-Institute of New Generation Computer Technology, January 1983.
L. Sterling and E. Shapiro. The Art of Prolog. MIT Press, Cambridge, Mass., 1986.
G. Takeuti. Proof Theory, volume 81. North-Holland, Amsterdam, 1987. Second edition.
S. Thompson. Type Theory and Functional Programming. Addison-Wesley, Wokingham, England, 1991.
Author information
Authors and Affiliations
Editor information
Rights and permissions
Copyright information
© 1993 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Reddy, U.S. (1993). A typed foundation for directional logic programming. In: Lamma, E., Mello, P. (eds) Extensions of Logic Programming. ELP 1992. Lecture Notes in Computer Science, vol 660. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-56454-3_15
Download citation
DOI: https://doi.org/10.1007/3-540-56454-3_15
Published:
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-56454-6
Online ISBN: 978-3-540-47562-0
eBook Packages: Springer Book Archive