Skip to main content

Constraint-Based Partial Evaluation of Rewriting-Based Functional Logic Programs

  • Conference paper
  • First Online:
Logic Program Synthesis and Transformation (LOPSTR 1997)

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

Abstract

The aim of this work is to describe a procedure for the partial evaluation of functional logic programs in rewriting-based languages using constraint-based information propagation. The constraint-based partial evaluation algorithm incorporated with local and global control describes a KMP partial evaluator. Results from the implementation of the partial evaluator in the functional logic language Escher show that the algorithm is also able to perform intermediate list elimination. Renaming operations and termination and correctness properties are presented. Finally, extensions of the constraint-based procedure which may lead to greater specialisation are discussed.

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

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 39.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. M. Alpuente, M. Falschi, P. Julián, and G. Vidal. Specialization of Lazy Functional Logic Programs. In Partial Evaluation and Semantics-Based. Program Manipulation, Amsterdam, The Netherlands, June 1997, pages 151–162. New York: ACM, 1997.

    Chapter  Google Scholar 

  2. M. Alpuente, M. Falaschi, and G. Vidal. Narrowing-driven Partial Evaluation of Functional Logic Programs. In H. R. Nielson, editor, Proc. of European Symp. on Programming Languages, ESOP’96, pages 45–61. Springer LNCS 1058, 1996.

    Google Scholar 

  3. P. Cousot and R. Cousot. Abstract interpretation: A unified lattice model for static analysis of programs by construction or approximation of fixpoints. In Proceedings of the 4th ACM Symposium on Principles of Programming Languages, Los Angeles, pages 238–252. 1977.

    Google Scholar 

  4. W.-N. Chin and S.-C. Khoo. Better Consumers for Program Specializations. Journal of Functional and Logic Programming, (4), 1996.

    Google Scholar 

  5. Y. Futamura and K. Nogi. Generalized partial computation. In A.P. Ershov D. Bjørner and N.D. Jones, editors, Partial Evaluation and Mixed Computation, page 133. North Holland, 1988.

    Google Scholar 

  6. T. Frühwirth. Constraint Handling Rules. In A. Podelski, editor, Constraint Programming: Basics and Trends, volume 910 of Lecture Notes in Computer Science, pages 90–107. Springer, 1994.

    Google Scholar 

  7. R. Glück, J. Jørgensen, B. Martens, and M. H. Sørensen. Controlling conjunctive partial deduction. In H. Kuchen and D. S. Swierstra, editors, Programming Languages: Implementations, Logics and Programs, Lecture Notes in Computer Science, pages 137–151. Springer-Verlag, 1996.

    Google Scholar 

  8. R. Glück and A. V. Klimov. Occam’s razor in metacomputation: the notion of a perfect process tree. In G. Filé P. Cousot, M. Falaschi and A. Rauzy, editors, Static Analysis. Proceedings, volume 724 of Lecture Notes in Computer Science, pages 112–123. Springer-Verlag, 1993.

    Google Scholar 

  9. R. Glück and M. H. Sørensen. Partial deduction and driving are equivalent. In M. Hermenegildo and J. Penjam, editors, Programming Language Implementation and Logic Programming, volume 844 of Lecture Notes in Computer Science, pages 165–181. Springer-Verlag, 1994.

    Google Scholar 

  10. R. Glück and M.H. Sørensen. A Roadmap to Metacomputation by Supercompilation. In O. Danvy, R. Glück, and P. Thiemann, editors, Partial Evaluation, volume 1110 of LNCS, Dagstuhl Castle, Germany, 1996. Springer.

    Google Scholar 

  11. M. Hanus. A unified computation model for functional and logic programming. In Proc. 24st ACM Symposium on Principles of Programming. Languages (POPL’97), pages 80–93, 1997.

    Google Scholar 

  12. N. D. Jones, C. Gomard, and P. Sestoft. Partial Evaluation and Automatic Program Generation. Prentice Hall International, International Series in Computer Science, June 1993. Series editor C. A. R. Hoare.

    Google Scholar 

  13. M. Leuschel. Extending Homeomorphic Embedding in the Contex of Logic Programming. Technical Report CW 252, Department of Computer Science, Katholieke Universiteit Leuven, June 1997 1997.

    Google Scholar 

  14. J.W. Lloyd. Declarative Programming in Escher. Technical Report CSTR-95-013, Department of Computer Science, University of Bristol, June 1995.

    Google Scholar 

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

    Article  MATH  MathSciNet  Google Scholar 

  16. M. Leuschel and D. De Schreye. An Almost Perfect Abstraction Operation for Partial Deduction Using Characteristic Trees. Technical Report CW 215, Departement Computerwetenschappen, K.U. Leuven, Belgium, October 1995. Accepted for Publication in New Generation Computing.

    Google Scholar 

  17. M. Leuschel and D. De Schreye. Constrained Partial Deduction and the Preservation of Characteristic Trees. Technical report, Department of Computer Science, Katholieke Universiteit Leuven, June 1997. Accepted for publication in New Generation Computing.

    Google Scholar 

  18. M. Leuschel, D. De Schreye, and A. de Waal. A Conceptual Embedding of Folding into Partial Deduction; Towards a Maximal Integration. In M. Maher, editor, Proceedings of the Joint International Conference and Symposium on Logic Programming JICSLP’96, pages 319–332, Bonn, Germany, September 1996. MIT Press.

    Google Scholar 

  19. S.D. Marlow. Deforestation for Higher-Order Functional Languages. PhD thesis, University of Glasgow, 1996.

    Google Scholar 

  20. B. Martens and J. Gallagher. Ensuring global termination of partial deduction while allowing flexible polyvariance. In L. Stirling, editor, International Conference on Logic Programming, pages 597–613. MIT Press, 1995.

    Google Scholar 

  21. M.H. Sørensen and R. Glück. An algorithm of generalization in positive supercompilation. In J. W. Lloyd, editor, Logic Programming: Proceedings of the 1995 International Symposium, pages 465–479. MIT Press, 1995.

    Google Scholar 

  22. M.H. Sørensen, R. Glück, and N. D. Jones. Towards unifying partial evaluation, deforestation, supercompilation, and GPC. In ESOP. Springer-Verlag, 1994.s

    Google Scholar 

  23. M.H. Sørensen, R. Glück, and N.D. Jones. A Positive Supercompiler. Journal of Functional Programming, 6(6):811–838, 1996.

    Article  MATH  Google Scholar 

  24. M.H. Sørensen. Convergence of Program Transformers in the Metric Space of Trees With a Reflection on the Set of Reals. Unpublished manuscript.

    Google Scholar 

  25. V. F. Turchin, R.M. Nirenberg, and D. V. Turchin. Experiments with a supercompiler. In Conference Record of the 1982 ACM Symposium on Lisp and Functional Programming, pages 47–55. ACM, ACM, August 1982.

    Google Scholar 

  26. V.F. Turchin. The concept of a supercompiler. ACM Transactions on Programming Languages and Systems, 8(3):292–325, July 1986.

    Article  MATH  MathSciNet  Google Scholar 

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

    Article  MATH  MathSciNet  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 1998 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Lafave, L., Gallagher, J.P. (1998). Constraint-Based Partial Evaluation of Rewriting-Based Functional Logic Programs. In: Fuchs, N.E. (eds) Logic Program Synthesis and Transformation. LOPSTR 1997. Lecture Notes in Computer Science, vol 1463. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-49674-2_9

Download citation

  • DOI: https://doi.org/10.1007/3-540-49674-2_9

  • Published:

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-65074-4

  • Online ISBN: 978-3-540-49674-8

  • eBook Packages: Springer Book Archive

Publish with us

Policies and ethics