The Community for Technology Leaders
Green Image
Issue No. 03 - March (1990 vol. 16)
ISSN: 0098-5589
pp: 335-349
<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>
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.

D. Warren and S. Debray, "Towards Banishing the Cut from Prolog," in IEEE Transactions on Software Engineering, vol. 16, no. , pp. 335-349, 1990.
299 ms
(Ver 3.3 (11022016))