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 条
  • [41] A LOGIC PROGRAMMING SYSTEM FOR NONMONOTONIC REASONING
    ALFERES, JJ
    DAMASIO, CV
    PEREIRA, LM
    JOURNAL OF AUTOMATED REASONING, 1995, 14 (01) : 93 - 147
  • [42] A Polymorphic Type System in Logic Programming
    Li Huiqi
    Zhao Zhizhuo
    2008 3rd International Conference on Intelligent System and Knowledge Engineering, Vols 1 and 2, 2008, : 125 - 130
  • [43] A defeasible logic programming system for the Web
    Antoniou, G
    Bikakis, A
    Wagner, G
    ICTAI 2004: 16TH IEEE INTERNATIONALCONFERENCE ON TOOLS WITH ARTIFICIAL INTELLIGENCE, PROCEEDINGS, 2004, : 756 - 757
  • [44] Constraint inductive logic programming system
    Zheng, Lei
    Liu, Chunnian
    Jia, Dong
    Jisuanji Gongcheng/Computer Engineering, 2003, 29 (19):
  • [45] OASys: An AND/OR parallel logic programming system
    Department of Informatics, Aristotle Univ. Thessaloniki, 54006, Thessaloniki, Greece
    不详
    不详
    Parallel Comput, 3 (321-336):
  • [46] On Improving the Efficiency of Deterministic Calls and Answers in Tabled Logic Programs
    Areias, Miguel
    Rocha, Ricardo
    PROGRESS IN ARTIFICIAL INTELLIGENCE, PROCEEDINGS, 2009, 5816 : 113 - 125
  • [47] Programming in logic without logic programming
    Kowalski, Robert
    Sadri, Fariba
    THEORY AND PRACTICE OF LOGIC PROGRAMMING, 2016, 16 : 269 - 295
  • [48] Logic programming and constraint logic programming
    Cohen, J
    ACM COMPUTING SURVEYS, 1996, 28 (01) : 257 - 259
  • [49] Incremental evaluation of tabled Prolog: Beyond pure logic programs
    Saha, D
    Ramakrishnan, CR
    PRACTICAL ASPECTS OF DECLARATIVE LANGUAGES, 2006, 3819 : 215 - 229
  • [50] A Term-Based Global Trie for Tabled Logic Programs
    Costa, Jorge
    Raimundo, Joao
    Rocha, Ricardo
    LOGIC PROGRAMMING, 2009, 5649 : 205 - 219