A technique for transforming logic programs by fold-unfold transformations

  • Francis Alexandre
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 631)


This paper deals with the logic program transformation using the fold-unfold technique. The major problem in the strategies using fold-unfold transformation is to find a sequence of unfolding that permits the folding. In this paper we propose a technique that solves this problem for a particular class of logic programs. This technique consists in studying the possibility of folding for some simple or basic programs and then to apply these results for some more general logic programs. This technique permits to compute the sequence of unfolding to achieve a folding or to detect the impossibility of a folding, in the latter case the technique permits the invention of new predicates.

Key words

program transformation definite program fold-unfold schema 


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 1.
    K.R. Apt and M.H Van Emden. Contribution to the Theory of Logic Programming. Journal of the Association for Computing Machinery, 29(3):841–862, 1982.Google Scholar
  2. 2.
    R.S. Boyer and J.S. Moore. A Computational Logic. Academic Press, New York, 1979.Google Scholar
  3. 3.
    M. Bruynooghe, L. De Raedt, and D. De Schreye. Explanation Based Program Transformation. In Proc. IJCAI Boston USA, 1989.Google Scholar
  4. 4.
    M. Bruynooghe, D. De Schreye, and B. Krekels. Compiling control. Journal of Logic Programming, 6(2 & 3):135–162, January 1989.Google Scholar
  5. 5.
    R.M Burstall and J.A Darlington. Transformation System for Developing Recursive Programs. Journal of the Association for Computing Machinery, 24(1):44–67, 1977.Google Scholar
  6. 6.
    J. Darlington. An Experimental Program Transformation and Synthesis System. Artificial Intelligence, 16:1–46, 1981.Google Scholar
  7. 7.
    S.K. Debray. Unfold/Fold Transformations and Loop Optimization of Logic Programs. In Proc. of the Sigplan'88 Conference on Programming Language Design and Implementation, pages 297–307, Atlanta, Georgia, June 1988.Google Scholar
  8. 8.
    M.S. Feather. A Survey and Classification of some Program Transformation Techniques. In Proc. TC2 IFIP Working Conference on Program Specification and Transformation, Bad-Tölz, F.R.G, 1986.Google Scholar
  9. 9.
    J.W. Lloyd. Foundations of Logic Programming. Springer-Verlag, 1987.Google Scholar
  10. 10.
    A. Pettorossi and M. Proietti. The Automatic Construction of Logic Programs. In IFIP WG2.1 Meeting, January 1989. Preliminary Version.Google Scholar
  11. 11.
    A. Pettorossi and M. Proietti. Decidability Results and Characterization of Strategies for the Development of Logic Programs. In G. Levi and M. Martelli, editors, 6th International Conference on Logic Programming, Lisbon (Portugal), 1989. MIT Press.Google Scholar
  12. 12.
    M. Proietti and A Pettorossi. The Synthesis of Eureka Predicates for Developing Logic Program. In N. Jones, editor, 3rd European Symposium on Programming, volume 432 of Lecture Notes in Computer Science, pages 306–325, Copenhaguen, 1990. Springer-Verlag.Google Scholar
  13. 13.
    H. Tamaki and T. Sato. Unfold/Fold Transformation of Logic Programs. In Proceedings of the 2nd International Logic Programming Conference, Uppsala, 1984.Google Scholar
  14. 14.
    B. Wegbreit. Goal-Directed Program Transformation. IEEE Transactions on Software Engineering, SE-2(2):69–80, 1976.Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 1992

Authors and Affiliations

  • Francis Alexandre
    • 1
  1. 1.Centre de recherches en informatique de Nancy-CNRS-INRIA LorraineVand∄uvre lès Nancy CedexFrance

Personalised recommendations