Skip to main content

Run-Time Profiling of Functional Logic Programs

  • Conference paper

Part of the book series: Lecture Notes in Computer Science ((LNTCS,volume 3573))

Abstract

In this work, we introduce a profiling scheme for modern functional logic languages covering notions like laziness, sharing, and non-determinism. Firstly, we instrument a natural (big-step) semantics in order to associate a symbolic cost to each basic operation (e.g., variable updates, function unfoldings, case evaluations). While this cost semantics provides a formal basis to analyze the cost of a computation, the implementation of a cost-augmented interpreter based on it would introduce a huge overhead. Therefore, we also introduce a sound transformation that instruments a program such that its execution—under the standard semantics—yields not only the corresponding results but also the associated costs. Finally, we describe a prototype implementation of a profiler based on the developments in this paper.

This work was partially supported by the Spanish Ministerio de Educación y Ciencia under grant TIN2004-00231, by Generalitat Valenciana GRUPOS03/025, by the ICT for EU-India Cross-Cultural Dissemination Project ALA/95/23/2003/077-054, and by the German Research Council (DFG) under grant Ha 2457/5-1.

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

Buying options

Chapter
USD   29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD   39.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD   54.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

Learn about institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. Albert, E., Hanus, M., Huch, F., Oliver, J., Vidal, G.: Operational Semantics for Declarative Multi-Paradigm Languages. Journal of Symbolic Computation (2005)(To appear)

    Google Scholar 

  2. Albert, E., Vidal, G.: Symbolic Profiling of Multi-Paradigm Declarative Languages. In: Pettorossi, A. (ed.) LOPSTR 2001. LNCS, vol. 2372, pp. 148–167. Springer, Heidelberg (2002)

    Chapter  Google Scholar 

  3. Antoy, S., Hanus, M.: Compiling Multi-Paradigm Declarative Programs into Prolog. In: Kirchner, H. (ed.) FroCos 2000. LNCS, vol. 1794, pp. 171–185. Springer, Heidelberg (2000)

    Chapter  Google Scholar 

  4. Barendregt, H.P.: The Lambda Calculus—Its Syntax and Semantics. Elsevier, Amsterdam (1984)

    MATH  Google Scholar 

  5. Braßel, B., Hanus, M., Huch, F., Silva, J., Vidal, G.: Run-Time Profiling of Functional Logic Programs. Technical report, DSIC, Technical University of Valencia (2005), Available at: http://www.dsic.upv.es/users/elp/german/papers.html

  6. Hanus, M. (ed.): Curry: An Integrated Functional Logic Language. Available at: http://www.informatik.uni-kiel.de/~curry

  7. Gorlick, M., Kesselman, C.: Timing Prolog Programs without Clock. In: Proc. of the 4th Symposium on Logic Programming (SLP1987), pp. 426–434 (1987)

    Google Scholar 

  8. Hanus, M.: A Unified Computation Model for Functional and Logic Programming. In: Proc. of the 24th ACM Symp. on Principles of Programming Languages (POPL1997), pp. 80–93. ACM, New York (1997)

    Google Scholar 

  9. Hanus, M., Prehofer, C.: Higher-Order Narrowing with Definitional Trees. Journal of Functional Programming 9(1), 33–75 (1999)

    Article  MATH  MathSciNet  Google Scholar 

  10. Hanus, M., Antoy, S., Engelke, M., Höppner, K., Koj, J., Niederau, P., Sadre, R., Steiner, F. (eds.): PAKCS 1.6.0: The Portland Aachen Kiel Curry System—User Manual. Technical report, University of Kiel, Germany (2004)

    Google Scholar 

  11. Jones, N.D., Gomard, C.K., Sestoft, P.: Partial Evaluation and Automatic Program Generation. Prentice-Hall, Englewood Cliffs (1993)

    MATH  Google Scholar 

  12. Launchbury, J.: A Natural Semantics for Lazy Evaluation. In: Proc. of the ACM Symp. on Principles of Programming Languages (POPL1993), pp. 144–154. ACM Press, New York (1993)

    Google Scholar 

  13. López-Fraguas, F., Sánchez-Hernández, J.: TOY: A Multiparadigm Declarative System. In: Narendran, P., Rusinowitch, M. (eds.) RTA 1999. LNCS, vol. 1631, pp. 244–247. Springer, Heidelberg (1999)

    Chapter  Google Scholar 

  14. Sansom, P.M., Peyton-Jones, S.L.: Formally Based Profiling for Higher-Order Functional Languages. ACM Transactions on Programming Languages and Systems 19(2), 334–385 (1997)

    Article  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2005 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Brassel, B., Hanus, M., Huch, F., Silva, J., Vidal, G. (2005). Run-Time Profiling of Functional Logic Programs. In: Etalle, S. (eds) Logic Based Program Synthesis and Transformation. LOPSTR 2004. Lecture Notes in Computer Science, vol 3573. Springer, Berlin, Heidelberg. https://doi.org/10.1007/11506676_12

Download citation

  • DOI: https://doi.org/10.1007/11506676_12

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-26655-6

  • Online ISBN: 978-3-540-31683-1

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics