Skip to main content

Partial deduction and driving are equivalent

  • Conference paper
  • First Online:
Programming Language Implementation and Logic Programming (PLILP 1994)

Part of the book series: Lecture Notes in Computer Science ((LNCS,volume 844))

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.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. S. M. Abramov. Metacomputation and Logic Programming. In Programmirovanie. 1991 (3): 31–44 (in Russian).

    Google Scholar 

  2. W.-N. Chin. Safe Fusion of Functional Expressions II: Further Improvements. In Journal of Functional Programming. 1994 (to appear).

    Google Scholar 

  3. 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.

    Google Scholar 

  4. 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.

    Google Scholar 

  5. 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.

    Google Scholar 

  6. 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.

    Google Scholar 

  7. 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.

    Google Scholar 

  8. 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.

    Google Scholar 

  9. N. D. Jones, C. Gomard & P. Sestoft. Partial Evaluation and Automatic Program Generation. Prentice Hall International. 1993

    Google Scholar 

  10. 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.

    Google Scholar 

  11. J. Komorowski. A Specification of an Abstract Prolog Machine and its Application to Partial Evaluation. Linkøping University. Dissertation, 1981.

    Google Scholar 

  12. 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.

    Google Scholar 

  13. J. W. Lloyd. Foundations of Logic Programming. Second, extended edition. Springer-Verlag, 1987.

    Google Scholar 

  14. J. W. Lloyd & J. C. Shepherdson. Partial Evaluation in Logic Programming. In Journal of Logic Programming. 11(3–4): 217–242, 1991.

    Google Scholar 

  15. 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.

    Google Scholar 

  16. A. Y. Romanenko. Inversion and Metacomputation. In Symposium on Partial Evaluation and Semantics-Based Program Manipulation. (New Haven, Connecticut). 12–22, ACM Press 1991.

    Google Scholar 

  17. 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.

    Google Scholar 

  18. 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.

    Google Scholar 

  19. 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.

    Google Scholar 

  20. 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.

    Google Scholar 

  21. 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).

    Google Scholar 

  22. V. F. Turchin. The Language Refal, the Theory of Compilation and Metasystem Analysis. Courant Computer Science Report No. 20, New York University 1980.

    Google Scholar 

  23. 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.

    Google Scholar 

  24. 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.

    Google Scholar 

  25. V. F. Turchin. The Concept of a Supercompiler. In ACM TOPLAS. 8(3), 292–325, 1986.

    Google Scholar 

  26. P. Wadler. Deforestation: Transforming Programs to Eliminate Trees. In Theoretical Computer Science. 73: 231–248, 1990.

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Manuel Hermenegildo Jaan Penjam

Rights and permissions

Reprints 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

Publish with us

Policies and ethics