A Hierarchical State Machine Model for Hazard Analysis of Real-time Safety Critical Systems

Ahmed Mohamed Bakr, May Salama, Abdelwahab Alsammak


Real-time systems must avoid hazardous situations. To achieve this, their functionality should be investigated under time constraints. In this paper, a modeling based on Hierarchical Communicating Real-time State Machine (H- CRSM) and analysis methodology is proposed to examine statically ANSI-C code to obtain the hazardous events in the input system. A hazardous event equation is taken as input to the proposed system. The output is a list of hazardous scenarios. A path in the code showing the cause of the undesirable event is associated with each hazardous scenario. The strength of the proposed methodology is that the process of hazardous situations detection does not require running the ANSI-C program multiple times with different input values. It also focuses on analyzing the software level of the life cycle. Most of the verification tools check the system level. The system level may be bug-free but the software level may not.


hazard analysis; fault tree analysis; hierarchical CRSM; ANSI-C; real-time systems

Full Text:



R. R. Lutz, “Analyzing software requirements errors in safety- critical, embedded systems,” in [1993] Proceedings of the IEEE International Symposium on Requirements Engineering, Jan 1993, pp. 126–133.

A. Bertolino, “Software testing research: Achievements, challenges, dreams,” in Future of Software Engineering, 2007. FOSE ’07, May 2007, pp. 85–103.

E. A. Lee, “Cyber physical systems: Design challenges,” in 2008 11th IEEE International Symposium on Object and Component- Oriented Real-Time Distributed Computing (ISORC), May 2008, pp. 363–369.

Y. B. Reddy, “Cloud-based cyber physical systems: Design chal- lenges and security needs,” in 2014 10th International Conference on Mobile Ad-hoc and Sensor Networks, Dec 2014, pp. 315–322.

“Ethiopian airlines flight 302 — Wikipedia, the free encyclopedia,” 2019, [Online; accessed 9-April-2019]. [Online]. Available: https:

//en.wikipedia.org/wiki/Ethiopian Airlines Flight 302

“Ethiopian airlines flight 302 — Wikipedia, the free encyclopedia,” 2019, [Online; accessed 9-April-2019]. [Online]. Available: https:

//en.wikipedia.org/wiki/Lion Air Flight 610

“Tesla driver crash with a truck,” 2019, [Online; accessed 9-April-2019]. [Online]. Available: https://electrek.co/2019/03/01/ tesla-driver-crash-truck-trailer-autopilot/

“Toyota car recalls — Wikipedia, the free encyclopedia,” 2010, [Online; accessed 9-April-2019]. [Online]. Available: https://en. wikipedia.org/wiki/2009%E2%80%9311 Toyota vehicle recalls

Lee and Seshia, Introduction to Embedded Systems, 2017.

G. Fortino, A. Furfaro, L. Nigro, and F. Pupo, “Hierarchical com- municating real-time state machines,” Laboratorio di Ingegneria del Software, Dipartimento di Elettronica Informatica e Sistemistica, Universita della Calabria, pp. 1–12, 2000.

A. Furfaro and L. Nigro, “Model checking hierarchical commu- nicating real-time state machines,” in 2005 IEEE Conference on Emerging Technologies and Factory Automation, vol. 1, Sept 2005, pp. 354–370.

A. C. Shaw, “Communicating real-time state machines,” IEEE Transactions on Software Engineering, vol. 18, no. 9, pp. 805–816, Sep 1992.

C. Rao, J. Guo, N. Li, Y. Lei, Y. Zhang, and Y. Li, “Safety- critical system modeling in model-based testing with hazard and operability analysis,” in 2018 IEEE International Conference on Software Quality, Reliability and Security (QRS), July 2018, pp. 397–404.

A. Gario, A. Andrews, and S. Hagerman, “Testing of safety-critical systems: An aerospace launch application,” in 2014 IEEE Aerospace Conference, March 2014, pp. 1–17.

G. Macher, H. Sporer, R. Berlach, E. Armengaud, and C. Kreiner, “Sahara: A security-aware hazard and risk analysis method,” in 2015 Design, Automation Test in Europe Conference Exhibition (DATE), March 2015, pp. 621–624.

C. A. Ericson et al., Hazard analysis techniques for system safety. John Wiley & Sons, 2015.

J. Leupolz, A. Habermaier, and W. Reif, “Quantitative and qualitative safety analysis of a hemodialysis machine with s#,” Journal of Software: Evolution and Process, vol. 30, no. 5, p. e1942, 2018, e1942 JSME-17-0029.R2. [Online]. Available: https://onlinelibrary.wiley.com/doi/abs/10.1002/smr.1942

P. Johannessen, C. Grante, A. Alminger, U. Eklund, and J. Torin, “Hazard analysis in object oriented design of dependable systems,” in 2001 International Conference on Dependable Systems and Networks, July 2001, pp. 507–512.

C. A. Ericson, “Fault tree analysis,” in System Safety Conference, Orlando, Florida, vol. 1, 1999, pp. 1–9.

J. D. Andrews and S. J. Dunnett, “Event-tree analysis using binary decision diagrams,” IEEE Transactions on Reliability, vol. 49, no. 2, pp. 230–238, Jun 2000.

K. Jenab and B. S. Dhillon, “Stochastic fault tree analysis with self- loop basic events,” IEEE Transactions on Reliability, vol. 54, no. 1, pp. 173–180, March 2005.

T. Ishimatsu, N. G. Leveson, J. Thomas, M. Katahira, Y. Miyamoto, and H. Nakao, “Modeling and hazard analysis using stpa,” Proceed- ings of the 4th IAASS Conference, Making Safety Matter, pp. 19–21, May 2010.

M. Takahashi, R. Kosaka, R. Nanba, Y. Anang, and Y. Watanabe, “A study of methodology for securing control software based fmea- fta coordination,” in 2016 IEEE/SICE International Symposium on System Integration (SII), Dec 2016, pp. 144–149.

J. Yoo, E. Jee, and S. Cha, “Formal modeling and verification of safety-critical software,” IEEE Software, vol. 26, no. 3, pp. 42–49, May 2009.

D. Zhu and S. Yao, “A hazard analysis method for software- controlled systems based on system-theoretic accident modeling and process,” in 2018 IEEE 9th International Conference on Software Engineering and Service Science (ICSESS), Nov 2018, pp. 90–95.

“Astre´e static-analysis tool,” 2019, [Online; accessed 11-November- 2019]. [Online]. Available: http://www.astree.ens.fr/

“Blast static-analysis tool,” 2019, [Online; accessed 11-November- 2019]. [Online]. Available: http://mtc.epfl.ch/software-tools/blast/ index-epfl.php

“4th international workshop on cpachecker,” 2019, [Online; accessed 11-November-2019]. [Online]. Available: https://cpa. sosy-lab.org/2019/

“Coverity,” 2019, [Online; accessed 11-November-2019]. [Online].

Available: https://scan.coverity.com/

“Infer,” 2019, [Online; accessed 11-November-2019]. [Online].

Available: https://fbinfer.com/

“Polyspace,” 2019, [Online; accessed 11-November-2019]. [Online].

Available: https://www.mathworks.com/products/polyspace.html

“Helix-qac,” 2019, [Online; accessed 11-November-2019]. [Online].

Available: https://www.perforce.com/products/helix-qac

A. M. Bakr, M. M. Fouda, M. Salama, A. K. Alsammak, and

H. Yahia, “Modeling real-time safety critical systems using hierar- chical communicating real-time state machines and c-lang parser,” in 2017 Eighth International Conference on Intelligent Computing and Information Systems (ICICIS), Dec 2017, pp. 244–251.

A. M. Bakr, M. M. Fouda, M. Salama, A. K. Alsammak, and

H. Yahia, “Hazard analysis of real-time safety critical systems using hierarchical communicating real-time state machines formal model,” in 2017 12th International Conference on Computer Engineering and Systems (ICCES), Dec 2017, pp. 628–634.

DOI: https://doi.org/10.7494/csci.2021.22.1.3547


  • There are currently no refbacks.