TY - JOUR
T1 - Detection and optimization of suspension-free logic programs
AU - Debray, Saumya K.
AU - Gudeman, David
AU - Bigot, Peter
N1 - Funding Information:
In recent years, mechanisms to suspend the execution of a goal until certain variables in the goal become bound have become increasingly popular in logic programming languages. They are available in many modern implementations of Prolog, e.g., NU-Prolog, Sicstns Prolog, Prolog-III, and Sepia. Such mechanisms also form the basis for synchronization in many concurrent logic programming languages such as FGHC, Janus, and Strand. Delay mechanisms allow clear and *A preliminary version of this paper appeared in Proc. 1994 International Symposium on Logic Programming. This work was supported in part by the National Science Foundation under Grant CCR-9123520. Address correspondence to Saumya K. Debray, Department of Computer Science, University of Arizona, Tucson, AZ 85721. E-mail: [email protected]. Received March 1995; accepted March 1996.
PY - 1996
Y1 - 1996
N2 - In recent years, language mechanisms to suspend, or delay, the execution of goals until certain variables become bound have become increasingly popular in logic programming languages. While convenient, such mechanisms can make control flow within a program difficult to predict at compile time, and therefore render many traditional compiler optimizations inapplicable. Unfortunately, this performance cost is also incurred by programs that do not use any delay primitives. In this paper, we describe a simple dataflow analysis for detecting computations where suspension effects can be ignored, and discuss several low-level optimizations that rely on this information. Our algorithm has been implemented in the jc system. Optimizations based on information it produces result in significant performance improvements, demonstrating speed comparable to or exceeding that of optimized C programs.
AB - In recent years, language mechanisms to suspend, or delay, the execution of goals until certain variables become bound have become increasingly popular in logic programming languages. While convenient, such mechanisms can make control flow within a program difficult to predict at compile time, and therefore render many traditional compiler optimizations inapplicable. Unfortunately, this performance cost is also incurred by programs that do not use any delay primitives. In this paper, we describe a simple dataflow analysis for detecting computations where suspension effects can be ignored, and discuss several low-level optimizations that rely on this information. Our algorithm has been implemented in the jc system. Optimizations based on information it produces result in significant performance improvements, demonstrating speed comparable to or exceeding that of optimized C programs.
UR - http://www.scopus.com/inward/record.url?scp=0030260416&partnerID=8YFLogxK
UR - http://www.scopus.com/inward/citedby.url?scp=0030260416&partnerID=8YFLogxK
U2 - 10.1016/s0743-1066(96)00052-0
DO - 10.1016/s0743-1066(96)00052-0
M3 - Article
AN - SCOPUS:0030260416
SN - 0743-1066
VL - 29
SP - 171
EP - 194
JO - Journal of Logic Programming
JF - Journal of Logic Programming
IS - 1-3
ER -