Abstract
The unfold/fold transformation system defined by Tamaki and Sato was meant for definite programs. It transforms a program into an equivalent one in the sense of both the least Herbrand model semantics and the Computed Answer Substitution semantics. Seki extended the method to normal programs and specialized it in order to preserve also the finite failure set. The resulting system is correct wrt nearly all the declarative semantics for normal programs. An exception is Fitting's model semantics. In this paper we consider a slight variation of Seki's method and we study its correctness wrt Fitting's semantics. We define an applicability condition for the fold operation and we show that it ensures the preservation of the considered semantics through the transformation.
This work has been partially supported by ”Progetto Finalizzato Sistemi Informatici e Calcolo Parallelo” of CNR under grant n. 89.00026.69
Preview
Unable to display preview. Download preview PDF.
Similar content being viewed by others
References
K. R. Apt. Introduction to Logic Programming. In J. van Leeuwen, editor, Handbook of Theoretical Computer Science, volume B: Formal Models and Semantics. Elsevier, Amsterdam and The MIT Press, Cambridge, 1990.
L. Aiello, G. Attardi, and G. Prini. Towards a more declarative programming style. In E. J. Neuhold, editor, Proceedings of the IFIP Conference on Formal Description of Programming Concepts, pages 121–137. North-Holland, 1978.
C. Aravidan and P. M. Dung. Partial deduction of logic programs w.r.t. well-founded semantics. In H. Kirchner G. Levi, editor, Proceedings of the Third International Conference on Algebraic and Logic Programming, pages 384–402. Springer-Verlag, 1992.
C. Aravidan and P. M. Dung. On the correctness of Unfold/Fold transformation of normal and extended logic programs. Technical report, Division of Computer Science, Asian Institute of Technology, Bangkok, Thailand, April 1993.
A. Bossi and N. Cocco. Basic Transformation Operations which preserve Computed Answer Substitutions of Logic Programs. Journal of Logic Programming, 16(1/2):47–87, 1993.
A. Bossi, N. Cocco, and S. Etalle. Transforming Normal Programs by Replacement. In A. Pettorossi, editor, Meta Programming in Logic — Proceedings META '92, volume 649 of Lecture Notes in Computer Science, pages 265–279. Springer-Verlag, Berlin, 1992.
A. Bossi, N. Cocco, and S. Etalle. Simultaneous replacement in normal programs. Technical Report CS-R9357, CWI, Centre for Mathematics and Computer Science, Amsterdam, The Netherlands, August 1993. Available via anonymous ftp at ftp.cwi.nl, or via xmosaic at http://www.cwi.nl/cwi/publications/index.html.
R.M. Burstall and J. Darlington. A transformation system for developing recursive programs. Journal of the ACM, 24(1):44–67, January 1977.
K. L. Clark. Negation as failure rule. In H. Gallaire and G. Minker, editors, Logic and Data Bases, pages 293–322. Plenum Press, 1978.
K.L. Clark and S. Sickel. Predicate logic: a calculus for deriving programs. In Proceedings of IJCAI'77, pages 419–120, 1977.
M. Fitting. A Kripke-Kleene semantics for Logic Programs. Journal of Logic Programming, 2(4):295–312, 1985.
P.A. Gardner and J.C. Shepherdson. Unfold/fold transformations of logic programs. In J-L Lassez and editor G. Plotkin, editors, Computational Logic: Essays in Honor of Alan Robinson. 1991.
C.J. Hogger. Derivation of logic programs. Journal of the ACM, 28(2):372–392, April 1981.
T. Kawamura and T. Kanamori. Preservation of Stronger Equivalence in Unfold/Fold Logic Programming Transformation. Theoretical Computer Science, 75(1/2):139–156, 1990.
S.C. Kleene. Introduction to Metamathematics. D. van Nostrand, Princeton, New Jersey, 1952.
H.J. Komorowski. Partial evaluation as a means for inferencing data structures in an applicative language: A theory and implementation in the case of Prolog. In Ninth ACM Symposium on Principles of Programming Languages, Albuquerque, New Mexico, pages 255–267, 1982.
J. W. Lloyd. Foundations of Logic Programming. Springer-Verlag, Berlin, 1987. Second edition.
J. W. Lloyd and J. C. Shepherdson. Partial Evaluation in Logic Programming. Journal of Logic Programming, 11:217–242, 1991.
M.J. Maher. Correctness of a logic program transformation system. IBM Research Report RC13496, T.J. Watson Research Center, 1987.
M. Proietti and A. Pettorossi. Unfolding, definition, folding, in this order for avoiding unnecessary variables in logic programs. In Maluszynski and M. Wirsing, editors, PLILP 91, Passau, Germany (Lecture Notes in Computer Science, Vol.528), pages 347–358. Springer-Verlag, 1991.
T. Sato. Equivalence-preserving first-order unfold/fold transformation system. Theoretical Computer Science, 105(1):57–84, 1992.
H. Seki. Unfold/fold transformation of stratified programs. In G. Levi and M. Martelli, editors, 6th International Conference on Logic Programming, pages 554–568. The MIT Press, 1989.
H. Seki. A comparative study of the Well-Founded and Stable model semantics: Transformation's viewpoint. In D. Pedreschi W. Marek, A. Nerode and V.S. Subrahmanian, editors, Workshop on Logic Programming and Non-Monotonic Logic, Austin, Texas, October 1990, pages 115–123, 1990.
H. Seki. Unfold/fold transformation of stratified programs. Theoretical Computer Science, 86(1):107–139, 1991.
H. Seki. Unfold/fold transformation of general logic programs for the Well-Founded semantics. Journal of Logic Programming, 16(1/2):5–23, 1993.
H. Tamaki and T. Sato. Unfold/Fold Transformations of Logic Programs. In Stenåke TÄrnlund, editor, Proc. Second Int'l Conf. on Logic Programming, pages 127–139, 1984.
Author information
Authors and Affiliations
Editor information
Rights and permissions
Copyright information
© 1994 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Bossi, A., Etalle, S. (1994). More on unfold/fold transformations of normal programs: Preservation of fitting's semantics. In: Fribourg, L., Turini, F. (eds) Logic Program Synthesis and Transformation — Meta-Programming in Logic. META LOPSTR 1994 1994. Lecture Notes in Computer Science, vol 883. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-58792-6_20
Download citation
DOI: https://doi.org/10.1007/3-540-58792-6_20
Published:
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-58792-7
Online ISBN: 978-3-540-49104-0
eBook Packages: Springer Book Archive