Table of Contents
Fetching ...

An LLM-Integrated Framework for Completion, Management, and Tracing of STPA

Ali Raeisdanaei, Juho Kim, Michael Liao, Sparsh Kochhar

TL;DR

The paper addresses the time-consuming nature of conducting STPA hazard analyses by introducing a free, open-source Python framework that couples STPA artifact management with LLM-powered generation of UCAs and loss scenarios, all within a human-in-the-loop workflow. It leverages vision-enabled LLM prompts (including control-structure diagrams) to synthesize numerous artifacts, while providing automated linking to support traceability to software and requirements. Empirical results on handbook-based case studies show high accuracy and usefulness for UCAs and loss scenarios, and strong performance for artifact linking, albeit with limitations such as data leakage risk and the need for broader validation. The framework aims to enhance efficiency and consistency in safety analyses and to facilitate integration with safety standards like ISO 26262, while preserving safety engineer oversight and extensibility for future features.

Abstract

In many safety-critical engineering domains, hazard analysis techniques are an essential part of requirement elicitation. Of the methods proposed for this task, STPA (System-Theoretic Process Analysis) represents a relatively recent development in the field. The completion, management, and traceability of this hazard analysis technique present a time-consuming challenge to the requirements and safety engineers involved. In this paper, we introduce a free, open-source software framework to build STPA models with several automated workflows powered by large language models (LLMs). In past works, LLMs have been successfully integrated into a myriad of workflows across various fields. Here, we demonstrate that LLMs can be used to complete tasks associated with STPA with a high degree of accuracy, saving the time and effort of the human engineers involved. We experimentally validate our method on real-world STPA models built by requirement engineers and researchers. The source code of our software framework is available at the following link: https://github.com/blueskysolarracing/stpa.

An LLM-Integrated Framework for Completion, Management, and Tracing of STPA

TL;DR

The paper addresses the time-consuming nature of conducting STPA hazard analyses by introducing a free, open-source Python framework that couples STPA artifact management with LLM-powered generation of UCAs and loss scenarios, all within a human-in-the-loop workflow. It leverages vision-enabled LLM prompts (including control-structure diagrams) to synthesize numerous artifacts, while providing automated linking to support traceability to software and requirements. Empirical results on handbook-based case studies show high accuracy and usefulness for UCAs and loss scenarios, and strong performance for artifact linking, albeit with limitations such as data leakage risk and the need for broader validation. The framework aims to enhance efficiency and consistency in safety analyses and to facilitate integration with safety standards like ISO 26262, while preserving safety engineer oversight and extensibility for future features.

Abstract

In many safety-critical engineering domains, hazard analysis techniques are an essential part of requirement elicitation. Of the methods proposed for this task, STPA (System-Theoretic Process Analysis) represents a relatively recent development in the field. The completion, management, and traceability of this hazard analysis technique present a time-consuming challenge to the requirements and safety engineers involved. In this paper, we introduce a free, open-source software framework to build STPA models with several automated workflows powered by large language models (LLMs). In past works, LLMs have been successfully integrated into a myriad of workflows across various fields. Here, we demonstrate that LLMs can be used to complete tasks associated with STPA with a high degree of accuracy, saving the time and effort of the human engineers involved. We experimentally validate our method on real-world STPA models built by requirement engineers and researchers. The source code of our software framework is available at the following link: https://github.com/blueskysolarracing/stpa.

Paper Structure

This paper contains 18 sections, 10 figures, 2 tables.

Figures (10)

  • Figure 1: A diagram of a simple control structure. This draw.io diagram is a reproduction of Figure 2.6 in the STPA Handbook STPA_Handbook.
  • Figure 2: An example control structure of an aviation wheel braking system STPA_Handbookautohold_STPA_exemplar. This draw.io diagram is a reproduction of Figure 2.12 in the STPA Handbook STPA_Handbook.
  • Figure 3: Outputs of the four steps of STPA showing their traceability as depicted in the handbook STPA_Handbook (Figure 2.21).
  • Figure 4: The class definition for hazards. It contains three attributes: system, unsafe condition, and losses. The corresponding types are annotated next to each attribute name.
  • Figure 5: The UML class diagram for our STPA framework. The stpa.control_structures section shows classes that pertain to elements within control structure diagram while the stpa.definitions section shows classes related to artifacts shown in Figure \ref{['fig:stpa_overview']} plus several abstract classes.
  • ...and 5 more figures