Abstract
An offline approach to narrowing-driven partial evaluation (a partial evaluation scheme for first-order functional and functional logic programs) has recently been introduced. In this approach, program annotations (i.e., the expressions that should be generalised at partial evaluation time to ensure termination) are based on a simple syntactic characterisation of quasi-terminating programs. This work extends the previous offline scheme by introducing a new annotation strategy which is based on a combination of size-change graphs and binding-time analysis. Preliminary experiments point out that the number of program annotations is significantly reduced compared to the previous approach, which means that faster residual programs are often produced.
This work has been partially supported by the EU (FEDER) and the Spanish MEC under grant TIN2005-09207-C03-02, by the Mexican SEIT-ANUIES and DGEST beca-comisión and by the ICT for EU-India Cross-Cultural Dissemination Project ALA/95/23/2003/077-054.
Preview
Unable to display preview. Download preview PDF.
Similar content being viewed by others
References
Albert, E., Vidal, G.: The Narrowing-Driven Approach to Functional Logic Program Specialization. New Generation Computing 20(1), 3–26 (2002)
Alpuente, M., Falaschi, M., Vidal, G.: Partial Evaluation of Functional Logic Programs. ACM TOPLAS 20(4), 768–844 (1998)
Antoy, S.: Definitional trees. In: Kirchner, H., Levi, G. (eds.) Algebraic and Logic Programming. LNCS, vol. 632, pp. 143–157. Springer, Heidelberg (1992)
Antoy, S., Echahed, R., Hanus, M.: A Needed Narrowing Strategy. Journal of the ACM 47(4), 776–822 (2000)
Arroyo, G., Ramos, J.G., Silva, J., Vidal, G.: Improving Offline Narrowing-Driven Partial Evaluation Using Size-Change Graphs. Technical report, Technical University of Valencia (2006), Available from the following URL, http://www.dsic.upv.es/users/elp/german/papers.html
Baader, F., Nipkow, T.: Term Rewriting and All That. Cambridge University Press, Cambridge (1998)
Bossi, A., Cocco, N., Fabris, M.: Proving Termination of Logic Programs by Exploiting Term Properties. In: Abramsky, S. (ed.) TAPSOFT 1991, CCPSD 1991, and ADC-Talks 1991. LNCS, vol. 494, pp. 153–180. Springer, Heidelberg (1991)
Chin, W.N., Khoo, S.C.: Better Consumers for Program Specializations. Journal of Functional and Logic Programming 1996(4) (1996)
Codish, M., Taboch, C.: A semantic basis for the termination analysis of logic programs. J. Log. Program. 41(1), 103–123 (1999)
De Schreye, D., Glück, R., Jørgensen, J., Leuschel, M., Martens, B., Sørensen, M.H.: Conjunctive Partial Deduction: Foundations, Control, Algorihtms, and Experiments. Journal of Logic Programming 41(2-3), 231–277 (1999)
Decorte, S., De Schreye, D., Leuschel, M., Martens, B., Sagonas, K.F.: Termination Analysis for Tabled Logic Programming. In: Fuchs, N.E. (ed.) LOPSTR 1997. LNCS, vol. 1463, pp. 111–127. Springer, Heidelberg (1998)
Dershowitz, N.: Termination of Rewriting. Journal of Symbolic Computation 3(1-2), 69–115 (1987)
Gallagher, J.: Tutorial on Specialisation of Logic Programs. In: Proc. of the ACM Symp. on Partial Evaluation and Semantics-Based Program Manipulation (PEPM’93), pp. 88–98. ACM, New York (1993)
Genaim, S., Codish, M., Gallagher, J.P., Lagoon, V.: Combining Norms to Prove Termination. In: Cortesi, A. (ed.) VMCAI 2002. LNCS, vol. 2294, pp. 126–138. Springer, Heidelberg (2002)
Giovannetti, E., Levi, G., Moiso, C., Palamidessi, C.: Kernel Leaf: A Logic plus Functional Language. Journal of Computer and System Sciences 42, 363–377 (1991)
Glenstrup, A.J., Jones, N.D.: Termination analysis and specialization-point insertion in offline partial evaluation. ACM Trans. Program. Lang. Syst. 27(6), 1147–1215 (2005)
Hanus, M.: The Integration of Functions into Logic Programming: From Theory to Practice. Journal of Logic Programming 19-20, 583–628 (1994)
Hanus, M.: Curry: An Integrated Functional Logic Language (2003), Available at, http://www.informatik.uni-kiel.de/~mh/curry
Hanus, M. (ed.), Antoy, S., Engelke, M., Höppner, K., Koj, J., Niederau, P., Sadre, R., Steiner, F.: PAKCS 1.6.0: The Portland Aachen Kiel Curry System—User Manual. Technical report, University of Kiel, Germany (2004)
Holst, C.K.: Finiteness Analysis. In: Hughes, J. (ed.) Functional Programming Languages and Computer Architecture. LNCS, vol. 523, pp. 473–495. Springer, Heidelberg (1991)
Huet, G., Lévy, J.J.: Computations in orthogonal rewriting systems, Part I + II. In: Lassez, J.L., Plotkin, G.D. (eds.) Computational Logic – Essays in Honor of Alan Robinson, pp. 395–443 (1992)
Jones, N.D., Gomard, C.K., Sestoft, P.: Partial Evaluation and Automatic Program Generation. Prentice-Hall, Englewood Cliffs (1993)
Lafave, L., Gallagher, J.P.: Constraint-based Partial Evaluation of Rewriting-based Functional Logic Programs. In: Fuchs, N.E. (ed.) LOPSTR 1997. LNCS, vol. 1463, pp. 168–188. Springer, Heidelberg (1998)
Lee, C.S., Jones, N.D., Ben-Amram, A.M.: The Size-Change Principle for Program Termination. In: ACM Symposium on Principles of Programming Languages (POPL’01), vol. 28, pp. 81–92. ACM press, New York (2001)
Lindenstrauss, N., Sagiv, Y.: Automatic termination analysis of logic programs. In: ICLP, pp. 63–77 (1997)
Loogen, R., López-Fraguas, F., Rodríguez-Artalejo, M.: A Demand Driven Computation Strategy for Lazy Narrowing. In: Penjam, J., Bruynooghe, M. (eds.) PLILP 1993. LNCS, vol. 714, pp. 184–200. Springer, Heidelberg (1993)
Moreno-Navarro, J.J., Rodríguez-Artalejo, M.: Logic Programming with Functions and Predicates: The language Babel. J. Logic Programming 12(3), 191–224 (1992)
Peyton-Jones, S. (ed.): Haskell 98 Language and Libraries—The Revised Report. Cambridge University Press, Cambridge (2003)
Ramos, J.G., Silva, J., Vidal, G.: Fast Narrowing-Driven Partial Evaluation for Inductively Sequential Systems. ACM SIGPLAN Notices (Proc. of ICFP’05) 40(9), 228–239 (2005)
Slagle, J.R.: Automated Theorem-Proving for Theories with Simplifiers, Commutativity and Associativity. Journal of the ACM 21(4), 622–642 (1974)
Thiemann, R., Giesl, J.: The size-change principle and dependency pairs for termination of term rewriting. Appl. Algebra Eng. Commun. Comput. 16(4), 229–270 (2005)
Verbaeten, S., Sagonas, K., De Schreye, D.: Termination Proofs for Logic Programs with Tabling. ACM Transactions on Computational Logic 2(1), 57–92 (2001)
Author information
Authors and Affiliations
Editor information
Rights and permissions
Copyright information
© 2007 Springer Berlin Heidelberg
About this paper
Cite this paper
Arroyo, G., Ramos, J.G., Silva, J., Vidal, G. (2007). Improving Offline Narrowing-Driven Partial Evaluation Using Size-Change Graphs. In: Puebla, G. (eds) Logic-Based Program Synthesis and Transformation. LOPSTR 2006. Lecture Notes in Computer Science, vol 4407. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-540-71410-1_6
Download citation
DOI: https://doi.org/10.1007/978-3-540-71410-1_6
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-71409-5
Online ISBN: 978-3-540-71410-1
eBook Packages: Computer ScienceComputer Science (R0)