Optimizing almost-tail-recursive Prolog programs

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

6 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 - 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
Country/TerritoryFrance
CityNancy
Period9/16/859/19/85

ASJC Scopus subject areas

  • Theoretical Computer Science
  • General Computer Science

Fingerprint

Dive into the research topics of 'Optimizing almost-tail-recursive Prolog programs'. Together they form a unique fingerprint.

Cite this