Optimizing almost-tail-recursive Prolog programs

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

4 Citations (Scopus)

Abstract

There is a wide class of problems for which the natural Prolog specification, as a top-down, recursive computation, is significantly less efficient than an iterative bottom-up version. However, the transformation from the top-down specification to the bottom-up implementation is not always obvious, principally due to problems with nondeterminism and the order in which variables get bound — problems which do not arise in comparable situations in functional languages. This paper illustrates how these problems can be handled in certain cases, and the transformation mechanized, using algebraic properties of operators such as associativity and distributivity. The resulting programs are tail-recursive, and hence significantly more efficient in space usage, with no deterioration in execution speed.

Original languageEnglish (US)
Title of host publicationFunctional Programming Languages and Computer Architecture
PublisherSpringer Verlag
Pages204-219
Number of pages16
Volume201 LNCS
ISBN (Print)9783540159759
DOIs
StatePublished - Jan 1 1985
Externally publishedYes
Event2nd International Conference on Functional Programming Languages and Computer Architecture, 1985 - Nancy, France
Duration: Sep 16 1985Sep 19 1985

Publication series

NameLecture Notes in Computer Science (including subseries Lecture Notes in Artificial Intelligence and Lecture Notes in Bioinformatics)
Volume201 LNCS
ISSN (Print)0302-9743
ISSN (Electronic)1611-3349

Other

Other2nd International Conference on Functional Programming Languages and Computer Architecture, 1985
CountryFrance
CityNancy
Period9/16/859/19/85

Fingerprint

Prolog
Tail
Specifications
Bottom-up
Deterioration
Specification
Distributivity
Associativity
Nondeterminism
Operator

ASJC Scopus subject areas

  • Theoretical Computer Science
  • Computer Science(all)

Cite this

Debray, S. K. (1985). Optimizing almost-tail-recursive Prolog programs. In Functional Programming Languages and Computer Architecture (Vol. 201 LNCS, pp. 204-219). (Lecture Notes in Computer Science (including subseries Lecture Notes in Artificial Intelligence and Lecture Notes in Bioinformatics); Vol. 201 LNCS). Springer Verlag. https://doi.org/10.1007/3-540-15975-4_38

Optimizing almost-tail-recursive Prolog programs. / Debray, Saumya K.

Functional Programming Languages and Computer Architecture. Vol. 201 LNCS Springer Verlag, 1985. p. 204-219 (Lecture Notes in Computer Science (including subseries Lecture Notes in Artificial Intelligence and Lecture Notes in Bioinformatics); Vol. 201 LNCS).

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

Debray, SK 1985, Optimizing almost-tail-recursive Prolog programs. in Functional Programming Languages and Computer Architecture. vol. 201 LNCS, Lecture Notes in Computer Science (including subseries Lecture Notes in Artificial Intelligence and Lecture Notes in Bioinformatics), vol. 201 LNCS, Springer Verlag, pp. 204-219, 2nd International Conference on Functional Programming Languages and Computer Architecture, 1985, Nancy, France, 9/16/85. https://doi.org/10.1007/3-540-15975-4_38
Debray SK. Optimizing almost-tail-recursive Prolog programs. In Functional Programming Languages and Computer Architecture. Vol. 201 LNCS. Springer Verlag. 1985. p. 204-219. (Lecture Notes in Computer Science (including subseries Lecture Notes in Artificial Intelligence and Lecture Notes in Bioinformatics)). https://doi.org/10.1007/3-540-15975-4_38
Debray, Saumya K. / Optimizing almost-tail-recursive Prolog programs. Functional Programming Languages and Computer Architecture. Vol. 201 LNCS Springer Verlag, 1985. pp. 204-219 (Lecture Notes in Computer Science (including subseries Lecture Notes in Artificial Intelligence and Lecture Notes in Bioinformatics)).
@inproceedings{f881024930c044b9b5a0f11d9ae78567,
title = "Optimizing almost-tail-recursive Prolog programs",
abstract = "There is a wide class of problems for which the natural Prolog specification, as a top-down, recursive computation, is significantly less efficient than an iterative bottom-up version. However, the transformation from the top-down specification to the bottom-up implementation is not always obvious, principally due to problems with nondeterminism and the order in which variables get bound — problems which do not arise in comparable situations in functional languages. This paper illustrates how these problems can be handled in certain cases, and the transformation mechanized, using algebraic properties of operators such as associativity and distributivity. The resulting programs are tail-recursive, and hence significantly more efficient in space usage, with no deterioration in execution speed.",
author = "Debray, {Saumya K}",
year = "1985",
month = "1",
day = "1",
doi = "10.1007/3-540-15975-4_38",
language = "English (US)",
isbn = "9783540159759",
volume = "201 LNCS",
series = "Lecture Notes in Computer Science (including subseries Lecture Notes in Artificial Intelligence and Lecture Notes in Bioinformatics)",
publisher = "Springer Verlag",
pages = "204--219",
booktitle = "Functional Programming Languages and Computer Architecture",
address = "Germany",

}

TY - GEN

T1 - Optimizing almost-tail-recursive Prolog programs

AU - Debray, Saumya K

PY - 1985/1/1

Y1 - 1985/1/1

N2 - There is a wide class of problems for which the natural Prolog specification, as a top-down, recursive computation, is significantly less efficient than an iterative bottom-up version. However, the transformation from the top-down specification to the bottom-up implementation is not always obvious, principally due to problems with nondeterminism and the order in which variables get bound — problems which do not arise in comparable situations in functional languages. This paper illustrates how these problems can be handled in certain cases, and the transformation mechanized, using algebraic properties of operators such as associativity and distributivity. The resulting programs are tail-recursive, and hence significantly more efficient in space usage, with no deterioration in execution speed.

AB - There is a wide class of problems for which the natural Prolog specification, as a top-down, recursive computation, is significantly less efficient than an iterative bottom-up version. However, the transformation from the top-down specification to the bottom-up implementation is not always obvious, principally due to problems with nondeterminism and the order in which variables get bound — problems which do not arise in comparable situations in functional languages. This paper illustrates how these problems can be handled in certain cases, and the transformation mechanized, using algebraic properties of operators such as associativity and distributivity. The resulting programs are tail-recursive, and hence significantly more efficient in space usage, with no deterioration in execution speed.

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

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

U2 - 10.1007/3-540-15975-4_38

DO - 10.1007/3-540-15975-4_38

M3 - Conference contribution

AN - SCOPUS:9944233625

SN - 9783540159759

VL - 201 LNCS

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

SP - 204

EP - 219

BT - Functional Programming Languages and Computer Architecture

PB - Springer Verlag

ER -