DocumentCode :
782637
Title :
Towards banishing the cut from Prolog
Author :
Debray, Saumya K. ; Warren, David S.
Author_Institution :
Dept. of Comput. Sci., State Univ. of New York, Stony Brook, NY, USA
Volume :
16
Issue :
3
fYear :
1990
fDate :
3/1/1990 12:00:00 AM
Firstpage :
335
Lastpage :
349
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
Keywords :
PROLOG; logic programming; Prolog source programs; compile time; cut; declarative readings; firstof; impure features; impure language features; language constructs; logic programs; nondeterminism; oneof; parallel evaluation strategies; program transformations; purer programming style; static analysis; Computer science; Costs; Logic programming; Programming profession; Proposals;
fLanguage :
English
Journal_Title :
Software Engineering, IEEE Transactions on
Publisher :
ieee
ISSN :
0098-5589
Type :
jour
DOI :
10.1109/32.48941
Filename :
48941
Link To Document :
بازگشت