The Community for Technology Leaders
RSS Icon
Subscribe
Issue No.03 - March (1990 vol.16)
pp: 335-349
ABSTRACT
<p>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.</p>
INDEX TERMS
logic programs; impure language features; impure features; Prolog source programs; static analysis; compile time; program transformations; language constructs; firstof; oneof; nondeterminism; declarative readings; cut; parallel evaluation strategies; purer programming style; logic programming; PROLOG.
CITATION
S.K. Debray, D.S. Warren, "Towards Banishing the Cut from Prolog", IEEE Transactions on Software Engineering, vol.16, no. 3, pp. 335-349, March 1990, doi:10.1109/32.48941
5 ms
(Ver 2.0)

Marketing Automation Platform Marketing Automation Tool