Analyzing Runtime and Size Complexity of Integer Programs

  • Marc Brockschmidt ,
  • Fabian Emmes ,
  • Stephan Falke ,
  • Carsten Fuhs ,
  • Jurgen Giesl

TOPLAS | , Vol 38

To appear.

Publication | Publication

We present a modular approach to automatic complexity analysis of integer programs. Based on a novel alternation between finding symbolic time bounds for program parts and using these to infer bounds on the absolute values of program variables, we can restrict each analysis step to a small part of the program while maintaining a high level of precision. The bounds computed by our method are polynomial or exponential expressions that depend on the absolute values of input parameters. We show how to extend our approach to arbitrary cost measures, allowing to use our technique to find upper bounds for other expended resources, such as network requests or memory consumption. Our contributions are implemented in the open source tool KoAT, and extensive experiments show the performance and power of our implementation in comparison with other tools.