Hostname: page-component-77f85d65b8-8v9h9 Total loading time: 0 Render date: 2026-04-22T23:17:57.878Z Has data issue: false hasContentIssue false

A general framework for static profiling of parametric resource usage*

Published online by Cambridge University Press:  14 October 2016

P. LOPEZ-GARCIA
Affiliation:
IMDEA Software Institute (e-mail: pedro.lopez@imdea.org, maximiliano.klemen@imdea.org, umer.liqat@imdea.org, manuel.hermenegildo@imdea.org) Spanish Council for Scientific Research (CSIC)
M. KLEMEN
Affiliation:
IMDEA Software Institute (e-mail: pedro.lopez@imdea.org, maximiliano.klemen@imdea.org, umer.liqat@imdea.org, manuel.hermenegildo@imdea.org)
U. LIQAT
Affiliation:
IMDEA Software Institute (e-mail: pedro.lopez@imdea.org, maximiliano.klemen@imdea.org, umer.liqat@imdea.org, manuel.hermenegildo@imdea.org)
M. V. HERMENEGILDO
Affiliation:
IMDEA Software Institute (e-mail: pedro.lopez@imdea.org, maximiliano.klemen@imdea.org, umer.liqat@imdea.org, manuel.hermenegildo@imdea.org) Technical University of Madrid (UPM)

Abstract

For some applications, standard resource analyses do not provide the information required. Such analyses estimate the total resource usage of a program (without executing it) as functions on input data sizes. However, some applications require knowing how such total resource usage is distributed over selected parts of a program. We propose a novel, general, and flexible framework for setting up cost equations/relations which can be instantiated for performing a wide range of resource usage analyses, including both static profiling and the inference of the standard notion of cost. We extend and generalize standard resource analysis techniques, so that the relations generated include additional Boolean control variables for switching on or off different terms in the relations, as required by the desired resource usage profile. We also instantiate our framework to perform static profiling of accumulated cost (also parameterized by input data sizes). Such information is much more useful to the software developer than the standard notion of cost: it identifies the parts of the program that have the greatest impact on the total program cost, and which therefore should be optimized first. We also report on an implementation of our framework within the CiaoPP system, and its instantiation for accumulated cost, and provide some experimental results. In addition to generality, our new method brings important advantages over our previous approach based on a program transformation, including support for non-deterministic programs, better and easier integration in the compiler, and higher efficiency.

Information

Type
Regular Papers
Copyright
Copyright © Cambridge University Press 2016 

Access options

Get access to the full version of this content by using one of the access options below. (Log in options will check for institutional or personal access. Content may require purchase if you do not have access.)

Article purchase

Temporarily unavailable

Supplementary material: PDF

Lopez-Garcia supplementary material

Online Appendix

Download Lopez-Garcia supplementary material(PDF)
PDF 279.8 KB