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 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.
Jens Palsberg, Di Ma, and Tian Zhao were supported by the NSF ITR award 0112628. Thomas A. Henzinger, Krishnendu Chatterjee, and Rupak Majumdar were supported by the AFOSR grant F49620-00-1-0327, the DARPA grants F33615-C-98-3614 and F33615-00-C-1693, the MARCO grant 98-DT-660, and the NSF grants CCR-0208875 and CCR-0085949.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
Similar content being viewed by others
References
D. Brylow, N. Damgaard, and J. Palsberg. Static checking of interrupt-driven software. In ICSE: International Conference on Software Engineering, pp. 47–56. ACM/IEEE, 2001.
J. Hughes, L. Pareto, and A. Sabry. Proving the correctness of reactive systems using sized types. In POPL: Principles of Programming Languages, pp. 410–423. ACM, 1996.
J. Palsberg and D. Ma. A typed interrupt calculus. In FTRTFT: Formal Techniques in Real-Time and Fault-tolerant Systems, LNCS 2469, pp. 291–310. Springer, 2002.
C. Papadimitriou. Computational Complexity. Addision-Wesley, 1994.
L. Pareto. Types for Crash Prevention. PhD thesis, Chalmers University of Technology, 2000.
T. Reps, S. Horwitz, and M. Sagiv. Precise interprocedural dataflow analysis via graph reachability. In POPL: Principles of Programming Languages, pp. 49–61. ACM, 1995.
Z. Wan, W. Taha, and P. Hudak. Event-driven FRP. In PADL: Practical Aspects of Declarative Languages, LNCS 2257, pp. 155–172. Springer, 2002.
M. Yannakakis. Graph-theoretic methods in database theory. In PODS: Principles of Database Systems, pp. 203–242. ACM, 1990.
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2003 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Chatterjee, K., Ma, D., Majumdar, R., Zhao, T., Henzinger, T.A., Palsberg, J. (2003). Stack Size Analysis for Interrupt-Driven Programs. In: Cousot, R. (eds) Static Analysis. SAS 2003. Lecture Notes in Computer Science, vol 2694. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-44898-5_7
Download citation
DOI: https://doi.org/10.1007/3-540-44898-5_7
Published:
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-40325-8
Online ISBN: 978-3-540-44898-3
eBook Packages: Springer Book Archive