Skip to main content

Symbolic Profiling for Multi-paradigm Declarative Languages

  • Conference paper
  • First Online:
Book cover Logic Based Program Synthesis and Transformation (LOPSTR 2001)

Part of the book series: Lecture Notes in Computer Science ((LNCS,volume 2372))

Abstract

We present the basis of a source-level profiler for multi-paradigm declarative languages which integrate features from (lazy) functional and logic programming. Our profiling scheme is symbolic in the sense that it is independent of the particular language implementation. This is achieved by counting the number of basic operations performed during the execution of program calls, e.g., the number of unfolding steps, the number of matching operations, etc. The main contribution of this paper is the formal specification of the attribution of execution costs to cost centers, which is particularly difficult in the context of lazy languages. A prototype implementation of the symbolic profiler has been undertaken for the multi-paradigm language Curry. Preliminary results demonstrate the practicality of our approach and its applications in the field of program transformation.

This work has been partially supported by CICYT TIC 2001-2705-C03-01, by Acción Integrada Hispano-Alemana HA2001-0059, by Acción Integrada Hispano-Austriaca HU2001-0019, and by Acción Integrada Hispano-Italiana HI2000-0161.

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 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

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. E. Albert, S. Antoy, and G. Vidal. Measuring the Effectiveness of Partial Evaluation in Functional Logic Languages. In Proc. of LOPSTR 2000, pages 103–124. Springer LNCS 2042, 2001.

    Google Scholar 

  2. E. Albert, M. Hanus, F. Huch, J. Oliver, and G. Vidal. An Operational Semantics for Declarative Multi-Paradigm Languages. Available from URL: http://www.dsic.upv.es/users/elp/papers.html, 2002.

  3. E. Albert, M. Hanus, and G. Vidal. Using an Abstract Representation to Specialize Functional Logic Programs. In Proc. of LPAR 2000, pages 381–398. Springer LNAI 1955, 2000.

    Google Scholar 

  4. E. Albert, M. Hanus, and G. Vidal. A Practical Partial Evaluator for a Multi-Paradigm Declarative Language. In Proc. of FLOPS’01, pages 326–342. Springer LNCS 2024, 2001.

    Google Scholar 

  5. E. Albert, M. Hanus, and G. Vidal. A Residualizing Semantics for the Partial Evaluation of Functional Logic Programs, 2002. Submitted for publication. Available at http://www.dsic.upv.es/users/elp/papers.html.

  6. E. Albert and G. Vidal. The Narrowing-Driven Approach to Functional Logic Program Specialization. New Generation Computing, 20(1):3–26, 2002.

    Article  MATH  MathSciNet  Google Scholar 

  7. M. Alpuente, M. Falaschi, and G. Vidal. Partial Evaluation of Functional Logic Programs. ACM Transactions on Programming Languages and Systems, 20(4):768–844, 1998.

    Article  Google Scholar 

  8. S. Antoy, R. Echahed, and M. Hanus. A Needed Narrowing Strategy. Journal of the ACM, 47(4):776–822, 2000.

    Article  MathSciNet  Google Scholar 

  9. S. Antoy and M. Hanus. Compiling Multi-Paradigm Declarative Programs into Prolog. In Proc. of FroCoS’2000, pages 171–185. Springer LNCS 1794, 2000.

    Google Scholar 

  10. S. Antoy, B. Massey, and P. Julián. Improving the Efficiency of Non-Deterministic Computations. In Proc. of WFLP’01, Kiel, Germany, 2001.

    Google Scholar 

  11. A.W. Appel, B.F. Duba, and D.B. MacQueen. Profiling in the Presence of Optimization and Garbage Collection. Technical Report CS-TR-197-88, Princeton University, 1988.

    Google Scholar 

  12. J.L. Bentley. Writing Efficient Programs. Prentice-Hall, Englewood Cliffs, N.J., 1982.

    MATH  Google Scholar 

  13. T. C. Conway and Z. Somogyi. Deep profiling: engineering a profiler for a declarative programming language. Technical Report Technical Report 2001/24, Department of Computer Science, University of Melbourne (Australia), 2001.

    Google Scholar 

  14. S.K. Debray. Profiling Prolog Programs. Software, Practice and Experience, 18(9):821–840, 1988.

    Article  Google Scholar 

  15. S.L. Graham, P.B. Kessler, and M.K. McKusick. gprof: a Call Graph Execution Profiler. In Proc. of CC’82, pages 120–126, Boston, MA, 1982.

    Google Scholar 

  16. M. Hanus. A unified computation model for functional and logic programming. In Proc. of POPL’97, pages 80–93. ACM, New York, 1997.

    Google Scholar 

  17. M. Hanus, S. Antoy, J. Koj, R. Sadre, and F. Steiner. PAKCS 1.2: The Portland Aachen Kiel Curry System User Manual. Technical report, University of Kiel, Germany, 2000.

    Google Scholar 

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

    Article  MATH  MathSciNet  Google Scholar 

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

  20. E. Jahier and M. Ducasse. A Generic Approach to Monitor Program Executions. In Proc. of ICLP’99, pages 139–153. MIT Press, 1999.

    Google Scholar 

  21. E. Jahier and M. Ducasse. Generic Program Monitoring by Trace Analysis. Theory and Practice of Logic Programming, 2(4,5), 2002.

    Google Scholar 

  22. N.D. Jones, C.K. Gomard, and P. Sestoft. Partial Evaluation and Automatic Program Generation. Prentice-Hall, Englewood Cliffs, NJ, 1993.

    MATH  Google Scholar 

  23. A. Kishon, P. Hudak, and C. Consel. Monitoring Semantics: A Formal Framework for Specifying, Implementing, and Reasoning about Execution Monitors. ACM Sigplan Notices, 26(6):338–352, 1991.

    Article  Google Scholar 

  24. F. López-Fraguas and J. Sánchez-Hernández. TOY: A Multiparadigm Declarative System. In Proc. of RTA’99, pages 244–247. Springer LNCS 1631, 1999.

    Google Scholar 

  25. W. Lux and H. Kuchen. An Efficient Abstract Machine for Curry. In Proc. of WFLP’99, pages 171–181, 1999.

    Google Scholar 

  26. R.G. Morgan and S.A. Jarvis. Profiling large-scale lazy functional programs. Journal of Functional Programming, 8(3), 1998.

    Google Scholar 

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

    Article  Google Scholar 

  28. E. Tick. Visualizing Parallel Logic Programs with VISTA. In Proc. of the Int’l Conf. on Fifth Generation Computer Systems, pages 934–942. ICOT, 1992.

    Google Scholar 

  29. G. Vidal. Cost-Augmented Narrowing-Driven Specialization. In Proc. of PEPM’02, pages 52–62. ACM Press, 2002.

    Google Scholar 

  30. S. Watterson and S. Debray. Goal-Directed Value Profiling. In Proc. of CC’01, pages 319–334. Springer LNCS 2027, 2001.

    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

Albert, E., Vidal, G. (2002). Symbolic Profiling for Multi-paradigm Declarative Languages. In: Pettorossi, A. (eds) Logic Based Program Synthesis and Transformation. LOPSTR 2001. Lecture Notes in Computer Science, vol 2372. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-45607-4_9

Download citation

  • DOI: https://doi.org/10.1007/3-540-45607-4_9

  • Published:

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-43915-8

  • Online ISBN: 978-3-540-45607-0

  • eBook Packages: Springer Book Archive

Publish with us

Policies and ethics