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.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
Similar content being viewed by others
References
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.
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.
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.
W.-N. Chin and S.-C. Khoo. Better Consumers for Program Specializations. Journal of Functional and Logic Programming, (4), 1996.
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.
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.
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.
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.
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.
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.
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.
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.
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.
J.W. Lloyd. Declarative Programming in Escher. Technical Report CSTR-95-013, Department of Computer Science, University of Bristol, June 1995.
J. W. Lloyd and J. C. Shepherdson. Partial Evaluation in Logic Programming. Journal of Logic Programming, 11(3&4):217–242, October 1991.
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.
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.
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.
S.D. Marlow. Deforestation for Higher-Order Functional Languages. PhD thesis, University of Glasgow, 1996.
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.
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.
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
M.H. Sørensen, R. Glück, and N.D. Jones. A Positive Supercompiler. Journal of Functional Programming, 6(6):811–838, 1996.
M.H. Sørensen. Convergence of Program Transformers in the Metric Space of Trees With a Reflection on the Set of Reals. Unpublished manuscript.
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.
V.F. Turchin. The concept of a supercompiler. ACM Transactions on Programming Languages and Systems, 8(3):292–325, July 1986.
P. Wadler. Deforestation: Transforming Programs to Eliminate Trees. Theoretical Computer Science, 73:231–248, 1990.
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights 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