The development of complex transport systems presents significant safety challenges. While safety-driven and model-based approaches show promise, their adoption is still in its early stages. One hazard analysis method that is gaining traction is the System Theoretic Process Analysis (STPA). Integrating STPA with the Systems Modeling Language (SysML) holds great potential, thanks to their shared system-theoretic foundation. Simultaneously, SysML v2, with extensibility features such as libraries, offers new integration opportunities. To try the integration, an open-source SysML v2 library for STPA was created.
This repo contains:
- A library for STPA in the textual notation of SysML v2 - LinkToLibrary
- A corresponding example project that uses the library - LinkToExample
- A jupyter notebook version that showcases the application - LinkToNotebook
- A Cameo specific extension that includes advanced views and diagram definitions - LinkToCameoViews
The library is divided into six packages. For each of the four STPA steps, one dedicated package is used. The fifth and sixth package include the metadata types and view/viewpoint definitions that facilitate the application of the library.
The LibrarySTPA.sysml and ExampleSTPA.sysml files of the library can be used with any SysML v2 tool. The LibrarySTPA.ipynb file is recommended to be used in combination with the pilot-implementation for Jupyter. Some tools for trying out the library are:
- Jupyter - LinkToGithub
- SysIDE (VSC Plugin) - LinkToWebsite
- Cameo Community Edition - LinkToWebsite
- SysON - LinkToWebsite
For Cameo users, advanced tool features allow defining and using specific extensions such as:
STPA-specific diagrams that support the graphical creation of library elements
Tabular views to show: relations between hazards and losses, or the model-based composition of UCAs and LSs
More information on the goals and concepts behind the library is available in the corresponding open-access article
Related References from Contributors:
- Extending SysML v2 for Safety - Open-Source Library for the System-Theoretic Process Analysis
- A System-Theoretic Assurance Framework for Safety-Driven Systems Engineering
- Tailoring STPA for SOTIF: Terminology Mapping and Methodological Extension
Recommended STPA Literature:
- MIT Partnership for Systems Approaches to Safety and Security (PSASS)
- STPA Handbook 2018
- Engineering A Safer World
- STPA Standard for All Industries
- SAE J3187 STPA Guidance
- Podcasts about STPA
For this library the copyright belongs to the German Aerospace Center / Deutsches Zentrum für Luft- und Raumfahrt e.V. (DLR):
Copyright (c) 2025 Deutsches Zentrum für Luft- und Raumfahrt e.V. (DLR)
Licensed under MIT + Apache 2.0. That means, as a downstream consumer of this software you may choose to either use it under MIT or under Apache 2.0 license, at your discretion. All contributions from upstream must be licensed under both MIT and Apache 2.0; if you contribute code to this project you agree to license your code under both the MIT and the Apache 2.0 license.
The main contributor of the library is Alexander Ahlbrecht:
In case of questions, you can also write a mail to: alexander.ahlbrecht@dlr.de

