Abstract
Partial deduction within Lloyd and Shepherdson's frame-work transforms different atoms of a goal independently and therefore fails to achieve a number of unfold/fold transformations. A recent framework for conjunctive partial deduction allows unfold/fold transformations by specialisation of entire conjunctions, but does not give an actual algorithm for conjunctive partial deduction, and in particular does not address control issues (e.g. how to select atoms for unfolding). Focusing on novel challenges specific to local and global control, we describe a generic algorithm for conjunctive partial deduction, refine it into a fully automatic concrete algorithm, and prove termination and correctness.
This is a preview of subscription content, log in via an institution.
Preview
Unable to display preview. Download preview PDF.
References
M. Alpuente, M. Falaschi, G. Vidal. Narrowing-driven partial evaluation of functional logic programs. ESOP'96. LNCS 1058, 45–61, Springer-Verlag, 1996.
R. Bol. Loop checking in partial deduction. Journal of Logic Programming, 16(1&2):25–46, 1993.
A. Bossi, N. Cocco, S. Dulli. A method for specializing logic programs. ACM Transactions on Programming Languages and Systems, 12(2):253–302, 1990.
M. Bruynooghe, D. De Schreye, B. Martens. A general criterion for avoiding infinite unfolding during partial deduction. New Generation Computing, 11(1):47–79, 1992.
R.M. Burstall, J. Darlington. A transformation system for developing recursive programs. Journal of the ACM, 24(1):44–67, 1977.
W.-N. Chin. Towards an automated tupling strategy. In Symposium on Partial Evaluation and Semantics-Based Program Manipulation. 119–132. ACM Press, 1993.
O. Danvy, R. Glück, P. Thiemann (eds.). Partial Evaluation, LNCS 1110, Springer-Verlag, 1996.
D. De Schreye, M. Leuschel, B. Martens. Program specialisation for logic programs. Tutorial presented at [23].
N. Dershowitz, J.-P. Jouannaud. Rewrite systems. In J. van Leeuwen (ed.), Handbook of Theoretical Computer Science, 244–320, Elsevier, 1992.
J. Gallagher. Tutorial on specialisation of logic programs. In Symposium on Partial Evaluation and Semantics-Based Program Manipulation, 88–98. ACM Press, 1993.
R. Glück, J. Jørgensen, B. Martens, and M. Sørensen. Controlling conjunctive partial deduction of definite logic programs. Technical Report CW 226, Departement Computerwetenschappen, K.U. Leuven, Belgium, February 1996.
R. Glück, A.V. Klimov. Occam's razor in metacomputation: The notion of a perfect process tree. In P. Cousot, et al. (eds.), Static Analysis. LNCS 724, 112–123, Springer-Verlag, 1993.
R. Glück, M.H. Sørensen. Partial deduction and driving are equivalent. In M. Hermenegildo and J. Penjam (eds.), Programming Language Implementation and Logic Programming. LNCS 844, 165–181, Springer-Verlag, 1994.
R. Glück, M.H. Sørensen. A roadmap to metacomputation by supercompilation. In [7].
N.D. Jones, C.K. Gomard, P. Sestoft. Partial Evaluation and Automatic Program Generation. Prentice Hall, 1993.
J. Jørgensen, M. Leuschel, B. Martens. Conjunctive partial deduction in practice. Logic Program Synthesis and Transformation 1996. To appear.
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 Symposium on Principles of Programming Languages, 255–167. ACM Press, 1982.
J.B. Kruskal. Well-quasi-ordering, the tree theorem, and Vazsonyi's conjecture. Transactions of the American Mathematical Society, 95:210–225, 1960.
M. Leuschel, D. De Schreye, A. de Waal. A conceptual embedding of folding into partial deduction: Towards a maximal integration, JICSLP'96, 1996. To appear.
M. Leuschel, B. Martens. Global control for partial deduction through characteristic atoms and global trees. In [7].
M. Leuschel, M.H. Sørensen. Redundant argument filtering of logic programs, 1996. Logic Program Synthesis and Transformation 1996. To appear.
J.W. Lloyd. Foundations of Logic Programming. Springer-Verlag, 1987.
J.W. Lloyd (ed.). Logic Programming: Proceedings of the 1995 International Symposium. MIT Press, 1995.
J.W. Lloyd, J.C. Shepherdson. Partial evaluation in logic programming. Journal of Logic Programming, 11(3–4):217–242, 1991.
B. Martens, D. De Schreye. Automatic finite unfolding using well-founded measures. Journal of Logic Programming, 1996. 28(2):89–146, 1996.
B. Martens, J. Gallagher. Ensuring global termination of partial deduction while allowing flexible polyvariance. In L. Sterling (ed.), International Conference on Logic Programming. 597–611, MIT Press, 1995.
A. Pettorossi, M. Proietti. Transformation of logic programs: Foundations and techniques. Journal of Logic Programming, 19 & 20:261–320, 1994.
M. Proietti, A. Pettorossi. Unfolding — definition — folding, in this order for avoiding unnecessary variables in logic programs. In Programming Language Implementation and Logic Programming. LNCS 528, 347–358, Springer-Verlag, 1991.
M. Proietti, A. Pettorossi. The loop absorption and the generalization strategies for the development of logic programs and partial deduction. Journal of Logic Programming, 16:123–161, 1993.
M.H. Sørensen, R. Glück. An algorithm of generalization in positive supercompilation. In [23], 465–479.
H. Tamaki, T. Sato. Unfold/fold transformation of logic programs. In S-Å. Tärnlund (ed.), International Conference on Logic Programming. 127–138, 1984.
V.F. Turchin. The concept of a supercompiler. ACM Transactions on Programming Languages and Systems, 8(3):292–325, 1986.
V.F. Turchin. The algorithm of generalization in the supercompiler. In D. Bjørner, A.P. Ershov, N.D. Jones (eds.), Partial Evaluation and Mixed Computation. 531–549. North-Holland, 1988.
P. Wadler. Deforestation: Transforming programs to eliminate intermediate trees. Theoretical Computer Science, 73:231–248, 1990.
Author information
Authors and Affiliations
Editor information
Rights and permissions
Copyright information
© 1996 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Glück, R., Jørgensen, J., Martens, B., Sørensen, M.H. (1996). Controlling conjunctive partial deduction. In: Kuchen, H., Doaitse Swierstra, S. (eds) Programming Languages: Implementations, Logics, and Programs. PLILP 1996. Lecture Notes in Computer Science, vol 1140. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-61756-6_83
Download citation
DOI: https://doi.org/10.1007/3-540-61756-6_83
Published:
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-61756-3
Online ISBN: 978-3-540-70654-0
eBook Packages: Springer Book Archive