Measuring the Effectiveness of Partial Evaluation in Functional Logic Languages
We introduce a framework for assessing the effectiveness of partial evaluators in functional logic languages. Our framework is based on properties of the rewrite system that models a functional logic program. Consequently, our assessment is independent of any specific language implementation or computing environment. We define several criteria for measuring the cost of a computation: number of steps, number of function applications, and pattern matching effort. Most importantly, we express the cost of each criterion by means of recurrence equations over algebraic data types, which can be automatically inferred from the partial evaluation process itself. In some cases, the equations can be solved by transforming their arguments from arbitrary data types to natural numbers. In other cases, it is possible to estimate the improvement of a partial evaluation by analyzing the associated cost recurrence equations.
KeywordsLogic Program Residual Program Recurrence Equation Partial Evaluation Cost Criterion
Unable to display preview. Download preview PDF.
- 1.A. V. Aho, J. E. Hopcroft, and J. D. Ullman. The Design and Analysis of Computer Algorithms. Addison-Wesley, Reading, MA, 1974.Google Scholar
- 2.E. Albert, M. Alpuente, M. Falaschi, and G. Vidal. Indy User’s Manual. Technical Report DSIC-II/12/98, UPV, 1998.Google Scholar
- 3.E. Albert, S. Antoy, and G. Vidal. A Formal Approach to Reasoning about the Effectiveness of Partial Evaluation. Technical Report DSIC, UPV, 2000. Available from URL: http://www.dsic.upv.es/users/elp/papers.html.
- 4.E. Albert, M. Hanus, and G. Vidal. Using an Abstract Representation to Specialize Functional Logic Programs. In Proc. of the 7th Int’l Conf. on Logic for Programming and Automated Reasoning (LPAR’2000), pages 381–398. Springer LNAI 1955, 2000.Google Scholar
- 7.T. Amtoft. Properties of Unfolding-based Meta-level Systems. In Proc. of PEPM’91, pages 243–254. ACM Press, 1991.Google Scholar
- 8.L. O. Andersen and C. K. Gomard. Speedup Analysis in Partial Evaluation: Preliminary Results. In Proc. of PEPM’92, pages 1–7. Yale University, 1992.Google Scholar
- 11.F. Baader and T. Nipkow. Term Rewriting and All That. Cambridge University Press, 1998.Google Scholar
- 14.J. Gallagher. Tutorial on Specialisation of Logic Programs. In Proc. of PEPM’93, pages 88–98. ACM, New York, 1993.Google Scholar
- 17.M. Hanus (ed.). Curry: An Integrated Functional Logic Language. Available at http://www-i2.informatik.rwth-aachen.de/~hanus/curry, 2000.
- 18.G. Huet and J. J. Lévy. Computations in orthogonal rewriting systems, Part I + II. In J. L. Lassez and G. D. Plotkin, editors, Computational Logic-Essays in Honor of Alan Robinson, pages 395–443, 1992.Google Scholar
- 19.M. P. Jones and A. Reid. The Hugs 98 User Manual. Available at http://haskell.cs.yale.edu/hugs/, 1998.
- 22.Laura Lafave. A Constraint-based Partial Evaluator for Functional Logic Programs and its Application. PhD thesis, University of Bristol, 1999.Google Scholar
- 23.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, Proc. of the Joint Int’l Conf. and Symp. on Logic Programming (JICSLP’96), pages 319–332. The MIT Press, Cambridge, MA, 1996.Google Scholar
- 24.Y. A. Liu and G. Gomez. Automatic Accurate Time-Bound Analysis for High-Level Languages. In Proc. of ACM SIGPLAN Workshop on Languages, Compilers, and Tools for Embedded Systems, pages 31–40. Springer LNCS 1474, 1998.Google Scholar
- 26.R. Loogen, F. López-Fraguas, and M. Rodríguez-Artalejo. A Demand Driven Computation Strategy for Lazy Narrowing. In Proc. of 5th Int’l Symp. on Programming Language Implementation and Logic Programming (PLILP’93), pages 184–200. Springer LNCS 714, 1993.Google Scholar
- 27.F. J. López-Fraguas and J. Sánchez-Hernández. TOY: A Multiparadigm Declarative System. In Proc. of the 10th Int’l Conf. on Rewriting Techniques and Applications (RTA’99), pages 244–247. Springer LNCS 1631, 1999.Google Scholar
- 29.F. Nielson. A Formal Type System for Comparing Partial Evaluators. In Proc. of the Int’l Workshop on Partial Evaluation and Mixed Computation, pages 349–384. N-H, 1988.Google Scholar
- 30.M. Rosendahl. Automatic Complexity Analysis. In Proc. of the Int’l Conf. on Functional Programming Languages and Computer Architecture, pages 144–156, New York, NY, 1989. ACM.Google Scholar
- 34.M. H. Sørensen. 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