Beyond depth-first: Improving tabled logic programs through alternative scheduling strategies

Juliana Freire, Terrance Swift, David S. Warren

Research output: Chapter in Book/Report/Conference proceedingConference contribution

Abstract

Tabled evaluations ensure termination of logic programs with finite models by keeping track of which subgoals have been called. Given several variant subgoals in an evaluation, only the first one encountered will use program clause resolution; the rest uses answer resolution. This use of answer resolution prevents infinite looping which happens in SLD. Given the asynchronicity of answer generation and answer return, tabling systems face an important scheduling choice not present in traditional top-down evaluation: How does the order of returning answers to consuming subgoals affect program efficiency. This paper investigates alternate scheduling strategies for tabling in a WAM implementation, the SLG-WAM. The original SLG-WAM had a simple mechanism of scheduling answers to be returned to callers which was expensive in terms of trailing and choice point creation. We propose here a more sophisticated scheduling strategy, Batched Scheduling, which reduces the overheads of these operations and provides dramatic space reduction as well as speedups for many programs. We also propose a second strategy, Local Scheduling, which has applications to non-monotonic reasoning and when combined with answer subsumption can improve the performance of some programs by arbitrary amounts.

Original languageEnglish (US)
Title of host publicationProgramming Languages: Implementations, Logics, and Programs - 8th International Symposium, PLILP 1996, Proceedings
PublisherSpringer Verlag
Pages243-258
Number of pages16
Volume1140
ISBN (Print)3540617566, 9783540617563
DOIs
StatePublished - 1996
Event8th International Symposium on Programming Languages, Implementations, Logics, and Programs, PLILP 1996 - Aachen, Germany
Duration: Sep 24 1996Sep 27 1996

Publication series

NameLecture Notes in Computer Science (including subseries Lecture Notes in Artificial Intelligence and Lecture Notes in Bioinformatics)
Volume1140
ISSN (Print)03029743
ISSN (Electronic)16113349

Other

Other8th International Symposium on Programming Languages, Implementations, Logics, and Programs, PLILP 1996
CountryGermany
CityAachen
Period9/24/969/27/96

Fingerprint

Logic Programs
Scheduling
Alternatives
Evaluation
Nonmonotonic Reasoning
Finite Models
Strategy
Termination
Alternate
Arbitrary

ASJC Scopus subject areas

  • Computer Science(all)
  • Theoretical Computer Science

Cite this

Freire, J., Swift, T., & Warren, D. S. (1996). Beyond depth-first: Improving tabled logic programs through alternative scheduling strategies. In Programming Languages: Implementations, Logics, and Programs - 8th International Symposium, PLILP 1996, Proceedings (Vol. 1140, pp. 243-258). (Lecture Notes in Computer Science (including subseries Lecture Notes in Artificial Intelligence and Lecture Notes in Bioinformatics); Vol. 1140). Springer Verlag. https://doi.org/10.1007/3-540-61756-6_89

Beyond depth-first : Improving tabled logic programs through alternative scheduling strategies. / Freire, Juliana; Swift, Terrance; Warren, David S.

Programming Languages: Implementations, Logics, and Programs - 8th International Symposium, PLILP 1996, Proceedings. Vol. 1140 Springer Verlag, 1996. p. 243-258 (Lecture Notes in Computer Science (including subseries Lecture Notes in Artificial Intelligence and Lecture Notes in Bioinformatics); Vol. 1140).

Research output: Chapter in Book/Report/Conference proceedingConference contribution

Freire, J, Swift, T & Warren, DS 1996, Beyond depth-first: Improving tabled logic programs through alternative scheduling strategies. in Programming Languages: Implementations, Logics, and Programs - 8th International Symposium, PLILP 1996, Proceedings. vol. 1140, Lecture Notes in Computer Science (including subseries Lecture Notes in Artificial Intelligence and Lecture Notes in Bioinformatics), vol. 1140, Springer Verlag, pp. 243-258, 8th International Symposium on Programming Languages, Implementations, Logics, and Programs, PLILP 1996, Aachen, Germany, 9/24/96. https://doi.org/10.1007/3-540-61756-6_89
Freire J, Swift T, Warren DS. Beyond depth-first: Improving tabled logic programs through alternative scheduling strategies. In Programming Languages: Implementations, Logics, and Programs - 8th International Symposium, PLILP 1996, Proceedings. Vol. 1140. Springer Verlag. 1996. p. 243-258. (Lecture Notes in Computer Science (including subseries Lecture Notes in Artificial Intelligence and Lecture Notes in Bioinformatics)). https://doi.org/10.1007/3-540-61756-6_89
Freire, Juliana ; Swift, Terrance ; Warren, David S. / Beyond depth-first : Improving tabled logic programs through alternative scheduling strategies. Programming Languages: Implementations, Logics, and Programs - 8th International Symposium, PLILP 1996, Proceedings. Vol. 1140 Springer Verlag, 1996. pp. 243-258 (Lecture Notes in Computer Science (including subseries Lecture Notes in Artificial Intelligence and Lecture Notes in Bioinformatics)).
@inproceedings{0d7e8ae98c86473c909182c359bafb4c,
title = "Beyond depth-first: Improving tabled logic programs through alternative scheduling strategies",
abstract = "Tabled evaluations ensure termination of logic programs with finite models by keeping track of which subgoals have been called. Given several variant subgoals in an evaluation, only the first one encountered will use program clause resolution; the rest uses answer resolution. This use of answer resolution prevents infinite looping which happens in SLD. Given the asynchronicity of answer generation and answer return, tabling systems face an important scheduling choice not present in traditional top-down evaluation: How does the order of returning answers to consuming subgoals affect program efficiency. This paper investigates alternate scheduling strategies for tabling in a WAM implementation, the SLG-WAM. The original SLG-WAM had a simple mechanism of scheduling answers to be returned to callers which was expensive in terms of trailing and choice point creation. We propose here a more sophisticated scheduling strategy, Batched Scheduling, which reduces the overheads of these operations and provides dramatic space reduction as well as speedups for many programs. We also propose a second strategy, Local Scheduling, which has applications to non-monotonic reasoning and when combined with answer subsumption can improve the performance of some programs by arbitrary amounts.",
author = "Juliana Freire and Terrance Swift and Warren, {David S.}",
year = "1996",
doi = "10.1007/3-540-61756-6_89",
language = "English (US)",
isbn = "3540617566",
volume = "1140",
series = "Lecture Notes in Computer Science (including subseries Lecture Notes in Artificial Intelligence and Lecture Notes in Bioinformatics)",
publisher = "Springer Verlag",
pages = "243--258",
booktitle = "Programming Languages: Implementations, Logics, and Programs - 8th International Symposium, PLILP 1996, Proceedings",

}

TY - GEN

T1 - Beyond depth-first

T2 - Improving tabled logic programs through alternative scheduling strategies

AU - Freire, Juliana

AU - Swift, Terrance

AU - Warren, David S.

PY - 1996

Y1 - 1996

N2 - Tabled evaluations ensure termination of logic programs with finite models by keeping track of which subgoals have been called. Given several variant subgoals in an evaluation, only the first one encountered will use program clause resolution; the rest uses answer resolution. This use of answer resolution prevents infinite looping which happens in SLD. Given the asynchronicity of answer generation and answer return, tabling systems face an important scheduling choice not present in traditional top-down evaluation: How does the order of returning answers to consuming subgoals affect program efficiency. This paper investigates alternate scheduling strategies for tabling in a WAM implementation, the SLG-WAM. The original SLG-WAM had a simple mechanism of scheduling answers to be returned to callers which was expensive in terms of trailing and choice point creation. We propose here a more sophisticated scheduling strategy, Batched Scheduling, which reduces the overheads of these operations and provides dramatic space reduction as well as speedups for many programs. We also propose a second strategy, Local Scheduling, which has applications to non-monotonic reasoning and when combined with answer subsumption can improve the performance of some programs by arbitrary amounts.

AB - Tabled evaluations ensure termination of logic programs with finite models by keeping track of which subgoals have been called. Given several variant subgoals in an evaluation, only the first one encountered will use program clause resolution; the rest uses answer resolution. This use of answer resolution prevents infinite looping which happens in SLD. Given the asynchronicity of answer generation and answer return, tabling systems face an important scheduling choice not present in traditional top-down evaluation: How does the order of returning answers to consuming subgoals affect program efficiency. This paper investigates alternate scheduling strategies for tabling in a WAM implementation, the SLG-WAM. The original SLG-WAM had a simple mechanism of scheduling answers to be returned to callers which was expensive in terms of trailing and choice point creation. We propose here a more sophisticated scheduling strategy, Batched Scheduling, which reduces the overheads of these operations and provides dramatic space reduction as well as speedups for many programs. We also propose a second strategy, Local Scheduling, which has applications to non-monotonic reasoning and when combined with answer subsumption can improve the performance of some programs by arbitrary amounts.

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

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

U2 - 10.1007/3-540-61756-6_89

DO - 10.1007/3-540-61756-6_89

M3 - Conference contribution

AN - SCOPUS:84957716924

SN - 3540617566

SN - 9783540617563

VL - 1140

T3 - Lecture Notes in Computer Science (including subseries Lecture Notes in Artificial Intelligence and Lecture Notes in Bioinformatics)

SP - 243

EP - 258

BT - Programming Languages: Implementations, Logics, and Programs - 8th International Symposium, PLILP 1996, Proceedings

PB - Springer Verlag

ER -