Optimizing almost-tail-recursive Prolog programs

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

4 Scopus citations

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
EditorsJean-Pierre Jouannaud
PublisherSpringer-Verlag
Pages204-219
Number of pages16
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

ASJC Scopus subject areas

  • Theoretical Computer Science
  • Computer Science(all)

Cite this

Debray, S. K. (1985). Optimizing almost-tail-recursive Prolog programs. In J-P. Jouannaud (Ed.), Functional Programming Languages and Computer Architecture (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