Abstract
This paper introduces a novel approach for the specialization of functional logic languages. We consider a maximally simplified abstract representation of programs (which still contains all the necessary information) and define a non-standard semantics for these programs. Both things mixed together allow us to design a simple and concise partial evaluation method for modern functional logic languages, avoiding several limitations of previous approaches. Moreover, since these languages can be automatically translated into the abstract representation, our technique is widely applicable. In order to assess the practicality of our approach, we have developed a partial evaluation tool for the multi-paradigm language Curry. The partial evaluator is written in Curry itself and has been tested on an extensive benchmark suite (even a meta-interpreter). To the best of our knowledge, this is the first purely declarative partial evaluator for a functional logic language.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
References
E. Albert, M. Alpuente, M. Falaschi, and G. Vidal. Indy User’s Manual. Technical report, UPV, 1998. Available from URL: http://www.dsic.upv.es/users/elp/papers.html. 396, 396
E. Albert, M. Alpuente, M. Hanus, and G. Vidal. A Partial Evaluation Framework for Curry Programs. In Proc. of the 6th Int'l Conf. on Logic for Programming and Automated Reasoning, LPAR’99, pages 376–395. Springer LNAI 1705, 1999. 382, 382, 383, 390, 390, 390, 390
E. Albert, M. Hanus, and G. Vidal. Using an Abstract Representation to Specialize Functional Logic Programs. Technical report, UPV, 2000. Available from URL: http://www.dsic.upv.es/users/elp/papers.html. 383, 386, 392, 396, 396
M. Alpuente, M. Falaschi, and G. Vidal. Partial Evaluation of Functional Logic Programs. ACM Transactions on Programming Languages and Systems, 20(4):768–844, 1998. 381, 381, 382, 382, 382, 383, 384, 392, 393, 396, 396
S. Antoy. Definitional trees. In Proc. of the 3rd Int'l Conference on Algebraic and Logic Programming, ALP’92, pages 143–157. Springer LNCS 632, 1992. 382
S. Antoy, R. Echahed, and M. Hanus. A Needed Narrowing Strategy. Journal of the ACM, 2000 (to appear). Previous version in Proc. of POPL’94, pages 268–279. 382
A. Bondorf. A Self-Applicable Partial Evaluator for Term Rewriting Systems. In Proc. of TAPSOFT’89, pages 81–95. Springer LNCS 352, 1989. 382
M. Bruynooghe, D. De Schreye, and B. Martens. A General Criterion for Avoiding Infinite Unfolding. New Generation Computing, 11(1):47–79, 1992. 392
C. Consel and O. Danvy. Tutorial notes on Partial Evaluation. In Proc. ACM Symp. on Principles of Programming Languages, pages 493–501, 1993. 381
D. De Schreye, R. Glück, J. Jørgensen, M. Leuschel, B. Martens, and M. H. Sørensen. Conjunctive Partial Deduction: Foundations, Control, Algorihtms, and Experiments. Journal of Logic Programming, 41(2&3):231–277, 1999. 382
N. Dershowitz and J.-P. Jouannaud. Rewrite Systems. In J. van Leeuwen, editor, Handbook of Theoretical Computer Science, volume B: Formal Models and Semantics, pages 243–320. Elsevier, Amsterdam, 1990. 383
J. Gallagher. Tutorial on Specialisation of Logic Programs. In Proc. of Partial Evaluation and Semantics-Based Program Manipulation, pages 88–98. ACM, New York, 1993. 381, 391, 392
R. Glück and M. H. Sørensen. A Roadmap to Metacomputation by Supercompilation. In Partial Evaluation. Int'l Dagstuhl Seminar, pages 137–160. Springer LNCS 1110, 1996. 382
M. Hanus. The Integration of Functions into Logic Programming: From Theory to Practice. Journal of Logic Programming, 19&20:583–628, 1994. 382, 383
M. Hanus. A unified computation model for functional and logic programming. In Proc. of POPL’97, pages 80–93. ACM, New York, 1997. 382, 385
M. Hanus. Distributed Programming in a Multi-Paradigm Declarative Language. In Proc. of PPDP’99, pages 376–395. Springer LNCS 1702, 1999. 395
M. Hanus. A Functional Logic Programming Approach to Graphical User Interfaces. In Int'l Workshop on Practical Aspects of Declarative Languages, pages 47–62. Springer LNCS 1753, 2000. 395
M. Hanus and C. Prehofer. Higher-Order Narrowing with Definitional Trees. Journal of Functional Programming, 9(1):33–75, 1999. 383, 383, 383, 385, 386, 386, 386, 386, 386
M. Hanus (ed.). Curry: An Integrated Functional Logic Language. Available at http://www.informatik.uni-kiel.de/~curry, 2000. 383, 385, 395
M. Hanus, S. Antoy, J. Koj, P. Niederau, R. Sadre, and F. Steiner. PAKCS 1.2: User Manual. Available at http://www.informatik.uni-kiel.de/~pakcs, 2000. 383, 396
N. D. Jones, C. K. Gomard, and P. Sestoft. Partial Evaluation and Automatic Program Generation. Prentice-Hall, Englewood Cliffs, NJ, 1993. 381, 382, 382
Laura Lafave. A Constraint-based Partial Evaluator for Functional Logic Programs and its Application. PhD thesis, Department of Computer Science, University of Bristol, 1998. 381
M. Leuschel. On the Power of Homeomorphic Embedding for Online Termination. In G. Levi, editor, Proc. of SAS’98, pages 230–245. Springer LNCS 1503, 1998. 392, 393
J. W. Lloyd and J. C. Shepherdson. Partial Evaluation in Logic Programming. Journal of Logic Programming, 11:217–242, 1991. 381, 381
A. P. Nemytykh, V. A. Pinchuk, and V. F. Turchin. A Self-Applicable Supercompiler. In Proc. of Dagstuhl Sem. on Part. Evaluation, pages 322–337. Springer LNCS 1110, 1996. 382
M. H. Sørensen and R. Glück. An Algorithm of Generalization in Positive Supercompilation. In Proc. of ILPS’95, pages 465–479. MIT Press, 1995. 392
M. H. Sørensen, R. Glück, and N. D. Jones. A Positive Supercompiler. Journal of Functional Programming, 6(6):811–838, 1996. 381, 382, 389, 389
P. L. Wadler. Deforestation: Transforming programs to eliminate trees. Theoretical Computer Science, 73:231–248, 1990. 381, 389
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2000 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Albert, E., Hanus, M., Vidal, G. (2000). Using an Abstract Representation to Specialize Functional Logic Programs. In: Parigot, M., Voronkov, A. (eds) Logic for Programming and Automated Reasoning. LPAR 2000. Lecture Notes in Artificial Intelligence(), vol 1955. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-44404-1_24
Download citation
DOI: https://doi.org/10.1007/3-540-44404-1_24
Published:
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-41285-4
Online ISBN: 978-3-540-44404-6
eBook Packages: Springer Book Archive