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
Tax calculation will be finalised at checkout
Purchases are for personal use only
Learn about institutional subscriptionsPreview
Unable to display preview. Download preview PDF.
References
Albert, E., Hanus, M., Huch, F., Oliver, J., Vidal, G.: Operational Semantics for Declarative Multi-Paradigm Languages. Journal of Symbolic Computation (2005)(To appear)
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)
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)
Barendregt, H.P.: The Lambda Calculus—Its Syntax and Semantics. Elsevier, Amsterdam (1984)
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
Hanus, M. (ed.): Curry: An Integrated Functional Logic Language. Available at: http://www.informatik.uni-kiel.de/~curry
Gorlick, M., Kesselman, C.: Timing Prolog Programs without Clock. In: Proc. of the 4th Symposium on Logic Programming (SLP1987), pp. 426–434 (1987)
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)
Hanus, M., Prehofer, C.: Higher-Order Narrowing with Definitional Trees. Journal of Functional Programming 9(1), 33–75 (1999)
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)
Jones, N.D., Gomard, C.K., Sestoft, P.: Partial Evaluation and Automatic Program Generation. Prentice-Hall, Englewood Cliffs (1993)
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)
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)
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)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights 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)