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.
Keywords
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.
This is a preview of subscription content, log in via an institution.
Buying options
Tax calculation will be finalised at checkout
Purchases are for personal use only
Learn about institutional subscriptionsPreview
Unable to display preview. Download preview PDF.
References
Apt, K.R.: Introduction to logic programming. In: van Leeuwen, J. (ed.) Handbook of Theoretical Computer Science, pp. 493–576. Elsevier, Amsterdam (1990)
Bezem, M.: Characterizing termination of logic programs with level mappings. In: Proc. of NACLP, Cleveland, Ohio (USA), pp. 69–80. MIT Press, Cambridge (1989)
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)
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)
Burstall, R.M., Darlington, J.: A transformation system for developing recursive programs. Journal of the ACM 24(1), 44–67 (1977)
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)
Etalle, S., Gabbrielli, M.: Transformations of CLP modules. Theoretical Computer Science 166, 101–146 (1996)
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)
Kanamori, T., Fujita, H.: Unfold/fold transformation of logic programs with counters. Technical Report 179, ICOT, Tokyo, Japan (1986)
Kott, L.: About transformation system: A theoretical study. In: 3ème Colloque International sur la Programmation, Paris (France), Dunod, pp. 232–247 (1978)
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)
Lloyd, J.W.: Foundations of Logic Programming, 2nd edn. Springer, Heidelberg (1987)
McCarthy, J.: Towards a mathematical science of computation. In: Proceedings of IFIP 1962, Amsterdam, pp. 21–28. North Holland (1963)
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)
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)
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)
Sands, D.: Total correctness by local improvement in the transformation of functional programs. ACM Toplas 18(2), 175–234 (1996)
Sato, T., Tamaki, H.: Examples of logic program transformation and synthesis, 1985 (unpublished manuscript)
Seki, H.: Unfold/fold transformation of stratified programs. Theoretical Computer Science 86, 107–139 (1991)
Tamaki, H., Sato, T.: Unfold/fold transformation of logic programs. In: Proceedings of ICLP 1984, Uppsala, Sweden, pp. 127–138. Uppsala University (1984)
Tamaki, H., Sato, T.: A generalized correctness proof of the unfold/fold logic program transformation. Technical Report 86-4, Ibaraki University, Japan (1986)
Author information
Authors and Affiliations
Editor information
Rights 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)