Worst-Case Execution Times for a Purely Functional Language

  • Armelle Bonenfant
  • Christian Ferdinand
  • Kevin Hammond
  • Reinhold Heckmann
Part of the Lecture Notes in Computer Science book series (LNCS, volume 4449)


This paper provides guaranteed bounds on worst-case execution times for a strict, purely functional programming notation. Our approach involves combining time information obtained using a low-level commercial analyser with a high-level source-derived model to give worst-case execution time information. We validate our results using concrete timing information obtained using machine code fragments executing on a Renesas M32C/85 microcontroller development board. Our results confirm experimentally that our worst-case execution time model is a good predictor of execution times.


Clock Cycle Code Fragment Abstract Machine Machine Code WCET Analysis 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 1.
    Augustsson, L.: Compiling Lazy Functional Languages, Part II. PhD thesis, Dept. of Computer Science, Chalmers University of Technology, Göteborg, Sweden (1987)Google Scholar
  2. 2.
    Bernat, G., Burns, A., Wellings, A.: Portable Worst-Case Execution Time Analysis Using Java Byte Code. In: Proc. 12th Euromicro Intl. Conf. on Real-Time Systems (ECRTS 2000), Stockholm (June 2000)Google Scholar
  3. 3.
    Bernat, G., Colin, A., Petters, S.M.: WCET Analysis of Probabilistic Hard Real-Time Systems. In: Proc. 23rd IEEE Real-Time Systems Symposium (RTSS 2002) (December 2002)Google Scholar
  4. 4.
    Bonenfant, A., Chen, Z., Hammond, K., Michaelson, G.J., Wallace, A., Wallace, I.: Towards resource-certified software: A formal cost model for time and its application to an image-processing example. In: ACM Symposium on Applied Computing (SAC ’07), Seoul, Korea (March 11-15, 2007)Google Scholar
  5. 5.
    Byhlin, S., Ermedahl, A., Gustafsson, J., Lisper, B.: Applying static WCET analysis to automotive communication software. In: 17th Euromicro Conference of Real-Time Systems, (ECRTS’05), Mallorca, Spain (July 2005)Google Scholar
  6. 6.
    Comaniciu, D., Ramesh, V., Meer, P.: Kernel-based object tracking. IEEE Transactions on Pattern Analysis and Machine Intelligence 25(5), 564–575 (2003)CrossRefGoogle Scholar
  7. 7.
    Renesas Technology Corp. (2006), Home Page
  8. 8.
    Corti, M., Gross, T.: Approximation of the Worst-Case Execution Time Using Structural Analysis. In: Proc. ACM International Conference on Embedded Software (EMSOFT 2004) (2004)Google Scholar
  9. 9.
    Cousot, P., Cousot, R.: Abstract interpretation: a unified lattice model for static analysis of programs by construction or approximation of fixpoints. In: 4th ACM Symposium on Principles of Programming Languages, pp. 238–252. ACM Press, New York (1977)CrossRefGoogle Scholar
  10. 10.
    Crary, K., Weirich, S.: Resource Bound Certification. In: POPL 2000 — Symposium on Principles of Prog. Langs. pp. 184–198, Boston, MA (January 2000)Google Scholar
  11. 11.
    Ferdinand, C.: Cache Behavior Prediction for Real-Time Systems, Saarland University, Saarbrücken, Germany. PhD thesis (1997)Google Scholar
  12. 12.
    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: Henzinger, T.A., Kirsch, C.M. (eds.) EMSOFT 2001. LNCS, vol. 2211, pp. 469–485. Springer, Heidelberg (2001)CrossRefGoogle Scholar
  13. 13.
    Ferdinand, C., Martin, F., Wilhelm, R., Alt, M.: Cache behavior prediction by abstract interpretation. Science of Computer Programming 35(2), 163–189 (1999)zbMATHCrossRefGoogle Scholar
  14. 14.
    Hammond, K.: Exploiting Purely Functional Programming to Obtain Bounded Resource Behaviour: the Hume Approach. In: Central European Summer School on Functional Programming, July 2005. Spinger-Verlag LNCS (to appear)Google Scholar
  15. 15.
    Hammond, K., Ferdinand, C., Heckmann, R., Dyckhoff, R., Hofmann, M., Jost, S., Loidl, H.-W., Michaelson, G.J., Pointon, R., Scaife, N., Sérot, J., Wallace, A.: Towards Formally Verifiable WCET Analysis for a Functional Programming Language. In: Proc. Intl. Workshop on Worst-Case Execution Time (WCET) Analysis (April 2006)Google Scholar
  16. 16.
    Hammond, K., Michaelson, G.: Bounded Space Programming using Finite State Machines and Recursive Functions: the Hume Approach. ACM Transactions on Software Engineering and Methodology (TOSEM 2006) (in preparation)Google Scholar
  17. 17.
    Hammond, K., Michaelson, G.J.: Hume: a Domain-Specific Language for Real-Time Embedded Systems. In: Pfenning, F., Smaragdakis, Y. (eds.) GPCE 2003. LNCS, vol. 2830, pp. 37–56. Springer, Heidelberg (2003)Google Scholar
  18. 18.
    Hammond, K., Michaelson, G.J.: Predictable Space Behaviour in FSM-Hume. In: Peña, R., Arts, T. (eds.) IFL 2002. LNCS, vol. 2670, Springer, Heidelberg (2003)CrossRefGoogle Scholar
  19. 19.
    Heckmann, R., Langenbach, M., Thesing, S., Wilhelm, R.: The influence of processor architecture on the design and the results of WCET tools. Proceedings of the IEEE 91(7), 1038–1054 (July 2003) Special Issue on Real-Time Systems.CrossRefGoogle Scholar
  20. 20.
    Hofmann, M., Jost, S.: Static Prediction of Heap Space Usage for First-Order Functional Programs. In: POPL’03 — Symposium on Principles of Programming Languages, New Orleans, LA, USA, ACM Press, New York (2003)Google Scholar
  21. 21.
    Hughes, R.J.M.: The Design and Implementation of Programming Languages, DPhil Thesis, Programming Research Group, Oxford (July 1983)Google Scholar
  22. 22.
    Langenbach, M., Thesing, S., Heckmann, R.: Pipeline modeling for timing analysis. In: Hermenegildo, M.V., Puebla, G. (eds.) SAS 2002. LNCS, vol. 2477, pp. 294–309. Springer, Heidelberg (2002)CrossRefGoogle Scholar
  23. 23.
    Li, Y.-T.S., Malik, S., Wolfe, A.: Efficient Microarchitecture Modeling and Path Analysis for Real-Time Software. In: Proc. RTSS 1995: IEEE Real-Time Systems Symposium, pp. 298 (1995)Google Scholar
  24. 24.
    Meyerhöfer, M., Lauterwald, F.: Towards Platform-Independent Component Measurement. In: Proc. WCOP 2005 – Tenth International Workshop on Component-Oriented Programming, Glasgow (July 2005)Google Scholar
  25. 25.
    Puschner, P., Bernat, G.: WCET Analysis of Reusable Portable Code. In: Proc. 13th Euromicro Intl. Conf. on Real-Time Syst. (ECRTS 2001), pp. 45–52 (2001)Google Scholar
  26. 26.
    Sandell, D., Ermedahl, A., Gustafsson, J., Lisper, B.: Static timing analysis of real-time operating system code. In: Margaria, T., Steffen, B. (eds.) ISoLA 2004. LNCS, vol. 4313, Springer, Heidelberg (2006)CrossRefGoogle Scholar
  27. 27.
    Sehlberg, D.: Static WCET analysis of task-oriented code for construction vehicles. Master’s thesis, Mälardalen University, (October 2005)Google Scholar
  28. 28.
    Souyris, J., Le Pavec, E., Himbert, G., Jégu, V., Borios, G., Heckmann, R.: Computing the Worst Case Execution Time of an Avionics Program by Abstract Interpretation. In: Proc. 2005 Intl Workshop on Worst-Case Execution Time (WCET) Analysis, pp. 21–24 (2005)Google Scholar
  29. 29.
    IAR Systems (2006), Home Page
  30. 30.
    Theiling, H., Ferdinand, C.: Combining abstract interpretation and ILP for microarchitecture modelling and program path analysis. In: Proc. RTSS 1998: IEEE Real-Time Systems Symposium, pp. 144–153, Madrid, Spain (December 1998)Google Scholar
  31. 31.
    Vasconcelos, P.B.: Cost Inference and Analysis for Recursive Functional Programs. PhD thesis, University of St Andrews (in preparation)Google Scholar
  32. 32.
    Vasconcelos, P.B., Hammond, K.: Inferring Costs for Recursive, Polymorphic and Higher-Order Functional Programs. In: Trinder, P., Michaelson, G.J., Peña, R. (eds.) IFL 2003. LNCS, vol. 3145, pp. 86–101. Springer, Heidelberg (2004)Google Scholar
  33. 33.
    Wilhelm, R.: Determining bounds on execution times. In: Zurawski, R. (ed.) Handbook on Embedded Systems, CRC Press, Boca Raton pp. 14–1,14–23. (2005)Google Scholar
  34. 34.
    Wong, P.: Bytecode Monitoring of Java Programs, MSc thesis, University of Warwick (2003)Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2007

Authors and Affiliations

  • Armelle Bonenfant
    • 1
  • Christian Ferdinand
    • 2
  • Kevin Hammond
    • 1
  • Reinhold Heckmann
    • 2
  1. 1.School of Computer Science, University of St Andrews, St AndrewsUK
  2. 2.AbsInt, SaarbrückenGermany

Personalised recommendations