Skip to main content

Automatic Optimization of Multi-paradigm Declarative Programs

  • Conference paper
  • First Online:
Advances in Artificial Intelligence — IBERAMIA 2002 (IBERAMIA 2002)

Part of the book series: Lecture Notes in Computer Science ((LNAI,volume 2527))

Included in the following conference series:

Abstract

This paper investigatesthe optimization by fold/unfold of functional-logic programswith operational semantics based on needed narrowing. Transformation sequences are automatically guided by tupling, a powerful strategy that avoids multiple accesses to data structures and redundant sub-computations. We systematically decompose in detail the internal structure of tupling in three low-level transformation phases (definition introduction, unfolding and abstraction with folding) that constitute the core of our automatic tupling algorithm. The resulting strategy is (strongly) correct and complete, efficient, elegant and realistic. In addition (and most important), our technique preserves the natural structure of multi-paradigm declarative programs, which contrasts with prior pure functional approachesthat produce corrupt integrated programswith (forbidden) overlapping rules.

This work hasb een partially supported by CICYT under grant TIC 2001-2705- C03-03 and by Acción Integrada Hispano-Italiana HI2000-0161, and the Valencian Research Council under grant GV01-424.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 84.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 109.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. M. Alpuente, M. Falaschi, C. Ferri, G. Moreno, and G. Vidal. Un sistema de transformación para programasm ultiparadigma. Revista Iberoamericana de Inteligencia Artificial, X/99(8):27–35, 1999.

    Google Scholar 

  2. M. Alpuente, M. Falaschi, C. Ferri, G. Moreno, G. Vidal, and I. Ziliotto. The Transformation System synth. Technical Report DSIC-II/16/99, UPV, 1999. Available in URL: http://www.dsic.upv.es/users/elp/papers.html.

    Google Scholar 

  3. M. Alpuente, M. Falaschi, G. Moreno, and G. Vidal. Safe folding/unfolding with conditional narrowing. In H. Heering M. Hanusand K. Meinke, editors, Proc. of the International Conference on Algebraic and Logic Programming, ALP’97, Southampton (England), pages1–15. Springer LNCS 1298, 1997.

    Google Scholar 

  4. M. Alpuente, M. Falaschi, G. Moreno, and G. Vidal. A Transformation System for Lazy Functional Logic Programs. In A. Middeldorp and T. Sato, editors, Proc. of the 4th Fuji International Symposyum on Functional and Logic Programming, FLOPS’99, Tsukuba (Japan), pages147–162. Springer LNCS 1722, 1999.

    Google Scholar 

  5. M. Alpuente, M. Falaschi, G. Moreno, and G. Vidal. An Automatic Composition Algorithm for Functional Logic Programs. In V. Hlaváč, K. G. Jeffery, and J. Wiedermann, editors, Proc. of the 27th Annual Conference on Current Trends in Theory and Practice of Informatics, SOFSEM’2000, pages289–297. Springer LNCS 1963, 2000.

    Google Scholar 

  6. S. Antoy, R. Echahed, and M. Hanus. A Needed Narrowing Strategy. In Proc. 21st ACM Symp. on Principles of Programming Languages, Portland, pages268–279, New York, 1994. ACM Press.

    Google Scholar 

  7. F. Baader and T. Nipkow. Term Rewriting and All That. Cambridge University Press, 1998.

    Google Scholar 

  8. R.S. Bird. Tabulation techniques for recursive programs. ACM Computing Surveys, 12(4):403–418, 1980.

    Article  MATH  MathSciNet  Google Scholar 

  9. M. Bruynooghe, D. De Schreye, and B. Martens. A General Criterion for Avoiding Infinite Unfolding. New Generation Computing, 11(1):47–79, 1992.

    Article  MATH  Google Scholar 

  10. R.M. Burstall and J. Darlington. A Transformation System for Developing Recursive Programs. Journal of the ACM, 24(1):44–67, 1977.

    Article  MATH  MathSciNet  Google Scholar 

  11. W. Chin. Towardsan Automated Tupling Strategy. In Proc. of Partial Evaluation and Semantics-Based Program Manipulation, 1993, pages119–132. ACM, New York, 1993.

    Google Scholar 

  12. W. Chin, A. Goh, and S. Khoo. Effective Optimisation of Multiple Traversals in Lazy Languages. In Proc. of Partial Evaluation and Semantics-Based Program Manipulation, San Antonio, Texas, USA (Technical Report BRICS-NS-99-1), pages 119–130. University of Aarhus, DK, 1999.

    Google Scholar 

  13. J. Darlington. Program transformation. In J. Darlington, P. Henderson, and D. A. Turner, editors, Functional Programming and its Applications, pages193–215. Cambridge University Press, 1982.

    Google Scholar 

  14. M. Hanus. The Integration of Functions into Logic Programming: From Theory to Practice. Journal of Logic Programming, 19&20:583–628, 1994.

    Article  MathSciNet  Google Scholar 

  15. G. Hutton. Fold and Unfold for Program Semantics. In Proc. of 3rd ACM SIGPLAN Int’l Conf. on Functional Programming, Baltimore, Maryland, 1998.

    Google Scholar 

  16. G. Moreno. Automatic Tupling for Functional-Logic Programs. Technical Report DIAB-02-07-24, UCLM, 2002. Available in URL: http://www.info-ab.uclm.es/personal/gmoreno/gmoreno.htm.

  17. G. Moreno. Transformation Rulesand Strategiesfor Functional-Logic Programs. AI Communications, IO Press (Amsterdam), 15(2):3, 2002.

    Google Scholar 

  18. A. Pettorossi and M. Proietti. Transformation of Logic Programs: Foundations and Techniques. Journal of Logic Programming, 19,20:261–320, 1994.

    Google Scholar 

  19. A. Pettorossi and M. Proietti. A Comparative Revisitation of Some Program Transformation Techniques. In O. Danvy, R. Glück, and P. Thiemann, editors, Partial Evaluation, Int’l Seminar, Dagstuhl Castle, Germany, pages 355–385. Springer LNCS 1110, 1996.

    Google Scholar 

  20. A. Pettorossi and M. Proietti. Rules and Strategies for Transforming Functional and Logic Programs. ACM Computing Surveys, 28(2):360–414, 1996.

    Article  Google Scholar 

  21. H. Tamaki and T. Sato. Unfold/Fold Transformations of Logic Programs. In S. Tärnlund, editor, Proc. of Second Int’l Conf. on Logic Programming, Uppsala, Sweden, pages127–139, 1984.

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2002 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Moreno, G. (2002). Automatic Optimization of Multi-paradigm Declarative Programs. In: Garijo, F.J., Riquelme, J.C., Toro, M. (eds) Advances in Artificial Intelligence — IBERAMIA 2002. IBERAMIA 2002. Lecture Notes in Computer Science(), vol 2527. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-36131-6_14

Download citation

  • DOI: https://doi.org/10.1007/3-540-36131-6_14

  • Published:

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-00131-7

  • Online ISBN: 978-3-540-36131-2

  • eBook Packages: Springer Book Archive

Publish with us

Policies and ethics