Backtrackable state with linear affine implication and Assumption Grammars
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 clement.info.umoncton.ca) 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.
Keywordsstate 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.
- [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 clement.info.umoncton.ca. Google Scholar
- [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
- [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
- [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
- [Tar96]Paul Tarau. BinProlog 5.00 User Guide. Technical Report 96-1, Département d'Informatique, Université de Moncton, April 1996. Available from http://clement.info.umoncton.ca/BinProlog.Google Scholar
- [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
- [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 clement.info.umoncton.ca. Google Scholar
- [Van89]Peter Van Roy. A useful extension to Prolog's Definite Clause Grammar notation. SIGPLAN notices, 24(11):132–134, November 1989.Google Scholar
- [Wad91]P. Wadler. Is there a use for linear logic? ACM/IFIP PEPM Symposium, June 1991.Google Scholar
- [Wad92]Philip Wadler. The essence of functional programming. In ACM Symposium POPL'92, pages 1–15. ACM Press, 1992.Google Scholar
- [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