On the computational complexity of imperative programming languages

  • Authors:
  • L. Kristiansen;K.-H. Niggl

  • Affiliations:
  • Oslo University College, Faculty of Engineering, Norway;Technische Universität Ilmenau, Institut für Theoretische and Technische Informatik, Helmholtzplatz, I Ilmenau 98693, Germany

  • Venue:
  • Theoretical Computer Science - Implicit computational complexity
  • Year:
  • 2004

Quantified Score

Hi-index 0.00

Visualization

Abstract

Two restricted imperative programming languages are considered: One is a slight modification of a loop language studied intensively in the literature, the other is a stack programming language over an arbitrary but fixed alphabet, supporting a suitable loop concept over stacks. The paper presents a purely syntactical method for analysing the impact of nesting loops on the running time. This gives rise to a uniform measure µ on both loop and stack programs, that is, a function that assigns to each such program P a natural number µ(P) computable from the syntax of P.It is shown that stack programs of µ-measure n compute exactly those functions computed by a Turing machine whose running time lies in Grzegorczyk class εn-2. In particular, stack programs of µ-measure 0 compute precisely the polynomial-time computable functions.Furthermore, it is shown that loop programs of µ-measure n compute exactly the functions in εn-2. In particular, loop programs of µ-measure 0 compute precisely the linear-space computable functions.