Program Derivation via List Introduction
We present a new program transformation strategy based on the introduction of lists. This strategy overcomes some of the limitations of the tupling strategy, and in particular, it allows us to derive linear recursive programs when the tupling strategy is not successful. The linear recursive programs one may derive using this new strategy, have in most cases very good time and space performance. We present our list introduction strategy in the case of definite logic programs, but it can also be applied in the case of functional programs thereby improving some transformation techniques proposed by Cohen (1983) and by Chin and Hagiya (1995).
KeywordsProgram transformation logic programming unfolding/folding transformation rules tupling strategy generalization strategy list introduction strategy
- Bird, R.S. and Meertens, L.G.L.T. (1987) Two Exercises Found in a Book on Algorithmics. In L.G.L.T. Meertens, editor, TC2/WG 2.1 Working Conference on Program Specification and Transformation, Bad Tölz, Germany, 451–457. North-Holland.Google Scholar
- Chin, W.-N. (1993) Towards an automated tupling strategy. In Proceedings of ACM SIGPLAN Symposium on Partial Evaluation and Semantics Based Program Manipulation, PEPM ’93, Copenhagen, Denmark, 119–132. ACM Press.Google Scholar
- Pettorossi, A. (1977) Transformation of programs and use of tupling strategy. In Proceedings Informatica 77, Bled, Yugoslavia, 1–6.Google Scholar
- Tamaki, H. and Sato, T. (1984) Unfold/fold transformation of logic programs. In S.-A. Tärnlund, editor, Proceedings of the Second International Conference on Logic Programming, Uppsala, Sweden, 127–138. Uppsala University.Google Scholar
- Tarau, P. and Boyer, M. (1990) Elementary logic programs. In P. Deransart and J. Maluszynski, editors, Proceedings PLILP ’90, 159–173. Springer-Verlag.Google Scholar