Closed-Form Upper Bounds in Static Cost Analysis

  • Authors:
  • Elvira Albert;Puri Arenas;Samir Genaim;Germán Puebla

  • Affiliations:
  • DSIC, Complutense University of Madrid (UCM), Madrid, Spain 28040;DSIC, Complutense University of Madrid (UCM), Madrid, Spain 28040;DSIC, Complutense University of Madrid (UCM), Madrid, Spain 28040;DLSIIS, Technical University of Madrid (UPM), Boadilla del Monte, Spain 28660

  • Venue:
  • Journal of Automated Reasoning
  • Year:
  • 2011

Quantified Score

Hi-index 0.00

Visualization

Abstract

The classical approach to automatic cost analysis consists of two phases. Given a program and some measure of cost, the analysis first produces cost relations (CRs), i.e., recursive equations which capture the cost of the program in terms of the size of its input data. Second, CRs are converted into closed-form, i.e., without recurrences. Whereas the first phase has received considerable attention, with a number of cost analyses available for a variety of programming languages, the second phase has been comparatively less studied. This article presents, to our knowledge, the first practical framework for the generation of closed-form upper bounds for CRs which (1) is fully automatic, (2) can handle the distinctive features of CRs, originating from cost analysis of realistic programming languages, (3) is not restricted to simple complexity classes, and (4) produces reasonably accurate solutions. A key idea in our approach is to view CRs as programs, which allows applying semantic-based static analyses and transformations to bound them, namely our method is based on the inference of ranking functions and loop invariants and on the use of partial evaluation.