Abstract
Recently, partial deduction of logic programs has been extended to conceptually embed folding. To this end, partial deductions are no longer computed of single atoms, but rather of entire conjunctions; Hence the term “conjunctive partial deduction”.
Conjunctive partial deduction aims at achieving unfold/fold-like program transformations such as tupling and deforestation within fully automated partial deduction. However, its merits greatly surpass that limited context: Also other major efficiency gains can be obtained through considerably improved side-ways information propagation.
In this paper, we present a first investigation of conjunctive partial deduction in practice. We describe the concrete options used in the implementation(s), look at abstraction in a practical Prolog context, include and discuss an extensive set of benchmark results. ¿ From these, we can conclude that conjunctive partial deduction can indeed pay off in practice, beating its conventional precursor on a number of small to medium size programs. However, controlling it in a perfect way proves far from obvious, and a range of challenging open problems remain as topics for further research.
Partially supported by the HCM Network “Logic Program Synthesis and Transformation”, and partially by the Belgian GOA “Non-Standard Applications of Abstract Interpretation”.
Supported by the Belgian GOA “Non-Standard Applications of Abstract Interpretation”
Partially supported as a postdoctoral fellow by the K.U.Leuven Research Council, Belgium, and partially by the HCM Network “Logic Program Synthesis and Transformation”, contract nr. CHRX-CT-93-00414, University of Padova, Italy.
Preview
Unable to display preview. Download preview PDF.
References
K. Benkerimi and P. M. Hill. Supporting transformations for the partial evaluation of logic programs. Journal of Logic and Computation, 3(5):469–486, 1993.
R. Bol. Loop checking in partial deduction. Journal of Logic Programming, 16:25–46, 1993.
A. Bossi and N. Cocco. Preserving Universal Termination through Unfold/Fold. In G. Levi and M. Rodriguez-Artalejo, editors, Proc. 4th International Conference on Algebraic and Logic Programming, Lecture Notes in Computer Science 850, pages 269–286, Madrid, Spain, 1994. Springer-Verlag.
A. Bossi and N. Cocco. Replacement can Preserve Termination. In this Volume.
A. Bossi, N. Cocco and S. Etalle. Transformation of Left Terminating Programs: The Reordering Problem. In M. Proietti, editor, Logic Program Synthesis and Transformation. Proceedings of LOPSTR'95, Lecture Notes in Computer Science 1048, pages 33–45, Utrecht, Netherlands, September 1995. Springer-Verlag.
A. Bossi and S. Etalle. Transforming Acyclic Programs. Transactions on Programming Languages and Systems, 16(4:1081–1096, 1994.
M. Bruynooghe, D. De Schreye, and B. Martens. A general criterion for avoiding infinite unfolding during partial deduction. New Generation Computing, 11(1):47–79, 1992.
R.M. Burstall and J. Darlington. A transformation system for developing recursive programs. Journal of the ACM, 24(1):44–67, 1977.
D. De Schreye, M. Leuschel, and B. Martens. Program specialisation for logic programs. Tutorial. Abstract in J. Lloyd, editor, Proceedings ILPS'95, pages 615–616, Portland, Oregon, December 1995, MIT Press.
D. A. de Waal and J. Gallagher. Specialisation of a Unification Algorithm. In K.-K. Lau and T. Clement, editors, Proceedings of LOPSTR'91, pages 205–220, Springer-Verlag, 1993.
D. A. de Waal and J. Gallagher. The applicability of logic program analysis and transformation to theorem proving. In A. Bundy, editor, Proceedings CADE-12, pages 207–221, Nancy, France, June/July 1994. Springer-Verlag, LNAI 814.
S. Debray and N.-W. Lin. Cost analysis of logic programs. ACM Transactions on Programming Languages and Systems, 15(5):826–875, November 1993.
S. Debray, P. López García, M. Hermenegildo, and N.-W. Lin. Estimating the computational cost of logic programs. In B. Le Charlier, editor, SAS'94, LNCS 864, pages 255–265, Namur, Belgium, September 1994. Springer-Verlag.
J. Gallagher and M. Bruynooghe. Some low-level source transformations for logic programs. In M. Bruynooghe, editor, Meta'90, pages 229–244, Leuven, April 1990.
J. Gallagher and M. Bruynooghe. The derivation of an algorithm for program specialisation. New Generation Computing, 9(3 & 4):305–333, 1991.
J. Gallagher. A system for specialising logic programs. Technical Report TR-91-32, University of Bristol, November 1991.
J. Gallagher. Tutorial on specialisation of logic programs. In Proceedings PEPM'93, pages 88–98. ACM Press, 1993.
R. Glück, J. Jørgensen, B. Martens, and M.H. Sørensen. Controlling conjunctive partial deduction of definite logic programs. In H. Kuchen and S.D. Swierstra, editors, Proceedings of the International Symposium on Programming Languages: Implementations, Logics and Programs (PLILP'96), LNCS 1140, pages 152–166, Aachen, Germany, September 1996. Extended version as Technical Report CW 226, K.U. Leuven. Accessible via http://www.cs.kuleuven.ac.be/∼lpai.
T. Horváth. Experiments in partial deduction. Master's thesis, Departement Computerwetenschappen, K.U.Leuven, Leuven, Belgium, July 1993.
J. Lam and A. Kusalik. A comparative analysis of partial deductors for pure Prolog. Technical report, Department of Computational Science, University of Saskatchewan, Canada, May 1990. Revised April 1991.
M. Leuschel. Ecological partial deduction: Preserving characteristic trees without constraints. In M. Proietti, editor, Logic Program Synthesis and Transformation. Proceedings of LOPSTR'95, Lecture Notes in Computer Science 1048, pages 1–16, Utrecht, Netherlands, September 1995. Springer-Verlag.
M. Leuschel. The ECCE partial deduction system and the DPPD library of benchmarks. Accessible via http://www.cs.kuleuven.ac.be/∼lpai.
M. Leuschel and D. De Schreye. An almost perfect abstraction operation for partial deduction using characteristic trees. Technical Report CW 215, Departement Computerwetenschappen, K.U. Leuven, Belgium, October 1995. Submitted for Publication. Accessible via http://www.cs.kuleuven.ac.be/lpai.
M. Leuschel, D. De Schreye, and A. de Waal. A conceptual embedding of folding into partial deduction: Towards a maximal integration. In Michael Maher, editor, Proceedings of the Joint International Conference and Symposium on Logic Programming JICSLP'96, pages 319–332, Bonn, Germany, September 1996. MIT Press. Extended version as Technical Report CW 225, K.U. Leuven. Accessible via http://www.cs.kuleuven.ac.be/lpai.
M. Leuschel and D. De Schreye. Logic program specialisation: How to be more specific. In H. Kuchen and S.D. Swierstra, editors, Proceedings of the International Symposium on Programming Languages: Implementations, Logics and Programs (PLILP'96), LNCS 1140, pages 137–151, Aachen, Germany, September 1996. Extended version as Technical Report CW 232, K.U. Leuven. Accessible via http://www.cs.kuleuven.ac.be/lpai.
M. Leuschel and B. Martens. Global control for partial deduction through characteristic atoms and global trees. In Olivier Danvy, Robert Glück, and Peter Thiemann, editors, Proceedings of the 1996 Dagstuhl Seminar on Partial Evaluation, LNCS 1110, pages 263–283, Schloß Dagstuhl, 1996. Extended version as Technical Report CW 220, K.U. Leuven. Accessible via http://www.cs.kuleuven.ac.be/lpai.
M. Leuschel and M.H. Sørensen. Redundant argument filtering of logic programs. In this Volume
J.W. Lloyd. Foundations of Logic Programming. Springer-Verlag, 1987.
J. W. Lloyd and J. C. Shepherdson. Partial evaluation in logic programming. The Journal of Logic Programming, 11:217–242, 1991.
B. Martens and D. De Schreye. Automatic finite unfolding using well-founded measures. Journal of Logic Programming, 28:89–146, 1996. Extended version as Technical Report CW180, Departement Computerwetenschappen, K.U.Leuven, October 1993, accessible via http://www.cs.kuleuven.ac.be/∼lpai.
B. Martens and J. Gallagher. Ensuring global termination of partial deduction while allowing flexible polyvariance. In L. Sterling, editor, Proceedings ICLP'95, pages 597–613, Kanagawa, Japan, June 1995. MIT Press. Extended version as Technical Report CSTR-94-16, University of Bristol.
A. Pettorossi and M. Proietti. Transformation of logic programs: Foundations and techniques. Journal of Logic Programming, 19 & 20:261–320, 1994.
D. L. Poole and R. Goebel. Gracefully adding negation and disjunction to Prolog. In E. Shapiro, editor, Proceedings ICLP'86, pages 635–641, London, U.K., July 1986. Springer-Verlag, LNCS 225.
S. Prestwich. The PADDY partial deduction system. Technical Report ECRC-92-6, ECRC, Munich, Germany, 1992.
M. Proietti and A. Pettorossi. Unfolding — definition — folding, in this order for avoiding unnecessary variables in logic programs. In Proceedings PLILP'91, pages 347–358. Springer-Verlag, LNCS 528, 1991.
M. Proietti and A. Pettorossi. The loop absorption and the generalization strategies for the development of logic programs and partial deduction. Journal of Logic Programming, 16:123–161, 1993.
M. Proietti and A. Pettorossi. Completeness of some transformation strategies for avoiding unnecessary logical variables. In P. Van Hentenryck, editor, Proceedings ICLP'94, pages 714–729, Italy, June 1994. MIT Press.
D. Sahlin. Mixtus: An automatic partial evaluator for full Prolog. New Generation Computing, 12(1):7–51, 1993.
Z. Somogyi, F. Henderson, and T. Conway. The execution algorithm of Mercury: An efficient purely declarative logic programming language. The Journal of Logic Programming, 1996. To Appear.
M.H. Sørensen and R. Glück. An algorithm of generalization in positive supercompilation. In J. Lloyd, editor, Proceedings ILPS'95, pages 465–479, Portland, Oregon, December 1995, MIT Press.
H. Tamaki and T. Sato. Unfold/fold transformation of logic programs. In S-Å. Tärnlund, editor, Proceedings ICLP'84, pages 127–138, Uppsala, July 1984.
V.F. Turchin. The concept of a supercompiler. ACM Transactions on Programming Languages and Systems, 8(3):292–325, 1986.
V.F. Turchin. The algorithm of generalization in the supercompiler. In D. Bjørner, A.P. Ershov and N.D. Jones, editors, Partial Evaluation and Mixed Computation, pages 531–549. North-Holland, 1988.
P.L. Wadler. Deforestation: Transforming programs to eliminate intermediate trees. Theoretical Computer Science, 73:231–248, 1990.
Author information
Authors and Affiliations
Editor information
Rights and permissions
Copyright information
© 1997 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Jørgensen, J., Leuschel, M., Martens, B. (1997). Conjunctive partial deduction in practice. In: Gallagher, J. (eds) Logic Program Synthesis and Transformation. LOPSTR 1996. Lecture Notes in Computer Science, vol 1207. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-62718-9_5
Download citation
DOI: https://doi.org/10.1007/3-540-62718-9_5
Published:
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-62718-0
Online ISBN: 978-3-540-68494-7
eBook Packages: Springer Book Archive