The narrowing-driven approach to functional logic program specialization
Special Feature
First Online:
Received:
Revised:
- 33 Downloads
- 10 Citations
Abstract
Partial evaluation is a semantics-based program optimization technique which has been investigated within different programming paradigms and applied to a wide variety of languages. Recently, a partial evaluation framework for functional logic programs has been proposed. In this framework, narrowing—the standard operational semantics of integrated languages—is used to drive the partial evaluation process. This paper surveys the essentials of narrowing-driven partial evaluation.
Keywords
Program Optimization Partial Evaluation NarrowingPreview
Unable to display preview. Download preview PDF.
References
- 1).Abramov, S. and Glück, R., “The Universal Resolving Algorithm: Inverse Computation in a Functional Language,” inProc. of the 5th Int’l Conf. on Mathematics of Program Construction, Springer LNCS 1837, pp. 187–212, 2000.MATHGoogle Scholar
- 2).Albert, E., “Partial Evaluation of Multi-Paradigm Declarative Languages: Foundations, Control, Algorithms and Efficiency,” Ph.D. thesis, DSIC, Universidad Politécnica de Valencia, 2001. Available from URL: http://www.dsic.upv.es/users/elp/papers.html.Google Scholar
- 3).Albert, E., Alpuente, M., Falaschi, M., Julián, P. and Vidal, G., “Improving Control in Functional Logic Program Specialization,” inProc. of the 5th Int’l Static Analysis Symposium (SAS’98), Springer LNCS 1503, pp. 262–277, 1998.CrossRefGoogle Scholar
- 4).Albert, E., Alpuente, M., Hanus, M. and Vidal, G., “A Partial Evaluation Framework for Curry Programs,” inProc. of the 6th Int’l Conf. on Logic Programming and Automated Reasoning (LPAR’99), Springer LNAI 1705, pp. 376–395, 1999.Google Scholar
- 5).Albert, E., Antoy, S. and Vidal, G., “Measuring the Effectiveness of Partial Evaluation in Functional Logic Languages,” inProc. of the 10th Int’l Workshop on Logic-Based Program Synthesis and Transformation (LOPSTR’2000), Springer LNCS 2042, pp. 103–124, 2001.Google Scholar
- 6).Albert, E., Hanus, M. and Vidal, G., “Using an Abstract Representation to Specialize Functional Logic Programs,” inProc. of the 7th Int’l Conf. on Logic for Programming and Automated Reasoning (LPAR’2000), Springer LNAI 1955, pp. 381–398, 2000.Google Scholar
- 7).Albert, E., Hanus, M. and Vidal, G., “A Practical Partial Evaluator, for a Multi-Paradigm Declarative Language,” inProc. of the 4th Fuji Int’l Symp. on Functional and Logic Programming (FLOPS’2001), Springer LNCS 2024, pp. 326–342, 2001.Google Scholar
- 8).Alpuente, M., Falaschi, M., Julián, P. and Vidal, G., “Specialization of Lazy Functional Logic Programs,” inProc. of the ACM SIGPLAN Symp. on Partial Evaluation and Semantics-Based Program Manipulation (PEPM’97) Sigplan Notices, 32, 12, ACM Press, pp. 151–162, 1997.CrossRefGoogle Scholar
- 9).Alpuente, M., Falaschi, M. and Vidal, G., “Narrowing-driven Partial Evaluation of Functional Logic Programs,” inProc. of the 6th European Symposium on Programming (ESOP’96), Springer LNCS 1058, pp. 45–61, 1996.Google Scholar
- 10).Alpuente, M., Falaschi, M. and Vidal, G., “Partial Evaluation of Functional Logic Programs,”ACM Transactions on Programming Languages and Systems, 20, 4, pp. 768–844, 1998.CrossRefGoogle Scholar
- 11).Alpuente M., Hanus M., Lucas S. and Vidal, G., “Specialization of Inductively Sequential Functional Logic Programs,” inProc. of the 4th ACM SIGPLAN Int’l Conf. on Functional Programming (ICFP’99), 34, 9 ofSigplan Notices, ACM Press, pp. 273–283, 1999.CrossRefGoogle Scholar
- 12).Antoy, S., “Definitional Trees,” inProc. of the 3rd Int’l Conf. on Algebraic and Logic Programming (ALP’92), Springer LNCS 632, pp. 143–157, 1992.Google Scholar
- 13).Antoy, S., Echahed, R. and Hanus, M., “A Needed Narrowing Strategy,”Journal of the ACM, 47, 4, pp. 776–822, 2000.MathSciNetCrossRefGoogle Scholar
- 14).Baader, F. and Nipkow, T.,Term Rewriting and All That, Cambridge University Press, 1998.Google Scholar
- 15).Bol, R., “Loop Checking in Partial Deduction,”Journal of Logic Programming, 16, 1&2, pp. 25–46, 1993.MathSciNetCrossRefGoogle Scholar
- 16).Bondorf, A., “A Self-Applicable Partial Evaluator for Term Rewriting Systems,” inProc. of the Int’l Joint Conf. on Theory and Practice of Software Development (TAP-SOFT’89), Springer LNCS 352, pp. 81–95, 1989.Google Scholar
- 17).Bruynooghe, M., de Schreye, D. and Martens, B., “A General Criterion for Avoiding Infinite Unfolding,”New Generation Computing, 11, 1, pp. 47–79, 1992.CrossRefGoogle Scholar
- 18).Burstall, R. and Darlington, J., “A Transformation System for Developing Recursive Programs,”Journal of the ACM, 24, 1, pp. 44–67, 1977.MathSciNetCrossRefGoogle Scholar
- 19).Consel, C. and Danvy, O., “Tutorial Notes on Partial Evaluation,” inProc. of the 20th Annual ACM SIGPLAN-SIGACT Symp. on Principles of Programming Languages (POPL’93), ACM Press, pp. 493–501, 1993.Google Scholar
- 20).Darlington, J. and Pull, H., “A Program Development Methodology Based on a Unified Approach to Execution and Transformation,” inProc. of the IFIP TC2 Workshop on Partial Evaluation and Mixed Computation, North-Holland, pp. 117–131, 1988.Google Scholar
- 21).De Schreye, D., Glück, R., Jørgensen, J., Leuschel, M., Martens, B. and Sørensen, M., “Conjunctive Partial Deduction: Foundations, Control, Algorihtms, and Experiments,”Journal of Logic Programming, 41, 2&3, pp. 231–277, 1999.MathSciNetCrossRefGoogle Scholar
- 22).Etalle, S., Gabbrielli, M. and Marchiori, E., “A Transformation System for CLP with Dynamic Scheduling and CCP,” inProc. of the ACM SIGPLAN Symp. on Partial Evaluation and Semantics-Based Program Manipulation (PEPM’97), volume 32, 12 ofSigplan Notices, ACM Press, pp. 137–150, 1997.Google Scholar
- 23).Fribourg, L., “SLOG: A Logic Programming Language Interpreter Based on Clausal Superposition and Rewriting,” inProc. of the 2nd IEEE Int’l Symp. on Logic Programming, IEEE Press, pp. 172–185, 1985.Google Scholar
- 24).Futamura, Y., “Partial Evaluation of Computation Process—An Approach to a Compiler-Compiler,”Higher-Order and Symbolic Computation, 12, 4, pp. 381–391, 1999. Reprint of article inSystems, Computers, Controls 1971.CrossRefGoogle Scholar
- 25).Gallagher, J., “Tutorial on Specialisation of Logic Programs,” inProc. of the ACM SIGPLAN Symp. on Partial Evaluation and Semantics-Based Program Manipulation (PEPM’93), pp. 88–98, ACM Press, 1993.Google Scholar
- 26).Giovannetti, E., Levi, G., Moiso, C. and Palamidessi, C., “Kernel Leaf: A Logic plus Functional Language,”Journal of Computer and System Sciences, 42, pp. 363–377, 1991.CrossRefGoogle Scholar
- 27).Glück, R. and Klimov, A., “Occam’s Razor in Metacomputation: the Notion of a Perfect Process Tree,” inProc. of the 3rd Int’l Workshop on Static Analysis, Springer LNCS 724, pp. 112–123, 1993.Google Scholar
- 28).Glück, R. and Sørensen, M., “Partial Deduction and Driving are Equivalent,” inProc. of the 6th Int’l Symp. on Programming Language Implementation and Logic Programming (PLILP’94), Springer LNCS 844, pp. 165–181, 1994.Google Scholar
- 29).Hanus, M., “The Integration of Functions into Logic Programming: From Theory to Practice,”Journal of Logic Programming, 19&20, pp. 583–628, 1994.MathSciNetCrossRefGoogle Scholar
- 30).Hanus, M., “A Unified Computation Model for Functional and Logic Programming,” inProc. of 24th ACM SIGPLAN-SIGACT Symp. on Principles of Programming Languages (POPL’97), ACM Press, pp. 80–93, 1997.Google Scholar
- 31).Hanus, M., Antoy, S., Koj, J., Sadre, R. and Steiner, F., “PAKCS 1.2: The Portland Aachen Kiel Curry System User Manual,” Technical report, University of Kiel, Germany, 2000.Google Scholar
- 32).Hanus, M. and Prehofer, C., “Higher-Order Narrowing with Definitional Trees,”Journal of Functional Programming, 9, 1, pp. 33–75, 1999.MathSciNetCrossRefGoogle Scholar
- 33).“Curry: An Integrated Functional Logic Language,” (Hanus, M., ed.) Available at http://www.informatik.uni-kiel.de/~curry/report.html, 2000.Google Scholar
- 34).Hortalá-González, T. and Ullán, E., “An Abstract Machine Based System for a Lazy Narrowing Calculus,” inProc. of the 4th Fuji Int’l Symp. on Functional and Logic Programming (FLOPS’2001), pp. 216–232, Springer LNCS 2024, 2001.Google Scholar
- 35).Huet, G. and Lévy, J., “Computations in Orthogonal Rewriting Systems, Part I+II,”, inComputational Logic—Essays in Honor of Alan Robinson (J. Lassez and G. Plotkin, eds.), pp. 395–443, 1992.Google Scholar
- 36).Hullot, J., “Canonical Forms and Unification,” inProc. of the 5th Int’l Conf. on Automated Deduction, Springer LNCS 87, pp. 318–334, 1980.CrossRefGoogle Scholar
- 37).Jones, N., Sestoft, P. and Søndergaard, H., “Mix: A Self-Applicable Partial Evaluator for Experiments in Compiler Generation,”Lisp and Symbolic Computation, 2, 1, pp. 9–50, 1989.CrossRefGoogle Scholar
- 38).Julián-Iranzo, P.,Specialization of Lazy Functional Logic Programs, Ph.D. thesis, DSIC, Universidad Politécnica de Valencia May 2000. In Spanish.Google Scholar
- 39).Klop, J., “Term Rewriting Systems,” inHandbook of Logic in Computer Science (S. Abramsky, D. Gabbay, and T. Maibaum, eds.), I, Oxford University Press, pp. 1–112, 1992.Google Scholar
- 40).Kruskal, J., “Well-quasi-ordering, the Tree Theorem, and Vazsonyi’s Conjecture,”Transactions of the American Mathematical Society, 95, pp. 210–225, 1960.MathSciNetMATHGoogle Scholar
- 41).Lafave, L. and Gallagher, J., “Partial Evaluation of Functional Logic Programs in Rewriting-based Languages,” Technical Report CSTR-97-001, Department of Computer Science, University of Bristol, England, March 1997.Google Scholar
- 42).Lassez, J.L., Maher, M.J. and Marriott, K., “Unification Revisited,” inFoundations of Deductive Databases and Logic Programming (J. Minker, ed.), Morgan Kaufmann, Los Altos, Ca., pp. 587–625, 1988.CrossRefGoogle Scholar
- 43).Leuschel, M., “On the Power of Homeomorphic Embedding for Online Termination,” inProc. of the 5th Int’l Static Analysis Symposium (SAS’98), Springer LNCS 1503, pp. 230–245, 1998.Google Scholar
- 44).Leuschel, M., de Schreye, D. and de Waal, A., “A Conceptual Embedding of Folding into Partial Deduction: Towards a Maximal Integration,” inProc. of the 1996 Joint Int’l Conf. and Symp. on Logic Programming, The MIT Press, Cambridge, MA, pp. 319–332, 1996.Google Scholar
- 45).Leuschel, M., Martens, B. and de Schreye, D., “Controlling Generalization and Polyvariance in Partial Deduction of Normal Logic Programs”,ACM Transactions on Programming Languages and Systems, 20, 1, pp. 208–258., 1998.CrossRefGoogle Scholar
- 46).Lloyd, J. and Shepherdson, J., “Partial Evaluation in Logic Programming”,Journal of Logic Programming, 11, pp. 217–242, 1991.MathSciNetCrossRefGoogle Scholar
- 47).Loogen, R., López-Fraguas, F. and Rodríguez-Artalejo, M., “A Demand Driven Computation Strategy for Lazy Narrowing”, inProc. of the 5th Int’l Symp. on Programming Language Implementation and Logic Programming (PLILP’93), Springer LNCS 714, pp. 184–200, 1993.Google Scholar
- 48).López-Fraguas, F. and Sánchez-Hernández, J., “TOY: A Multiparadigm Declarative System,” inProc. of the 10th Int’l Conf. on Rewriting Techniques and Applications (RTA’ 99), Springer LNCS 1631, pp. 244–247, 1999.CrossRefGoogle Scholar
- 49).Lux, W. and Kuchen, H., “An Efficient Abstract Machine for Curry,” inProc. of the 8th Int’l Workshop on Functional and Logic Programming (WFLP’99), pp. 171–181, 1999.Google Scholar
- 50).Martens, B. and Gallagher, J., “Ensuring Global Termination of Partial Deduction while Allowing Flexible Polyvariance,” inProc. of the 12th Int’l Conf. on Logic Programming (ICLP’95), The MIT Press, pp. 597–611, 1995.Google Scholar
- 51).Moreno-Navarro, J. and Rodríguez-Artalejo, M., “Logic Programming with Functions and Predicates: The Language Babel,”Journal of Logic Programming, 12, 3, pp. 191–224, 1992.CrossRefGoogle Scholar
- 52).Nemytykh, A., Pinchuk, V. and Turchin, V., “A Self-Applicable Supercompiler,” inPartial Evaluation, Proceedings, Springer LNCS 1110, pp. 322–337, 1996.CrossRefGoogle Scholar
- 53).Pettorossi, A. and Proietti, M., “A Comparative Revisitation of Some Program Transformation Techniques”, inPartial Evaluation. Proceedings, Springer LNCS 1110, pp. 355–385, 1996.CrossRefGoogle Scholar
- 54).Plasmeijer, R. and Eekelen, M.,Functional Programming and Parallel Graph Rewriting, Addison Wesley, 1993.Google Scholar
- 55).Reddy, U.S., “Narrowing as the Operational Semantics of Functional Languages,” inProc. of the 2nd IEEE Int’l Symp. on Logic Programmin, IEEE, New York, pp. 138–151, 1985.Google Scholar
- 56).Slagle, J., “Automated Theorem-Proving for Theories with Simplifiers, Commutativity and Associativity,”Journal of the ACM, 21, 4, pp. 622–642, 1974.MathSciNetCrossRefGoogle Scholar
- 57).Sørensen, M., “Turchin’s Supercompiler Revisited: An Operational Theory of Positive Information Propagation,” Technical Report 94/7, Master’s Thesis, DIKU, University of Copenhagen, Denmark, 1994.Google Scholar
- 58).Sørensen, M. and Glück, R., “An Algorithm of Generalization in Positive Supercompilation,” inProc. of the 1995 Int’l Logic Programming Symposium (ILPS’95), The MIT Press, pp. 465–479, 1995.Google Scholar
- 59).Sørensen, M., Glück, R. and Jones, N., “A Positive Supercompiler,”Journal of Functional Programming, 6, 6, pp. 811–838, 1996.CrossRefGoogle Scholar
- 60).Turchin, V., “The Concept of a Supercompiler,”ACM Transactions on Programming Languages and Systems, 8, 3, pp. 292–325, July 1986.CrossRefGoogle Scholar
- 61).Vidal, G.,Semantics-Based Analysis and Transformation of Functional Logic Programs, Ph.D. thesis, DSIC, Universidad Politécnica de Valencia, Sept. 1996. In Spanish.Google Scholar
Copyright information
© Ohmsha, Ltd. and Springer 2002