A general framework for static profiling of parametric resource usage

被引:8
作者
Lopez-Garcia, P. [1 ,2 ]
Klemen, M. [1 ]
Liqat, U. [1 ]
Hermenegildo, M. V. [1 ,3 ]
机构
[1] IMDEA Software Inst, Madrid, Spain
[2] CSIC, Spanish Council Sci Res, Madrid, Spain
[3] Tech Univ Madrid, Madrid, Spain
关键词
Static Profiling; Static Analysis; Resource Usage Analysis; Complexity Analysis; CIAO;
D O I
10.1017/S1471068416000442
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
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.
引用
收藏
页码:849 / 865
页数:17
相关论文
共 28 条
[1]  
Albert E, 2011, LECT NOTES COMPUT SC, V6538, P38, DOI 10.1007/978-3-642-18275-4_5
[2]   Closed-Form Upper Bounds in Static Cost Analysis [J].
Albert, Elvira ;
Arenas, Puri ;
Genaim, Samir ;
Puebla, German .
JOURNAL OF AUTOMATED REASONING, 2011, 46 (02) :161-203
[3]  
Debray S, 1997, LOGIC PROGRAMM, P291
[4]  
DEBRAY SK, 1990, SIGPLAN NOTICES, V25, P174, DOI 10.1145/93548.93564
[5]   COST-ANALYSIS OF LOGIC PROGRAMS [J].
DEBRAY, SK ;
LIN, NW .
ACM TRANSACTIONS ON PROGRAMMING LANGUAGES AND SYSTEMS, 1993, 15 (05) :826-875
[6]  
Giesl J., 2012, PPDP 2012, P1, DOI [DOI 10.1145/2370776.2370778, 10.1145/2370776.2370778]
[7]   Cost recurrences for DML programs [J].
Grobauer, B .
ACM SIGPLAN NOTICES, 2001, 36 (10) :253-264
[8]   SPEED: Precise and Efficient Static Estimation of Program Computational Complexity [J].
Gulwani, Sumit ;
Mehra, Krishna K. ;
Chilimbi, Trishul .
ACM SIGPLAN NOTICES, 2009, 44 (01) :127-139
[9]  
Haemmerle R., 2016, Functional and Logic Programming. 13th International Symposium, FLOPS 2016. Proceedings: LNCS 9613, P163, DOI 10.1007/978-3-319-29604-3_11
[10]   An overview of Ciao and its design philosophy [J].
Hermenegildo, M. V. ;
Bueno, F. ;
Carro, M. ;
Lopez-Garcia, P. ;
Mera, E. ;
Morales, J. F. ;
Puebla, G. .
THEORY AND PRACTICE OF LOGIC PROGRAMMING, 2012, 12 :219-252