Automated Complexity Analysis of Nuprl Extracted Programs
by Ralph Benzinger
Journal of Functional Programming, vol. 11, no.1, pp. 3-31
This paper describes the Automated Complexity Analysis Prototype (ACAp) system for automated complexity analysis of functional programs synthesized with the Nuprl proof development system.
We define a simple abstract cost model for Nuprl's term language based on the current call-by-name evaluator. The framework uses abstract functions and abstract lists to facilitate reasoning about primitive recursive programs with first-order functions, lazy lists, and a subclass of higher-order functions.
The ACAp system automatically derives upper bounds on the time complexity of Nuprl extracts relative to a given profiling semantics. Analysis proceeds by abstract interpretation of the extract, where symbolic evaluation rules extend standard evaluation to terms with free variables. Symbolic evaluation of recursive programs generates systems of multi-variable difference equations, which are solved using the Mathematica computer algebra system.
The use of the system is exemplified by analyzing a proof extract that computes the maximum segment sum of a list and a functional program that determines the minimum of a list via sorting. For both results, we compare call-by-name to call-by-value evaluation.
bibTex ref: Ben00