Title :
Implementation of tabled evaluation with delaying in Prolog
Author :
Ramesh, R. ; Chen, Weidong
Author_Institution :
Texas Instrum. Inc., Dallas, TX, USA
Abstract :
Unlike SLD resolution as implemented in Prolog, tabled evaluation with delaying guarantees termination for function free logic programs, avoids repeated computation of identical subqueries, and handles recursion through negation. It is often used in query processing and nonmonotonic reasoning where termination is required. The paper presents a new technique for incorporating tabled evaluation into existing Prolog systems. It requires neither time consuming modifications of a Prolog engine nor metainterpretation that can enormously slow down program execution. Instead, using a program transformation approach, the technique allows effective use of the advanced Prolog technology. The transformed program uses tabling primitives implemented externally in C that provide direct control over the search strategies. This brings efficiency as well as portability across Prolog systems. Experiences with a prototype implementation indicate that the approach results in a flexible and pragmatic method for query processing and nonmonotonic reasoning on top of Prolog. Performance measurements show that the method is efficient for practical applications
Keywords :
PROLOG; information retrieval; logic programming; nonmonotonic reasoning; query formulation; C language; advanced Prolog technology; delaying; function free logic programs; identical subqueries; negation; nonmonotonic reasoning; program execution; program transformation approach; query processing; recursion handling; search strategies; tabled evaluation; tabling primitives; termination guarantee; Computer Society; Delay; Engines; Knowledge representation; Logic; Measurement; Prototypes; Query processing; Superluminescent diodes; Table lookup;
Journal_Title :
Knowledge and Data Engineering, IEEE Transactions on