Conference Paper

Calculating Polynomial Runtime Properties

Department of Computer Science , National University of Singapore, Tumasik, 00, Singapore
DOI: 10.1007/11575467_16 Conference: Programming Languages and Systems, Third Asian Symposium, APLAS 2005, Tsukuba, Japan, November 2-5, 2005, Proceedings
Source: DBLP


Ane size-change analysis has been used for termination analysis of eager functional programming languages. The same style of analysis is also capable of compactly recording and calculating other properties of programs, including their runtime, maximum stack depth, and (relative) path time costs. In this paper we show how precise poly- nomial bounds on such costs may be calculated on programs, by a char- acterization as a problem in quantifier elimination. The technique is de- cidable, and complete for a class of size-change terminating programs with limited-degree polynomial costs. An extension to the technique al- lows the calculation of some classes of exponential-cost programs. We demonstrate the new technique by recording the calculation in numbers- of-function (or procedure) calls for a simple definition language, but it can also be applied to functional and imperative languages. The tech- nique is automated within the reduce computer algebra system.

Download full-text


Available from: Hugh Anderson
  • Source
    • "Currently the complexity analysis of higher-order systems via rewriting has not yet attracted much attention. Although there is long established interest in the functional programming community to automatically verify complexity properties of programs, see for example [4] [22] [65] [129], no results along the lines presented here can be found in the literature. Future research will overcome this restriction as the applicability of complexity analysis to rewrite systems in the context of (functional) programs is of utmost importance to the sustainability of this research, see Section 2.5. "
    [Show abstract] [Hide abstract]
    ABSTRACT: This thesis is concerned with investigations into the "complexity of term rewriting systems". Moreover the majority of the presented work deals with the "automation" of such a complexity analysis. The aim of this introduction is to present the main ideas in an easily accessible fashion to make the result presented accessible to the general public. Necessarily some technical points are stated in an over-simplified way. Comment: Cumulative Habilitation Thesis, submitted to the University of Innsbruck
    Preview · Article · Jul 2009
  • Source
    [Show abstract] [Hide abstract]
    ABSTRACT: Size-change termination (SCT) automatically identifies termination of first-order functional programs. The SCT principle: a program terminates if every infinite control flow sequence would cause an infinite descent in a well-founded data value (POPL 2001). More recent work (RTA 2004) developed a termination analysis of the pure untyped λ-calculus using a similar approach, but an entirely different notion of size was needed to compare higher-order values. Again this is a powerful analysis, even proving termination of certain λ-expressions containing the fixpoint combinator Y. However the language analysed is tiny, not even containing constants. These techniques are unified and extended significantly, to yield a termination analyser for higher-order, call-by-value programs as in ML’s purely functional core or similar functional languages. Our analyser has been proven correct, and implemented for a substantial subset of OCaml.
    Full-text · Conference Paper · Nov 2005
  • [Show abstract] [Hide abstract]
    ABSTRACT: Affine size-change analysis has been used for calculating precise polynomial bounds on the run times, and stack depths of affine size-change terminating programs. Such polynomial costs may be discovered by a characterization as a problem in quantifier elimination. In this paper we extend this work to cover a class of exponential cost programs. The tool described allows the calculation of run-time and stack-depth costs for some classes of exponential-cost programs, again by using quantifier elimination. The technique is automated, and uses the reduce computer algebra system.
    No preview · Conference Paper · Oct 2007
Show more