Stack size analysis for interrupt-driven programs

  • Authors:
  • Krishnendu Chatterjee;Di Ma;Rupak Majumdar;Tian Zhao;Thomas A. Henzinger;Jens Palsberg

  • Affiliations:
  • Department of Electrical Engineering and Computer Sciences, University of California, Berkeley, CA;Department of Computer Science, Purdue University, West Lafayette, IN;Department of Computer Science, University of California, Los Angeles, CA;Department of Computer Science, University of Wisconsin, Milwaukee, WI;Department of Electrical Engineering and Computer Sciences, University of California, Berkeley, CA and School of Computer and Communication Sciences, École Polytechnique Fédérale de ...;Department of Computer Science, University of Wisconsin, Milwaukee, WI

  • Venue:
  • Information and Computation - Special issue: Commemorating the 50th birthday anniversary of Paris C. Kanellakis
  • Year:
  • 2004

Quantified Score

Hi-index 0.00

Visualization

Abstract

We study the problem of determining stack boundedness and the exact maximum stack size for three classes of interrupt-driven programs. Interrupt-driven programs are used in many real-time applications that require responsive interrupt handling. In order to ensure responsiveness, programmers often enable interrupt processing in the body of lower-priority interrupt handlers. In such programs a programming error can allow interrupt handlers to be interrupted in a cyclic fashion to lead to an unbounded stack, causing the system to crash. For a restricted class of interrupt-driven programs, we show that there is a polynomial-time procedure to check stack boundedness, while determining the exact maximum stack size is PSPACE-complete. For a larger class of programs, the two problems are both PSPACE-complete, and for the largest class of programs we consider, the two problems are PSPACE-hard and can be solved in exponential time. While the complexities are high, our algorithms are exponential only in the number of handlers, and polynomial in the size of the program.