Towards banishing the cut from Prolog

Saumya K Debray, David S. Warren

Research output: Contribution to journalArticle

7 Citations (Scopus)

Abstract

Logic programs can often be inefficient. The usual solution to this problem has been to return some control to the user in the form of impure language features like cut. The authors argue that it is not necessary to resort to such impure features for efficiency. This point is illustrated by considering how most of the common uses of cut can be eliminated from Prolog source programs, relying on static analysis to generate them at compile time. Three common situations where the cut is used are considered. Static analysis techniques are given to detect such situations, and applicable program transformations are described. Two language constructs, firstof and oneof, for situations involving don't-care nondeterminism, are suggested. These constructs have better declarative readings than the cut and extend better to parallel evaluation strategies. Together, these proposals result in a system where users need rely much less on cuts for efficiency, thereby promoting a purer programming style without sacrificing efficiency.

Original languageEnglish (US)
Pages (from-to)335-349
Number of pages15
JournalIEEE Transactions on Software Engineering
Volume16
Issue number3
DOIs
StatePublished - Mar 1990

Fingerprint

Static analysis

ASJC Scopus subject areas

  • Computer Graphics and Computer-Aided Design
  • Software
  • Electrical and Electronic Engineering

Cite this

Towards banishing the cut from Prolog. / Debray, Saumya K; Warren, David S.

In: IEEE Transactions on Software Engineering, Vol. 16, No. 3, 03.1990, p. 335-349.

Research output: Contribution to journalArticle

Debray, Saumya K ; Warren, David S. / Towards banishing the cut from Prolog. In: IEEE Transactions on Software Engineering. 1990 ; Vol. 16, No. 3. pp. 335-349.
@article{d005b54444ef4822ac05960518e550ab,
title = "Towards banishing the cut from Prolog",
abstract = "Logic programs can often be inefficient. The usual solution to this problem has been to return some control to the user in the form of impure language features like cut. The authors argue that it is not necessary to resort to such impure features for efficiency. This point is illustrated by considering how most of the common uses of cut can be eliminated from Prolog source programs, relying on static analysis to generate them at compile time. Three common situations where the cut is used are considered. Static analysis techniques are given to detect such situations, and applicable program transformations are described. Two language constructs, firstof and oneof, for situations involving don't-care nondeterminism, are suggested. These constructs have better declarative readings than the cut and extend better to parallel evaluation strategies. Together, these proposals result in a system where users need rely much less on cuts for efficiency, thereby promoting a purer programming style without sacrificing efficiency.",
author = "Debray, {Saumya K} and Warren, {David S.}",
year = "1990",
month = "3",
doi = "10.1109/32.48941",
language = "English (US)",
volume = "16",
pages = "335--349",
journal = "IEEE Transactions on Software Engineering",
issn = "0098-5589",
publisher = "Institute of Electrical and Electronics Engineers Inc.",
number = "3",

}

TY - JOUR

T1 - Towards banishing the cut from Prolog

AU - Debray, Saumya K

AU - Warren, David S.

PY - 1990/3

Y1 - 1990/3

N2 - Logic programs can often be inefficient. The usual solution to this problem has been to return some control to the user in the form of impure language features like cut. The authors argue that it is not necessary to resort to such impure features for efficiency. This point is illustrated by considering how most of the common uses of cut can be eliminated from Prolog source programs, relying on static analysis to generate them at compile time. Three common situations where the cut is used are considered. Static analysis techniques are given to detect such situations, and applicable program transformations are described. Two language constructs, firstof and oneof, for situations involving don't-care nondeterminism, are suggested. These constructs have better declarative readings than the cut and extend better to parallel evaluation strategies. Together, these proposals result in a system where users need rely much less on cuts for efficiency, thereby promoting a purer programming style without sacrificing efficiency.

AB - Logic programs can often be inefficient. The usual solution to this problem has been to return some control to the user in the form of impure language features like cut. The authors argue that it is not necessary to resort to such impure features for efficiency. This point is illustrated by considering how most of the common uses of cut can be eliminated from Prolog source programs, relying on static analysis to generate them at compile time. Three common situations where the cut is used are considered. Static analysis techniques are given to detect such situations, and applicable program transformations are described. Two language constructs, firstof and oneof, for situations involving don't-care nondeterminism, are suggested. These constructs have better declarative readings than the cut and extend better to parallel evaluation strategies. Together, these proposals result in a system where users need rely much less on cuts for efficiency, thereby promoting a purer programming style without sacrificing efficiency.

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

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

U2 - 10.1109/32.48941

DO - 10.1109/32.48941

M3 - Article

VL - 16

SP - 335

EP - 349

JO - IEEE Transactions on Software Engineering

JF - IEEE Transactions on Software Engineering

SN - 0098-5589

IS - 3

ER -