Skip to main content

Fully Automatic Binding-Time Analysis for Prolog

  • Conference paper
Logic Based Program Synthesis and Transformation (LOPSTR 2004)

Part of the book series: Lecture Notes in Computer Science ((LNTCS,volume 3573))

Abstract

Offline partial evaluation techniques rely on an annotated version of the source program to control the specialisation process. These annotations guide the specialisation and ensure the termination of the partial evaluation. We present an algorithm for generating these annotations automatically. The algorithm uses state-of-the-art termination analysis techniques, combined with a new type-based abstract interpretation for propagating the binding types. This algorithm has been implemented as part of the logen partial evaluation system, along with a graphical annotation visualiser and editor, and we report on the performance of the algorithm for a series of benchmarks.

Work supported in part by European Framework 5 Project ASAP (IST-2001-38059).

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 39.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 54.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. Benoy, F., King, A., Mesnard, F.: Computing Convex Hulls with a Linear Solver. Theory and Practice of Logic Programming (January 2004)

    Google Scholar 

  2. Boulanger, D., Bruynooghe, M.: A systematic construction of abstract domains. In: LeCharlier, B. (ed.) SAS 1994. LNCS, vol. 864, pp. 61–77. Springer, Heidelberg (1994)

    Google Scholar 

  3. Boulanger, D., Bruynooghe, M., Denecker, M.: Abstracting s-semantics using a model-theoretic approach. In: Penjam, J. (ed.) PLILP 1994. LNCS, vol. 844, pp. 432–446. Springer, Heidelberg (1994)

    Google Scholar 

  4. Bruynooghe, M., Janssens, G.: An instance of abstract interpretation integrating type and mode inferencing. In: Kowalski, R., Bowen, K. (eds.) Proceedings of ICLP/SLP, pp. 669–683. MIT Press, Cambridge (1988)

    Google Scholar 

  5. Bruynooghe, M., Leuschel, M., Sagonas, K.: A polyvariant binding-time analysis for off-line partial deduction. In: Hankin, C. (ed.) ESOP 1998. LNCS, vol. 1381, pp. 27–41. Springer, Heidelberg (1998)

    Chapter  Google Scholar 

  6. Codish, M., Demoen, B.: Analysing logic programs using “Prop”-ositional logic programs and a magic wand. In: Miller, D. (ed.) Proceedings of the 1993 International Symposium on Logic Programming, Vancouver. MIT Press, Cambridge (1993)

    Google Scholar 

  7. Codish, M., Demoen, B.: Deriving type dependencies for logic programs using multiple incarnations of Prop. In: LeCharlier, B. (ed.) SAS 1994. LNCS, vol. 864. Springer, Heidelberg (1994)

    Google Scholar 

  8. Codish, M., Lagoon, V.: Type dependencies for logic programs using ACI-unification. Theoretical Computer Science 238(1-2), 131–159 (2000)

    Article  MATH  MathSciNet  Google Scholar 

  9. Codish, M., Taboch, C.: A semantic basic for the termination analysis of logic programs. The Journal of Logic Programming 41(1), 103–123 (1999)

    Article  MATH  MathSciNet  Google Scholar 

  10. Comon, H., Dauchet, M., Gilleron, R., Jacquemard, F., Lugiez, D., Tison, S., Tommasi, M.: Tree Automata Techniques and Applications (1999), http://www.grappa.univ-lille3.fr/tata

  11. Decorte, S., De Schreye, D., Leuschel, M., Martens, B., Sagonas, K.: Termination analysis for tabled logic programming. In: Fuchs, N.E. (ed.) LOPSTR 1997. LNCS, vol. 1463, pp. 111–127. Springer, Heidelberg (1998)

    Chapter  Google Scholar 

  12. Gallagher, J., Boulanger, D., Sağlam, H.: Practical model-based static analysis for definite logic programs. In: Lloyd, J.W. (ed.) Proc. of International Logic Programming Symposium, pp. 351–365 (1995)

    Google Scholar 

  13. Gallagher, J.P., Henriksen, K.: Abstract domains based on regular types. In: Lifschitz, V., Demoen, B. (eds.) ICLP 2004. LNCS, vol. 3132, pp. 27–42. Springer, Heidelberg (2004)

    Chapter  Google Scholar 

  14. Genaim, S., Codish, M.: Inferring termination conditions of logic programs by backwards analysis. In: Nieuwenhuis, R., Voronkov, A. (eds.) LPAR 2001. LNCS (LNAI), vol. 2250, pp. 681–690. Springer, Heidelberg (2001)

    Chapter  Google Scholar 

  15. Hill, P., Gallagher, J.: Meta-programming in logic programming. In: Gabbay, D.M., Hogger, C.J., Robinson, J.A. (eds.) Handbook of Logic in Artificial Intelligence and Logic Programming, vol. 5, pp. 421–497. Oxford Science Publications, Oxford University Press, Oxford (1998)

    Google Scholar 

  16. Horiuchi, K., Kanamori, T.: Polymorphic type inference in prolog by abstract interpretation. In: Furukawa, K., Fujisaki, T., Tanaka, H. (eds.) Logic Programming 1987. LNCS, vol. 315, pp. 195–214. Springer, Heidelberg (1988)

    Google Scholar 

  17. Lagoon, V., Mesnard, F., Stuckey, P.J.: Termination analysis with types is more accurate. In: Palamidessi, C. (ed.) ICLP 2003. LNCS, vol. 2916, pp. 254–268. Springer, Heidelberg (2003)

    Chapter  Google Scholar 

  18. Leuschel, M.: The ecce partial deduction system and the dppd library of benchmarks (1996-2002). Obtainable via, http://www.ecs.soton.ac.uk/~mal

  19. Leuschel, M., Craig, S.-J., Bruynooghe, M., Vanhoof, W.: Specializing interpreters using offline partial deduction. In: Bruynooghe, M., Lau, K.-K. (eds.) Program Development in Computational Logic. LNCS, vol. 3049, pp. 341–376. Springer, Heidelberg (2004)

    Chapter  Google Scholar 

  20. Leuschel, M., Jørgensen, J., Vanhoof, W., Bruynooghe, M.: Offline specialisation in Prolog using a hand-written compiler generator. Theory and Practice of Logic Programming 4(1), 139–191 (2004)

    Article  MATH  Google Scholar 

  21. Martens, B., De Schreye, D.: Two semantics for definite meta-programs, using the non-ground representation. In: Apt, K.R., Turini, F. (eds.) Meta-logics and Logic Programming, pp. 57–82. MIT Press, Cambridge (1995)

    Google Scholar 

  22. Martens, B., Gallagher, J.: Ensuring global termination of partial deduction while allowing flexible polyvariance. In: Sterling, L. (ed.) Proceedings ICLP1995, Kanagawa, Japan, June 1995, pp. 597–613. MIT Press, Cambridge (1995)

    Google Scholar 

  23. Mogensen, T., Bondorf, A.: Logimix: A self-applicable partial evaluator for Prolog. In: Lau, K.-K., Clement, T. (eds.) Logic Program Synthesis and Transformation. Proceedings of LOPSTR1992, pp. 214–227. Springer, Heidelberg (1992)

    Google Scholar 

  24. Vanhoof, W.: Binding-time analysis by constraint solving: a modular and higher-order approach for Mercury. In: Parigot, M., Voronkov, A. (eds.) LPAR 2000. LNCS (LNAI), vol. 1955, pp. 399–416. Springer, Heidelberg (2000)

    Chapter  Google Scholar 

  25. Vanhoof, W., Bruynooghe, M.: Binding-time analysis for Mercury. In: De Schreye, D. (ed.) Proceedings of the International Conference on Logic Programming ICLP1999, pp. 500–514. MIT Press, Cambridge (1999)

    Google Scholar 

  26. Vanhoof, W., Bruynooghe, M.: Binding-time annotations without binding-time analysis. In: Nieuwenhuis, R., Voronkov, A. (eds.) LPAR 2001. LNCS (LNAI), vol. 2250, pp. 707–722. Springer, Heidelberg (2001)

    Chapter  Google Scholar 

  27. Vanhoof, W., Bruynooghe, M.: When size does matter. In: Pettorossi, A. (ed.) LOPSTR 2001. LNCS, vol. 2372, pp. 129–147. Springer, Heidelberg (2002)

    Chapter  Google Scholar 

  28. Vanhoof, W., Bruynooghe, M., Leuschel, M.: Binding-time analysis for mercury. In: Bruynooghe, M., Lau, K.-K. (eds.) Program Development in Computational Logic. LNCS, vol. 3049, pp. 189–232. Springer, Heidelberg (2004)

    Chapter  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2005 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Craig, SJ., Gallagher, J.P., Leuschel, M., Henriksen, K.S. (2005). Fully Automatic Binding-Time Analysis for Prolog. In: Etalle, S. (eds) Logic Based Program Synthesis and Transformation. LOPSTR 2004. Lecture Notes in Computer Science, vol 3573. Springer, Berlin, Heidelberg. https://doi.org/10.1007/11506676_4

Download citation

  • DOI: https://doi.org/10.1007/11506676_4

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-26655-6

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

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics