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.
Preview
Unable to display preview. Download preview PDF.
Similar content being viewed by others
References
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.
R. Burstall and J. Darlington. A transformation system for developing recursive programs. J.ACM, 24(1):44–67, Jan. 1977.
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.
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.
T. Kawamura and T. Kanamori. Preservation of stronger equivalence in unfold/fold logic program transformations. Theoretical Computer Science, 75:139–156, 1990.
J. W. Lloyd. Foundations of Logic Programming. Springer-Verlag, 1987.
J. W. Lloyd and J. C. Shepherdson. Partial evaluation in logic programming. J. Logic Programming, 11(3 & 4):217–242, Oct./Nov. 1991.
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.
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.
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.
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.
T. Sato and H. Tamaki. Transformational logic program synthesis. In International Conference of Fifth Generation Computer Systems, pages 195–201, 1984.
H. Tamaki and T. Sato. Unfold/fold transformations of logic programs. In Second International Conference on Logic Programming, pages 127–138, 1984.
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.
Author information
Authors and Affiliations
Editor information
Rights 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