Skip to main content

Improved Tupling for Optimizing Multi-paradigm Declarative Programs

  • Conference paper
Advances in Artificial Intelligence – IBERAMIA 2004 (IBERAMIA 2004)

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

Included in the following conference series:

  • 970 Accesses

Abstract

This paper investigates the optimization by fold/unfold of declarative programs that integrate the best features from both functional and logic programming. Transformation sequences are guided by a mixed strategy which, in three low-level transformation phases, successfully combines two well-known heuristics -composition and tupling-, thus avoiding the construction of intermediate data structures and redundant sub-computations. In particular, whereas composition is able to produce a single function definition for some nested (composed) functions, the tupling method merges non-nested functions calls into a new function definition called eureka. We solve the non trivial problem of discovering the set of calls to be tupled in an incremental way, i.e. by chaining different eureka definitions where only non-nested calls sharing common variables are taken into account. Moreover, by appropriately combining both strategies, together with a simplification pre-process based on a kind of normalization, we automatically optimize a wide range of programs (with nested and/or non-nested function calls) at a very low cost.

This work was partially supported by CICYT under grant TIC 2001-2705-C03-03.

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 129.00
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 169.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. Alpuente, M., Falaschi, M., Moreno, G., Vidal, G.: An Automatic Composition Algorithm for Functional Logic Programs. In: Jeffery, K., Hlaváč, V., Wiedermann, J. (eds.) SOFSEM 2000. LNCS, vol. 1963, pp. 289–297. Springer, Heidelberg (2000)

    Chapter  Google Scholar 

  2. Alpuente, M., Falaschi, M., Moreno, G., Vidal, G.: Rules+Strategies for Transforming Lazy Functional Logic Programs. Theoretical Computer Science 311, 479–525 (2004)

    Article  MATH  MathSciNet  Google Scholar 

  3. Antoy, S., Echahed, R., Hanus, M.: A Needed Narrowing Strategy. In: Proc. 21st ACM Symp. on POPL, Portland, pp. 268–279. ACM Press, New York (1994)

    Google Scholar 

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

    Article  MATH  MathSciNet  Google Scholar 

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

    Article  MATH  MathSciNet  Google Scholar 

  6. Chin, W.: Towards an Automated Tupling Strategy. In: Proc. of Partial Evaluation and Semantics-Based Program Manipulation 1993, pp. 119–132. ACM Press, New York (1993)

    Chapter  Google Scholar 

  7. González, S., Moreno, G.: Incremental Tupling with Simplification Pre-Process. Technical Report DIAB-04-05-1, UCLM (2004)

    Google Scholar 

  8. Moreno, G.: Automatic Optimization of Multi-Paradigm Declarative Programs. In: Garijo, F.J., Riquelme, J.-C., Toro, M. (eds.) IBERAMIA 2002. LNCS (LNAI), vol. 2527, pp. 131–140. Springer, Heidelberg (2002)

    Chapter  Google Scholar 

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

    Article  Google Scholar 

  10. Tamaki, H., Sato, T.: Unfold/Fold Transformations of Logic Programs. In: Proc. of 2nd Int’l Conf. on Logic Programming, Uppsala, Sweden, pp. 127–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

© 2004 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

González, S., Moreno, G. (2004). Improved Tupling for Optimizing Multi-paradigm Declarative Programs. In: Lemaître, C., Reyes, C.A., González, J.A. (eds) Advances in Artificial Intelligence – IBERAMIA 2004. IBERAMIA 2004. Lecture Notes in Computer Science(), vol 3315. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-540-30498-2_42

Download citation

  • DOI: https://doi.org/10.1007/978-3-540-30498-2_42

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-23806-5

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

  • eBook Packages: Springer Book Archive

Publish with us

Policies and ethics