To support users in their safety work, Architects can configure various graphs, grids, and charts, etc.  This article provides some examples. 



Example Configurable Views

Safety Graph

<Graph>
  <Options>
    <ObjIcons/>
  </Options>

  <NodeStyles>
    <NodeStyle name="SafetyGoal" fillColor="#F5DEB3" fillColor2="#ffffff" borderThickness="1" borderColor="#000000" />
    <NodeStyle name="HazardousEvent" fillColor="#ffcccc" fillColor2="#ffffff" borderThickness="2" borderColor="#000000" />  
    <NodeStyle name="Hazard" fillColor="#ffff00" fillColor2="#fdfac5" borderThickness="4" borderColor="#000000" />  
    <NodeStyle name="Item" fillColor="#f00f00" fillColor2="#fdfac5" borderThickness="4" borderColor="#FF0000" />  
    <NodeStyle name="Context" borderThickness="0" visibleHeader="false" />  
  </NodeStyles> 

  <NodeGroups>
    <NodeGroup name="hazards" caption="Hazards" style="Context"/>
        <NodeGroup name="hazevs" caption="Hazards" style="Context"/>
        <NodeGroup name="safegoals" caption="Hazards" style="Context"/>
  </NodeGroups>   
          
    <EdgeStyles>
        <EdgeStyle name="trace" color="blue" thickness="2" lineType="dash" toArrowType="default"/>
    </EdgeStyles>

    <Parameters>
        <Parameter caption="Analysis Area" name="p1" hintContextPath="I2AHA"/>
        <ForEachPathReference path="I2AHA">
            <AddParameterValue name="p1"/>            
        </ForEachPathReference>
    </Parameters>

    <Function name="AsilValue" as="String">
        <Parameter name="asil" as="String"/>
        <Value select="if $asil = 'QM' then NewLine + 'QM' else (if $asil != '' then NewLine + 'ASIL ' + $asil else '')"/>
    </Function>
    
    <Context name="HARAContext">
        <AddParts owner="main" sid="DEIT" part="AnalysisToItem" defobj="Item"/>
        <AddParts owner="main" sid="DEHA" part="AnalysisToHazard" defobj="Haz"/>
        <AddParts owner="main" sid="DEHE" part="AnalysisToHazEv" defobj="HazEv"/>
        <AddParts owner="Item" sid="I2SID" part="ItemToDetail" defobj="Detail"/>
        <AddParts owner="Item" sid="I2IRQ" part="ItemToDetail" defobj="+Detail"/>
        <AddParts owner="main" sid="DESG" part="AnalysisToSafetyGoal" defobj="SafetyGoal"/>
        <AddParts owner="SafetyGoal" sid="SGDF" part="SafetyGoalToHazEv" defobj="+HazEv"/>
        <AddParts owner="HazEv" sid="HEH" part="HazEvToHaz" defobj="+Haz"/>
        <AddParts owner="Haz" sid="I2HO" part="HazToDetail" defobj="Detail"/>
        <AddParts owner="Haz" sid="I2HARQ" part="HazToDetail" defobj="Detail"/>
    </Context>

    <Node style="Item" >   
        <Variable name="AnalyzedComponentAndSignals" as="[Item]" select="/DEIT/I2SID[SID='2SE91' or SID='2SE90']"/>
        <Variable name="System" as="[Item]" select="$p1/I2FP/2IS148"/>
    <Variable name="SystemComponentAndSignals" as="[Item]" select="$System/2IS182*/2IS150* union $System/2IS182*/2IS151*"/>
    <If test="any $AnalyzedComponentAndSignals satisfies (. in $SystemComponentAndSignals)">
      <ForEach select="$System">
        <ApplyTemplate name="ImplicitConnection_Template">
          <WithParam name="Signals" select="$AnalyzedComponentAndSignals"/>
        </ApplyTemplate>            
      </ForEach>
    </If>
        <ForEach select="/DEIT/I2IRQ">
            <Node/>
        </ForEach>   
        <ForEach select="$AnalyzedComponentAndSignals[not . in $SystemComponentAndSignals]">
            <Node/>
        </ForEach>
    </Node>

    <ForEachInContext name="HARAContext" group="SafetyGoal">
        <Node style="SafetyGoal" group="safegoals" caption="#{?Name + AsilValue(@26AS)}"/>
        <Edge from="." to="Context:/SafetyGoalToHazEv"/>
    </ForEachInContext>

    <ForEachInContext name="HARAContext" group="HazEv">
        <Node style="HazardousEvent" group="hazevs" caption="#{?Name + AsilValue(@EAA1)}"/>
        <Edge from="." to="Context:/HazEvToHaz"/>
    </ForEachInContext>

    <ForEachInContext name="HARAContext" group="Haz">
        <Node style="Hazard" group="hazards">    
            <ForEach select="Context:/HazToDetail[SID='2SE91']">               
                <InPort connection="."/>
            </ForEach>
        </Node>
        <Edge from="." to="Context:/HazToDetail"/>
    </ForEachInContext>       
    
    <Template name="ImplicitConnection_Template"> 
        <Parameter name="Signals" as="[Item]"/>
        <Node>
            <ForEach select="/2IS182[(any (/2IS182*/2IS150 union /2IS182*/2IS151) satisfies . in $Signals) or (any /2IS182* satisfies . in $Signals)]">
                <ApplyTemplate name="ImplicitConnection_Template">
                    <WithParam name="Signals" select="$Signals"/>
                </ApplyTemplate>            
            </ForEach>
            <ForEach select="/part::2IS150[(DefObj in $Signals) or (Owner in $Signals)]">
                <InPort connection="DefObj"/>
            </ForEach>
            <ForEach select="/part::2IS151[(DefObj in $Signals) or (Owner in $Signals)]">
                <OutPort connection="DefObj"/>
            </ForEach>
        </Node>
    </Template> 
</Graph>


Safety Grid

<Grid> 
  <Options>
    <CellAutoHeight/>
    <HeaderAutoHeight/>
  </Options>
  <Columns> 
        <ItemNameColumn     caption="Safety goal"        font="Normal8pt" width="100"   cellMerge ="True" readOnly="False"   objectName="safetyGoal" />
        <DescriptionColumn  caption="Description"        font="Normal8pt" width="100"   cellMerge ="True" readOnly="False"   objectName="safetyGoal" />
        <ItemNameColumn     caption="Safe mode"          font="Normal8pt" width="100"    cellMerge ="True" readOnly="False"   objectName="mode"/>
        <AttributeColumn    caption="ASIL rationale"     font="Normal8pt" width="100"   cellMerge ="True" readOnly="False"   objectName="safetyGoal" type="26AR"/> 
        <AttributeColumn    caption="ASIL"               font="Normal8pt" width="50"   cellMerge ="True" readOnly="False"   objectName="safetyGoal" type="26AS"/>     

        <ItemNameColumn     caption="Hazardous event"    font="Normal8pt" width="100"   cellMerge ="True" readOnly="False"   objectName="hazardousEvent" />
        <DescriptionColumn  caption="Description"        font="Normal8pt" width="100"   cellMerge ="True" readOnly="False"   objectName="hazardousEvent" />
        <TextColumn       caption="Consequence"     font="Normal8pt" width="100"   cellMerge ="True" readOnly="True"  objectName="consequence" multiValueStyle="Bullets">#{Name}#{?if @2BSE != '' then ' (' + @2BSE + ')' else ''}</TextColumn>  
        <TextColumn       caption="Situation"     font="Normal8pt" width="100"   cellMerge ="True" readOnly="True"   objectName="situation"   multiValueStyle="Bullets">#{Name}#{?if @2BEC != '' then ' (' + @2BEC + ')' else ''}</TextColumn>  
        <!--ItemNameColumn     caption="Situation"        font="Normal8pt" width="100" cellMerge ="True" multiValueStyle="Bullets" objectName="situation"/--> 
        <ItemNameColumn     caption="Operation mode"    font="Normal8pt" width="100"  cellMerge ="True" objectName="failureMode"/>
        <AttributeColumn    caption="Severity"          font="Normal8pt" width="30"   cellMerge ="True" readOnly="False"   objectName="hazardousEvent" type="2BSE"/>  
        <AttributeColumn    caption="Exposure"          font="Normal8pt" width="30"    cellMerge ="True" readOnly="False"   objectName="hazardousEvent" type="2BEC"/>  
        <AttributeColumn    caption="Controllability"   font="Normal8pt" width="30"   cellMerge ="True" readOnly="False"   objectName="hazardousEvent" type="2BCY"/>  
        <AttributeColumn    caption="ASIL rational"     font="Normal8pt" width="60"   cellMerge ="True" readOnly="False"   objectName="hazardousEvent" type="26AR"/> 
        <AttributeColumn    caption="ASIL"              font="Normal8pt" width="50"   cellMerge ="True" readOnly="False"   objectName="hazardousEvent" type="EAA1"/>

        <ItemNameColumn     caption="Hazard"          font="Normal8pt" width="100"   cellMerge ="True" readOnly="False"   objectName="hazard" />
        <DescriptionColumn  caption="Description"        font="Normal8pt" width="100"     cellMerge ="True" readOnly="False"     objectName="hazard" /> 
        <ItemNameColumn     caption="Flawed Item part"  font="Normal8pt" width="100"     cellMerge ="True" readOnly="False"     objectName="flawedItem" multiValueStyle="NewLineSeparated"/> 
        <ItemNameColumn     caption="Guideword"         font="Normal8pt" width="100"     cellMerge ="True" readOnly="False"   objectName="guideword"/>
    </Columns> 

    <ForEach select="/DESG">             
        <RowObject name="safetyGoal">
            <ForEach select="/part::SGDF">               
                <Row>
                    <DefObj> 
                        <ApplyTemplate name="HazEv"/>
                    </DefObj>
                    <ForEach select="/owner::/SGMS">   
                        <RowObject name="mode"/> 
                    </ForEach>
                </Row>  
            </ForEach>
        </RowObject>  
    </ForEach>

    <Context name="HARAContext">
        <AddParts owner="main" sid="DEHE" part="AnalysisToHazEv" defobj="HazEv"/>
        <AddParts owner="main" sid="DESG" part="AnalysisToSafetyGoal" defobj="SafetyGoal"/>
        <AddParts owner="SafetyGoal" sid="SGDF" part="SafetyGoalToHazEv" defobj="+HazEv"/>   
        <AddParts owner="main" sid="DEHA" part="AnalysisToHazard" defobj="Haz"/>
        <AddParts owner="HazEv" sid="HEH" part="HazEvToHaz" defobj="+Haz"/>
    </Context>

    <ForEachInContext name="HARAContext" group="HazEv">  
        <ForEach select="Context:.[not /back::SafetyGoalToHazEv]">  
            <Row>
                <ApplyTemplate name="HazEv"/>
            </Row>
        </ForEach>
    </ForEachInContext>    

    <ForEachInContext name="HARAContext" group="Haz">  
        <ForEach select="Context:.[not /back::HazEvToHaz]">  
            <Row>
                <ApplyTemplate name="Hazard"/>
            </Row>
        </ForEach>
    </ForEachInContext>    

    <Template name="HazEv">
        <RowObject name="hazardousEvent">
            <ForEach select="/HEH">  
                <ApplyTemplate name="Hazard"/>
            </ForEach>
            <ForEach select="/HEOM">    
                <RowObject name="failureMode"/> 
            </ForEach>
            <ForEach select="/I2GH">   
                <RowObject name="consequence"/> 
            </ForEach>
            <ForEach select="/I2CMPST">       
                <RowObject name="situation"/> 
            </ForEach>            
        </RowObject>  
    </Template>

    <Template name="Hazard">
        <RowObject name="hazard">
            <ForEach select="/I2HO union /I2HARQ">       
                <RowObject name="flawedItem"/>
            </ForEach>
            <ForEach select="/I2GW"> 
                <RowObject name="guideword"/> 
            </ForEach>            
        </RowObject>  
    </Template>
</Grid> 


Safety Coverage Chart


<Charts>
    <PieChart>
        <Slices>
            <Slice name="realized" caption="Realized in FSC" color="blue"/>
            <Slice name="unrealized" caption="Not in FSC" color="red"/>
            <Slice name="version" caption="Version inconsistent" color="yellow"/>
      <Slice name="orphan" caption="In FSC but not in HARA" color="olive"/>
        </Slices>           
        <Variable name="currentSafetyGoals" select="/I2SA/I2AHA/DESG" as="[Item]"/>
        <Variable name="realizedGoals" select="/I2SA/I2AFTA/2IFW/2IFI*/(IBRA|I2FTRQ)[SID='EASG']" as="[Item]"/>
        <Variable name="versionMismatch" select="$currentSafetyGoals[(not Handle in $realizedGoals.Select(Handle)) and (AncestorHandle in $realizedGoals.Select(AncestorHandle))]" as="[Item]"/>
        <Counter name="My Pie">
            <ForEach select="$realizedGoals[. in $currentSafetyGoals]">
                <AddToSlice name="realized"/>
            </ForEach>
            <ForEach select="$currentSafetyGoals - $realizedGoals - $versionMismatch">
                <AddToSlice name="unrealized"/>
            </ForEach>
            <ForEach select="$versionMismatch">
                <AddToSlice name="version"/>
            </ForEach>
            <ForEach select="$realizedGoals - $currentSafetyGoals - $versionMismatch">
                <AddToSlice name="orphan"/>
            </ForEach>
        </Counter>
    </PieChart>
</Charts>