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 条
  • [21] Towards Practical Tabled Abduction in Logic Programs
    Saptawijaya, Ari
    Pereira, Luis Moniz
    PROGRESS IN ARTIFICIAL INTELLIGENCE, EPIA 2013, 2013, 8154 : 223 - 234
  • [22] Batched Evaluation of Linear Tabled Logic Programs
    Areias, Miguel
    Rocha, Ricardo
    COMPUTER SCIENCE AND INFORMATION SYSTEMS, 2013, 10 (04) : 1775 - 1797
  • [23] Tabled evaluation with delaying for general logic programs
    Chen, WD
    Warren, DS
    JOURNAL OF THE ACM, 1996, 43 (01) : 20 - 74
  • [24] Separation logic: A logic for shared mutable data structures
    Reynolds, JC
    17TH ANNUAL IEEE SYMPOSIUM ON LOGIC IN COMPUTER SCIENCE, PROCEEDINGS, 2002, : 55 - 74
  • [25] The Fusemate Logic Programming System
    Baumgartner, Peter
    AUTOMATED DEDUCTION, CADE 28, 2021, 12699 : 589 - 601
  • [26] The Life of a Logic Programming System
    Costa, Vitor Santos
    LOGIC PROGRAMMING, PROCEEDINGS, 2008, 5366 : 1 - 6
  • [27] Magnetic logic makes for mutable chips
    Geoff Brumfiel
    Nature, 2013, 493 : 589 - 590
  • [28] Speculative computations in or-parallel tabled logic programs
    Rocha, R
    Silva, F
    Costa, VS
    LOGIC PROGRAMMING, PROCEEDINGS, 2004, 3132 : 254 - 268
  • [29] Magnetic logic makes for mutable chips
    Brumfiel, Geoff
    NATURE, 2013, 493 (7434) : 589 - 590
  • [30] Research Summary: Tabled Evaluation for Transaction Logic Programs
    Fodor, Paul
    LOGIC PROGRAMMING, 2009, 5649 : 525 - 526