This repository holds code to support the partial automation of the System Theoretic Process Analysis.
- Open Eclipse Installer and install 2025-06
- Open your workspace
- Right click in the Package Explorer and select Import
- Select Git > Projects from Git > GitHub
- Search "cmu-sei/FASR" and select it
- Right click on UCA_Classification and select Import > Install > Install Software Items from File
- Select browse and navigate to
SoftwareRequirements.p2f
- Select all software that is not already installed
- Restart Eclipse
This compares two traces through a system -- one safe and one unsafe -- and creates an unsafe control action for the unsafe trace. Fortis can be used to generate the traces from a TLA+ or FSP model of a system and its environment.
After cloning the repository, use maven to build the project:
% pwd
/Users/sprocter/git/fasr/UCAClassification_EditDistance
% mvn clean verify
[INFO] Scanning for projects...
[INFO]
[INFO] -----------------------------< FASR:FASR >------------------------------
[INFO] Building Formalization and Automation of STPA using Robustness 0.0.1-SNAPSHOT
[INFO] from pom.xml
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] --- clean:3.2.0:clean (default-clean) @ FASR ---
[...]
You will also need the FASR branch of Fortis. After cloning and switching to the FASR branch, make sure you can run the "Water Tank" example using the --stpa
flag:
% pwd
/Users/sprocter/git/fortis-core/examples/water_tank
% java -jar ../../out/artifacts/fortis_core_jar/fortis-core.jar robustness --stpa --tla-sys WaterTank.tla --cfg-sys WaterTank.cfg --tla-env WaterTankEnv.tla --cfg-env WaterTankEnv.cfg | tail -2 | head -1 | jq
[
{
"goodTrace": [
"TurnPumpOn",
"Wait",
"Wait",
"TurnPumpOff"
],
"badTrace": [
"TurnPumpOn",
"Wait",
"Wait",
"Wait"
]
},
[...]
]
You can now pipe the output from Fortis to the UCA Classifier:
% pwd
% java -jar ../../out/artifacts/fortis_core_jar/fortis-core.jar robustness --stpa --tla-sys WaterTank.tla --cfg-sys WaterTank.cfg --tla-env WaterTankEnv.tla --cfg-env WaterTankEnv.cfg | java -jar ~/git/fasr/UCAClassification_EditDistance/target/FASR-0.0.1-SNAPSHOT-jar-with-dependencies.jar | jq
[
{
"source": "##PLACEHOLDER##",
"guideword": "NotProviding",
"controlAction": "TurnPumpOff",
"context": [
"TurnPumpOn",
"Wait",
"Wait"
],
[...]
]
- Cameo Enterprise Architecture
- STPA Library
- STPA Profile
- FASR Profile
- An exported Cameo Enterprise Architecture Project
- Export To.. > Eclipse UML2 XMI File > Eclipse UML2 (v5.x) XMI File
- Import project files into Eclipse
- Pass the path to
<project_name>.uml
into a TraverseModel object - Pass the TraverseModel object and the return from UCA_Classification into a SysMLGenerator object
- Use TraverseModel's
exportModel()
to create a new.uml
file or useupdateModel()
to update the.uml
file that was passed in - If using
updateModel()
, then you'll need to close your project in Cameo and reopen it for the generated elements to load