Skip to main content

Unfold/fold transformations for definite clause programs

  • Conference paper
  • First Online:
Programming Language Implementation and Logic Programming (PLILP 1994)

Part of the book series: Lecture Notes in Computer Science ((LNCS,volume 844))

Abstract

An unfold/fold program transformation system which extends the unfold/fold transformations of H. Tamaki and T. Sato is presented in this paper. The system consists of unfolding, simultaneous folding, and generalization + equality introduction rules. The simultaneous folding rule permits the folding of a set of folded clauses into a single clause, using a set of folding clauses, while the generalization + equality introduction rule facilitates the application of the simultaneous folding rule by performing appropriate abstractions. A proof of the correctness of the proposed transformations in the sense of the least Herbrand model semantics of the program is also presented.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. A. Bossi, N. Cocco, and S. Dulli. A method for specializing logic programs. ACM Transactions on Programming Languages and Systems, 12(2):253–302, 1990.

    Google Scholar 

  2. R. Burstall and J. Darlington. A transformation system for developing recursive programs. J.ACM, 24(1):44–67, Jan. 1977.

    Google Scholar 

  3. S. K. Debray. Unfold/fold transformations and loop optimization of logic programs. In SIGPLAN' 88 Conference on Programming Language Design and Implementation, pages 297–307, June 1988.

    Google Scholar 

  4. M. Gergatsoulis and M. Katzouraki. Unfold/fold transformations for definite clause programs. Technical report 250/3/42, Institute of Informatics & Telecom. NCSR’ Demokritos', Febr. 1994.

    Google Scholar 

  5. T. Kawamura and T. Kanamori. Preservation of stronger equivalence in unfold/fold logic program transformations. Theoretical Computer Science, 75:139–156, 1990.

    Google Scholar 

  6. J. W. Lloyd. Foundations of Logic Programming. Springer-Verlag, 1987.

    Google Scholar 

  7. J. W. Lloyd and J. C. Shepherdson. Partial evaluation in logic programming. J. Logic Programming, 11(3 & 4):217–242, Oct./Nov. 1991.

    Google Scholar 

  8. M. Proietti and A. Pettorossi. Synthesis of eureka predicates for developing logic programs. In LNCS no. 432, Proc. of the 3rd European Symposium on Programming, pages 306–325. Springer-Verlag, 1990.

    Google Scholar 

  9. M. Proietti and A. Pettorossi. Unfolding-definition-folding, in this order for avoiding unnecessary variables in logic programs. In J. Maluszinski and M. Wirsing, editors, LNCS no. 528, Proc. PLILP' 91, pages 347–358. Springer-Verlag, 1991.

    Google Scholar 

  10. M. Proietti and A. Pettorossi. The loop absorption and the generalization strategies for the development of logic programs and partial deduction. The. Journal of Logic Programming, 16(1 & 2):123–162, May 1993.

    Google Scholar 

  11. T. Sato. An equivalence preserving first order unfold/fold transformation system. In Lecture Notes in Computer Science (LNCS), 463, pages 175–188. Springer Verlag, 1990.

    Google Scholar 

  12. T. Sato and H. Tamaki. Transformational logic program synthesis. In International Conference of Fifth Generation Computer Systems, pages 195–201, 1984.

    Google Scholar 

  13. H. Tamaki and T. Sato. Unfold/fold transformations of logic programs. In Second International Conference on Logic Programming, pages 127–138, 1984.

    Google Scholar 

  14. H. Tamaki and T. Sato. A generalized correctness proof of the unfold/fold logic program transformation. Technical Report No 86-4, Dept. of Information Science Ibaraki University, Japan, 1986.

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Manuel Hermenegildo Jaan Penjam

Rights and permissions

Reprints and permissions

Copyright information

© 1994 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Gergatsoulis, M., Katzouraki, M. (1994). Unfold/fold transformations for definite clause programs. In: Hermenegildo, M., Penjam, J. (eds) Programming Language Implementation and Logic Programming. PLILP 1994. Lecture Notes in Computer Science, vol 844. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-58402-1_24

Download citation

  • DOI: https://doi.org/10.1007/3-540-58402-1_24

  • Published:

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-58402-5

  • Online ISBN: 978-3-540-48695-4

  • eBook Packages: Springer Book Archive

Publish with us

Policies and ethics