Ecological partial deduction: Preserving characteristic trees without constraints

  • Michael Leuschel
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 1048)


A partial deduction strategy for logic programs usually uses an abstraction operation to guarantee the finiteness of the set of atoms for which partial deductions are produced. Finding an abstraction operation which guarantees finiteness and does not loose relevant information is a difficult problem. In earlier work Gallagher and Bruynooghe proposed to base the abstraction operation on characteristic paths and trees. A characteristic tree captures the relevant structure of the generated partial SLDNF-tree for a given goal. Unfortunately the abstraction operations proposed in the earlier work do not always produce more general atoms and do not always preserve the characteristic trees. This problem has been solved for purely determinate unfolding rules and definite programs in [12, 13] by using constraints inside the partial deduction process.

In this paper we propose an alternate solution which achieves the preservation of characteristic trees for any unfolding rule, normal logic programs (it can even handle some built-in's if so desired) and without adding constraints to the partial deduction process (making the re-use of existing unfolding techniques very simple). We thus provide a powerful, generally applicable and elegant abstraction operation for partial deduction providing a fine-grained and terminating control of polyvariance.


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 1.
    K. Benkerimi and P. M. Hill. Supporting transformations for the partial evaluation of logic programs. Journal of Logic and Computation, 3(5):469–486, October 1993.Google Scholar
  2. 2.
    K. Benkerimi and J. W. Lloyd. A partial evaluation procedure for logic programs. In S. Debray and M. Hermenegildo, editors, Proceedings of the North American Conference on Logic Programming, pages 343–358. MIT Press, 1990.Google Scholar
  3. 3.
    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.Google Scholar
  4. 4.
    J. Gallagher. A system for specialising logic programs. Technical Report TR-91-32, University of Bristol, November 1991.Google Scholar
  5. 5.
    J. Gallagher. Tutorial on specialisation of logic programs. In Proceedings of PEPM'93, the ACM Sigplan Symposium on Partial Evaluation and Semantics-Based Program Manipulation, pages 88–98. ACM Press, 1993.Google Scholar
  6. 6.
    J. Gallagher and M. Bruynooghe. Some low-level transformations for logic programs. In M. Bruynooghe, editor, Proceedings of Meta90 Workshop on Meta Programming in Logic, pages 229–244, Leuven, Belgium, 1990.Google Scholar
  7. 7.
    J. Gallagher and M. Bruynooghe. The derivation of an algorithm for program specialisation. New Generation Computing, 9(3 & 4):305–333, 1991.Google Scholar
  8. 8.
    J. Komorowski. An introduction to partial deduction. In A. Pettorossi, editor, Proceedings Meta'92, pages 49–69. Springer-Verlag, LNCS 649, 1992.Google Scholar
  9. 9.
    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.Google Scholar
  10. 10.
    J.-L. Lassez, M. Maher, and K. Marriott. Unification revisited. In J. Minker, editor, Foundations of Deductive Databases and Logic Programming, pages 587–625. Morgan-Kaufmann, 1988.Google Scholar
  11. 11.
    M. Leuschel. Partial evaluation of the “real thing”. In L. Fribourg and F. Turini, editors, Logic Program Synthesis and Transformation — Meta-Programming in Logic. Proceedings of LOPSTR'94 and META '94, Lecture Notes in Computer Science 883, pages 122–137, Pisa, Italy, June 1994. Springer-Verlag.Google Scholar
  12. 12.
    M. Leuschel and D. De Schreye. An almost perfect abstraction operator for partial deduction. Technical Report CW 199, Departement Computerwetenschappen, K.U. Leuven, Belgium, December 1994.Google Scholar
  13. 13.
    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 Scholar
  14. 14.
    M. Leuschel and B. Martens. Global control for partial deduction through characteristic atoms and global trees. Technical Report CW 220, Departement Computerwetenschappen, K.U. Leuven, Belgium, December 1995. Submitted for Publication. Accessible via Scholar
  15. 15.
    M. Leuschel and B. Martens. Partial deduction of the ground representation and its application to integrity checking. In J. Lloyd, editor, Proceedings of ILPS'95, the International Logic Programming Symposium, pages 495–509, Portland, USA, December 1995. MIT Press. Extended version as Technical Report CW 210, K.U. Leuven. Accessible via Scholar
  16. 16.
    J. Lloyd. Foundations of Logic Programming. Springer Verlag, 1987.Google Scholar
  17. 17.
    J. W. Lloyd and J. C. Shepherdson. Partial evaluation in logic programming. The Journal of Logic Programming, 11:217–242, 1991.Google Scholar
  18. 18.
    B. Martens. On the Semantics of Meta-Programming and the Control of Partial Deduction in Logic Programming. PhD thesis, K.U. Leuven, February 1994.Google Scholar
  19. 19.
    B. Martens, D. De Schreye, and T. Horváth. Sound and complete partial deduction with unfolding based on well-founded measures. Theoretical Computer Science, 122(1–2):97–117, 1994.Google Scholar
  20. 20.
    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.Google Scholar
  21. 21.
    D. Meulemans. Partiële deductie: Een substantiële vergelijkende studie. Master's thesis, K.U. Leuven, 1995.Google Scholar
  22. 22.
    A. Pettorossi and M. Proietti. Transformation of logic programs: Foundations and techniques. The Journal of Logic Programming, 19 & 20:261–320, May 1994.Google Scholar
  23. 23.
    M. Proietti and A. Pettorossi. The loop absorption and the generalization strategies for the development of logic programs and partial deduction. The Journal of Logic Programming, 16(1 & 2):123–162, May 1993.Google Scholar
  24. 24.
    D. Sahlin. Mixtus: An automatic partial evaluator for full Prolog. New Generation Computing, 12(1):7–51, 1993.Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 1996

Authors and Affiliations

  • Michael Leuschel
    • 1
  1. 1.Department of Computer ScienceK.U. LeuvenHeverleeBelgium

Personalised recommendations