skip to main content
article

Faster WCET flow analysis by program slicing

Published:14 June 2006Publication History
Skip Abstract Section

Abstract

Static Worst-Case Execution Time (WCET) analysis is a technique to derive upper bounds for the execution times of programs. Such bounds are crucial when designing and verifying real-time systems. WCET analysis needs a program flow analysis to derive constraints on the possible execution paths of the analysed program, like iteration bounds for loops and dependences between conditionals.Current WCET analysis tools typically obtain flow information through manual annotations. Better support for automatic flow analysis would eliminate much of the need for this laborious work. However, to automatically derive high-quality flow information is hard, and solution techniques with large time and space complexity are often required.In this paper we describe how to use program slicing to reduce the computational need of flow analysis methods. The slicing identifes statements and variables which are guaranteed not to influence the program flow. When these are removed, the calculation time of our different flow analyses decreases, in some cases considerably.We also show how program slicing can be used to identify the input variables and globals that control the outcome of a particular loop or conditional. This should be valuable aid when performing WCET analysis and systematic testing of large and complex real-time programs.

References

  1. H. Agrawal. Dominators, Super Blocks, and Program Coverage. In Conference Record of POPL '94: 21st ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, Oregon, 1994. Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. ASTEC homepage, 2005. www.astec.uu.se.Google ScholarGoogle Scholar
  3. I. Bate and R. Reutemann. Worst-case execution time analysis for dynamic branch predictors. In Proc. 16th Euromicro Conference of Real-Time Systems, (ECRTS'04), June 2004. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. B. Blanchet, P. Cousot, R. Cousot, J. Feret, L. Mauborgne, A. Miné, D. Monniaux, and X. Rival. The Essence of Computation: Complexity, Analysis, Transformation. LNCS 2566. Springer-Verlag, 2002.Google ScholarGoogle Scholar
  5. Bound-T tool homepage, 2006. www.tidorum.fi/bound-t/.Google ScholarGoogle Scholar
  6. S. Byhlin, A. Ermedahl, J.n Gustafsson, and B. Lisper. Applying static WCET analysis to automotive communication software. In Proc. 17th Euromicro Conference of Real-Time Systems, (ECRTS'05), pages 249--258, July 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. P. Cousot and R. Cousot. Abstract Interpretation: A Unified Lattice Model for Static Analysis of Programs by Construction or Approximation of Fixpoints. In Proc. 4th ACM Symposium on Principles of Programming Languages, Los Angeles, January 1977. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. P. Cousot and R. Cousot. Comparing the Galois Connection and Widening/Narrowing Approaches to Abstract Interpretation. In Proc. 4th International Symposium on Programming Languages, Implementations, Logics, and Programs, Lecture Notes in Computer Science (LNCS) 631, pages 269--295. Springer-Verlag, August 1992. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. J. Engblom. Processor Pipelines and Static Worst-Case Execution Time Analysis. PhD thesis, Uppsala University, April 2002. ISBN 91-554-5228-0.Google ScholarGoogle Scholar
  10. J. Engblom and A. Ermedahl. Pipeline Timing Analysis Using a Trace-Driven Simulator. In Proc. 6th International Conference on Real-Time Computing Systems and Applications (RTCSA'99). IEEE Computer Society Press, Dec 1999. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. J. Engblom and A. Ermedahl. Modeling Complex Flows for Worst-Case Execution Time Analysis. In Proc. 21th IEEE Real-Time Systems Symposium (RTSS'00), Nov 2000. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. A. Ermedahl. A Modular Tool Architecture for Worst-Case Execution Time Analysis. PhD thesis, Uppsala University, June 2003.Google ScholarGoogle Scholar
  13. A. Ermedahl, J. Gustafsson, and B. Lisper. Experiences from industrial WCET analysis case studies. In Reinhard Wilhelm, editor, Proc. 5th International Workshop on Worst-Case Execution Time Analysis, (WCET'2005), pages 19--22, Palma de Mallorca, July 2005.Google ScholarGoogle Scholar
  14. A. Ermedahl, F. Stappert, and J. Engblom. Clustered Calculation of Worst-Case Execution Times. In Proc. 6th International Conference on Compilers, Architecture, and Synthesis for Embedded Systems, (CASES'03), Oct 2003. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. J. Ferrante, K. J. Ottenstein, and J. D. Warren. The program dependence graph and its use in optimization. ACM Transactions on Programming Languages and Systems, 9(3):319--349, July 1987. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. C. Fraser and D. Hanson. A Retargetable C Compiler: Design and Implementation. Addison-Wesley, 1990. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. J. Ganssle. Really real-time systems. In Proc. Embedded Systems Conference San Francisco 2001, April 2001.Google ScholarGoogle Scholar
  18. P. Granger. Static Analysis of Arithmetical Congruences. International Journal of Computer Mathematics, pages 165--199, 1989.Google ScholarGoogle ScholarCross RefCross Ref
  19. R. Gupta. Generalized Dominators and Post-Dominators. In POPL '92: Proceedings of the 19th ACM SIGPLAN-SIGACT symposium on Principles of programming languages, NY, USA, 1992. ACM Press. Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. J. Gustafsson. Analyzing Execution-Time of Object-Oriented Programs Using Abstract Interpretation. PhD thesis, May 2000.Google ScholarGoogle Scholar
  21. J. Gustafsson, A. Ermedahl, and B. Lisper. Towards a flow analysis for embedded system C programs. In Proc. 10th IEEE International Workshop on Object-oriented Real-time Dependable Systems (WORDS 2005), Sedona, USA, February 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. J. Gustafsson, B. Lisper, C. Sandberg, and N. Bermudo. A tool for automatic flow analysis of C-programs for WCET calculation. In Bob Werner, editor, Proc. 8th IEEE International Workshop on Object-oriented Real-time Dependable Systems (WORDS 2003), Guadalajara, Mexico, 2003. IEEE.Google ScholarGoogle ScholarCross RefCross Ref
  23. C. Healy, M. Sjödin, V. Rustagi, and David Whalley. Bounding Loop Iterations for Timing Analysis. In Proc. 4th IEEE Real-Time Technology and Applications Symposium (RTAS'98), June 1998. Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. C. Healy and D. Whalley. Tighter Timing Predictions by Automatic Detection and Exploitation of Value-Dependent Constraints. In Proc. 5th IEEE Real-Time Technology and Applications Symposium (RTAS'99), June 1999. Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. N. Holsti, T. Långbacka, and S. Saarinen. Worst-Case Execution-Time Analysis for Digital Signal Processors. In Proc. EUSIPCO 2000 Conference (X European Signal Processing Conference), 2000.Google ScholarGoogle Scholar
  26. S. Horwitz, T. Reps, and D. Binkley. Interprocedural slicing using dependence graphs. ACM Trans. Program. Lang. Syst., 12(1), 1990. Google ScholarGoogle ScholarDigital LibraryDigital Library
  27. T. Lundqvist and P. Stenström. Integrating Path and Timing Analysis using Instruction-Level Simulation Techniques. In Proc. ACM SIGPLAN Workshop on Languages, Compilers and Tools for Embedded Systems (LCTES'98), June 1998. Google ScholarGoogle ScholarDigital LibraryDigital Library
  28. Thomas Lundqvist. A WCET Analysis Method for Pipelined Microprocessors with Cache Memories. PhD thesis, Chalmers University of Technology, Göteborg, Sweden, June 2002.Google ScholarGoogle Scholar
  29. Mälardalen University WCET project homepage, 2006. www.mrtc.mdh.se/projects/wcet.Google ScholarGoogle Scholar
  30. S. S. Muchnick. Advanced Compiler Design and Implementation. Morgan Kaufmann Publishers, 1997. ISBN: 1-55860-320-4. Google ScholarGoogle ScholarDigital LibraryDigital Library
  31. F. Nielson, H. R. Nielson, and C. Hankin. Principles of Program Analysis, 2nd edition. Springer, 2005. ISBN 3-540-65410-0. Google ScholarGoogle ScholarDigital LibraryDigital Library
  32. K. J. Ottenstein and L. M. Ottenstein. The Program Dependence Graph in a Software Development Environment. In Proc. ACM SIGSOFT/SIGPLAN Software Engineering Symposium on Practical Software Development Environments, pages 177--184, 1984. Google ScholarGoogle ScholarDigital LibraryDigital Library
  33. M. Rodriguez, N. Silva, J. Esteves, L. Henriques, D. Costa, N. Holsti, and K. Hjortnaes. Challenges in Calculating the WCET of a Complex On-board Satellite Application. In Proc. 3rd International Workshop on Worst-Case Execution Time Analysis, (WCET'2003), 2003.Google ScholarGoogle Scholar
  34. J. Runeson and S. Nyström. Retargetable Graph-coloring Register Allocation for Irregular Architectures. In Proc. 7th International Workshop on Software and Compilers for Embedded Systems (SCOPES 03), 2003.Google ScholarGoogle ScholarCross RefCross Ref
  35. C. Sandberg. Inspection of Industrial Code for Syntactical Loop Analysis. In Proc. 3rd International Workshop on Worst-Case Execution Time Analysis, (WCET'2003), June 2003.Google ScholarGoogle Scholar
  36. F. Stappert and P. Altenbernd. Complete worst-case execution time analysis of straight-line hard real-time programs. Journal of Systems Architecture, 46(4):339--355, 2000. Google ScholarGoogle ScholarDigital LibraryDigital Library
  37. F. Stappert, A. Ermedahl, and J. Engblom. Efficient longest executable path search for programs with complex flows and pipeline effects. In Proc. 4th International Conference on Compilers, Architecture, and Synthesis for Embedded Systems, November 2001. Google ScholarGoogle ScholarDigital LibraryDigital Library
  38. B. Steensgaard. Points-to Analysis in Almost Linear Time. Proc. in 23rd Annual ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, Jan 1996. Google ScholarGoogle ScholarDigital LibraryDigital Library
  39. S. Thesing. Safe and Precise WCET Determination by Abstract Interpretation of Pipeline Models. PhD thesis, Saarland University, 2004.Google ScholarGoogle Scholar
  40. Vinnova homepage, 2006. www.vinnova.se.Google ScholarGoogle Scholar
  41. M. Weiser. Program Slicing. IEEE Transactions on Software Engineering, SE-10(4):352--357, July 1984.Google ScholarGoogle ScholarDigital LibraryDigital Library
  42. B. Xu, J. Qian, X. Zhang, Z. Wu, and L. Chen. A Brief Survey of Program Slicing. SIGSOFT Softw. Eng. Notes, 30(2):1--36, 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Faster WCET flow analysis by program slicing

        Recommendations

        Comments

        Login options

        Check if you have access through your login credentials or your institution to get full access on this article.

        Sign in

        Full Access

        • Published in

          cover image ACM SIGPLAN Notices
          ACM SIGPLAN Notices  Volume 41, Issue 7
          Proceedings of the 2006 LCTES Conference
          July 2006
          208 pages
          ISSN:0362-1340
          EISSN:1558-1160
          DOI:10.1145/1159974
          Issue’s Table of Contents
          • cover image ACM Conferences
            LCTES '06: Proceedings of the 2006 ACM SIGPLAN/SIGBED conference on Language, compilers, and tool support for embedded systems
            June 2006
            220 pages
            ISBN:159593362X
            DOI:10.1145/1134650

          Copyright © 2006 ACM

          Publisher

          Association for Computing Machinery

          New York, NY, United States

          Publication History

          • Published: 14 June 2006

          Check for updates

          Qualifiers

          • article

        PDF Format

        View or Download as a PDF file.

        PDF

        eReader

        View online with eReader.

        eReader
        About Cookies On This Site

        We use cookies to ensure that we give you the best experience on our website.

        Learn more

        Got it!