Reference › Language reference › Safety

Reference › Language reference

Safety

Hazards, safety goals, failure modes and fault trees.

On this page: hazard · safety-goal · failure-mode · gate · control-action · uca · loss-scenario

Hazards and safety goals (ISO 26262, written to safety.yaml as Arche reads them), failure modes and fault-tree gates (checked, and typeset in the LaTeX specification). The error model of the parts — produces, contains, turns, from on their ports — gives each hazard with error … on … a derived fault tree, and an FMEA row per error source (archec safety). STPA: control actions between the parts, their unsafe control actions of the four types, each traced to hazards and constraints, and the loss scenarios behind them.

hazard#

A hazardous event (ISO 26262-3): what the system does, in which situation, rated for severity (S0–S3), exposure (E0–E4) and controllability (C0–C3) — its ASIL is derived from the three, never written. goal names the safety goal that answers it. caused-by lists the failure modes and gates that lead to it (OR); with target (per hour) the probability of the top event is checked. Written to safety.yaml (hazards).

  • Keywords: hazard
  • Set: safety, security & design space
  • Where: top level
  • Syntax: hazard id "Label" { situation; effect; item }
Property Value Meaning
description text Prose description. $…$ and $$…$$ are LaTeX math; a ```latex block is kept as LaTeX.
situation text The situation it happens in.
effect text What follows.
item string The item or function it comes from.
severity ident S0 none … S3 life-threatening.
exposure ident E0 incredible … E4 high probability.
controllability ident C0 controllable … C3 uncontrollable.
goal ident The safety goal that answers it.
tags refs Tags.
caused-by list of failure mode or gate names Failure modes and gates that lead to it (any one is enough).
target number The probability per hour the top event must stay under (checked against its fault tree).
error any Its top event in the error model: these errors reaching this port (or part) of a system — error omission on Car.brakes.cmd. archec derives its fault tree from the error model and checks it against caused-by.
hazard HZ-01 "Unintended braking" {
  situation "Motorway, 130 km/h"
  effect "Rear-end collision"
  severity S3
  exposure E4
  controllability C3
  goal SG-01
  caused-by FM-VALVE, G-PUMPS
  target 1e-8
}

safety-goal#

A safety goal: the top-level safety requirement answering hazards, with the state the system must reach and the time it has (FTTI). Its ASIL is the highest of its hazards'; one written lower is reported. Written to safety.yaml (safetyGoals).

  • Keywords: safety-goal
  • Set: safety, security & design space
  • Where: top level
  • Syntax: safety-goal id "Label" { safe-state; ftti; asil }
Property Value Meaning
description text Prose description. $…$ and $$…$$ are LaTeX math; a ```latex block is kept as LaTeX.
safe-state text The state to reach or keep.
ftti duration Fault-tolerant time interval (100ms).
asil ident An ASIL decided elsewhere (else the highest of its hazards).
tags refs Tags.
safety-goal SG-01 "No braking without a demand" { safe-state "Brake pressure released"; ftti 100ms }

failure-mode#

A failure mode (FMEA): what fails, of which element, with what effect; rated for severity, occurrence and detection (1–10, their product is the RPN), with its probability per hour for fault trees. Checked and typeset in the LaTeX specification; Arche has no place for it yet.

  • Keywords: failure-mode
  • Set: safety, security & design space
  • Where: top level
  • Syntax: failure-mode Id "What fails" { of element; effect "…"; severity 9; occurrence 3; detection 4; probability 1e-7; causes HZ-…; mitigated-by … }
Property Value Meaning
description text Prose description. $…$ and $$…$$ are LaTeX math; a ```latex block is kept as LaTeX.
of element name The element that fails.
effect text What follows.
severity number Severity of the effect, 1–10.
occurrence number How often it happens, 1–10.
detection number How hard it is to detect, 1–10 (10: undetectable).
probability number Probability per hour, for fault trees.
causes list of hazard names The hazards it leads to.
mitigated-by list of element names What answers it: requirements, elements.
produces refs The error it makes at the outputs of its element (of): omission, commission, value, early, late. It is then a basic event of the fault trees archec derives, with its probability.
inject string How a test makes it happen in the simulation: a fault, as fault writes it (freeze brakes, drop adcu.can_brake, stuck brakes.can force=0). at 20ms fault FM-VALVE then injects it.
failure-mode FM-VALVE "Brake valve stuck open" {
  of Car.brakes
  effect "Pressure on one wheel without a demand"
  severity 9
  occurrence 3
  detection 4
  probability 1e-7
  causes HZ-01
}

gate#

A fault-tree gate: all A, B fails when every one does (probability: the product), any A, B when one does. A hazard's caused-by and other gates name it.

  • Keywords: gate
  • Set: safety, security & design space
  • Where: top level
  • Syntax: gate Id "Event" { all A, B } | gate Id "Event" { any A, B }
Property Value Meaning
description text Prose description. $…$ and $$…$$ are LaTeX math; a ```latex block is kept as LaTeX.
all list of failure mode or gate names Every one must fail (AND).
any list of failure mode or gate names One is enough (OR).
gate G-PUMPS "Both pumps fail" { all FM-PUMP-A, FM-PUMP-B }

control-action#

A control action (STPA): what a controller (from, a part) commands of the process it controls (to, a part), over the links of the architecture, and what it learns back (feedback). Its unsafe control actions (uca) are written in it, one for each of the four ways a control action can be unsafe — or the type is said not-applicable. Checked and typeset by archec (archec safety); Arche has no place for it yet.

  • Keywords: control-action
  • Set: safety, security & design space
  • Where: top level
  • Syntax: control-action Id "What" { from controller; to process; carries MSG; feedback MSG; not-applicable timing; uca … }
Property Value Meaning
description text Prose description. $…$ and $$…$$ are LaTeX math; a ```latex block is kept as LaTeX.
from element name The controller: the part that gives it.
to element name The controlled process: the part that receives it. A link (or a way through parts) from from to to must exist.
carries list of message names The messages that carry it.
feedback list of message names What the controller learns back from the process: messages. A link back from to to from must exist.
not-applicable refs The UCA types considered and found not hazardous here (not-provided, provided, timing, duration); because says why.
because text Why the types said not-applicable are.
control-action CA-BRAKE "Apply the brakes" {
  from Car.adcu
  to Car.brakes
  carries BRAKE_CMD
  feedback WHEEL_SPEED
  not-applicable duration
  because "The brakes release on their own when the command stops."
  uca UCA-1 "No braking with an obstacle within the stopping distance" {
    type not-provided
    causes HZ-01
    constraint REQ-SAF-1
  }
}

uca#

An unsafe control action (STPA), in its control action: in which context giving it — or not — is hazardous. Of one of four types: not-provided (not given when needed), provided (given when it causes a hazard), timing (too early, too late, out of order), duration (stopped too soon, applied too long). It names the hazards it leads to (causes) and the constraint that prevents it (constraint, a requirement). Its loss scenarios — how it could happen — are written in it.

  • Keywords: uca
  • Set: safety, security & design space
  • Where: inside control-action
  • Syntax: uca Id "Unsafe when" { type not-provided; context "…"; causes HZ-…; constraint REQ-…; loss-scenario … }
Property Value Meaning
description text Prose description. $…$ and $$…$$ are LaTeX math; a ```latex block is kept as LaTeX.
type not-provided | provided | timing | duration How the control action is unsafe: not-provided, provided (causing a hazard), timing (too early, too late, out of order), duration (stopped too soon, applied too long).
context text The situation that makes it unsafe.
causes list of hazard names The hazards it leads to.
constraint list of requirement names The constraints that prevent it: requirements (or safety goals).
uca UCA-1 "No braking with an obstacle within the stopping distance" {
  type not-provided
  context "Obstacle ahead, closer than the stopping distance"
  causes HZ-01
  constraint REQ-SAF-1
}

loss-scenario#

A loss scenario (STPA), in its unsafe control action: how it could come about — a controller that decides wrong, feedback that is missing or wrong, an actuator or a process that does not do what it is told — and the constraint that prevents it.

  • Keywords: loss-scenario
  • Set: safety, security & design space
  • Where: inside uca
  • Syntax: loss-scenario Id "How" { factor feedback; constraint REQ-… }
Property Value Meaning
description text Prose description. $…$ and $$…$$ are LaTeX math; a ```latex block is kept as LaTeX.
factor controller | feedback | control-path | process Where it comes from: the controller (its algorithm or process model), the feedback, the control path (actuator, link), or the controlled process.
constraint list of requirement names The requirements that prevent it.
loss-scenario LS-1 "The radar misses the obstacle in heavy rain" {
  factor feedback
  constraint REQ-SAF-2
}