Extension table built-ins for Prolog

Changguan Fan, Suzanne Dietrich

Research output: Contribution to journalArticle

11 Citations (Scopus)

Abstract

The ET* algorithm is a complete evaluation strategy for Datalog programs, which are logic programs without function symbols. The ET* algorithm uses extension tables and depth-first iterative deepening to provide the evaluation of pure function-free logic programs as declarative specifications. Extension tables are a memo facility that the algorithm uses both to cut infinite derivation paths for complete evaluation and to optimize the evaluation of logic programs. The original implementation of the ET* algorithm incorporated extension tables as part of the Prolog database using the built-in predicates assert and retract. The advantage of implementing the extension table using the Prolog database is the portability of the ET* algorithm. There are several disadvantages, however, with this approach. One disadvantage is the cost associated with the built-in predicates assert and retract, which are known to be expensive operations in most current Prolog systems. Another disadvantage is the differences across implementations in the semantics that these built-ins provide for dynamic predicates. This paper presents an efficient implementation of extension tables as a global data structure in Prolog, which includes a set of built-in primitives for manipulating the extension table. The ET* algorithm is updated to reflect the utilization of the global extension table data structure. The implementations of the ET* algorithm are compared using time and space performance on a variety of benchmark programs.

Original languageEnglish (US)
Pages (from-to)573-597
Number of pages25
JournalSoftware - Practice and Experience
Volume22
Issue number7
StatePublished - Jul 1992

Fingerprint

Data structures
Semantics
Specifications
Costs

ASJC Scopus subject areas

  • Computer Graphics and Computer-Aided Design
  • Software

Cite this

Extension table built-ins for Prolog. / Fan, Changguan; Dietrich, Suzanne.

In: Software - Practice and Experience, Vol. 22, No. 7, 07.1992, p. 573-597.

Research output: Contribution to journalArticle

Fan, Changguan ; Dietrich, Suzanne. / Extension table built-ins for Prolog. In: Software - Practice and Experience. 1992 ; Vol. 22, No. 7. pp. 573-597.
@article{7811d7faf7db4a1aa8711c3cf345a636,
title = "Extension table built-ins for Prolog",
abstract = "The ET* algorithm is a complete evaluation strategy for Datalog programs, which are logic programs without function symbols. The ET* algorithm uses extension tables and depth-first iterative deepening to provide the evaluation of pure function-free logic programs as declarative specifications. Extension tables are a memo facility that the algorithm uses both to cut infinite derivation paths for complete evaluation and to optimize the evaluation of logic programs. The original implementation of the ET* algorithm incorporated extension tables as part of the Prolog database using the built-in predicates assert and retract. The advantage of implementing the extension table using the Prolog database is the portability of the ET* algorithm. There are several disadvantages, however, with this approach. One disadvantage is the cost associated with the built-in predicates assert and retract, which are known to be expensive operations in most current Prolog systems. Another disadvantage is the differences across implementations in the semantics that these built-ins provide for dynamic predicates. This paper presents an efficient implementation of extension tables as a global data structure in Prolog, which includes a set of built-in primitives for manipulating the extension table. The ET* algorithm is updated to reflect the utilization of the global extension table data structure. The implementations of the ET* algorithm are compared using time and space performance on a variety of benchmark programs.",
author = "Changguan Fan and Suzanne Dietrich",
year = "1992",
month = "7",
language = "English (US)",
volume = "22",
pages = "573--597",
journal = "Software - Practice and Experience",
issn = "0038-0644",
publisher = "John Wiley and Sons Ltd",
number = "7",

}

TY - JOUR

T1 - Extension table built-ins for Prolog

AU - Fan, Changguan

AU - Dietrich, Suzanne

PY - 1992/7

Y1 - 1992/7

N2 - The ET* algorithm is a complete evaluation strategy for Datalog programs, which are logic programs without function symbols. The ET* algorithm uses extension tables and depth-first iterative deepening to provide the evaluation of pure function-free logic programs as declarative specifications. Extension tables are a memo facility that the algorithm uses both to cut infinite derivation paths for complete evaluation and to optimize the evaluation of logic programs. The original implementation of the ET* algorithm incorporated extension tables as part of the Prolog database using the built-in predicates assert and retract. The advantage of implementing the extension table using the Prolog database is the portability of the ET* algorithm. There are several disadvantages, however, with this approach. One disadvantage is the cost associated with the built-in predicates assert and retract, which are known to be expensive operations in most current Prolog systems. Another disadvantage is the differences across implementations in the semantics that these built-ins provide for dynamic predicates. This paper presents an efficient implementation of extension tables as a global data structure in Prolog, which includes a set of built-in primitives for manipulating the extension table. The ET* algorithm is updated to reflect the utilization of the global extension table data structure. The implementations of the ET* algorithm are compared using time and space performance on a variety of benchmark programs.

AB - The ET* algorithm is a complete evaluation strategy for Datalog programs, which are logic programs without function symbols. The ET* algorithm uses extension tables and depth-first iterative deepening to provide the evaluation of pure function-free logic programs as declarative specifications. Extension tables are a memo facility that the algorithm uses both to cut infinite derivation paths for complete evaluation and to optimize the evaluation of logic programs. The original implementation of the ET* algorithm incorporated extension tables as part of the Prolog database using the built-in predicates assert and retract. The advantage of implementing the extension table using the Prolog database is the portability of the ET* algorithm. There are several disadvantages, however, with this approach. One disadvantage is the cost associated with the built-in predicates assert and retract, which are known to be expensive operations in most current Prolog systems. Another disadvantage is the differences across implementations in the semantics that these built-ins provide for dynamic predicates. This paper presents an efficient implementation of extension tables as a global data structure in Prolog, which includes a set of built-in primitives for manipulating the extension table. The ET* algorithm is updated to reflect the utilization of the global extension table data structure. The implementations of the ET* algorithm are compared using time and space performance on a variety of benchmark programs.

UR - http://www.scopus.com/inward/record.url?scp=0026889334&partnerID=8YFLogxK

UR - http://www.scopus.com/inward/citedby.url?scp=0026889334&partnerID=8YFLogxK

M3 - Article

VL - 22

SP - 573

EP - 597

JO - Software - Practice and Experience

JF - Software - Practice and Experience

SN - 0038-0644

IS - 7

ER -