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 AProlog. Keywords: state in logic and functional programming, linear affine and intuitionistic implication, accumulator processing, alternative DCG implementations, destructive assignment, logical global variables, continuations.
CITATION STYLE
Tarau, P., Dahl, V., & Fall, A. (1996). Backtrackable state with linear affine implication and assumption grammars. In Lecture Notes in Computer Science (including subseries Lecture Notes in Artificial Intelligence and Lecture Notes in Bioinformatics) (Vol. 1179, pp. 53–63). Springer Verlag. https://doi.org/10.1007/bfb0027779
Mendeley helps you to discover research relevant for your work.