Skip to main content

Sonic Partial Deduction

  • Conference paper
  • First Online:
Book cover Perspectives of System Informatics (PSI 1999)

Part of the book series: Lecture Notes in Computer Science ((LNCS,volume 1755))

Abstract

The current state of the art for ensuring finite unfolding of logic programs consists of a number of online techniques where unfolding decisions are made at specialisation time. Introduction of a static termination analysis phase into a partial deduction algorithm permits unfolding decisions to be made offline, before the actual specialisation phase itself. This separation improves specialisation time and facilitates the automatic construction of compilers and compiler generators. The main contribution of this paper is how this separation may be achieved in the context of logic programming, while providing non-trivial support for partially static datastructures.

The paper establishes a solid link between the fields of static termination analysis and partial deduction enabling existing termination analyses to be used to ensure finiteness of the unfolding process. This is the first offline technique which allows arbitrarily partially instantiated goals to be sufficiently unfolded to achieve good specialisation results. Furthermore, it is demonstrated that an offline technique such as this one can be implemented very efficiently and, surprisingly, yield even better specialisation than a (pure) online technique. It is also, to our knowledge, the first offline approach which passes the KMP test (i.e., obtaining an efficient Knuth-Morris-Pratt pattern matcher by specialising a naive one).

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 84.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 109.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. M. Bruynooghe, D. De Schreye, and B. Martens. A general criterion for avoiding infinite unfolding during partial deduction of logic programs. In Proceedings of ILPS’91, pages 117–131. MIT Press, 1991.

    Google Scholar 

  2. 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.

    Article  MATH  Google Scholar 

  3. M. Bruynooghe, M. Leuschel, and K. Sagonas. A polyvariant binding-time analysis for off-line partial deduction. In C. Hankin, editor, Proceedings of ESOP’98, LNCS 1381, pages 27–41. Springer-Verlag, April 1998.

    Google Scholar 

  4. D. De Schreye and S. Decorte. Termination of logic programs: The never-ending story. The Journal of Logic Programming, 19 & 20:199–260, May 1994.

    Google Scholar 

  5. D. De Schreye, R. Glück, J. Jørgensen, M. Leuschel, B. Martens, and M. H. Sørensen. Conjunctive partial deduction: Foundations, control, algorithms and experiments. The Journal of Logic Programming, 41(2 & 3):231–277, 1999.

    Article  MATH  Google Scholar 

  6. N. Dershowitz. Termination of rewriting. Journal of Symbolic Computation, 3:69–116, 1987.

    Article  MATH  MathSciNet  Google Scholar 

  7. N. Dershowitz and Z. Manna. Proving termination with multiset orderings. Communications of the ACM, 22(8):465–476, 1979.

    Article  MATH  MathSciNet  Google Scholar 

  8. A. Ershov. On Futamura projections. BIT (Japan), 12(14):4–5, 1982. In Japanese.

    Google Scholar 

  9. J. Gallagher. Tutorial on specialisation of logic programs. In Proceedings of PEPM’93, pages 88–98. ACM Press, 1993.

    Google Scholar 

  10. 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. Swierstra, editors, Proceedings of PLILP’96, LNCS 1140, pages 152–166, Aachen, Germany, September 1996. Springer-Verlag.

    Google Scholar 

  11. C. A. Gurr. A Self-Applicable Partial Evaluator for the Logic Programming Language Gödel. PhD thesis, Dept. of Computer Science, University of Bristol, 1994.

    Google Scholar 

  12. J. Jørgensen and M. Leuschel. Efficiently generating efficient generating extensions in Prolog. In O. Danvy, R. Glück, and P. Thiemann, editors, Proceedings of the Dagstuhl Seminar on Partial Evaluation, LNCS 1110, pages 238–262, 1996.

    Google Scholar 

  13. M. Leuschel. The ECCE partial deduction system and the DPPD library of benchmarks. Obtainable via http://www.cs.kuleuven.ac.be/~dtai, 1996.

  14. M. Leuschel. Advanced Techniques for Logic Program Specialisation. PhD thesis, K.U. Leuven, May 1997. Accessible via http://www.ecs.soton.ac.uk/~mal.

  15. M. Leuschel. Improving homeomorphic embedding for online termination. In P. Flener, editor, Proceedings of LOPSTR’98, LNCS 1559, pages 199–218, Manchester, UK, June 1998. Springer-Verlag.

    Google Scholar 

  16. M. Leuschel. On the power of homeomorphic embedding for online termination. In G. Levi, editor, Proceedings of SAS’98, LNCS 1503, pages 230–245, Pisa, Italy, September 1998. Springer-Verlag.

    Google Scholar 

  17. M. Leuschel, D. De Schreye, and A. de Waal. A conceptual embedding of folding into partial deduction: Towards a maximal integration. In M. Maher, editor, Proceedings of JICSLP’96, pages 319–332, Bonn, Germany, September 1996. MIT Press.

    Google Scholar 

  18. M. Leuschel, B. Martens, and D. De Schreye. Controlling generalisation and polyvariance in partial deduction of normal logic programs. ACM Transactions on Programming Languages and Systems, 20(1):208–258, January 1998.

    Article  Google Scholar 

  19. J. W. Lloyd. Foundations of Logic Programming. Springer-Verlag, 1987.

    Google Scholar 

  20. J. W. Lloyd and J. C. Shepherdson. Partial evaluation in logic programming. The Journal of Logic Programming, 11(3& 4):217–242, 1991.

    Article  MathSciNet  MATH  Google Scholar 

  21. B. Martens and D. De Schreye. Automatic finite unfolding using well-founded measures. Journal of Logic Programming, 28(2):89–146, 1996.

    Article  MATH  MathSciNet  Google Scholar 

  22. B. Martens, D. De Schreye, and T. Horváth. Sound and complete partial deduction with unfolding based on well-founded measures. Theoretical Comput. Sci., 122(12):97–117, 1994.

    Article  MATH  Google Scholar 

  23. J. Martin and A. King. Generating Efficient, Terminating Logic Programs. In TAPSOFT’97. Springer-Verlag, 1997.

    Google Scholar 

  24. J. Martin and M. Leuschel. Sonic partial deduction. Technical Report DSSETR-99-3, Dept. of Electronics and Computer Science, University of Southampton, February 1999.

    Google Scholar 

  25. T. Mogensen and A. Bondorf. Logimix: A self-applicable partial evaluator for Prolog. In K.-K. Lau and T. Clement, editors, Proceedings of LOPSTR’92, pages 214–227. Springer-Verlag, 1992.

    Google Scholar 

  26. S. A. Romanenko. A compiler generator produced by a self-applicable specializer can have a surprisingly natural and understandable structure. In D. Bjørner, A. P. Ershov, and N. D. Jones, editors, Partial Evaluation and Mixed Computation, pages 445–463. North-Holland, 1988.

    Google Scholar 

  27. M. H. Sørensen and R. Glück. An algorithm of generalization in positive supercompilation. In J. W. Lloyd, editor, Proceedings of ILPS’95, pages 465–479, Portland, USA, December 1995. MIT Press.

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2000 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Martin, J., Leuschel, M. (2000). Sonic Partial Deduction. In: Bjøner, D., Broy, M., Zamulin, A.V. (eds) Perspectives of System Informatics. PSI 1999. Lecture Notes in Computer Science, vol 1755. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-46562-6_9

Download citation

  • DOI: https://doi.org/10.1007/3-540-46562-6_9

  • Published:

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-67102-2

  • Online ISBN: 978-3-540-46562-1

  • eBook Packages: Springer Book Archive

Publish with us

Policies and ethics