Abstract
Partial deduction and driving are two methods used for program specialization in logic and functional languages, respectively. We argue that both techniques achieve essentially the same transformational effect by unification-based information propagation. We show their equivalence by analyzing the definition and construction principles underlying partial deduction and driving, and by giving a translation from a functional language to a definite logic language preserving certain properties. We discuss residual program generation, termination issues, and related other techniques developed for program specialization in logic and functional languages.
Supported by an Erwin-Schrödinger Fellowship of the Austrian Science Foundation (FWF) under grant J0780 and J0964.
Preview
Unable to display preview. Download preview PDF.
References
S. M. Abramov. Metacomputation and Logic Programming. In Programmirovanie. 1991 (3): 31–44 (in Russian).
W.-N. Chin. Safe Fusion of Functional Expressions II: Further Improvements. In Journal of Functional Programming. 1994 (to appear).
J. Gallagher. Tutorial on Specialisation of Logic Programs. In Symposium on Partial Evaluation and Semantics-Based Program Manipulation. (Copenhagen, Denmark). 88–98, ACM Press 1993.
R. Glück & V. F. Turchin. Application of Metasystem Transition to Function Inversion and Transformation. In Proceedings of the ISSAC '90 (Tokyo, Japan). 286–287, ACM Press 1990.
R. Glück & And. Klimov. Occam's Razor in Metacomputation: the Notion of a Perfect Process Tree. In P. Cousot et al. (Eds.), Static Analysis, Proceedings. Lecture Notes in Computer Science, Vol. 724, 112–123, Springer-Verlag 1993.
R. Glück, And. Klimov. Metacomputation as a Tool for Formal Linguistic Modeling. In R. Trappl (ed.), Cybernetics and Systems '94. Vol. 2, 1563–1570, World Scientific: Singapore 1994.
C. K. Holst. Partial Evaluation is Fuller Laziness. In Symposium on Partial Evaluation and Semantics-Based Program Manipulation. (New Haven, Connecticut). Sigplan Notices vol. 26, No. 9, September 1991, 223–233, ACM Press 1991.
N. D. Jones. Automatic Program Specialization: a Re-Examination from Basic Principles. In D. Bjørner, A. P. Ershov, & N. D. Jones (eds.), Partial Evaluation and Mixed Computation. 225–282, North-Holland 1988.
N. D. Jones, C. Gomard & P. Sestoft. Partial Evaluation and Automatic Program Generation. Prentice Hall International. 1993
N. D. Jones. The Essence of Program Transformation by Partial Evaluation and Driving. In N. D. Jones and M. Hagiya and M. Sato (eds.), Logic, Language and Computation. Lecture Notes in Computer Science, Vol. 792, 206–224, Springer-Verlag 1994.
J. Komorowski. A Specification of an Abstract Prolog Machine and its Application to Partial Evaluation. Linkøping University. Dissertation, 1981.
J. Komorowski. An Introduction to Partial Deduction. In A. Pettorossi (ed.), Meta-Programming in Logic. Proceedings. (Uppsala, Sweden). Lecture Notes in Computer Science, Vol. 649, 49–69, Springer-Verlag 1992.
J. W. Lloyd. Foundations of Logic Programming. Second, extended edition. Springer-Verlag, 1987.
J. W. Lloyd & J. C. Shepherdson. Partial Evaluation in Logic Programming. In Journal of Logic Programming. 11(3–4): 217–242, 1991.
M. Proietti & A. Pettorossi. The Loop Absorption and the Generalization Strategies for the Development of Logic Programs and Partial Deduction. In Journal of Logic Programming. 16(1&2): 123–161, 1993.
A. Y. Romanenko. Inversion and Metacomputation. In Symposium on Partial Evaluation and Semantics-Based Program Manipulation. (New Haven, Connecticut). 12–22, ACM Press 1991.
M. H. Sørensen. A New Means of Ensuring Termination of Deforestation with an Application to Logic Programming. In Workshop of the Global Compilation Workshop in conjunction with the International Logic Programming Symposium. Vancouver, Canada, October, 1993.
M. H. Sørensen. A Grammar-Based Data-Flow Analysis to stop Deforestation. In S. Tison (ed.), Trees in Algebra and Programming — CAAP '94. Proceedings. (Edinburgh, Scotland). Lecture Notes in Computer Science, Vol. 787, 335–351, Springer-Verlag 1994.
M. H. Sørensen. Turchin's Supercompiler Revisited. An Operational Theory of Positive Information Propagation. Master's Thesis, Department of Computer Science, University of Copenhagen, 1994, Technical report 94/7.
M. H. Sørensen, R. Glück & N. D. Jones. Towards Unifying Partial Evaluation, Deforestation, Supercompilation, and GPC. In D. Sannella (ed.), Programming Languages and Systems — ESOP '94. Proceedings. (Edinburgh, Scotland). Lecture Notes in Computer Science, Vol. 788, 485–500, Springer-Verlag 1994.
V. F. Turchin. Equivalent Transformations of Recursive Functions Defined in Refal. In Teorija Jazykov i Metody Programmirovanija (Proceedings of the Symposium on the Theory of Languages and Programming Methods). (Kiev-Alushta, USSR). 31–42, 1972 (in Russian).
V. F. Turchin. The Language Refal, the Theory of Compilation and Metasystem Analysis. Courant Computer Science Report No. 20, New York University 1980.
V. F. Turchin. The Use of Metasystem Transition in Theorem Proving and Program Optimizattion. In J. W. de Bakker & J. van Leeuwen (Eds.), Automata, Languages and Programming (Noordwijkerhout, Netherlands). Lecture Notes in Computer Science, Vol. 85, 645–657, Springer-Verlag 1980.
V. F. Turchin, R. Nirenberg & D. Turchin. Experiments with a Supercompiler. In Conference Record of the ACM Symposium on Lisp and Functional Programming. 47–55, ACM Press 1982.
V. F. Turchin. The Concept of a Supercompiler. In ACM TOPLAS. 8(3), 292–325, 1986.
P. Wadler. Deforestation: Transforming Programs to Eliminate Trees. In Theoretical Computer Science. 73: 231–248, 1990.
Author information
Authors and Affiliations
Editor information
Rights and permissions
Copyright information
© 1994 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Glück, R., Sørensen, M.H. (1994). Partial deduction and driving are equivalent. 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_13
Download citation
DOI: https://doi.org/10.1007/3-540-58402-1_13
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