Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Aliraeis/process model #6

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added docs/stpa_class_diagram.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
117 changes: 117 additions & 0 deletions docs/stpa_class_diagram.puml
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
@startuml stpa
!pragma useIntermediatePackages false

class stpa.control_structures.ControlActionOrFeedback {
description: str
control_type: ControlType
controller: Entity
controlled: Entity
}
class stpa.control_structures.ControlStructure {
entities: frozenset[Entity]
control_actions_or_feedbacks: frozenset[ControlActionOrFeedback]
}
enum stpa.control_structures.ControlType {
ACTION: 1 {static}
FEEDBACK: 2 {static}
}
class stpa.definitions.ControllerConstraint {
source: str
type_: str
control_action: str
context: str
unsafe_control_actions: list[UnsafeControlAction]
}
abstract class stpa.definitions.Definition {
_NAME_PATTERN: ClassVar[Pattern[str]]
_Definition__lookup: ClassVar[dict[str, Definition]]
name: str
}
class stpa.control_structures.Entity {
name: str
}
class stpa.definitions.Hazard {
system: str
unsafe_condition: str
losses: list[Loss]
}
class stpa.definitions.Loss {
description: str
}
class stpa.definitions.Responsibility {
description: str
system_level_constraints: list[SystemLevelConstraint]
}
abstract class stpa.definitions.Scenario {
}
class stpa.definitions.ScenarioType1 {
description: str
unsafe_control_action: UnsafeControlAction | None
result: str | None
hazard: Hazard | None
}
class stpa.definitions.ScenarioType2 {
description: str
result: str
hazard: Hazard
}
class stpa.definitions.SubHazard {
hazard: Hazard
description: str
}
abstract class stpa.definitions.SystemLevelConstraint {
}
class stpa.definitions.SystemLevelConstraintType1 {
system: str
enforcement_condition: str
hazards: list[Hazard]
}
class stpa.definitions.SystemLevelConstraintType2 {
hazard: Hazard
loss_mitigation: str
hazards: list[Hazard]
}
class stpa.definitions.SystemLevelConstraintType3 {
sub_hazard: SubHazard
enforcement_condition: str
}
class stpa.definitions.UnsafeControlAction {
source: str
type_: str
control_action: str
context: str
hazards: list[Hazard | SubHazard]
}
stpa.control_structures.ControlActionOrFeedback *-- stpa.control_structures.ControlType
stpa.control_structures.ControlActionOrFeedback *-- stpa.control_structures.Entity
stpa.control_structures.ControlStructure *-- stpa.control_structures.Entity
stpa.control_structures.ControlStructure *-- stpa.control_structures.ControlActionOrFeedback
stpa.definitions.ControllerConstraint *-- stpa.definitions.UnsafeControlAction
stpa.definitions.Definition <|-- stpa.definitions.ControllerConstraint
stpa.definitions.Definition *-- stpa.definitions.Definition
stpa.definitions.Hazard *-- stpa.definitions.Loss
stpa.definitions.Definition <|-- stpa.definitions.Hazard
stpa.definitions.Definition <|-- stpa.definitions.Loss
stpa.definitions.Responsibility *-- stpa.definitions.SystemLevelConstraint
stpa.definitions.Definition <|-- stpa.definitions.Responsibility
stpa.definitions.Definition <|-- stpa.definitions.Scenario
stpa.definitions.ScenarioType1 *-- stpa.definitions.UnsafeControlAction
stpa.definitions.ScenarioType1 *-- stpa.definitions.Hazard
stpa.definitions.Scenario <|-- stpa.definitions.ScenarioType1
stpa.definitions.ScenarioType2 *-- stpa.definitions.Hazard
stpa.definitions.Scenario <|-- stpa.definitions.ScenarioType2
stpa.definitions.SubHazard *-- stpa.definitions.Hazard
stpa.definitions.SystemLevelConstraint <|-- stpa.definitions.SubHazard
stpa.definitions.Definition <|-- stpa.definitions.SystemLevelConstraint
stpa.definitions.SystemLevelConstraintType1 *-- stpa.definitions.Hazard
stpa.definitions.SystemLevelConstraint <|-- stpa.definitions.SystemLevelConstraintType1
stpa.definitions.SystemLevelConstraintType2 *-- stpa.definitions.Hazard
stpa.definitions.SystemLevelConstraint <|-- stpa.definitions.SystemLevelConstraintType2
stpa.definitions.SystemLevelConstraintType3 *-- stpa.definitions.SubHazard
stpa.definitions.SystemLevelConstraint <|-- stpa.definitions.SystemLevelConstraintType3
stpa.definitions.UnsafeControlAction *-- stpa.definitions.Hazard
stpa.definitions.UnsafeControlAction *-- stpa.definitions.SubHazard
stpa.definitions.Definition <|-- stpa.definitions.UnsafeControlAction
footer Generated by //py2puml//
@enduml

1 change: 1 addition & 0 deletions docs/stpa_class_diagram.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.