Skip to main content

Automatic Correctness Proofs for Logic Program Transformations

  • Conference paper
Logic Programming (ICLP 2007)

Part of the book series: Lecture Notes in Computer Science ((LNPSE,volume 4670))

Included in the following conference series:

Abstract

The many approaches which have been proposed in the literature for proving the correctness of unfold/fold program transformations, consist in associating suitable well-founded orderings with the proof trees of the atoms belonging to the least Herbrand models of the programs. In practice, these orderings are given by ‘clause measures’, that is, measures associated with the clauses of the programs to be transformed. In the unfold/fold transformation systems proposed so far, clause measures are fixed in advance, independently of the transformations to be proved correct. In this paper we propose a method for the automatic generation of the clause measures which, instead, takes into account the particular program transformation at hand. During the transformation process we construct a system of linear equations and inequations whose unknowns are the clause measures to be found, and the correctness of the transformation is guaranteed by the satisfiability of that system. Through some examples we show that our method is able to establish in a fully automatic way the correctness of program transformations which, by using other methods, are proved correct at the expense of fixing sophisticated clause measures.

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. Apt, K.R.: Introduction to logic programming. In: van Leeuwen, J. (ed.) Handbook of Theoretical Computer Science, pp. 493–576. Elsevier, Amsterdam (1990)

    Google Scholar 

  2. Bezem, M.: Characterizing termination of logic programs with level mappings. In: Proc. of NACLP, Cleveland, Ohio (USA), pp. 69–80. MIT Press, Cambridge (1989)

    Google Scholar 

  3. Bossi, A., Cocco, N.: Preserving universal termination through unfold/fold. In: Rodríguez-Artalejo, M., Levi, G. (eds.) ALP 1994. LNCS, vol. 850, pp. 269–286. Springer, Heidelberg (1994)

    Google Scholar 

  4. Bossi, A., Cocco, N., Etalle, S.: On safe folding. In: Bruynooghe, M., Wirsing, M. (eds.) PLILP 1992. LNCS, vol. 631, pp. 172–186. Springer, Heidelberg (1992)

    Chapter  Google Scholar 

  5. Burstall, R.M., Darlington, J.: A transformation system for developing recursive programs. Journal of the ACM 24(1), 44–67 (1977)

    Article  MATH  Google Scholar 

  6. Cook, J., Gallagher, J.P.: A transformation system for definite programs based on termination analysis. In: Fribourg, L., Turini, F. (eds.) LOPSTR 1994 and META 1994. LNCS, vol. 883, pp. 51–68. Springer, Heidelberg (1994)

    Google Scholar 

  7. Etalle, S., Gabbrielli, M.: Transformations of CLP modules. Theoretical Computer Science 166, 101–146 (1996)

    Article  MATH  Google Scholar 

  8. Gergatsoulis, M., Katzouraki, M.: Unfold/fold transformations for definite clause programs. In: Penjam, J. (ed.) PLILP 1994. LNCS, vol. 844, pp. 340–354. Springer, Heidelberg (1994)

    Google Scholar 

  9. Kanamori, T., Fujita, H.: Unfold/fold transformation of logic programs with counters. Technical Report 179, ICOT, Tokyo, Japan (1986)

    Google Scholar 

  10. Kott, L.: About transformation system: A theoretical study. In: 3ème Colloque International sur la Programmation, Paris (France), Dunod, pp. 232–247 (1978)

    Google Scholar 

  11. Lau, K.-K., Ornaghi, M., Pettorossi, A., Proietti, M.: Correctness of logic program transformation based on existential termination. In: Lloyd, J.W. (ed.) Proceedings of ILPS 1995, pp. 480–494. MIT Press, Cambridge (1995)

    Google Scholar 

  12. Lloyd, J.W.: Foundations of Logic Programming, 2nd edn. Springer, Heidelberg (1987)

    MATH  Google Scholar 

  13. McCarthy, J.: Towards a mathematical science of computation. In: Proceedings of IFIP 1962, Amsterdam, pp. 21–28. North Holland (1963)

    Google Scholar 

  14. Pettorossi, A., Proietti, M.: A theory of totally correct logic program transformations. In: Proceedings of PEPM 2004, pp. 159–168. ACM Press, New York (2004)

    Chapter  Google Scholar 

  15. Roychoudhury, A., Narayan Kumar, K., Ramakrishnan, C.R., Ramakrishnan, I.V.: Beyond Tamaki-Sato style unfold/fold transformations for normal logic programs. Int. Journal on Foundations of Computer Science 13(3), 387–403 (2002)

    Article  MATH  Google Scholar 

  16. Roychoudhury, A., Narayan Kumar, K., Ramakrishnan, C.R., Ramakrishnan, I.V.: An unfold/fold transformation framework for definite logic programs. ACM Transactions on Programming Languages and Systems 26, 264–509 (2004)

    Article  Google Scholar 

  17. Sands, D.: Total correctness by local improvement in the transformation of functional programs. ACM Toplas 18(2), 175–234 (1996)

    Article  Google Scholar 

  18. Sato, T., Tamaki, H.: Examples of logic program transformation and synthesis, 1985 (unpublished manuscript)

    Google Scholar 

  19. Seki, H.: Unfold/fold transformation of stratified programs. Theoretical Computer Science 86, 107–139 (1991)

    Article  MATH  Google Scholar 

  20. Tamaki, H., Sato, T.: Unfold/fold transformation of logic programs. In: Proceedings of ICLP 1984, Uppsala, Sweden, pp. 127–138. Uppsala University (1984)

    Google Scholar 

  21. Tamaki, H., Sato, T.: A generalized correctness proof of the unfold/fold logic program transformation. Technical Report 86-4, Ibaraki University, Japan (1986)

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Véronica Dahl Ilkka Niemelä

Rights and permissions

Reprints and permissions

Copyright information

© 2007 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Pettorossi, A., Proietti, M., Senni, V. (2007). Automatic Correctness Proofs for Logic Program Transformations. In: Dahl, V., Niemelä, I. (eds) Logic Programming. ICLP 2007. Lecture Notes in Computer Science, vol 4670. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-540-74610-2_25

Download citation

  • DOI: https://doi.org/10.1007/978-3-540-74610-2_25

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-74608-9

  • Online ISBN: 978-3-540-74610-2

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics