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.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
References
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.
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.
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.
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.
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.
E. Albert and G. Vidal. The Narrowing-Driven Approach to Functional Logic Program Specialization. New Generation Computing, 20(1):3–26, 2002.
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.
S. Antoy, R. Echahed, and M. Hanus. A Needed Narrowing Strategy. Journal of the ACM, 47(4):776–822, 2000.
S. Antoy and M. Hanus. Compiling Multi-Paradigm Declarative Programs into Prolog. In Proc. of FroCoS’2000, pages 171–185. Springer LNCS 1794, 2000.
S. Antoy, B. Massey, and P. Julián. Improving the Efficiency of Non-Deterministic Computations. In Proc. of WFLP’01, Kiel, Germany, 2001.
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.
J.L. Bentley. Writing Efficient Programs. Prentice-Hall, Englewood Cliffs, N.J., 1982.
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.
S.K. Debray. Profiling Prolog Programs. Software, Practice and Experience, 18(9):821–840, 1988.
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.
M. Hanus. A unified computation model for functional and logic programming. In Proc. of POPL’97, pages 80–93. ACM, New York, 1997.
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.
M. Hanus and C. Prehofer. Higher-Order Narrowing with Definitional Trees. Journal of Functional Programming, 9(1):33–75, 1999.
M. Hanus (ed.). Curry: An Integrated Functional Logic Language. Available at: http://www.informatik.uni-kiel.de/~mh/curry/ .
E. Jahier and M. Ducasse. A Generic Approach to Monitor Program Executions. In Proc. of ICLP’99, pages 139–153. MIT Press, 1999.
E. Jahier and M. Ducasse. Generic Program Monitoring by Trace Analysis. Theory and Practice of Logic Programming, 2(4,5), 2002.
N.D. Jones, C.K. Gomard, and P. Sestoft. Partial Evaluation and Automatic Program Generation. Prentice-Hall, Englewood Cliffs, NJ, 1993.
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.
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.
W. Lux and H. Kuchen. An Efficient Abstract Machine for Curry. In Proc. of WFLP’99, pages 171–181, 1999.
R.G. Morgan and S.A. Jarvis. Profiling large-scale lazy functional programs. Journal of Functional Programming, 8(3), 1998.
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.
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.
G. Vidal. Cost-Augmented Narrowing-Driven Specialization. In Proc. of PEPM’02, pages 52–62. ACM Press, 2002.
S. Watterson and S. Debray. Goal-Directed Value Profiling. In Proc. of CC’01, pages 319–334. Springer LNCS 2027, 2001.
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights 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