Advertisement

Global control for partial deduction through characteristic atoms and global trees

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

Abstract

Recently, considerable advances have been made in the (online) control of logic program specialisation. A clear conceptual distinction has been established between local and global control and on both levels concrete strategies as well as general frameworks have been proposed. For global control in particular, recent work has developed concrete techniques based on the preservation of characteristic trees (limited, however, by a given, arbitrary depth bound) to obtain a very precise control of polyvariance. On the other hand, the concept of an m-tree has been introduced as a refined way to trace “relationships” of partially deduced atoms, thus serving as the basis for a general framework within which global termination of partial deduction can be ensured in a non ad hoc way.

Blending both, formerly separate, contributions, in this paper, we present an elegant and sophisticated technique to globally control partial deduction of normal logic programs. Leaving unspecified the specific local control one may wish to plug in, we develop a concrete global control strategy combining the use of characteristic atoms and trees with global (m-)trees. We thus obtain partial deduction that always terminates in an elegant, non ad hoc way, while providing excellent specialisation as well as fine-grained (but reasonable) polyvariance.

We conjecture that a similar approach may contribute to improve upon current (on-line) control strategies for functional program transformation methods such as (positive) supercompilation.

Keywords

Logic Program Characteristic Tree Logic Programming Partial Evaluation Characteristic Atom 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. 1.
    K. Benkerimi and J. W. Lloyd. A partial evaluation procedure for logic programs. In S. Debray and M. Hermenegildo, editors, Proceedings NACLP'90, pages 343–358, Austin, Texas, October 1990. MIT Press.Google Scholar
  2. 2.
    R. Bol. Loop checking in partial deduction. Journal of Logic Programming, 16(1&2):25–46, 1993.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.
    C. Consel and O. Danvy. Tutorial notes on partial evaluation. In Proceedings POPL'93, Charleston, South Carolina, January 1993. ACM.Google Scholar
  5. 5.
    D. De Schreye, M. Leuschel, and B. Martens. Tutorial on program specialisation (abstract). In J.W. Lloyd, editor, Proceedings ILPS'95, pages 615–616, Portland, Oregon, December 1995. MIT Press.Google Scholar
  6. 6.
    N. Dershowitz and J.-P. Jouannaud. Rewrite systems. In J. van Leeuwen, editor, Handbook of Theoretical Computer Science, Vol. B, pages 243–320. Elsevier, MIT Press, 1990.Google Scholar
  7. 7.
    J. Gallagher. A system for specialising logic programs. Technical Report TR-91-32, Computer Science Department, University of Bristol, U.K., November 1991.Google Scholar
  8. 8.
    J. Gallagher. Specialisation of logic programs: A tutorial. In Proceedings PEPM'93, ACM SIGPLAN Symposium on Partial Evaluation and Semantics-Based Program Manipulation, pages 88–98, Copenhagen, June 1993. ACM Press.Google Scholar
  9. 9.
    J. Gallagher and M. Bruynooghe. Some low-level source transformations for logic programs. In M. Bruynooghe, editor, Proceedings Meta'90, pages 229–244, Leuven, April 1990.Google Scholar
  10. 10.
    J. Gallagher and M. Bruynooghe. The derivation of an algorithm for program specialisation. New Generation Computing, 9(3&4):305–333, 1991.Google Scholar
  11. 11.
    J. Gallagher and D. A. de Waal. Deletion of redundant unary type predicates from logic programs. In K.-K. Lau and T. Clement, editors, Proceedings LOPSTR'92, pages 151–167. Springer-Verlag, Workshops in Computing Series, 1993.Google Scholar
  12. 12.
    J. P. Gallagher and L. Lafave. Regular approximations of computation paths in logic and functional languages. In this volume.Google Scholar
  13. 13.
    P. M. Hill and J. Gallagher. Meta-programming in logic programming. Technical Report 94.22, School of Computer Studies, University of Leeds, U.K., August 1994. To appear in Volume V of the Handbook of Logic in Artificial Intelligence and Logic Programming, Oxford University Press.Google Scholar
  14. 14.
    N. D. Jones, C. K. Gomard, and P. Sestoft. Partial Evaluation and Automatic Program Generation. Prentice Hall, 1993.Google Scholar
  15. 15.
    J. Jørgensen and M. Leuschel. Efficiently generating efficient generating extensions in Prolog. In this volume.Google Scholar
  16. 16.
    J. Komorowski. An introduction to partial deduction. In A. Pettorossi, editor, Proceedings Meta'92, pages 49–69. Springer-Verlag, LNCS 649, 1992.Google Scholar
  17. 17.
    M. Leuschel. Partial evaluation of the “real thing”. In L. Fribourg and F. Turini, editors, Proceedings LOPSTR'94 and META'94 pages 122–137. Springer-Verlag, LNCS 883, 1995.Google Scholar
  18. 18.
    M. Leuschel. Ecological partial deduction: Preserving characteristic trees without constraints. In M. Proietti, editor, Proceedings of LOPSTR'95, pages 1–16. Springer-Verlag, LNCS 1048, 1996.Google Scholar
  19. 19.
    M. Leuschel and D. De Schreye. An almost perfect abstraction operation for partial deduction using characteristic trees. Technical Report CW215, Departement Computerwetenschappen, K.U.Leuven, Belgium, October 1995. Submitted for Publication. Accessible via http://www.cs.kuleuven.ac.be/lpai.Google Scholar
  20. 20.
    M. Leuschel and D. De Schreye. Towards creating specialised integrity checks through partial evaluation of meta-interpreters. In Proceedings of PEPM'95, the ACM Sigplan Symposium on Partial Evaluation and Semantics-Based Program Manipulation, pages 253–263, La Jolla, California, June 1995. ACM Press.Google Scholar
  21. 21.
    M. Leuschel and B. Martens. Global control for partial deduction through characteristic atoms and global trees. Technical Report CW220, Departement Computerwetenschappen, K.U.Leuven, Belgium, December 1995. Accessible via http://www.cs.kuleuven.ac.be/lpai.Google Scholar
  22. 22.
    J. W. Lloyd. Foundations of Logic Programming. Springer-Verlag, 1987.Google Scholar
  23. 23.
    J. W. Lloyd and J. C. Shepherdson. Partial evaluation in logic programming. Journal of Logic Programming, 11(3&4):217–242, 1991.Google Scholar
  24. 24.
    B. Martens and D. De Schreye. Automatic finite unfolding using well-founded measures. Journal of Logic Programming, 1996. To Appear, abridged and revised version of Technical Report CW180, Departement Computerwetenschappen, K.U.Leuven, October 1993, accessible via http://www.cs.kuleuven.ac.be/lpai.Google Scholar
  25. 25.
    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
  26. 26.
    B. Martens and J. Gallagher. Ensuring global termination of partial deduction while allowing flexible polyvariance. Technical Report CSTR-94-16, Computer Science Department, University of Bristol, U.K., December 1994. Accessible via http://www.cs.kuleuven.ac.be/lpai.Google Scholar
  27. 27.
    B. Martens and J. Gallagher. Ensuring global termination of partial deduction while allowing flexible polyvariance. In L. Sterling, editor, Proceedings ICLP'95, pages 597–611, Shonan Village Center, Kanagawa, Japan, June 1995. MIT Press.Google Scholar
  28. 28.
    T. Mogensen and A. Bondorf. Logimix: A self-applicable partial evaluator for Prolog. In K.-K. Lau and T. Clement, editors, Proceedings LOPSTR'92, pages 214–227. Springer-Verlag, Workshops in Computing Series, 1993.Google Scholar
  29. 29.
    A. Pettorossi and M. Proietti. Transformation of logic programs: Foundations and techniques. Journal of Logic Programming, 19/20:261–320, 1994.Google Scholar
  30. 30.
    D. Sahlin. Mixtus: An automatic partial evaluator for full Prolog. New Generation Computing, 12(1):7–51, 1993.Google Scholar
  31. 31.
    M. H. Sørensen and R. Glück. An algorithm of generalization in positive supercompilation. In J.W. Lloyd, editor, Proceedings ILPS'95, pages 465–479, Portland, Oregon, December 1995. MIT Press.Google Scholar
  32. 32.
    V. F. Turchin. The concept of a supercompiler. ACM Transactions on Programming Languages and Systems, 8(3):292–325, 1986.Google Scholar
  33. 33.
    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.Google Scholar
  34. 34.
    D. Weise, R. Conybeare, E. Ruf, and S. Seligman. Automatic online partial evaluation. In J. Hughes, editor, Proceedings of the 3rd ACM Conference on Functional Programming Languages and Computer Architecture, pages 165–191, Cambridge, Massachusets, USA, August 1991. Springer-Verlag, LNCS 523.Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 1996

Authors and Affiliations

  • Michael Leuschel
    • 1
  • Bern Martens
    • 1
  1. 1.Department of Computer ScienceKatholieke Universiteit LeuvenHeverleeBelgium

Personalised recommendations