Skip to main content

Fast Offline Partial Evaluation of Large Logic Programs

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

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

Abstract

In this paper, we present a fast binding-time analysis (BTA) by integrating a size-change analysis, which is independent of a selection rule, into a classical BTA for offline partial evaluation of logic programs. In contrast to previous approaches, the new BTA is conceptually simpler and considerably faster, scaling to medium-sized or even large examples and, moreover, it ensures both the so called local and global termination. We also show that through the use of selective hints, we can achieve both good specialisation results and a fast BTA and specialisation process.

This work has been partially supported by the EU (FEDER) and the Spanish MEC/MICINN under grants TIN2005-09207-C03-02, TIN2008-06622-C03-02, and DAAD PPP D/06/12830 together with Acción Integrada HA2006-0008.

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. Albert, E., Puebla, G., Gallagher, J.: Non-Leftmost Unfolding in Partial Deduction of Logic Programs with Impure Predicates. In: Hill, P.M. (ed.) LOPSTR 2005. LNCS, vol. 3901, pp. 115–132. Springer, Heidelberg (2006)

    Chapter  Google Scholar 

  2. Apt, K.R.: Introduction to logic programming. In: van Leeuwen, J. (ed.) Handbook of Theoretical Computer Science, ch. 10, pp. 495–574. North-Holland, Amsterdam (1990)

    Google Scholar 

  3. Codish, M., Taboch, C.: A Semantic Basis for the Termination Analysis of Logic Programs. Journal of Logic Programming 41(1), 103–123 (1999)

    Article  MathSciNet  MATH  Google Scholar 

  4. Craig, S.-J., Gallagher, J., Leuschel, M., Henriksen, K.S.: Fully Automatic Binding Time Analysis for Prolog. In: Etalle, S. (ed.) LOPSTR 2004. LNCS, vol. 3573, pp. 53–68. Springer, Heidelberg (2005)

    Chapter  Google Scholar 

  5. Craig, S.-J.: Practicable Prolog Specialisation. PhD thesis, University of Southampton, U.K. (June 2005)

    Google Scholar 

  6. Gómez-Zamalloa, M., Albert, E., Puebla, G.: Improving the decompilation of java bytecode to prolog by partial evaluation. Electr. Notes Theor. Comput. Sci. 190(1), 85–101 (2007)

    Article  Google Scholar 

  7. Henriksen, K.S., Gallagher, J.P.: Abstract interpretation of pic programs through logic programming. In: SCAM, pp. 184–196. IEEE Computer Society, Los Alamitos (2006)

    Google Scholar 

  8. Jones, N.D., Gomard, C.K., Sestoft, P.: Partial Evaluation and Automatic Program Generation. Prentice-Hall, Englewood Cliffs (1993)

    MATH  Google Scholar 

  9. Leuschel, M., Bruynooghe, M.: Logic Program Specialisation through Partial Deduction: Control Issues. Theory and Practice of Logic Programming 2(4-5), 461–515 (2002)

    Article  MathSciNet  MATH  Google Scholar 

  10. Leuschel, M., Craig, S.-J., Bruynooghe, M., Vanhoof, W.: Specialising Interpreters Using Offline Partial Deduction. In: Bruynooghe, M., Lau, K.-K. (eds.) Program Development in Computational Logic. LNCS, vol. 3049, pp. 340–375. Springer, Heidelberg (2004)

    Chapter  Google Scholar 

  11. 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-2), 139–191 (2004)

    Article  MATH  Google Scholar 

  12. Leuschel, M., Tamarit, S., Vidal, G.: Improving size-change analysis in offline partial evaluation. In: Arenas, P., Zanardini, D. (eds.) WLPE (2008)

    Google Scholar 

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

  14. Leuschel, M., Craig, S.-J., Elphick, D.: Supervising offline partial evaluation of logic programs using online techniques. In: Puebla, G. (ed.) LOPSTR 2006. LNCS, vol. 4407, pp. 43–59. Springer, Heidelberg (2007)

    Chapter  Google Scholar 

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

    Article  Google Scholar 

  16. Lindenstrauss, N., Sagiv, Y.: Automatic Termination Analysis of Logic Programs. In: Proc. ICLP 1997, pp. 63–77. MIT Press, Cambridge (1997)

    Google Scholar 

  17. Lloyd, J.W.: Foundations of Logic Programming. Springer, Heidelberg (1987)

    Book  MATH  Google Scholar 

  18. Vidal, G.: Quasi-Terminating Logic Programs for Ensuring the Termination of Partial Evaluation. In: Proc. PEPM 2007, pp. 51–60. ACM Press, New York (2007)

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2009 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Leuschel, M., Vidal, G. (2009). Fast Offline Partial Evaluation of Large Logic Programs. In: Hanus, M. (eds) Logic-Based Program Synthesis and Transformation. LOPSTR 2008. Lecture Notes in Computer Science, vol 5438. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-00515-2_9

Download citation

  • DOI: https://doi.org/10.1007/978-3-642-00515-2_9

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-642-00514-5

  • Online ISBN: 978-3-642-00515-2

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics