Formal validation of transformation schemata
We present a first-order theory Г, which is used to validate transformation schemata. The theory Г consists of two kinds of axioms. Δ is the subset of the axioms Г which can be executed using a SLD-reso-lution like inference system, and Г-Δ contains first-order programs, as defined by T. Sato [Sat90], and induction axioms. Induction is essential if we want to prove correctness of more elaborate transformation schemata, e.g., a scheme which makes a program tail-recursive.
We show how to prove the correctness of transformation schemata using an ordinary proof system for intuitionistic first-order logic. Let ϑ be a transformation scheme which is proved correct. If we apply the scheme ϑ to a (first-order) program, the resulting program computes the same set of solutions as the original one.
We exemplify the method by proving the correctness of unfold/fold transformation, and of a scheme, which replaces recursion by tail-recursion.
KeywordsLogic Program Inference Rule Logic Programming Function Symbol Proof System
Unable to display preview. Download preview PDF.
- [Bro87]Brough, D.R. and Hogger, CJ. Compiling Associativity into Logic Programs. Tech. Rept. 87/2, Imperial College, London, 1987.Google Scholar
- [Cla78]Clark, K.L. Negation as failure. In Logic and data bases. Plenum Press, Gallaire, H. and Minker, J., pp. 293-322, New York, 1978.Google Scholar
- [Fut86]Futamura, Y. Recursion Reduction: A Technique for Designing Efficient Recursive Programs. 1986, Lecture Notes, Uppsala.Google Scholar
- [Geg89]Gegg-Harrison, T.S. Basic Prolog Schemata. Tech. Rept. CS-1989-20, Dept of Computer Science, Duke University, Durham, North Carolina, 1989.Google Scholar
- [Llo87]Lloyd, J.W. Foundations of logic programming, Springer-Verlag, 2(1987).Google Scholar
- [Mah87]Mäher, M.J. Correctness of a Logic Program Transformation System. Tech. Rept., IBM T.J. Watson Research Center, 1987.Google Scholar
- [Mar71]Martin-Löf, P. Hauptsatz for the intuitionistic theory of iterated inductive definitions. In Proceedings of the Second Scandinavian Logic Symposium, Fenstad, J.E., North-Holland, 1971.Google Scholar
- [McC88]McCarty, L.T. Clausal intuitionistic logic. JLP 5, 1 (1988).Google Scholar
- [Mil89]Miller, D. A logical analysis of modules in logic programming. JLP (1989), 79-108.Google Scholar
- [O90]O’Keefe, R. The craft of Prolog, MIT press (1990).Google Scholar
- [Sat90]Sato, T. A First Order Unfold/Fold System. Tech. Rept. 90-17, Electrotechnical Laboratory, Umezono, Tsukuba, Ibaraki, Japan 305, 1990.Google Scholar
- [Sek89]Seki, H. Unfold/Fold Transformation of Stratified Programs. In 6th ICLP, 1989, pp. 554-568.Google Scholar
- [Tam84]Tamaki, H. and Sato, T. Unfold/Fold transformations of logic programs. In Proceedings of the 2nd ICLP, 1984.Google Scholar
- [Wal91]Waldau, M., Verification of logic programs using verification sentences, Computing Science Dept, Uppsala University, Sweden, 1991.Google Scholar