A typed foundation for directional logic programming

  • Uday S. Reddy
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 660)


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.


Directionality modes types concurrent logic programming linear logic Curry-Howard isomorphism sequent calculus logic variables 


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 1.
    S. Abramsky. Computational interpretation of linear logic. Tutorial Notes, International Logic Programming Symposium, San Diego, 1991.Google Scholar
  2. 2.
    S. Abramsky. Computational interpretations of linear logic. Research Report DOC 90/20, Imperial College, London, Oct 1990. (available by FTP from; to appear in J. Logic and Computation).Google Scholar
  3. 3.
    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).Google Scholar
  4. 4.
    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.Google Scholar
  5. 5.
    G. Berry and G. Boudol. The chemical abstract machine. In Seventeenth Ann. ACM Symp. on Princ. of Program. Lang., pages 81–94. ACM, 1990.Google Scholar
  6. 6.
    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.Google Scholar
  7. 7.
    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.Google Scholar
  8. 8.
    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.Google Scholar
  9. 9.
    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.Google Scholar
  10. 10.
    R. L. Constable, et. al. Implementing Mathematics with the Nuprl Proof Development System. Prentice-Hall, New York, 1986.Google Scholar
  11. 11.
    H. B. Curry and R. Feys. Combinatory Logic. North-Holland, Amsterdam, 1958.Google Scholar
  12. 12.
    V. Danos and L. Regnier. The structure of multiplicatives. Archive for Mathematical Logic, 28:181–203, 1989.Google Scholar
  13. 13.
    Y. Deville. Logic Programming: Systematic Program Development. Addison-Wesley, Wokingham, 1990.Google Scholar
  14. 14.
    A. Filinski. Linear continuations. In ACM Symp. on Princ. of Program. Lang., pages 27–38. ACM, Jan 1992.Google Scholar
  15. 15.
    V. Gehlot and C. Gunter. Normal process representatives. In Symp. on Logic in Comp. Science, pages 200–207. IEEE, June 1990.Google Scholar
  16. 16.
    G. Gentzen. The Collected Papers of Gerhard Gentzen, edited by M. E. Szabo. North-Holland, Amsterdam, 1969.Google Scholar
  17. 17.
    J.-Y. Girard. Linear logic. Theoretical Comp. Science, 50:1–102, 1987.Google Scholar
  18. 18.
    J.-Y. Girard. Proof Theory and Logical Complexity, volume 1. Bibliopolis, Napoli, 1987.Google Scholar
  19. 19.
    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).Google Scholar
  20. 20.
    J-Y. Girard, Y. Lafont, and P. Taylor. Proofs and Types. Cambridge Univ. Press, Cambridge, 1989.Google Scholar
  21. 21.
    S. Gregory. Parallel Logic Programming in PARLOG: The Language and its Implementation. Addison-Wesley, Reading, Mass., 1987.Google Scholar
  22. 22.
    C. Gunter and V. Gehlot. Nets as tensor theories. Technical Report MS-CIS-89-68, University of Pennsylvania, Oct 1989.Google Scholar
  23. 23.
    M. Hanus. Horn clause programs with polymorphic types: Semantics and resolution. Theoretical Comp. Science, 89:63–106, 1991.Google Scholar
  24. 24.
    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.Google Scholar
  25. 25.
    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.Google Scholar
  26. 26.
    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.Google Scholar
  27. 27.
    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.Google Scholar
  28. 28.
    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.Google Scholar
  29. 29.
    R. A. Kowalski. Algorithm = logic + control. Communications of the ACM, 22:424–431, 1979.Google Scholar
  30. 30.
    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.Google Scholar
  31. 31.
    Y. Lafont. Interaction nets. In Seventeenth Ann. ACM Symp. on Princ. of Program. Lang., pages 95–108. ACM, Jan 1990.Google Scholar
  32. 32.
    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.Google Scholar
  33. 33.
    J.-L. Lassez and M. J. Maher. Closures and fairness in the semantics of programming logic. Theoretical Computer Science, pages 167–184, May 1984.Google Scholar
  34. 34.
    P. Lincoln. Linear logic. SIGACT Notices, 23(2):29–37, 1992.Google Scholar
  35. 35.
    J. W. Lloyd. Foundations of Logic Programming. Springer-Verlag, Berlin, second edition, 1987.Google Scholar
  36. 36.
    N. Marti-Oliet and J. Meseguer. From Petri nets to linear logic. Math. Structures in Comp. Science, 1:69–101, 1991.Google Scholar
  37. 37.
    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.Google Scholar
  38. 38.
    D. A. Miller and G. Nadathur. Higher-order logic programming. In Intern. Conf. on Logic Programming, 1986.Google Scholar
  39. 39.
    R. Milner. A calculus for communicating systems. (LNCS). Springer-Verlag, 1979.Google Scholar
  40. 40.
    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.Google Scholar
  41. 41.
    L. Naish. Automating control of logic programs. J. Logic Programming, 2(3):167–183, 1985.Google Scholar
  42. 42.
    U. S. Reddy. Transformation of logic programs into functional programs. In Intern. Symp. on Logic Programming, pages 187–197. IEEE, 1984.Google Scholar
  43. 43.
    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.Google Scholar
  44. 44.
    U. S. Reddy. Acceptors as values: Functional programming in classical linear logic. Preprint, Univ. Illinois at Urbana-Champaign, Dec 1991.Google Scholar
  45. 45.
    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.Google Scholar
  46. 46.
    V. A. Saraswat and M. Rinard. Concurrent constraint programming. In Seventeenth Ann. ACM Symp. on Princ. of Program. Lang., pages 232–245. ACM, 1990.Google Scholar
  47. 47.
    A. Scedrov. A brief guide to linar logic. Bulletin of the European Assoc. for Theoretical Computer Science, 41:154–165, June 1990.Google Scholar
  48. 48.
    E. Shapiro. The family of concurrent logic programming languages. ACM Computing Surveys, 21(3):412–510, 1989.Google Scholar
  49. 49.
    E. Y. Shapiro. A subset of concurrent prolog and its interpreter. Technical Report TR-003, ICOT-Institute of New Generation Computer Technology, January 1983.Google Scholar
  50. 50.
    L. Sterling and E. Shapiro. The Art of Prolog. MIT Press, Cambridge, Mass., 1986.Google Scholar
  51. 51.
    G. Takeuti. Proof Theory, volume 81. North-Holland, Amsterdam, 1987. Second edition.Google Scholar
  52. 52.
    S. Thompson. Type Theory and Functional Programming. Addison-Wesley, Wokingham, England, 1991.Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 1993

Authors and Affiliations

  • Uday S. Reddy
    • 1
  1. 1.Department of Computer ScienceUniversity of Illinois at Urbana-ChampaignUrbana

Personalised recommendations