Backtrackable state with linear affine implication and Assumption Grammars

  • Paul Tarau
  • Veronica Dahl
  • Andrew Fall
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 1179)


A general framework of handling state information for logic programming languages on top of backtrackable assumptions (linear affine and intuitionistic implications ranging over the current continuation) is introduced. Assumption Grammars (AGs), a variant of Extended DCGs handling multiple streams without the need of a preprocessing technique, are specified within our framework. Equivalence with DCGs is shown through a translation from AGs to DCGs and through use of an implementation-independent meta-interpreter, customized for handling both DCGs and AGs.

For AGs, efficiency comparable to that of preprocessing based DCG is obtained through a WAM-level implementation which uses space only for non-deterministic execution while collapsing to a form of in-place update in case of deterministic execution. AGs have been fully integrated in BinProlog 5.00 (available by ftp from and have been used as an alternative to DCGs in various applications.

Not restricted to Prolog, the techniques described in the paper are portable to alternative logic programming languages like Lolli, Lygon and λProlog.


state in logic and functional programming linear affine and intuitionistic implication accumulator processing alternative DCG implementations destructive assignment logical global variables continuations 


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. [Bak92]
    H. Baker. Lively linear lisp-'look ma, no garbage!'. ACM Sigplan Notices, 27(8):89–98, August 1992.CrossRefGoogle Scholar
  2. [FTD95]
    Andrew Fall, Paul Tarau, and Veronica Dahl. Natural Language Processing with Hypothetical Assumption Grammars and Sparse Term Taxonomies. Technical Report 95-3, Département d'Informatique, Université de Moncton, April 1995. Available by ftp from Google Scholar
  3. [Gir87]
    J.-Y. Girard. Linear logic. Theoretical Computer Science, (50):1–102, 1987.CrossRefGoogle Scholar
  4. [HM94]
    Joshua S. Hodas and Dale Miller. Logic Programming in a Fragment of Intuitionistic Linear logic. Journal of Information and Computation, 110(2):327–365, May 1994.CrossRefGoogle Scholar
  5. [Hod92]
    J. Hodas. Specifying Filler-Gap Dependency Parsers in a Linear-Logic Programming Language. In Krzysztof Apt, editor, Logic Programming Proceedings of the Joint International Conference and Symposium on Logic programming, pages 622–636, Cambridge, Massachusetts London, England, 1992. MIT Press.Google Scholar
  6. [Hod94]
    Joshua S. Hodas. Logic Programming in Intuitionistic Linear Logic: Theory, Design, and Implementation. PhD thesis, University of Pennsylvania, Department of Computer and Information Science, May 1994. Available as University of Pennsylvania Technical Reports MS-CIS-92-28 or LINC LAB 269.Google Scholar
  7. [Kop95]
    A. P. Kopylov. Decidability of linear affine logic. In Proceedings, Tenth Annual IEEE Symposium on Logic in Computer Science, pages 496–504, San Diego, California, 26–29 June 1995. IEEE Computer Society Press.Google Scholar
  8. [Tar96]
    Paul Tarau. BinProlog 5.00 User Guide. Technical Report 96-1, Département d'Informatique, Université de Moncton, April 1996. Available from Scholar
  9. [TB89]
    Paul Tarau and Michel Boyer. Prolog Meta-Programming with Soft Databases. In Harvey Abramson and M.H. Rogers, editors, Meta-Programming in Logic Programming, pages 365–382. MIT Press, 1989.Google Scholar
  10. [TDF95]
    Paul Tarau, Veronica Dahl, and Andrew Fall. Backtrackable State with Linear Assumptions, Continuations and Hidden Accumulator Grammars. Technical Report 95-2, Département d'Informatique, Université de Moncton, April 1995. Available by ftp from Google Scholar
  11. [Van89]
    Peter Van Roy. A useful extension to Prolog's Definite Clause Grammar notation. SIGPLAN notices, 24(11):132–134, November 1989.Google Scholar
  12. [Wad91]
    P. Wadler. Is there a use for linear logic? ACM/IFIP PEPM Symposium, June 1991.Google Scholar
  13. [Wad92]
    Philip Wadler. The essence of functional programming. In ACM Symposium POPL'92, pages 1–15. ACM Press, 1992.Google Scholar
  14. [WH95]
    Michael Winikoff and James Harland. Implementing the linear logic programming language Lygon. In John Lloyd, editor, International Logic Programming Symposium, pages 66–80, Portland, Oregon, December 1995. MIT Press.Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 1996

Authors and Affiliations

  • Paul Tarau
    • 1
  • Veronica Dahl
    • 2
  • Andrew Fall
    • 2
  1. 1.Département d'InformatiqueUniversité de MonctonMonctonCanada
  2. 2.Logic and Functional Programming Group Department of Computing SciencesSimon Fraser UniversityBurnabyCanada

Personalised recommendations