Skip to main content

Stack Size Analysis for Interrupt-Driven Programs

  • Conference paper
  • First Online:
Static Analysis (SAS 2003)

Part of the book series: Lecture Notes in Computer Science ((LNCS,volume 2694))

Included in the following conference series:

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.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 39.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. 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.

    Google Scholar 

  2. 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.

    Google Scholar 

  3. 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.

    Chapter  Google Scholar 

  4. C. Papadimitriou. Computational Complexity. Addision-Wesley, 1994.

    Google Scholar 

  5. L. Pareto. Types for Crash Prevention. PhD thesis, Chalmers University of Technology, 2000.

    Google Scholar 

  6. 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.

    Google Scholar 

  7. Z. Wan, W. Taha, and P. Hudak. Event-driven FRP. In PADL: Practical Aspects of Declarative Languages, LNCS 2257, pp. 155–172. Springer, 2002.

    Chapter  Google Scholar 

  8. M. Yannakakis. Graph-theoretic methods in database theory. In PODS: Principles of Database Systems, pp. 203–242. ACM, 1990.

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints 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

Publish with us

Policies and ethics