From Safety Critical Java Programs to Timed Process Models

  • Bent ThomsenEmail author
  • Kasper Søe Luckow
  • Lone Leth
  • Thomas Bøgholm
Part of the Lecture Notes in Computer Science book series (LNCS, volume 9465)


The idea of analysing real programs by process algebraic methods probably goes back to the Occam language using the CSP process algebra [43]. In [16, 24] Degano et al. followed in that tradition by analysing Mobile Agent Programs written in the Higher Order Functional, Concurrent and Distributed, programming language Facile [47], by equipping Facile with a process algebraic semantics based on true concurrency. This semantics facilitated analysis of programs revealing subtle bugs that would otherwise be very hard to find. Inspired by the idea of translating real programs into process algebraic frameworks, we have in recent years pursued an agenda of translating hard-real-time embedded safety critical programs written in the Safety Critical Java Profile [33] into networks of timed automata [4] and subjecting those to automated analysis using the UPPAAL model checker [10]. Several tools have been built and the tools have been used to analyse a number of systems for properties such as worst case execution time, schedulability and energy optimization [12, 13, 14, 19, 34, 36, 38]. In this paper we will elaborate on the theoretical underpinning of the translation from Java programs to timed automata models and briefly summarize some of the results based on this translation. Furthermore, we discuss future work, especially relations to the work in [16, 24] as Java recently has adopted first class higher order functions in the form of lambda abstractions.


Execution Environment Java Virtual Machine Control Flow Graph Schedulability Analysis Time Automaton 
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.


  1. 1.
    Aho, A.V., Lam, M.S., Sethi, R., Ullman, J.D.: Compilers: Principles. Techniques and Tools. Pearson Education, London (2006)zbMATHGoogle Scholar
  2. 2.
    Aicas: JamaicaVM User Manual: Java Technology for Critical Embedded Systems (2010)Google Scholar
  3. 3.
    aJile Systems:
  4. 4.
    Alur, R.: Timed automata. In: Halbwachs, N., Peled, D.A. (eds.) CAV 1999. LNCS, vol. 1633, pp. 8–22. Springer, Heidelberg (1999) CrossRefGoogle Scholar
  5. 5.
    Alur, R., Dill, D.L.: A theory of timed automata. Theor. Comput. Sci. 126(2), 183–235 (1994)MathSciNetCrossRefzbMATHGoogle Scholar
  6. 6.
    Amighi, A., de Carvalho Gomes, P., Gurov, D., Huisman, M.: Provably correct control flow graphs from Java bytecode programs with exceptions. Int. J. Softw. Tools Technol. Transfer, 1–32 (2015).
  7. 7.
    Amnell, T., Fersman, E., Mokrushin, L., Pettersson, P., Yi, W.: TIMES: a tool for schedulability analysis and code generation of real-time systems. In: The 1st International Workshop on Formal Modeling and Analysis of Timed Systems, May 2003Google Scholar
  8. 8.
    Bacon, D.F., Sweeney, P.F.: Fast static analysis of c++ virtual function calls. In: Proceedings of the 11th ACM SIGPLAN Conference on Object-oriented Programming, Systems, Languages, and Applications. OOPSLA 1996, pp. 324–341. ACM, New York (1996)Google Scholar
  9. 9.
    Baier, C., Katoen, J.-P.: Principles of Model Checking, vol. 26202649. The MIT Press, Cambridge (2008)zbMATHGoogle Scholar
  10. 10.
    Bengtsson, J., Larsen, K., Larsson, F., Pettersson, P., Yi, W.: Uppaal - a tool suite for automatic verification of real-time systems. In: Alur, R., Henzinger, T.A., Sontag, E.D. (eds.) HS 1995. LNCS, vol. 1066, pp. 232–243. Springer, Heidelberg (1996) CrossRefGoogle Scholar
  11. 11.
    Bengtsson, J.E., Yi, W.: Timed automata: semantics, algorithms and tools. In: Desel, J., Reisig, W., Rozenberg, G. (eds.) Lectures on Concurrency and Petri Nets. LNCS, vol. 3098, pp. 87–124. Springer, Heidelberg (2004) CrossRefGoogle Scholar
  12. 12.
    Bøgholm, T., Frost, C., Hansen, R., Jensen, C., Luckow, K., Ravn, A., Søndergaard, H., Thomsen, B.: Towards harnessing theories through tool support for hard real-time Java programming. Innovations Syst. Softw. Eng. 9(1), 17–28 (2013)CrossRefGoogle Scholar
  13. 13.
    Bøgholm, T., Hansen, R.R., Ravn, A.P., Thomsen, B., Søndergaard, H.: A predictable Java profile: rationale and implementations. In: Proceedings of the 7th International Workshop on Java Technologies for Real-Time and Embedded Systems. JTRES 2009, pp. 150–159 (2009)Google Scholar
  14. 14.
    Bøgholm, T., Kragh-Hansen, H., Olsen, P., Thomsen, B., Larsen, K.G.: Model-based schedulability analysis of safety critical hard real-time Java programs. In: Proceedings of the 6th International Workshop on Java Technologies for Real-time and Embedded Systems. JTRES 2008, pp. 106–114 (2008)Google Scholar
  15. 15.
    Bollella, G.: The Real-time Specification for Java. Addison-Wesley Java Series. Addison-Wesley, Boston (2000) Google Scholar
  16. 16.
    Borgia, R., Degano, P., Priami, C., Leth, L., Thomsen, B.: Understanding mobile agents via a non-interleaving semantics for facile. In: Schmidt, D.A., Cousot, R. (eds.) SAS 1996. LNCS, vol. 1145, pp. 98–112. Springer, Heidelberg (1996) CrossRefGoogle Scholar
  17. 17.
    Burns, A., Wellings, A.: Real-Time Systems and Programming Languages: ADA 95, Real-Time Java, and Real-Time POSIX, 4th edn. Addison-Wesley Educational Publishers Inc., Boston (2009)Google Scholar
  18. 18.
    Börger, E., Schulte, W.: Defining the Java virtual machine as platform for provably correct Java compilation. In: Brim, L., Gruska, L., Zlatuška, J. (eds.) MFCS 1998. LNCS, vol. 1450, pp. 17–35. Springer, Heidelberg (1998) CrossRefGoogle Scholar
  19. 19.
    Bøgholm, T., Thomsen, B., Larsen, K.G., Mycroft, A.: Schedulability analysis abstractions for safety critical Java. In: 2012 IEEE 15th International Symposium on Object/Component/Service-Oriented Real-Time Distributed Computing (ISORC), pp. 71–78, April 2012Google Scholar
  20. 20.
    Corbett, J.C., Dwyer, M.B., Hatcliff, J., Laubach, S., Robby, C.S.P., Zheng, H.: Bandera: extracting finite-state models from Java source code. In: Proceedings of the 2000 International Conference on Software Engineering, pp. 439–448 (2000)Google Scholar
  21. 21.
    Dalsgaard, A.E., Olesen, M.C., Toft, M., Hansen, R.R., Larsen, K.G.: METAMOC: modular execution time analysis using model checking. In: 10th International Workshop on Worst-Case Execution Time Analysis (2010)Google Scholar
  22. 22.
    David, A., Illum, J., Larsen, K., Skou, A.: Model-Based Framework for Schedulability Analysis Using UPPAAL 4.1, pp. 93–119. CRC Press, Boca Raton (2009) Google Scholar
  23. 23.
    Dean, J., Grove, D., Chambers, C.: Optimization of object-oriented programs using static class hierarchy analysis. In: Tokoro, M., Pareschi, R. (eds.) ECOOP 1995. LNCS, vol. 952, pp. 77–101. Springer, Heidelberg (1995) Google Scholar
  24. 24.
    Degano, P., Priami, C., Leth, L., Thomsen, B.: Causality for debugging mobile agents. Acta Informatica 36(5), 335–374 (1999)MathSciNetCrossRefzbMATHGoogle Scholar
  25. 25.
    Ferdinand, C.: Worst case execution time prediction by static program analysis. In: 2004 Proceedings, 18th International Symposium on Parallel and Distributed Processing, p. 125. IEEE (2004)Google Scholar
  26. 26.
    Frost, C., Jensen, C.S., Luckow, K.S., Thomsen, B.: WCET analysis of Java bytecode featuring common execution environments. In: 9th International Workshop on Java Technologies for Real-Time and Embedded Systems (2011)Google Scholar
  27. 27.
    Goossens, J., Devillers, R.: The non-optimality of the monotonic priority assignments for hard real-time offset free systems. Real-Time Syst. 13, 107–126 (1997)CrossRefGoogle Scholar
  28. 28.
    Holzmann, G.J.: The model checker spin. IEEE Trans. Softw. Eng. 23(5), 279–295 (1997)MathSciNetCrossRefGoogle Scholar
  29. 29.
    Huisman, M., Gurov, D.: CVPP: a tool set for compositional verification of control–flow safety properties. In: Beckert, B., Marché, C. (eds.) FoVeOOS 2010. LNCS, vol. 6528, pp. 107–121. Springer, Heidelberg (2011) CrossRefGoogle Scholar
  30. 30.
    HVM (Hardware near Virtual Machine):
  31. 31.
    JPF: Java PathFinder Tool-set (2014).
  32. 32.
    Li, S.: Y.-T., Malik, S.: Performance analysis of embedded software using implicit path enumeration. In: Proceedings of the 32nd Annual ACM/IEEE Design Automation Conference. DAC 1995, pp. 456–461. ACM, New York (1995)Google Scholar
  33. 33.
    Locke, D., Scott Andersen, B., Brosgol, B., Fulton, M., Henties, T., Hunt, J.H., Nielsen, J.O., Nilsen, K., Schoeberl, M., Tokar, J., Vitek, J., Wellings, A: Safety-Critical Java Technology Specification, Public draft (2013)Google Scholar
  34. 34.
    Luckow, K.S., Bøgholm, T., Thomsen, B.: Supporting development of energy-optimised Java real-time systems using TetaSARTS. In: WiP Proceedings of the 19th Real-Time and Embedded Technology and Application Symposium, pp. 41–44 (2013)Google Scholar
  35. 35.
    Luckow, K.S., Bøgholm, T., Thomsen, B., Larsen, K.G.: TetaSARTS: modular timing and performance analysis of safety critical Java systems. Practice and Experience, Concurrency and Computation (2014)Google Scholar
  36. 36.
    Luckow, K.S., Thomsen, B., Korsholm, S.E.: HVM-TP: a time predictable and portable Java virtual machine for hard real-time embedded systems. In: 12th International Workshop on Java Technologies for Real-Time and Embedded Systems (2014)Google Scholar
  37. 37.
    Luckow, K.S.: Platforms and model-based analyses for real-time Java. Ph.D. thesis, Department of Computer Science, Aalborg University (2014).
  38. 38.
    Luckow, K.S., Bøgholm, T., Thomsen, B., Larsen, K.G.: TetaSARTS: a tool for modular timing analysis of safety critical Java systems. In: Proceedings of the 11th International Workshop on Java Technologies for Real-Time and Embedded Systems. JTRES 2013, pp. 11–20 (2013)Google Scholar
  39. 39.
    Schoeberl, M.: JOP: a Java optimized processor for embedded real-time systems. Number ISBN 978-3-8364-8086-4. VDM Verlag Dr. Müller (2008)Google Scholar
  40. 40.
    Nilsen, K.: Differentiating features of the PERC virtual machine. Technical report, CTO, Atego (2009).
  41. 41.
    Pizlo, F., Ziarek, L., Vitek, J.: Real time Java on resource-constrained platforms with Fiji VM. In: Proceedings of the 7th International Workshop on Java Technologies for Real-Time and Embedded Systems. JTRES 2009, pp. 110–119. ACM, New York (2009)Google Scholar
  42. 42.
    Plsek, A., Zhao, L., Sahin, V.H., Tang, D., Kalibera, T., Vitek, J.: Developing safety critical Java applications with oscj/l0. In: Proceedings of the 8th International Workshop on Java Technologies for Real-Time and Embedded Systems. JTRES 2010, pp. 95–101. ACM, New York (2010)Google Scholar
  43. 43.
    Roscoe, A.W., Richard Hoare, C.A.: The laws of Occam programming. Theor. Comput. Sci. 60(2), 177–229 (1988)MathSciNetCrossRefzbMATHGoogle Scholar
  44. 44.
    Schoeberl, M., Puffitsch, W., Pedersen, R.U., Huber, B.: Worst-case execution time analysis for a Java processor. Softw. Pract. Experience 40(6), 507–542 (2010)CrossRefGoogle Scholar
  45. 45.
    Søndergaard, H., Korsholm, S.E., Ravn, A.P.: Safety-critical Java for low-end embedded platforms. In: Proceedings of the 10th International Workshop on Java Technologies for Real-Time and Embedded Systems. JTRES 2012, pp. 44–53. ACM, New York (2012)Google Scholar
  46. 46.
    Sundaresan, V., Hendren, L., Razafimahefa, C., Vallée-Rai, R., Lam, P., Gagnon, E., Godin, C.: Practical virtual method call resolution for Java. SIGPLAN Not. 35(10), 264–280 (2000)CrossRefGoogle Scholar
  47. 47.
    Thomsen, B., Leth, L., Kuo, T.-M.: A facile tutorial. In: Montanari, U., Sassone, V. (eds.) CONCUR 1996. LNCS, vol. 1119, pp. 278–298. Springer, Heidelberg (1996) CrossRefGoogle Scholar

Copyright information

© Springer International Publishing Switzerland 2015

Authors and Affiliations

  • Bent Thomsen
    • 1
    Email author
  • Kasper Søe Luckow
    • 2
  • Lone Leth
    • 1
  • Thomas Bøgholm
    • 1
  1. 1.Department of Computer ScienceAalborg UniversityAalborgDenmark
  2. 2.Carnegie Mellon Silicon ValleyNASA AmesMoffett FieldUSA

Personalised recommendations