Top-down and Bottom-up Evaluation Procedurally Integrated

被引:1
|
作者
Warren, David S. [1 ,2 ]
机构
[1] SUNY Stony Brook, Stony Brook, NY 11794 USA
[2] XSB Inc, Setauket, NY 11733 USA
关键词
top-down; bottom-up; logic programming; tabling; Prolog; procedural interpretation;
D O I
10.1017/S1471068418000194
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
This paper describes how the Logic Programming System XSB combines top-down and bottomup computation through the mechanisms of variant tabling and subsumptive tabling with abstraction, respectively. It is well known that top-down evaluation of logical rules in Prolog has a procedural interpretation as recursive procedure invocation (Kowalski 1986). Tabling adds the intuition of short-circuiting redundant computations (Warren 1992). This paper shows how to introduce into tabled logic program evaluation a bottom-up component, whose procedural intuition is the initialization of a data structure, in which a relation is initially computed and filled, on first demand, and then used throughout the remainder of a larger computation for efficient lookup. This allows many Prolog programs to be expressed fully declaratively, programs which formerly required procedural features, such as assert, to be made efficient.
引用
收藏
页码:706 / 721
页数:16
相关论文
共 50 条