Practical experiences of applying source-level WCET flow analysis to industrial code

  • Björn Lisper
  • Andreas Ermedahl
  • Dietmar Schreiner
  • Jens Knoop
  • Peter Gliwa


Code-level timing analysis, such as worst-case execution time (WCET) analysis, usually takes place at the binary level. However, many program properties that are important for the analysis, such as constraints on possible program flows, are easier to derive at the source code level since this code contains much more information. Therefore, various source-level analyses can provide valuable support for timing analysis. However, source-level analysis is not always smoothly applicable in industrial settings. In this paper, we report on the experiences of applying source-level analysis to industrial code in the ALL-TIMES project: the promises, the pitfalls, and the workarounds that were developed. We also discuss various approaches to how the difficulties that were encountered can be tackled.


Static analysis WCET analysis Source-level analysis Embedded software 


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 1.
    Barkah, D., Ermedahl, A., Gustafsson, J., Lisper, B., Sandberg, C.: Evaluation of automatic flow analysis for WCET calculation on industrial real-time system code. In: Burns, A. (ed.) Proceedings of 20th Euromicro Conference on Real-Time Systems, pp. 331–340 (2008)Google Scholar
  2. 2.
    Bessey A., Block K., Chelf B., Chou A., Fulton B., Hallem S., Henri-Gros C., Kamsky A., McPeak S., Engler D.: A few billion lines of code later: using static analysis to find bugs in the real world. Commun. ACM 53(2): (2010)Google Scholar
  3. 3.
    Byhlin, S., Ermedahl, A., Gustafsson, J., Lisper, B.: Applying static WCET analysis to automotive communication software. In: Proceedings of 17th Euromicro Conference on Real-Time Systems (ECRTS’05) (2005)Google Scholar
  4. 4.
    Carlsson, M., Engblom, J., Ermedahl, A., Lindblad, J., Lisper, B.: Worst-case execution time analysis of disable interrupt regions in a commercial real-time operating system. In: Pettersson, P., Yi, W. (ed.) Proceedings of 2nd International Workshop on Real-Time Tools, Copenhagen (2002)Google Scholar
  5. 5.
    CIL infrastructure for C program analysis and transformation (2010)
  6. 6.
    Cousot, P., Cousot, R., Feret, J., Mauborgne, L., Miné, A., Monniaux, D., Rival, X.: The ASTRÉE analyzer. In: Sagiv, M. (ed.) Proceedings of 14th European Symposium on Programming. Lecture Notes in Computer Sci., vol. 3444, pp. 21–30. Springer, Berlin (2005)Google Scholar
  7. 7.
    Emanuelsson, P., Nilsson, U.: A comparative study of industrial static analysis tools (extended version). Technical report, Linköping University (2008)Google Scholar
  8. 8.
    Ferdinand, C., Heckmann, R., Langenbach, M., Martin, F., Schmidt, M., Theiling, H., Thesing, S., Wilhelm, R.: Reliable and precise WCET determination for a real-life processor. In: Proceedings of 1st International Workshop on Embedded Systems (EMSOFT2001), LNCS, vol. 2211 (2001)Google Scholar
  9. 9.
    Gustafsson, J.: SWEET manual, 2011.
  10. 10.
    Gustafsson, J., Ermedahl, A., Lisper, B., Sandberg, C., Källberg L.: ALF—a language for WCET flow analysis. In: Holsti, N. (ed.) Proceedings of 9th International Workshop on Worst-Case Execution Time Analysis (WCET’2009), pp. 1–11, Dublin, Ireland (2009)Google Scholar
  11. 11.
    Gustafsson, J., Ermedahl, A., Sandberg, C., Lisper, B.: Automatic derivation of loop bounds and infeasible paths for WCET analysis using abstract execution. In: Proceedings of 27th IEEE Real-Time Systems Symposium (RTSS’06), pp. 57–66, Rio de Janeiro, Brazil, Dec. (2006). IEEE Computer SocietyGoogle Scholar
  12. 12.
    Healy C., Sjödin M., Rustagi V., Whalley D., van Engelen R.: Supporting timing analysis by automatic bounding of loop iterations. J. Real-Time Syst. 18(2–3), 129–156 (2000)CrossRefGoogle Scholar
  13. 13.
    Heckmann, R., Ferdinand, C., Kästner, D., Nenova, S.: Architecture exploration and timing estimation during early design phases (this volume)Google Scholar
  14. 14.
    Holsti, N., Långbacka, T., Saarinen, S.: Using a worst-case execution-time tool for real-time verification of the DEBIE software. In: Proceedings of DASIA 2000 Conference (Data Systems in Aerospace 2000, ESA SP-457) (2000)Google Scholar
  15. 15.
    Holsti, N., Långbacka, T., Saarinen, S.: Worst-case execution-time analysis for digital signal processors. In: Proceedings of EUSIPCO 2000 Conference (X European Signal Processing Conference) (2000)Google Scholar
  16. 16.
    Kirner, R.: Extending Optimising Compilation to Support Worst-Case Execution Time Analysis. PhD thesis, Technische Universität Wien, Vienna, Austria (2003)Google Scholar
  17. 17.
    Kirner, R., Knoop, J., Prantl, A., Schordan, M., Wenzel, I.: WCET analysis: the annotation language challenge. In: Rochange, C. (ed.) Proceedings of 7th International Workshop on Worst-Case Execution Time Analysis (WCET’2007), pp. 83–99, Pisa, Italy (2007)Google Scholar
  18. 18.
    Levine, J.: Linkers and Loaders. Morgan Kaufmann, 2000. ISBN 1-55860-496-0Google Scholar
  19. 19.
    Lisper, B.: The ALL-TIMES project: Introduction and overview (this volume)Google Scholar
  20. 20.
    Merriam, N., Lisper, B.: Estimation of productivity increase for timing analysis tool chains (this volume)Google Scholar
  21. 21.
    Montag, P., Goerzig, S., Levi, P.: Challenges of timing verification tools in the automotive domain. In: Margaria, T., Philippou, A., Steffen, B. (ed.) Proceedings of 2nd International Symposium on Leveraging Applications of Formal Methods (ISOLA’06), Paphos, Cyprus (2006)Google Scholar
  22. 22.
    Nielson, F., Nielson, H.R., Hankin, C.: Principles of Program Analysis, 2nd edn. Springer, Berlin. ISBN 3-540-65410-0 (2005)Google Scholar
  23. 23.
    Prantl, A., Schordan, M., Knoop, J.: TuBound—a conceptually new tool for worst-case execution time analysis. In: Kirner, R. (ed.) Proceedings of 8th International Workshop on Worst-Case Execution Time Analysis (WCET’2008), pp. 141–148, Prague, Czech Republic (2008)Google Scholar
  24. 24.
    Rodriguez, M., Silva, N., Esteves, J., Henriques, L., Costa, D., Holsti, N., Hjortnaes, K.: Challenges in calculating the WCET of a complex on-board satellite application. In: Proceedings of 3rd International Workshop on Worst-Case Execution Time Analysis (WCET’2003), Porto (2003)Google Scholar
  25. 25.
  26. 26.
    Sandell, D., Ermedahl, A., Gustafsson, J., Lisper, B.: Static timing analysis of real-time operating system code. In: Proceedings of 1st International Symposium on Leveraging Applications of Formal Methods (ISOLA’04), (2004)Google Scholar
  27. 27.
    Schreiner, D., Barany, G., Schordan, M., Knoop, J.: Comparison of type-based vs. alias-based component recognition for interface-level timing annotations (this volume)Google Scholar
  28. 28.
    Sehlberg, D., Ermedahl, A., Gustafsson, J., Lisper, B., Wiegratz, S.: Static WCET analysis of real-time task-oriented code in vehicle control systems. In: Margaria, T., Philippou, A., Steffen, B. (eds.) Proceedings of 2nd International Symposium on Leveraging Applications of Formal Methods (ISOLA’06), Paphos, Cyprus (2006)Google Scholar
  29. 29.
    Thesing, S., Souyris, J., Heckmann, R., Randimbivololona, F., Langenbach, M., Wilhelm, R., Ferdinand, C.: An abstract interpretation-based timing validation of hard real-time avionics software. In: Proceedings of the IEEE International Conference on Dependable Systems and Networks (DSN-2003) (2003)Google Scholar

Copyright information

© Springer-Verlag 2012

Authors and Affiliations

  • Björn Lisper
    • 1
  • Andreas Ermedahl
    • 1
  • Dietmar Schreiner
    • 2
  • Jens Knoop
    • 2
  • Peter Gliwa
    • 3
  1. 1.School of Innovation, Design, and EngineeringMälardalen UniversityVästeråsSweden
  2. 2.Institute of Computer LanguagesVienna University of TechnologyViennaAustria
  3. 3.GLIWA GmbH embedded systemsWeilheim i.OB.Germany

Personalised recommendations