Mutable terms in a tabled logic programming system

被引:0
|
作者
Cui, B [1 ]
Warren, DS [1 ]
机构
[1] SUNY Stony Brook, Dept Comp Sci, Stony Brook, NY 11794 USA
关键词
D O I
暂无
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
Mutable terms in Prolog form an abstract data type that supports back-trackable destructive assignment. They are intensively used in Constraint Logic Programming and the implementation of constraint solvers. When implemented in XSB, a tabled logic programming system, the underlying mechanism to support mutable terms provides in addition an important way to save table space. In this paper we describe our implementation of mutable terms in XSB. The implementation of mutable terms is considerably more complex than in a normal Prolog system. First, since mutable terms can appear in a subgoal call and may be updated in an answer, the substitution factoring mechanism in XSB's variant engine must be extended to handle them. Second, to ensure that direct invocation and retrieval from the table give equivalent results, multiple occurrences of the same mutable term in a subgoal and/or an answer must be maintained as shared whenever we copy terms into and out of a table. The XSB tabling engine has to be extended, and special modifications are required for the structure of subgoal table and answer table. The mechanism to preserve the sharing of mutable terms is also proved to be an efficient way of reducing table sizes, as an unchanged mutable term is only saved once in the subgoal table or answer table no matter how many times it appears in the subgoal and the corresponding answer (the new value of a changed mutable term is saved once in the answer table). Used in tailed programs, this mechanism can significantly improve time and space performance.
引用
收藏
页码:305 / 319
页数:15
相关论文
共 50 条
  • [1] A system for tabled constraint logic programming
    Cui, BQ
    Warren, DS
    [J]. COMPUTATIONAL LOGIC - CL 2000, 2000, 1861 : 478 - 492
  • [2] Planning as tabled logic programming
    Zhou, Neng-Fa
    Bartak, Roman
    Dovier, Agostino
    [J]. THEORY AND PRACTICE OF LOGIC PROGRAMMING, 2015, 15 : 543 - 558
  • [3] Approximate pruning in tabled logic programming
    Castro, LF
    Warren, DS
    [J]. PROGRAMMING LANGUAGES AND SYSTEMS, 2003, 2618 : 69 - 83
  • [4] Deductive spreadsheets using tabled logic programming
    Ramakrishnan, C. R.
    Ramakrishnan, I. V.
    Warren, David S.
    [J]. LOGIC PROGRAMMING, PROCEEDINGS, 2006, 4079 : 391 - 405
  • [5] Model checking with probabilistic tabled logic programming
    Gorlin, Andrey
    Ramakrishnan, C. R.
    Smolka, Scott A.
    [J]. THEORY AND PRACTICE OF LOGIC PROGRAMMING, 2012, 12 : 681 - 700
  • [6] Failure tabled constraint logic programming by interpolation
    Gange, Graeme
    Navas, Jorge A.
    Schachte, Peter
    Sondergaard, Harald
    Stuckey, Peter J.
    [J]. THEORY AND PRACTICE OF LOGIC PROGRAMMING, 2013, 13 : 593 - 607
  • [7] On modeling planning problems in tabled logic programming
    Bartak, Roman
    Dovier, Agostino
    Zhou, Neng-Fa
    [J]. PROCEEDINGS OF THE 17TH INTERNATIONAL SYMPOSIUM ON PRINCIPLES AND PRACTICE OF DECLARATIVE PROGRAMMING (PPDP 2015), 2015, : 31 - 42
  • [8] XSB: Extending Prolog with Tabled Logic Programming
    Swift, Terrance
    Warren, David S.
    [J]. THEORY AND PRACTICE OF LOGIC PROGRAMMING, 2012, 12 : 157 - 187
  • [9] Using Tabled Logic Programming to Solve the Petrobras Planning Problem
    Bartak, Roman
    Zhou, Neng-Fa
    [J]. THEORY AND PRACTICE OF LOGIC PROGRAMMING, 2014, 14 : 697 - 710
  • [10] Constraint solver synthesis using tabled resolution for constraint logic programming
    Abdennadher, S
    Rigotti, C
    [J]. LOGIC BASED PROGRAM SYNTHESIS AND TRANSFORMATION, 2003, 2664 : 32 - 47