Welcome!
To use the personalized features of this site, please log in or register.
If you have forgotten your username or password, we can help.
|
 |
Derivation of Efficient Logic Programs by Specialization and Reduction of Nondeterminism
| |
|
Derivation of Efficient Logic Programs by Specialization and Reduction of Nondeterminism Alberto Pettorossi1 , Maurizio Proietti2 and Sophie Renault3  | (1) | DISP, University of Roma Tor Vergata, Via del Politecnico 1, I-00133 Roma, Italy |
| (2) | IASI-CNR, Viale Manzoni 30, I-00185 Roma, Italy |
| (3) | European Patent Office, Patentlaan 2, P.O. Box 5818, NL, 2280 HV Rijswijk, The Netherlands |
Abstract Program specialization is a program transformation methodology which improves program efficiency by exploiting the information about the input data which are available at compile time. We show that current techniques for program specialization based on partial evaluation do not perform well on nondeterministic logic programs. We then consider a set of transformation rules which extend the ones used for partial evaluation, and we propose a strategy for guiding the application of these extended rules so to derive very efficient specialized programs. The efficiency improvements which sometimes are exponential, are due to the reduction of nondeterminism and to the fact that the computations which are performed by the initial programs in different branches of the computation trees, are performed by the specialized programs within single branches. In order to reduce nondeterminism we also make use of mode information for guiding the unfolding process. To exemplify our technique, we show that we can automatically derive very efficient matching programs and parsers for regular languages. The derivations we have performed could not have been done by previously known partial evaluation techniques. Keywords automatic program derivation - program transformation - program specialization - logic programming - transformation rules and strategies A preliminary version of this paper appears as: Reducing Nondeterminism while Specializing Logic Programs. Proceedings of the 24th Annual ACM Symposium on Principles of Programming Languages, Paris, France, January 15–17, 1997, ACM Press, 1997, pp. 414–427.
Fulltext Preview (Small, Large)
 References secured to subscribers.
|
|
|
|
|
|