skip to main content
10.1145/317636.317910acmconferencesArticle/Chapter ViewAbstractPublication PagesicfpConference Proceedingsconference-collections
Article
Free Access

Specialization of inductively sequential functional logic programs

Authors Info & Claims
Published:01 September 1999Publication History

ABSTRACT

Functional logic languages combine the operational principles of the most important declarative programming paradigms, namely functional and logic programming. Inductively sequential programs admit the definition of optimal computation strategies and are the basis of several recent (lazy) functional logic languages. In this paper, we define a partial evaluator for inductively sequential functional logic programs. We prove strong correctness of this partial evaluator and show that the nice properties of inductively sequential programs carry over to the specialization process and the specialized programs. In particular, the structure of the programs is preserved by the specialization process. This is in contrast to other partial evaluation methods for functional logic programs which can destroy the original program structure. Finally, we present some experiments which highlight the practical advantages of our approach.

References

  1. 1.E. Albert, M. Alpuente, M. Falaschi, P. Julian, and G. Vidal. Improving Control in Functional Logic Program Specialization. In G. Levi, editor, Proc. of Static Analysis Symposium, SAS'98, pages 262-277. Springer LNCS 1503, 1998.]]Google ScholarGoogle Scholar
  2. 2.E. Albert, M. Alpuente, M. Falaschi, and G. Vidal. INDY User's Manual. Technical Report DSIC-II/12/98, UPV, 1998. Available from URL: http://www, dsic. upv. es/users/elp/papers, html.]]Google ScholarGoogle Scholar
  3. 3.M. Alpuente, M. Falaschi, P. Julian, and G. Vidal. Specialization of Lazy Functional Logic Programs. In Proc. of PEPM'97, volume 32, 12 of Sigplan Notices, pages 151-162, New York, 1997. ACM Press.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. 4.M. Alpuente, M. Falaschi, and G. Vidal. Narrowing-driven Partial Evaluation of Functional Logic Programs. in H. Riis Nielson, editor, Proc. of the 6th European Syrup. on Programming, ESOP'96, pages 45-61. Springer LNCS 1058, 1996.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. 5.M. Alpuente, M. Falaschi, and G. Vidal. Partial Evaluation of Functional Logic Programs. A CM Transactions on Programming Languages and Systems, 20(4):768-844, 1998.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. 6.M. Alpuente, M. Falaschi, and G. Vidal. A Unifying View of Functional and Logic Program Specialization. A CM Computing Surveys, 30(3es):9es, 1998.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. 7.M. Alpuente, M. Hauus, S. Lucas, and G. Vidal. Specialization of Functional Logic Programs Based on Needed Narrowing. Technical report 99-4, RWTH Aachen, 1999. Available from ~tp. informaVik, r~rth-aachen, de/pub/report s/.]]Google ScholarGoogle Scholar
  8. 8.S. Antoy. Definitional trees. In Proc. of the $rd ~nt'l Conference on Algebraic and Logic Programming, ALP'92, pages 143-157. Springer LNCS 632, 1992.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. 9.S. Antoy, R. Echahed, and M. Hanus. A Needed Narrowing Strategy. In Proc. 21st A CM Syrup. on Principles of Programming Languages, Portland, pages 268-279, 1994.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. 10.S. Antoy, R. Echahed, and Ivi. Hanus. Parallel evaluation strategies for functional logic languages. In Proc. of the 1,~th Int'l Conf. on Logic Programming ({CLP'97), pages 138- 152. MIT Press, 1997.]]Google ScholarGoogle Scholar
  11. 11.F. Bander and T. Nipkow. Term Rewriting and All That. Cambridge University Press, 1998.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. 12.F. BeIlegarde. ASTRE: Towards a fully automated program transformation system. In Jieh Hsiang, editor, Prom of RTA '95, pages 403--407. Springer LNCS 914, 1995.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. 13.A. Bondorf. Towards a Self-Applicable Partial Evaluator for Term Rewriting Systems. In D. Bjorner, A.P. Ershov, and N.D. Jones, editors, Proc. of the Int'l Workshop on Partial Evaluation and Mixed Computation, pages 27-50. North-Holland, Amsterdam, 1988.]]Google ScholarGoogle Scholar
  14. 14.R.M. Burstall and J. Darlington. A Transformation System for Developing Recursive Programs. Journal of the A CM, 24(1):44-67, 1977.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. 15.C. Consel and O. Danvy. Tutorial notes on Partial Evaluation. In Proc. of 20th Annual A CM Syrup. on Principles of Programming Languages, pages 493-501. ACM, New York, 1993.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. 16.J. Daxlington. Program transformation. In J. Darlington, P. Henderson, and D. A. Turner, editors, Functional Programming and its Applications, pages 193-215. Cambridge University Press, 1982.]]Google ScholarGoogle Scholar
  17. 17.N. Dershowitz and J.-P. Jouannaud. Rewrite Systems. In J. van Leeuwen, editor, Handbook o/Theoretical Computer Science, volume B: Formal Models and Semantics, pages 243-320. Elsevier, Amsterdam, 1990.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. 18.N. Dershowitz and U. Reddy. Deductive and Inductive Synthesis of Equational Programs. Journal o/Symbolic Computation, 15:467-494, 1993.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. 19.I. Durand. Bounded, Strongly Sequential and Forward- Branching Term Rewriting Systems. Journal of Symbolic Computation, 18(4):319-352, 1994.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. 20.A.J. Field and P.G. Harrison. Functional Programming. Addison-WesIey, Wokingham, 1988.]]Google ScholarGoogle Scholar
  21. 21.J. Gallagher. Tutorial on Specialisation of Logic Programs. In Proc. of PEPM~93, pages 88-98. ACM, New York, 1993.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. 22.E. Giovannetti, G. Levi, C. Moiso, and C. Palamidessi. Kernel Leaf: A Logic plus Functional Language. Jou~mal of Computer and System Sciences, 42:363-377, 1991.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. 23.R. Gliick and M.H. S0rensen. Partial Deduction and Driving are Equivalent. In Proc. of PLILP'9d, pages 165-181. Springer LNCS 844, 1994.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. 24.R. Glfick and M.H. Sorensen. A Roadmap to Metacompuration by Supercompilation. In O. Danvy, R. Glfick, and P. Thiemann, editors, Partial Evaluation, Int'l Seminar, Da~stuhl Castle, Germany, pages 137-160. Springer LNCS 11t0, February 1996.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. 25.M. Hanus. The Integration of Functions into Logic ProgrammJng: From Theory to Practice. Journal of Logic Programming, 19&20:583-628, 1994.]]Google ScholarGoogle Scholar
  26. 26.M. Hanus. Efficient translation of lazy functional logic programs into Prolog. In Proc. 5th Int'l Workshop on Logic Program Synthesis and Transformation, pages 252-266. Springer LNCS 1048, 1995.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  27. 27.M. Hanus. A unified computation model for functional and logic programming. In Proc. of the 2~ th A CM Symposium on Principles of Programming Languages (Paris), pages 80-93. AOM, New York, 1997.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  28. 28.M. Hanus, S. Lures, and A. Middeldorp. Strongly sequential and inductively sequential term rewriting systems. Infownation Processing Letters, 67(1):1-8, 1998.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  29. 29.M. Hanus and C. Prehofer. Higher-Order Narrowing with Definitional Trees. Journal of Functional Programming, 9(1):33-75, 1999.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  30. 30.M. Hanus (ed.). Curry: An Integrated Functional Logic Language. Version 0.5, Jan. 1999. Available at http://www-i2, informatik, rwth-aachen, de/~hanus/curry.]]Google ScholarGoogle Scholar
  31. 31.G. Huet and J.J. L6vy. 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 ScholarGoogle Scholar
  32. 32.J.M. Hullot. Canonical Forms and Unification. In Proc of 5th Int'l Conf. on Automated Deduction, pages 318-334. Springer LNCS 87, 1980.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  33. 33.N.D. Jones, C.K. Gomaxd, and P. Sestoft. Partial Evaluation and Automatic Program Generation. Prentice-Hall, Englewood Cliffs, N J, 1993.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  34. 34.J.W. Klop. Term Rewriting Systems. In S. Abramsky, D. Gabbay, and T. Maibaum, editors, Handbook of Logic in Computer Science, volume I, pages 1-112. Oxford University Press, 1992.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  35. 35.H. Kuchen, R. Loogen, J.J. Moreno-Navarro, and M. Rodrigue~-Artalejo. Lazy Narrowing in a Graph Machine. In Proc. of ALP'90, pages 298-317. Springer LNCS 463, 1990.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  36. 36.L. Lafave and J.P. Gallagher. Constraint-based Partial Evaluation of Rewriting-based Functional Logic Programs. In Proc. of LOPSTR'9?, pages 168-188. Springer LNCS 1463, 1997.]]Google ScholarGoogle Scholar
  37. 37.J. Lam and A. Kusalik. A Comparative Analysis of Partial Deductors for Pure Prolog. Technical report, Department of Computational Science, University of Saskatchewan, Canada, May 1991. Revised April 1991.]]Google ScholarGoogle Scholar
  38. 38.M. Leuschel. The ECCE partial deduction system and the DPPD library of benchmarks. Technical report, Accessible via http://~, cs. kuleuven, ac. be/~ lpai, i{998.]]Google ScholarGoogle Scholar
  39. 39.M. Leuschel, D. De Schreye, and A. de Ws~I. A Conceptual Embedding of Folding into Partial Deduction: Towards a Maximal Integration. In M. Maher, editor, Proc. of the Joint Int'l Conference and Syraposium on Logic Programrain~, JICSLP'96, pages 319-332. The MIT Press~ Cambridge, MA, 1996.]]Google ScholarGoogle Scholar
  40. 40.J.W. Lloyd and J.C. Shepherdson. Partial Evaluation in Logic Programming. Journal of Logic Programming, 11:217- 242, 1991.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  41. 41.R. Loogen, F. LSpez-Fraguas, and M. Rodrlguez-Artalejo. A Demand Driven Computation Strategy for Lazy Narrowing. In J. Penjam and M. Bruynooghe, editors, Proc. of PLILP'93, Tallinn (Estonia), pages 184-200. Springer LNCS 714, 1993.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  42. 42.A. M{niussi and D. J. Sherman. Squeezing Intermediate Construction in Equational Programs. In O. Danvy, R. Glfick, and P. Thiemann, editors, Partial Evaluation, Int'l Seminar, Da~stuhl Castle, Germany, pages 284-302. Springer LNCS 1110, February 1996.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  43. 43.J.J. Moreno-Navarro and M. Rodrfguez-Artalejo. Logic Programming with Functions and Predicates; The language Babel. Journal of Logic Programming, 12(3):191-224, 1992.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  44. 44.A. Pettorossi and M. Proietti. A Comparative Revisitation of Some Program Transformation Techniques. In O. Danvy, R. Gliick, and P. Thiemann, editors, Partial Evaluation, fnt'l Seminar, Dagstuhl Castle, Germany, pages 355-385. Springer LNCS 1110, 1996.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  45. 45.S.L. Peyton Jones. The Implementation of Functional Programming Languages. Prentice-Hall, 1987.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  46. 46.R. Plasmeijer and M. van Eekelen. Function.el Programming and Parallel Graph Rewriting. Addison Wesley, 1993.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  47. 47.U.S. Reddy. Narrowing as the Operational Semantics of Functional Languages. In Proc. of Second LEEE Int'l Syrup. on Logic Programming, pages 138-151. IEEE, New York, 1985.]]Google ScholarGoogle Scholar
  48. 48.J.R. Slagle. Automated Theorem-Proving fi3r Theories with Simplifiers, Commutativity and Associativity. Journal of the ACM, 21(4):622-642, 1974.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  49. 49.M.H. S0rensen, R. Gliick, and N.D. Jones. A Positive Supercompiler. Journal of Functional Programming, 6(6):811- 838, 1996.]]Google ScholarGoogle ScholarCross RefCross Ref
  50. 50.P.L. Wadler. Deforestation: Transforming programs to eliminate trees. Theoretical Corr~puter Science, 7'3:231-248, 1990.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  51. 51.F. Zartmann. Denotational Abstract Interpretation of Functional Logic Programs. In P. Van Hentenryck, editor, Proc. of the 4th Int'l Static Analysis Symposium, SAS'97, pages 141-159. Springer LNCS 1302, 1997.]] Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Specialization of inductively sequential functional logic programs

      Recommendations

      Comments

      Login options

      Check if you have access through your login credentials or your institution to get full access on this article.

      Sign in
      • Published in

        cover image ACM Conferences
        ICFP '99: Proceedings of the fourth ACM SIGPLAN international conference on Functional programming
        September 1999
        288 pages
        ISBN:1581131119
        DOI:10.1145/317636
        • Chairmen:
        • Didier Rémy,
        • Peter Lee

        Copyright © 1999 ACM

        Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

        Publisher

        Association for Computing Machinery

        New York, NY, United States

        Publication History

        • Published: 1 September 1999

        Permissions

        Request permissions about this article.

        Request Permissions

        Check for updates

        Qualifiers

        • Article

        Acceptance Rates

        ICFP '99 Paper Acceptance Rate25of81submissions,31%Overall Acceptance Rate333of1,064submissions,31%

        Upcoming Conference

        ICFP '24

      PDF Format

      View or Download as a PDF file.

      PDF

      eReader

      View online with eReader.

      eReader