Fusa_Medini/VEC_FuSa_HeavyVehicles/AnalyzeConstraints.xmi.pre2310

217 lines
84 KiB
XML

<?xml version="1.1" encoding="UTF-8"?>
<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:OCLConstraints="http://www.ikv.de/OCLConstraints.ecore">
<OCLConstraints:Constraint xmi:id="_27zdAI5bEd-ROOssltGSNA" description="Checks if for each safety goal at least one functional safety requirement is specified (ISO 26262-3 8.4.2.2)" message="Safety Goal {1} has no functional safety requirement specified" constraintExpression="inv:&#xD;&#xA;let&#xD;&#xA;MessageArg1:String= self.identifier&#xD;&#xA;in&#xD;&#xA;self.targetRelations-&gt;exists(rel|rel.source.oclIsTypeOf(SafetyRequirement) and rel.source.oclAsType(SafetyRequirement).kind= safetygoals::SafetyReqKind::FUNCTIONAL)" mediniIdentifier="0003">
<target xmi:id="_27zdAY5bEd-ROOssltGSNA" class="safetygoals::SafetyGoal"/>
</OCLConstraints:Constraint>
<OCLConstraints:Constraint xmi:id="_STSLgI5cEd-ROOssltGSNA" severity="WARNING" description="Checks that each Hazard model is traced to an item" message="{0} Hazard has no item traced" constraintExpression="inv:&#xD;&#xA;self.mediniGetTracedElements(PlainItem)-&gt;notEmpty()&#xD;&#xA;" mediniIdentifier="0013">
<target xmi:id="_STSLgY5cEd-ROOssltGSNA" class="hazard::HazardAnalysisModel"/>
</OCLConstraints:Constraint>
<OCLConstraints:Constraint xmi:id="_cAD0sEvLEeC8vaXAN0jU6Q" description="Checks if every safety requirement has an unique identifier (ISO 26262-8 6.4.2.5 a)" message="The requirement ''{1}'' has no unique identifier" constraintExpression="inv:&#xD;&#xA;let&#xD;&#xA;MessageArg1:String= self.identifier&#xD;&#xA;in&#xD;&#xA;if ((not self.identifier.oclIsUndefined()) and (self.identifier&lt;&gt;'')) then&#x9;&#xD;&#xA;&#x9;&#x9;safetygoals::SafetyRequirement.allInstances()-&gt;one(element|element.identifier = self.identifier)&#xD;&#xA;else&#xD;&#xA;&#x9;true&#xD;&#xA;endif" mediniIdentifier="0005">
<target xmi:id="_cAD0sUvLEeC8vaXAN0jU6Q" class="safetygoals::SafetyRequirement"/>
</OCLConstraints:Constraint>
<OCLConstraints:Constraint xmi:id="_yUb1sEvLEeC8vaXAN0jU6Q" description="Checks if every hazardous event has an unique identifier" message="The ''{0}'' has no (unique) identifier" constraintExpression="inv:&#xD;&#xA;if ((not self.id.oclIsUndefined()) and (self.id&lt;&gt;'')) then&#xD;&#xA;&#x9;hazard::HazardousEvent.allInstances()-&gt;one(element|element.id = self.id)&#xD;&#xA;else&#xD;&#xA;&#x9;false&#xD;&#xA;endif" mediniIdentifier="0033">
<target xmi:id="_yUb1sUvLEeC8vaXAN0jU6Q" class="hazard::HazardousEvent"/>
</OCLConstraints:Constraint>
<OCLConstraints:Constraint xmi:id="_zsMS0EvLEeC8vaXAN0jU6Q" description="Checks if every function has an unique identifier" message="The ''{0}'' has no (unique) identifier" constraintExpression="inv:&#xD;&#xA;if self.typeCode ='function' then&#x9;&#xD;&#xA;&#x9;&#x9;if ((not self.id.oclIsUndefined()) and (self.id&lt;&gt;'')) then&#xD;&#xA;&#x9;&#x9;&#x9;&#x9; sysml::SysMLActivity.allInstances()-&gt;one(element|element.typeCode ='function' and element.id = self.id)&#xD;&#xA;&#x9;&#x9;else&#xD;&#xA;&#x9;&#x9;&#x9;false&#xD;&#xA;&#x9;&#x9;endif&#xD;&#xA;else&#xD;&#xA;&#x9;true&#xD;&#xA;endif" mediniIdentifier="0034">
<target xmi:id="_zsMS0UvLEeC8vaXAN0jU6Q" class="sysml::SysMLActivity"/>
</OCLConstraints:Constraint>
<OCLConstraints:Constraint xmi:id="_1CKnQEvLEeC8vaXAN0jU6Q" description="Checks if every malfunction has an unique identifier" message="The ''{0}'' has no (unique) identifier" constraintExpression="inv:&#xD;&#xA;if ((not self.id.oclIsUndefined()) and (self.id&lt;&gt;'')) then&#xD;&#xA;&#x9;&#x9; safetyModel::Malfunction.allInstances()-&gt;one(element|element.id = self.id)&#xD;&#xA;else&#xD;&#xA;&#x9;false&#xD;&#xA;endif" mediniIdentifier="0035">
<target xmi:id="_1CKnQUvLEeC8vaXAN0jU6Q" class="safetyModel::Malfunction"/>
</OCLConstraints:Constraint>
<OCLConstraints:Constraint xmi:id="_2NGwYEvLEeC8vaXAN0jU6Q" severity="WARNING" description="Checks if every FMEA worksheet has an unique number" message="The ''{0}'' has no (unique) number" constraintExpression="inv:&#xD;&#xA;if ((not self.fmeaNumber.oclIsUndefined()) and (self.fmeaNumber&lt;&gt;'')) then&#xD;&#xA;&#x9;FMEA::FMEAWorksheet.allInstances()-&gt;one(element|element.fmeaNumber = self.fmeaNumber)&#xD;&#xA;else&#xD;&#xA;&#x9;false&#xD;&#xA;endif" mediniIdentifier="0036">
<target xmi:id="_2NGwYUvLEeC8vaXAN0jU6Q" class="FMEA::FMEAWorksheet"/>
</OCLConstraints:Constraint>
<OCLConstraints:Constraint xmi:id="_4S5_QEvLEeC8vaXAN0jU6Q" description="Checks that voting gates have at least as much inputs as the threshold set" message="Number of inputs for ''{0}'' is less than its threshold set" constraintExpression="inv:&#xD;&#xA;not (self.inputs.outputNode-&gt;&#xD;&#xA;&#x9;collect(node|&#xD;&#xA;&#x9;&#x9;if node.oclIsTypeOf(fta::EventNode) then&#xD;&#xA;&#x9;&#x9;&#x9;node.oclAsType(fta::EventNode).event&#xD;&#xA;&#x9;&#x9;else&#xD;&#xA;&#x9;&#x9;&#x9;node&#xD;&#xA;&#x9;&#x9;endif&#xD;&#xA;&#x9;)-&gt;asSet()-&gt;size()&lt;self.threshold)" mediniIdentifier="0037">
<target xmi:id="_4S5_QUvLEeC8vaXAN0jU6Q" class="FTA::VotingGate"/>
</OCLConstraints:Constraint>
<OCLConstraints:Constraint xmi:id="_5p61gEvLEeC8vaXAN0jU6Q" description="Checks that transfer gates have a target set" message="The ''{0}'' has no target set" constraintExpression="inv:&#xD;&#xA;not self.targetEventNode.oclIsUndefined()" mediniIdentifier="0038">
<target xmi:id="_5p61gUvLEeC8vaXAN0jU6Q" class="FTA::TransferGate"/>
</OCLConstraints:Constraint>
<OCLConstraints:Constraint xmi:id="_7eubAEvLEeC8vaXAN0jU6Q" description="Checks that voting gates do not have threshold of zero" message="The threshold of zero for ''{0}'' is not allowed" constraintExpression="inv:&#xD;&#xA;self.threshold&lt;&gt;0" mediniIdentifier="0039">
<target xmi:id="_7eubAUvLEeC8vaXAN0jU6Q" class="FTA::VotingGate"/>
</OCLConstraints:Constraint>
<OCLConstraints:Constraint xmi:id="_Pum5oDo1EeSM7dc93wKcuw" severity="WARNING" description="Checks for components with failure rate 0.0" message="The ''{0}'' has failure rate 0.0" constraintExpression="inv:&#xD;&#xA;if self.oclIsTypeOf(FMEA::Component) then&#xD;&#xA;&#x9;-- detached FMEA&#xD;&#xA;&#x9;self.failureRate&lt;&gt;0.0&#xD;&#xA;else if&#x9; self.element.oclIsTypeOf(sysml::SysMLPart) or self.element.oclIsKindOf(sysml::SysMLBlock) or self.element.oclIsKindOf(sysml::SysMLPortUsage) then&#xD;&#xA;&#x9;&#x9;-- derived FMEA&#xD;&#xA;&#x9;&#x9;self.element.oclAsType(sysml::SysMLFailable).failureRate&lt;&gt;0.0&#xD;&#xA;&#x9;else&#xD;&#xA;&#x9;&#x9;true&#xD;&#xA;&#x9;endif&#xD;&#xA;endif" mediniIdentifier="0043">
<target xmi:id="_Pum5oTo1EeSM7dc93wKcuw" class="FMEA::ComponentEntry"/>
</OCLConstraints:Constraint>
<OCLConstraints:Constraint xmi:id="_zOwkALIVEeCQYIKxeQ-Alw" severity="INFO" description="Checks that for every checked task in a checklist a reviewer is set." message="There is a checked task in checklist {1} which misses a reviewer." constraintExpression="-- determine the checklist&#xD;&#xA;def: getChecklist(item:ChecklistItem):Checklist&#xD;&#xA;&#x9;= if item.eContainer().oclIsUndefined() then&#xD;&#xA;&#x9;&#x9;&#x9;null -- not in a resource&#xD;&#xA;&#x9;&#x9;else&#xD;&#xA;&#x9;&#x9;&#x9;if item.eContainer().oclIsKindOf(Checklist) then&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;item.eContainer().oclAsType(Checklist) -- found the containing checklist&#xD;&#xA;&#x9;&#x9;&#x9;else&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;if item.eContainer().oclIsKindOf(ChecklistItem) then&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;getChecklist(item.eContainer().oclAsType(ChecklistItem))&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;else&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;null -- unknown container type&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;endif&#xD;&#xA;&#x9;&#x9;&#x9;endif&#xD;&#xA;&#x9;&#x9;endif&#xD;&#xA;&#xD;&#xA;inv:&#xD;&#xA;let&#xD;&#xA;&#x9;checklist:Checklist = getChecklist(self),&#xD;&#xA;&#x9;MessageArg1:String = if checklist.oclIsUndefined() then 'unknown' else checklist.name endif&#xD;&#xA;in&#xD;&#xA;if (self.checked) then&#xD;&#xA;&#x9;not (self.checkedBy.oclIsUndefined()) and not (self.checkedBy.trim().isEmpty())&#xD;&#xA;else &#xD;&#xA;&#x9;true&#xD;&#xA;endif" mediniIdentifier="0026">
<target xmi:id="_zOwkAbIVEeCQYIKxeQ-Alw" class="checklist::ChecklistItem"/>
</OCLConstraints:Constraint>
<OCLConstraints:Constraint xmi:id="_dxTDJtq1EeCu8-fFdTERtg" description="Checks if each safety related hazardous event has a safety goal assigned (ISO 26262-3 7.4.4.3)" message="The ''{0}'' is safety related and has no safety goal assigned" constraintExpression="inv:&#xD;&#xA;let&#xD;&#xA;&#x9;isoAsil:String= self.integrityLevel,&#xD;&#xA;&#x9;safetyGoal:safetygoals::SafetyGoal = self.getProfilePropertyValue('ISO26262_safetyGoal')-&gt;first().oclAsType(safetygoals::SafetyGoal)&#xD;&#xA;in&#xD;&#xA;&#x9;if (not isoAsil.oclIsUndefined()) then&#xD;&#xA;&#x9;&#x9;-- we cannot check for ASIL enum value 'None' here because its literal has been changed to empty string and the engine queries the enum by its literal&#xD;&#xA;&#x9;&#x9;(if isoAsil = 'A' or isoAsil = 'B' or isoAsil = 'C' or isoAsil = 'D' then&#xD;&#xA;&#x9;&#x9;&#x9;not (safetyGoal.oclIsUndefined())&#xD;&#xA;&#x9;&#x9;else&#xD;&#xA;&#x9;&#x9;&#x9;true&#xD;&#xA;&#x9;&#x9;endif)&#xD;&#xA;&#x9;else&#xD;&#xA;&#x9;&#x9;true&#xD;&#xA;&#x9;endif" mediniIdentifier="0002">
<target xmi:id="_dxTDJ9q1EeCu8-fFdTERtg" class="hazard::HazardousEvent"/>
</OCLConstraints:Constraint>
<OCLConstraints:Constraint xmi:id="_dxTDL9q1EeCu8-fFdTERtg" description="Checks that classification of severity (ISO 26262-3 7.4.3.2), exposure (ISO 26262-3 7.4.3.4) and controllability (ISO 26262-3 7.4.3.7) have a justifications given" message="{0} has no justification given for the estimated classification of: {1}" constraintExpression="--util to append &#xD;&#xA;def:&#xD;&#xA;&#x9;append(value:String, suffix: String):String&#xD;&#xA;&#x9;=&#x9;if value&lt;&gt;'' then&#xD;&#xA;&#x9;&#x9;&#x9;if suffix&lt;&gt;'' then&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;value .concat( ', ').concat(suffix)&#xD;&#xA;&#x9;&#x9;&#x9;else&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;value&#xD;&#xA;&#x9;&#x9;&#x9;endif&#xD;&#xA;&#x9;&#x9;else&#xD;&#xA;&#x9;&#x9;&#x9;suffix&#xD;&#xA;&#x9;&#x9;endif&#xD;&#xA;&#xD;&#xA;-- util to check comment&#x9;&#xD;&#xA;def:&#xD;&#xA;&#x9;check(comment:String, message:String):String&#xD;&#xA;&#x9;=&#x9;if comment.oclIsUndefined() then&#xD;&#xA;&#x9;&#x9;&#x9;message&#xD;&#xA;&#x9;&#x9;else&#xD;&#xA;&#x9;&#x9;&#x9;if comment.trim()='' then&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;message&#xD;&#xA;&#x9;&#x9;&#x9;else&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;''&#xD;&#xA;&#x9;&#x9;&#x9;endif&#xD;&#xA;&#x9;&#x9;endif&#xD;&#xA;inv:&#xD;&#xA;let&#xD;&#xA;&#x9;exposureComment:String = self.getProfilePropertyValue('ISO26262_exposureComment')-&gt;first().oclAsType(String),&#xD;&#xA;&#x9;severityComment:String = self.getProfilePropertyValue('ISO26262_severityComment')-&gt;first().oclAsType(String),&#xD;&#xA;&#x9;controllabilityComment:String = self.getProfilePropertyValue('ISO26262_controllabilityComment')-&gt;first().oclAsType(String),&#xD;&#xA;&#x9;defaultExposureComment:String = self.operationalSituation.getProfilePropertyValue('ISO26262_defaultExposureComment')-&gt;first().oclAsType(String),&#xD;&#xA;&#x9;val1:String= check(severityComment, 'severity'),&#xD;&#xA;&#x9;val2:String =append(val1,if exposureComment.oclIsUndefined() then&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;check(defaultExposureComment, 'exposure')&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;else&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;if exposureComment.trim()='' then&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;check(defaultExposureComment, 'exposure')&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;else&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;''&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;endif&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;endif),&#xD;&#xA;&#x9;MessageArg1:String= append(val2,check(controllabilityComment, 'controllability'))&#xD;&#xA;in&#xD;&#xA;&#x9;if not self.integrityLevel.oclIsUndefined() then&#xD;&#xA;&#x9;&#x9;MessageArg1=''&#xD;&#xA;&#x9;else&#xD;&#xA;&#x9;&#x9;true&#xD;&#xA;&#x9;endif&#xD;&#xA;&#xD;&#xA;" mediniIdentifier="0010">
<target xmi:id="_dxTDMNq1EeCu8-fFdTERtg" class="hazard::HazardousEvent"/>
</OCLConstraints:Constraint>
<OCLConstraints:Constraint xmi:id="_dxTDQdq1EeCu8-fFdTERtg" description="Checks if every safety goal has an unique identifier (ISO 26262-8 6.4.2.5 a)" message="The safety goal ''{1}'' has no unique identifier" constraintExpression="inv:&#xD;&#xA;let&#xD;&#xA;MessageArg1:String= self.identifier&#xD;&#xA;in&#xD;&#xA;if ((not self.identifier.oclIsUndefined()) and (self.identifier&lt;&gt;'')) then&#xD;&#xA;&#x9;&#x9; safetygoals::SafetyGoal.allInstances()-&gt;one(element|element.identifier = self.identifier)&#xD;&#xA;else&#xD;&#xA;&#x9;true&#xD;&#xA;endif" mediniIdentifier="0032">
<target xmi:id="_dxTDQtq1EeCu8-fFdTERtg" class="safetygoals::SafetyGoal"/>
</OCLConstraints:Constraint>
<OCLConstraints:Constraint xmi:id="__rEBgG0GEeG_ushRuE058g" description="Checks if for each decomposed safety requirement an independence argument requirement is specified" message="Decomposed requirement {1} has no independence argument requirement specified" constraintExpression="inv:&#xD;&#xA;let&#xD;&#xA;MessageArg1:String= self.identifier&#xD;&#xA;in&#xD;&#xA;if(self.subRequirements-&gt;exists(sub|sub.oclIsTypeOf(SafetyRequirement) and sub.oclAsType(SafetyRequirement).decomposingRequirement= true)) then&#xD;&#xA;&#x9;self.targetRelations-&gt;exists(rel|rel.source.oclIsTypeOf(SafetyRequirement) and rel.oclAsType(SafetyReqRelation).kind= SafetyReqRelationKind::INDEPENDENCY)&#xD;&#xA;else&#xD;&#xA;&#x9;true&#xD;&#xA;endif" mediniIdentifier="0049">
<target xmi:id="__rEBgW0GEeG_ushRuE058g" class="safetygoals::SafetyRequirement"/>
</OCLConstraints:Constraint>
<OCLConstraints:Constraint xmi:id="_cpBWBDloEeK6Vagv30244g" severity="WARNING" description="Checks that no decomposing requirement is allocated to the same system model or software element as its neighbor" message="The decomposing requirement {1} is allocated to the same system model or software element as its neighbor" constraintExpression="inv:&#xD;&#xA;let&#xD;&#xA;MessageArg1:String= self.identifier&#xD;&#xA;in&#xD;&#xA;if self.decomposingRequirement and self.container.oclIsKindOf(safetygoals::SafetyRequirement) then&#xD;&#xA;&#x9;let&#xD;&#xA;&#x9;&#x9;neighbors:Set(SafetyRequirement)= self.container.oclAsType(safetygoals::SafetyRequirement).getDecomposingRequirements(false,false)-&gt;excluding(self)-&gt;asSet()&#xD;&#xA;&#x9;in&#xD;&#xA;&#x9;&#x9;if neighbors-&gt;isEmpty() then&#xD;&#xA;&#x9;&#x9;&#x9;true&#xD;&#xA;&#x9;&#x9;else&#xD;&#xA;&#x9;&#x9;&#x9;let&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;selfSWElements:Bag(Structure::SimulinkNamedElement)=self.mediniGetTracedElements(Structure::SimulinkNamedElement)-&gt;asBag(),&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;selfHWElements:Bag(sysml::SysMLElement)=self.mediniGetTracedElements(sysml::SysMLElement)-&gt;asBag(),&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;-- collect elements allocated to neighbors of self&#x9;&#x9;&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;swElements:Bag(Structure::SimulinkNamedElement)=neighbors-&gt;collect(element|element.mediniGetTracedElements(Structure::SimulinkNamedElement))-&gt;asBag(),&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;hwElements:Bag(sysml::SysMLElement)=neighbors-&gt;collect(element|element.mediniGetTracedElements(sysml::SysMLElement))-&gt;asBag()&#xD;&#xA;&#x9;&#x9;&#x9;in&#x9;&#x9;&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;selfSWElements-&gt;intersection(swElements)-&gt;isEmpty() and&#x9;selfHWElements-&gt;intersection(hwElements)-&gt;isEmpty()&#xD;&#xA;&#x9;&#x9;endif&#x9;&#x9;&#xD;&#xA;else&#xD;&#xA;&#x9;true&#xD;&#xA;endif&#xD;&#xA;" mediniIdentifier="0016">
<target xmi:id="_cpBWBTloEeK6Vagv30244g" class="safetygoals::SafetyRequirement"/>
</OCLConstraints:Constraint>
<OCLConstraints:Constraint xmi:id="_cpBWCjloEeK6Vagv30244g" description="Checks if each system model element has a name set (except for connectors and dependencies)" message="{0} has no name set" constraintExpression="inv:&#xD;&#xA;if not (self.oclIsKindOf(sysml::SysMLRelationship) or self.oclIsKindOf(sysml::SysMLConnectorEnd) or self.oclIsKindOf(sysml::SysMLActivityEdge) or (self.oclIsKindOf(sysml::SysMLActivityNode) and not (self.oclIsKindOf(sysml::SysMLStructuredActivity) or self.oclIsKindOf(sysml::SysMLAction) or self.oclIsKindOf(sysml::SysMLPin) or self.oclIsKindOf(sysml::SysMLObjectNode)))) then&#xD;&#xA;&#x9;self.name&lt;&gt;''&#xD;&#xA;else&#xD;&#xA;&#x9;true&#xD;&#xA;endif" mediniIdentifier="0007">
<target xmi:id="_cpBWCzloEeK6Vagv30244g" class="sysml::SysMLElement"/>
</OCLConstraints:Constraint>
<OCLConstraints:Constraint xmi:id="_cpBWDTloEeK6Vagv30244g" description="Checks if each system model port is connected" message="{0} is not connected" constraintExpression="inv:&#xD;&#xA;self.the_owner.oclIsTypeOf(sysml::SysMLPart) implies self.relationships-&gt;exists(x | x.oclIsTypeOf(sysml::SysMLConnector))&#xD;&#xA;" mediniIdentifier="0008">
<target xmi:id="_cpBWDjloEeK6Vagv30244g" class="sysml::SysMLPortUsage"/>
</OCLConstraints:Constraint>
<OCLConstraints:Constraint xmi:id="_OIEZoDo1EeSM7dc93wKcuw" severity="WARNING" description="Checks for hardware parts with failure rate 0.0" message="The ''{0}'' has failure rate 0.0" constraintExpression="inv:&#xD;&#xA;&#x9;self.typeCode &lt;&gt; 'Hardware Part' or self.failureRate&lt;&gt;0.0" mediniIdentifier="0042">
<target xmi:id="_OIEZoTo1EeSM7dc93wKcuw" class="sysml::SysMLPart"/>
</OCLConstraints:Constraint>
<OCLConstraints:Constraint xmi:id="_cpBWIjloEeK6Vagv30244g" description="Checks that system model elements have independence comment if independence flag is set" message="No independence comment given for {0}" constraintExpression="inv:&#xD;&#xA;let&#xD;&#xA;&#x9;info:safetyModel::SafetyInformation= self.safetyInformation&#xD;&#xA;in&#xD;&#xA;&#x9;if not info.oclIsUndefined() then&#xD;&#xA;&#x9;&#x9;info.independent implies (not info.independenceComment.oclIsUndefined() and info.independenceComment&lt;&gt;'')&#xD;&#xA;&#x9;else&#xD;&#xA;&#x9;&#x9;true&#xD;&#xA;&#x9;endif" mediniIdentifier="0047">
<target xmi:id="_cpBWIzloEeK6Vagv30244g" class="sysml::SysMLElement"/>
</OCLConstraints:Constraint>
<OCLConstraints:Constraint xmi:id="_m_uDw2xjEeK8N_FfTXiZgA" severity="WARNING" description="Checks that all worksheets do have at least on safety goal defined" message="{0} has no safety goal defined" constraintExpression="inv:&#xD;&#xA;self.safetyGoal-&gt;exists(goal|goal.oclIsTypeOf(safetygoals::SafetyGoal))&#xD;&#xA;" mediniIdentifier="0050">
<target xmi:id="_m_uDxGxjEeK8N_FfTXiZgA" class="dc::DCWorksheet"/>
</OCLConstraints:Constraint>
<OCLConstraints:Constraint xmi:id="_gsAu19UCEeKAJpTEiBQAAQ" description="Checks if a valid decomposition has been applied (ISO 26262-9 5.4.10)" message="Requirement {1} is not correctly decomposed" constraintExpression="def: isQM(asil : String): Boolean = asil.trim().matches('QM(\\((A|B|C|D)\\))?')&#xD;&#xA;def: isA(asil : String): Boolean = asil.trim().matches('A(\\((A|B|C|D)\\))?')&#xD;&#xA;def: isB(asil : String): Boolean = asil.trim().matches('B(\\((B|C|D)\\))?')&#xD;&#xA;def: isC(asil : String): Boolean = asil.trim().matches('C(\\((C|D)\\))?')&#xD;&#xA;def: isD(asil : String): Boolean = asil.trim().matches('D(\\((D)\\))?')&#xD;&#xA;&#xD;&#xA;def: isLower(first : String,second: String): Boolean =&#xD;&#xA;&#x9;( (first = 'D') implies (false) ) and&#xD;&#xA;&#x9;( (first = 'C') implies (second = 'D') ) and&#xD;&#xA;&#x9;( (first = 'B') implies (second = 'C' or second = 'D') ) and&#xD;&#xA;&#x9;( (first = 'A') implies (second = 'B' or second = 'C' or second = 'D') ) and&#xD;&#xA;&#x9;( (first = 'QM') implies (second = 'A' or second = 'B' or second = 'C' or second = 'D') ) and&#xD;&#xA;&#x9;( (first = 'NONE') implies (true) )&#xD;&#xA;&#xD;&#xA;def: isHigherOrEqual(first: String, second: String): Boolean =&#xD;&#xA;&#x9;&#x9;( (first = second) or ( isLower(second,first) ) )&#xD;&#xA;def: getAsilContext(asil : String): String = if&#xD;&#xA;&#x9;asil.trim().matches('QM\\((A|B|C|D)\\)') then&#xD;&#xA;&#x9;&#x9;&#x9;asil.trim().substring(4,4)&#xD;&#xA;&#x9;else if asil.trim().matches('A\\((A|B|C|D)\\)') or asil.trim().matches('B\\((B|C|D)\\)') or asil.trim().matches('C\\((C|D)\\)') or asil.trim().matches('D\\((D)\\)') then&#xD;&#xA;&#x9;&#x9;&#x9;asil.trim().substring(3,3)&#xD;&#xA;&#x9;&#x9;else&#xD;&#xA;&#x9;&#x9;&#x9;'NONE'&#xD;&#xA;&#x9;&#x9;endif&#xD;&#xA;&#x9;endif&#xD;&#xA;&#xD;&#xA;inv:&#xD;&#xA;let&#xD;&#xA;&#x9;decompositions:Bag(SafetyRequirement)= self.getDecomposingRequirements(false,false)-&gt;asBag(), &#xD;&#xA;&#x9;number:Integer=decompositions-&gt;size(),&#xD;&#xA; MessageArg1:String= self.identifier&#xD;&#xA;&#xD;&#xA;in&#xD;&#xA;&#x9;if number = 0 then&#xD;&#xA;&#x9;&#x9;true&#xD;&#xA;&#x9;else if number = 2 then&#x9;&#xD;&#xA;&#x9;&#x9;&#x9;let&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;asils:Bag(String)=decompositions-&gt;collect(a|a.asil),&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;notAll_QM:Boolean= not asils-&gt;forAll(a| isQM(a)),&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;notAll_A:Boolean= not asils-&gt;forAll(a|isA(a)),&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;notA_and_QM:Boolean= not (asils-&gt;one(a|isQM(a)) and asils-&gt;one(a|isA(a))),&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;notB_and_QM:Boolean= not (asils-&gt;one(a|isQM(a)) and asils-&gt;one(a|isB(a))),&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;notC_and_QM:Boolean= not (asils-&gt;one(a|isQM(a)) and asils-&gt;one(a|isC(a))),&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;notB_and_A:Boolean= not (asils-&gt;one(a|isB(a)) and asils-&gt;one(a|isA(a))),&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;asilContext:String = getAsilContext(self.asil)&#xD;&#xA;&#x9;&#x9;&#x9;in --check ASIL decompositions rules&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;(isA(self.asil) implies&#x9;(notAll_QM))&#xD;&#xA;&#x9;&#x9;&#x9;and&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;(isB(self.asil) implies&#x9;(notAll_QM and notA_and_QM))&#xD;&#xA;&#x9;&#x9;&#x9;and&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;(isC(self.asil) implies (notAll_QM and notA_and_QM and notB_and_QM and notAll_A))&#xD;&#xA;&#x9;&#x9;&#x9;and&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;(isD(self.asil) implies (notAll_QM and notA_and_QM and notB_and_QM and notAll_A and notC_and_QM and notB_and_A))&#xD;&#xA;&#x9;&#x9;&#x9;and if (not (asilContext = 'NONE')) then&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;asils-&gt;forAll(asil | isHigherOrEqual(getAsilContext(asil),asilContext) )&#xD;&#xA;&#x9;&#x9;&#x9;&#x9; else&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;asils-&gt;forAll(asil | isHigherOrEqual(getAsilContext(asil),self.asil) )&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;endif&#xD;&#xA;&#x9;else&#xD;&#xA;&#x9;&#x9;false&#xD;&#xA;&#x9;endif&#xD;&#xA;&#x9;endif&#xD;&#xA;&#x9;" mediniIdentifier="0009">
<target xmi:id="_gsAu2NUCEeKAJpTEiBQAAQ" class="safetygoals::SafetyRequirement"/>
</OCLConstraints:Constraint>
<OCLConstraints:Constraint xmi:id="_gsAu2tUCEeKAJpTEiBQAAQ" description="Checks that the ASIL of a hazardous event matches the ASIL of an associated goal (ISO 26262-3 7.4.4.4)" message="The ASIL of ''{0}'' does not match to ASIL of associated goal" constraintExpression="inv:&#xD;&#xA;let&#xD;&#xA;&#x9;safetyGoal:safetygoals::SafetyGoal = self.getProfilePropertyValue('ISO26262_safetyGoal')-&gt;first().oclAsType(safetygoals::SafetyGoal)&#xD;&#xA;in&#xD;&#xA;&#xD;&#xA;if (not (safetyGoal.oclIsUndefined())) then&#xD;&#xA;&#x9;let&#xD;&#xA;&#x9;&#x9;hazardAsil:String=self.integrityLevel,&#xD;&#xA;&#x9;&#x9;goalAsil:String=safetyGoal.integrityLevel&#xD;&#xA;&#x9;in&#x9;&#xD;&#xA;&#x9;&#x9;(hazardAsil = 'A' implies (goalAsil ='A' or goalAsil ='B' or goalAsil ='C' or goalAsil ='D')) and&#xD;&#xA;&#x9;&#x9;(hazardAsil = 'B' implies (goalAsil ='B' or goalAsil ='C' or goalAsil ='D')) and &#xD;&#xA;&#x9;&#x9;(hazardAsil = 'C' implies (goalAsil ='C' or goalAsil ='D')) and&#xD;&#xA;&#x9;&#x9;(hazardAsil = 'D' implies goalAsil ='D') or&#xD;&#xA;&#x9;&#x9;hazardAsil = '' or&#xD;&#xA;&#x9;&#x9;hazardAsil.oclIsUndefined()&#xD;&#xA;else&#xD;&#xA;&#x9;true&#xD;&#xA;endif&#xD;&#xA;&#x9;" mediniIdentifier="0012">
<target xmi:id="_gsAu29UCEeKAJpTEiBQAAQ" class="hazard::HazardousEvent"/>
</OCLConstraints:Constraint>
<OCLConstraints:Constraint xmi:id="_gsAu3dUCEeKAJpTEiBQAAQ" description="Checks if safety requirements have the same or higher ASIL than of goals they contribute to" message="Safety requirement {1} has an invalid ASIL. ASIL has to be the same or higher than of goals it contributes to." constraintExpression="def: isQM(asil : String): Boolean = asil.trim().matches('QM(\\((A|B|C|D)\\))?')&#xD;&#xA;def: isA(asil : String): Boolean = asil.trim().matches('A(\\((A|B|C|D)\\))?')&#xD;&#xA;def: isC(asil : String): Boolean = asil.trim().matches('C(\\((C|D)\\))?')&#xD;&#xA;def: isD(asil : String): Boolean = asil.trim().matches('D(\\((D)\\))?')&#xD;&#xA;inv:&#xD;&#xA;let&#xD;&#xA;&#x9;goalContributions:Set(goal::Relation)=self.sourceRelations-&gt;select(rel| rel.oclIsKindOf(SafetyReqRelation) and rel.oclAsType(SafetyReqRelation).kind = SafetyReqRelationKind::UNSPECIFIED and rel.target.oclIsKindOf(SafetyGoal)),&#xD;&#xA;&#x9;targets:Bag(SafetyGoal)= goalContributions-&gt;collect(rel| rel.target),&#xD;&#xA; MessageArg1:String= self.identifier&#xD;&#xA;&#xD;&#xA;in&#xD;&#xA;&#x9;targets-&gt;forAll(target|&#x9;((target.asil='D') implies (isD(self.asil)))&#xD;&#xA;&#x9;&#x9;and&#xD;&#xA;&#x9;&#x9;&#x9;((target.asil= 'C') implies ((isC(self.asil)) or (isD(self.asil))))&#xD;&#xA;&#x9;&#x9;and&#xD;&#xA;&#x9;&#x9;&#x9;((target.asil= 'B') implies ((not isA(self.asil)) and (not isQM(self.asil))))&#xD;&#xA;&#x9;&#x9;and&#xD;&#xA;&#x9;&#x9;&#x9;((target.asil= 'A') implies ((not isQM(self.asil))))&#xD;&#xA;&#x9;)&#xD;&#xA;&#xD;&#xA;" mediniIdentifier="0014">
<target xmi:id="_gsAu3tUCEeKAJpTEiBQAAQ" class="safetygoals::SafetyRequirement"/>
</OCLConstraints:Constraint>
<OCLConstraints:Constraint xmi:id="_gsAu4NUCEeKAJpTEiBQAAQ" severity="WARNING" description="Checks that decomposition does not increase ASIL" message="Decompositions of requirement {1} increase ASIL" constraintExpression="def: isQM(asil : String): Boolean = asil.trim().matches('QM(\\((A|B|C|D)\\))?')&#xD;&#xA;def: isA(asil : String): Boolean = asil.trim().matches('A(\\((A|B|C|D)\\))?')&#xD;&#xA;def: isB(asil : String): Boolean = asil.trim().matches('B(\\((B|C|D)\\))?')&#xD;&#xA;def: isC(asil : String): Boolean = asil.trim().matches('C(\\((C|D)\\))?')&#xD;&#xA;def: isD(asil : String): Boolean = asil.trim().matches('D(\\((D)\\))?')&#xD;&#xA;def: getAsilContext(asil : String): String = if&#xD;&#xA;&#x9;asil.trim().matches('QM\\((A|B|C|D)\\)') then&#xD;&#xA;&#x9;&#x9;&#x9;asil.trim().substring(4,4)&#xD;&#xA;&#x9;else if asil.trim().matches('A\\((A|B|C|D)\\)') or asil.trim().matches('B\\((B|C|D)\\)') or asil.trim().matches('C\\((C|D)\\)') or asil.trim().matches('D\\((D)\\)') then&#xD;&#xA;&#x9;&#x9;&#x9;asil.trim().substring(3,3)&#xD;&#xA;&#x9;&#x9;else&#xD;&#xA;&#x9;&#x9;&#x9;'NONE'&#xD;&#xA;&#x9;&#x9;endif&#xD;&#xA;&#x9;endif&#xD;&#xA;def: isLower(first : String,second: String): Boolean =&#xD;&#xA;&#x9;( (first = 'D') implies (false) ) and&#xD;&#xA;&#x9;( (first = 'C') implies (second = 'D') ) and&#xD;&#xA;&#x9;( (first = 'B') implies (second = 'C' or second = 'D') ) and&#xD;&#xA;&#x9;( (first = 'A') implies (second = 'B' or second = 'C' or second = 'D') ) and&#xD;&#xA;&#x9;( (first = 'QM') implies (second = 'A' or second = 'B' or second = 'C' or second = 'D') ) and&#xD;&#xA;&#x9;( (first = 'NONE') implies (true) )&#xD;&#xA;&#xD;&#xA;inv:&#xD;&#xA;let&#xD;&#xA;&#x9;decompositions:Bag(SafetyRequirement)= self.getDecomposingRequirements(false,false)-&gt;asBag(), &#xD;&#xA;&#x9;number:Integer=decompositions-&gt;size(),&#xD;&#xA;&#x9;asils:Bag(String)=decompositions-&gt;collect(a|a.asil),&#xD;&#xA;&#x9;asilContext:String = getAsilContext(self.asil),&#xD;&#xA;&#x9;MessageArg1:String= self.identifier&#xD;&#xA;&#xD;&#xA;in&#xD;&#xA;&#x9;if number = 1 or number = 2 then&#x9;&#xD;&#xA;&#x9;&#x9;&#x9;( ( isQM(self.asil) ) implies ( asils-&gt;forAll(asil|isQM(asil)) ) )&#xD;&#xA;&#x9;&#x9;and &#xD;&#xA;&#x9;&#x9;&#x9;( ( isA(self.asil) ) implies ( (asils-&gt;one(asil|isA(asil)) or&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;asils-&gt;exists(asil|isQM(asil)))&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;and not asils-&gt;exists(asil|isB(asil) or isC(asil) or isD(asil)) ) )&#xD;&#xA;&#x9;&#x9;and&#xD;&#xA;&#x9;&#x9;&#x9;( ( isB(self.asil) ) implies ( ((asils-&gt;one(asil|isB(asil)) xor asils-&gt;exists(asil|isA(asil))) or&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;asils-&gt;exists(asil|isQM(asil)))&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;and not asils-&gt;exists(asil|isC(asil) or isD(asil)) ) )&#xD;&#xA;&#x9;&#x9;and&#xD;&#xA;&#x9;&#x9;&#x9;( ( isC(self.asil) ) implies ( ((asils-&gt;one(asil|isC(asil)) xor (asils-&gt;one(asil|isB(asil)) or asils-&gt;exists(asil|isA(asil)))) or&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;asils-&gt;exists(asil|isQM(asil)))&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;and not asils-&gt;exists(asil|isD(asil)) ) )&#xD;&#xA;&#x9;&#x9;and ( ( isD(self.asil) ) implies ( (asils-&gt;one(asil|isD(asil)) xor asils-&gt;one(asil|isC(asil) or isB(asil) or isA(asil))) or&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;(asils-&gt;forAll(asil|isB(asil))) or&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;(asils-&gt;exists(asil|isA(asil)) and not asils-&gt;exists(asil|isD(asil))) or&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;asils-&gt;exists(asil|isQM(asil)) ) )&#xD;&#xA;&#x9;&#x9;and ( if not( asilContext = 'NONE' ) then&#xD;&#xA;&#x9;&#x9;&#x9;&#x9; asils-&gt;forAll(asil| (asilContext = getAsilContext(asil)) or (isLower(getAsilContext(asil),asilContext)) ) &#xD;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;else&#xD;&#xA;&#x9;&#x9;&#x9;&#x9; asils-&gt;forAll(asil| (self.asil = getAsilContext(asil)) or (isLower(getAsilContext(asil),self.asil)) ) &#xD;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;endif&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;)&#xD;&#xA;&#x9;else&#xD;&#xA;&#x9;&#x9;true -- does not check general decomposition rules &#xD;&#xA;&#x9;endif&#xD;&#xA;&#xD;&#xA;" mediniIdentifier="0022">
<target xmi:id="_gsAu4dUCEeKAJpTEiBQAAQ" class="safetygoals::SafetyRequirement"/>
</OCLConstraints:Constraint>
<OCLConstraints:Constraint xmi:id="_gsAu49UCEeKAJpTEiBQAAQ" description="Checks if safety requirements have the same or higher ASIL than of requirements they contribute, also as independency argument, to" message="Requirement {2} has an invalid ASIL. ASIL has to be the same or higher than of requirement(s): {1}" constraintExpression="def: isQM(asil : String): Boolean = asil.trim().matches('QM(\\((A|B|C|D)\\))?')&#xD;&#xA;def: isA(asil : String): Boolean = asil.trim().matches('A(\\((A|B|C|D)\\))?')&#xD;&#xA;def: isB(asil : String): Boolean = asil.trim().matches('B(\\((B|C|D)\\))?')&#xD;&#xA;def: isC(asil : String): Boolean = asil.trim().matches('C(\\((C|D)\\))?')&#xD;&#xA;def: isD(asil : String): Boolean = asil.trim().matches('D(\\((D)\\))?')&#xD;&#xA;&#xD;&#xA;-- this function returns the asil context ; example ;QM(A) returns A, B(D) returns D&#xD;&#xA;def: getAsilContext(asil : String): String = if&#xD;&#xA;&#x9;asil.trim().matches('QM\\((A|B|C|D)\\)') then&#xD;&#xA;&#x9;&#x9;&#x9;asil.trim().substring(4,4)&#xD;&#xA;&#x9;else if ( asil.trim().matches('A\\((A|B|C|D)\\)') or asil.trim().matches('B\\((B|C|D)\\)') or asil.trim().matches('C\\((C|D)\\)') or asil.trim().matches('D\\((D)\\)') ) then&#xD;&#xA;&#x9;&#x9;&#x9;asil.trim().substring(3,3)&#xD;&#xA;&#x9;&#x9;else&#xD;&#xA;&#x9;&#x9;&#x9;'NONE'&#xD;&#xA;&#x9;&#x9;endif&#xD;&#xA;&#x9;endif&#xD;&#xA;&#x9;&#xD;&#xA;-- this function checks which asil is lower ;if first is lower it returns true&#xD;&#xA;def: isLower(first : String,second: String): Boolean =&#xD;&#xA;&#x9;( (first = 'D') implies (false) ) and&#xD;&#xA;&#x9;( (first = 'C') implies (second = 'D') ) and&#xD;&#xA;&#x9;( (first = 'B') implies (second = 'C' or second = 'D') ) and&#xD;&#xA;&#x9;( (first = 'A') implies (second = 'B' or second = 'C' or second = 'D') ) and&#xD;&#xA;&#x9;( (first = 'QM') implies (second = 'A' or second = 'B' or second = 'C' or second = 'D') ) and&#xD;&#xA;&#x9;( (first = 'NONE') implies (second = 'A' or second = 'B' or second = 'C' or second = 'D' or second='QM') )&#xD;&#xA;&#x9;&#xD;&#xA;-- this function is resturns first asil example; QM(B) returns QM, A(D) return A&#xD;&#xA;def: getRawAsil(asil : String): String = if&#xD;&#xA;&#x9;asil.trim().matches('QM\\((A|B|C|D)\\)') then&#xD;&#xA;&#x9;&#x9;'QM'&#xD;&#xA;&#x9;else if ( asil.trim().matches('A\\((A|B|C|D)\\)') or asil.trim().matches('B\\((B|C|D)\\)') or asil.trim().matches('C\\((C|D)\\)') or asil.trim().matches('D\\((D)\\)') ) then&#xD;&#xA;&#x9;&#x9;&#x9;asil.trim().substring(1,1)&#xD;&#xA;&#x9;&#x9;else&#xD;&#xA;&#x9;&#x9;&#x9;'NONE'&#xD;&#xA;&#x9;&#x9;endif&#xD;&#xA;&#x9;endif&#xD;&#xA;&#x9;&#xD;&#xA;def: hasSameRawAsil(first : String,second:String): Boolean =&#xD;&#xA;&#x9;if ( getRawAsil(first)=getRawAsil(second))then&#xD;&#xA;&#x9;&#x9;true&#xD;&#xA;&#x9;else&#xD;&#xA;&#x9;&#x9;false&#xD;&#xA;&#x9;endif&#xD;&#xA;&#x9;&#xD;&#xA;-- this function is checking val matches with any of these combinations QM(A|B|C|D) or A(A|B|C|D) or B(B|C|D) or C(C|D) or D(D)&#xD;&#xA;def:isContextAsil(val:String):Boolean = if (val.trim().matches('QM\\((A|B|C|D)\\)') or val.trim().matches('A\\((A|B|C|D)\\)') or val.trim().matches('B\\((B|C|D)\\)') or val.trim().matches('C\\((C|D)\\)') or val.trim().matches('D\\((D)\\)') ) then&#xD;&#xA;&#x9;&#x9;&#x9;true&#xD;&#xA;&#x9;&#x9;else&#xD;&#xA;&#x9;&#x9;&#x9;false&#xD;&#xA;&#x9;&#x9;endif&#xD;&#xA;&#xD;&#xA;-- checking asil is lower for source or target with context combinations; example ( QM(B),A(B) ) or ( D, A(B) )&#xD;&#xA;def: isLowerWithContext(source:String,target:String):Boolean=&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;if(isContextAsil(source)) then&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;if(isContextAsil(target)) then&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;if(hasSameRawAsil(source,target)) then&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;isLower(getAsilContext(source),getAsilContext(target))&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;else &#xD;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;isLower(getRawAsil(source),getRawAsil(target))&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;endif&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;else&#x9;&#x9;&#x9;&#x9;&#x9;&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;isLower(getRawAsil(source),target)&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;endif&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;else&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;if(isContextAsil(target)) then&#x9;&#x9;&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9; not isLower(getRawAsil(target),source)&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;else&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;isLower(source,target)&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;endif&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;endif&#xD;&#xA;&#xD;&#xA;inv:&#xD;&#xA;let&#xD;&#xA;&#x9;reqContributions:Bag(entities::Relation)=self.sourceRelations-&gt;select(rel| rel.oclIsKindOf(SafetyReqRelation) and (rel.oclAsType(SafetyReqRelation).kind = SafetyReqRelationKind::UNSPECIFIED or rel.oclAsType(SafetyReqRelation).kind = SafetyReqRelationKind::INDEPENDENCY) and rel.target.oclIsKindOf(SafetyRequirement)),&#xD;&#xA;&#x9;targets:Bag(SafetyRequirement)= reqContributions-&gt;collect(rel| rel.target),&#x9;&#x9;&#xD;&#xA;&#x9;MessageArg1:Bag(String)= targets-&gt;select(target| isLowerWithContext(self.asil,target.asil) ).identifier,&#xD;&#xA;&#x9;MessageArg2:String= self.identifier&#xD;&#xA;&#xD;&#xA;in&#xD;&#xA;MessageArg1-&gt;isEmpty()&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" mediniIdentifier="0029">
<target xmi:id="_gsAu5NUCEeKAJpTEiBQAAQ" class="safetygoals::SafetyRequirement"/>
</OCLConstraints:Constraint>
<OCLConstraints:Constraint xmi:id="_gsAu5tUCEeKAJpTEiBQAAQ" description="Checks if sub requirements have the same or higher ASIL than of its parent" message="Requirement {1} has an invalid ASIL. ASIL of sub requirement has to be the same or higher than of its parent." constraintExpression="def: isD(asil : String): Boolean = asil.trim().matches('D(\\((D)\\))?')&#xD;&#xA;def: isC(asil : String): Boolean = asil.trim().matches('C(\\((C|D)\\))?')&#xD;&#xA;def: isQM(asil : String): Boolean = asil.trim().matches('QM(\\((A|B|C|D)\\))?')&#xD;&#xA;def: isA(asil : String): Boolean = asil.trim().matches('A(\\((A|B|C|D)\\))?')&#xD;&#xA;def: isB(asil : String): Boolean = asil.trim().matches('B(\\((B|C|D)\\))?')&#xD;&#xA;inv:&#xD;&#xA;let&#xD;&#xA;&#x9;parent:safetygoals::SafetyRequirement=self.container,&#xD;&#xA;&#x9;MessageArg1:String= self.identifier&#xD;&#xA;in&#xD;&#xA;&#x9;if not self.decomposingRequirement and not parent.oclIsUndefined() and parent.oclIsKindOf(SafetyRequirement) then&#xD;&#xA;&#x9;&#x9;&#x9;((isD(parent.oclAsType(SafetyRequirement).asil)) implies (isD(self.asil)))&#xD;&#xA;&#x9;&#x9;and&#xD;&#xA;&#x9;&#x9;&#x9;((isC(parent.oclAsType(SafetyRequirement).asil)) implies ((isC(self.asil)) or (isD(self.asil))))&#xD;&#xA;&#x9;&#x9;and&#xD;&#xA;&#x9;&#x9;&#x9;((isB(parent.oclAsType(SafetyRequirement).asil)) implies ((not isA(self.asil)) and (not isQM(self.asil))))&#xD;&#xA;&#x9;&#x9;and&#xD;&#xA;&#x9;&#x9;&#x9;((isA(parent.oclAsType(SafetyRequirement).asil)) implies ((not isQM(self.asil))))&#xD;&#xA;&#x9;else&#xD;&#xA;&#x9;&#x9;true&#xD;&#xA;&#x9;endif&#xD;&#xA;&#xD;&#xA;" mediniIdentifier="0030">
<target xmi:id="_gsAu59UCEeKAJpTEiBQAAQ" class="safetygoals::SafetyRequirement"/>
</OCLConstraints:Constraint>
<OCLConstraints:Constraint xmi:id="_gsAu6dUCEeKAJpTEiBQAAQ" description="Checks that ASIL of system model element is same or higher than required by its requirements (ISO 26262-4 7.4.2.2)" message="ASIL of {0} is lower than required by its requirements" constraintExpression="inv:&#xD;&#xA;let&#xD;&#xA;&#x9;info:safetyModel::SafetyInformation=self.safetyInformation,&#xD;&#xA;&#x9;reqs:Sequence(traceability::Trace)=self.mediniGetTracedElements(safetygoals::SafetyRequirement)&#xD;&#xA;in&#xD;&#xA;&#x9;-- only parts, port usages, and functions/activities support ASIL&#xD;&#xA;&#x9;if (self.oclIsKindOf(sysml::SysMLPart) or self.oclIsKindOf(sysml::SysMLPortUsage) or self.oclIsKindOf(sysml::SysMLActivity)) and (not info.oclIsUndefined()) then&#xD;&#xA;&#x9;&#x9;not reqs-&gt;exists(req|info.compareAsil(req.oclAsType(safetygoals::SafetyRequirement).asil)&lt;0)&#xD;&#xA;&#x9;else&#xD;&#xA;&#x9;&#x9;true&#xD;&#xA;&#x9;endif&#xD;&#xA;" mediniIdentifier="0048">
<target xmi:id="_gsAu6tUCEeKAJpTEiBQAAQ" class="sysml::SysMLElement"/>
</OCLConstraints:Constraint>
<OCLConstraints:Constraint xmi:id="_gsAu7NUCEeKAJpTEiBQAAQ" description="Checks that metric target values fit to highest ASIL of worksheet's goals." message="Metric target values for {0} does not fit to highest ASIL of worksheet's goals." constraintExpression="inv:&#xD;&#xA;let&#xD;&#xA;&#x9;asils:OrderedSet(String)= self.safetyGoal-&gt;select(goal|goal.oclIsTypeOf(safetygoals::SafetyGoal))-&gt;collect(goal|goal.oclAsType(safetygoals::SafetyGoal).asil)&#xD;&#xA;in&#xD;&#xA;&#x9;-- for individual metrics we don't care the target values set at the worksheet&#xD;&#xA;&#x9; self.individualMetrics or asils-&gt;forAll(asil|&#xD;&#xA;&#x9;&#x9;((asil='B') implies self.spfTargetValue&gt;=90.0 and self.lmpfTargetValue&gt;=60.0) and&#x9;&#x9;&#xD;&#xA;&#x9;&#x9;((asil='C') implies self.spfTargetValue&gt;=97.0 and self.lmpfTargetValue&gt;=80.0) and&#x9;&#x9;&#xD;&#xA;&#x9;&#x9;((asil='D') implies self.spfTargetValue&gt;=99.0 and self.lmpfTargetValue&gt;=90.0)&#xD;&#xA;&#x9;)" mediniIdentifier="0051">
<target xmi:id="_gsAu7dUCEeKAJpTEiBQAAQ" class="dc::DCWorksheet"/>
</OCLConstraints:Constraint>
<OCLConstraints:Constraint xmi:id="_gsAu79UCEeKAJpTEiBQAAQ" severity="WARNING" description="Checks that contribution does not increase ASIL" message="Requirement {2} increases ASIL. ASIL should be the same than of requirement(s): {1}" constraintExpression="def: isQM(asil : String): Boolean = asil.trim().matches('QM(\\((A|B|C|D)\\))?')&#xD;&#xA;def: isA(asil : String): Boolean = asil.trim().matches('A(\\((A|B|C|D)\\))?')&#xD;&#xA;def: isB(asil : String): Boolean = asil.trim().matches('B(\\((B|C|D)\\))?')&#xD;&#xA;def: isC(asil : String): Boolean = asil.trim().matches('C(\\((C|D)\\))?')&#xD;&#xA;def: isD(asil : String): Boolean = asil.trim().matches('D(\\((D)\\))?')&#xD;&#xA;&#xD;&#xA;-- this function returns the asil context ; example ;QM(A) returns A, B(D) returns D&#xD;&#xA;def: getAsilContext(asil : String): String = if&#xD;&#xA;&#x9;asil.trim().matches('QM\\((A|B|C|D)\\)') then&#xD;&#xA;&#x9;&#x9;&#x9;asil.trim().substring(4,4)&#xD;&#xA;&#x9;else if ( asil.trim().matches('A\\((A|B|C|D)\\)') or asil.trim().matches('B\\((B|C|D)\\)') or asil.trim().matches('C\\((C|D)\\)') or asil.trim().matches('D\\((D)\\)') ) then&#xD;&#xA;&#x9;&#x9;&#x9;asil.trim().substring(3,3)&#xD;&#xA;&#x9;&#x9;else&#xD;&#xA;&#x9;&#x9;&#x9;'NONE'&#xD;&#xA;&#x9;&#x9;endif&#xD;&#xA;&#x9;endif&#xD;&#xA;&#x9;&#xD;&#xA;-- this function checks which asil is lower ;if first is lower it returns true&#xD;&#xA;def: isHigher(first : String,second: String): Boolean =&#xD;&#xA;( (first = 'D') implies (second = 'C' or second = 'B' or second = 'A' or second = 'QM' or second = 'NONE') ) and&#xD;&#xA;( (first = 'C') implies ( second = 'B' or second = 'A' or second = 'QM' or second = 'NONE') ) and&#xD;&#xA;( (first = 'B') implies ( second = 'A' or second = 'QM' or second = 'NONE') ) and&#xD;&#xA;( (first = 'A') implies ( second = 'QM' or second = 'NONE') ) and&#xD;&#xA;( (first = 'QM') implies ( second = 'NONE') ) and&#xD;&#xA;( (first = 'NONE') implies false)&#x9;&#xD;&#xA;&#x9;&#xD;&#xA;-- this function is resturns first asil example; QM(B) returns QM, A(D) return A&#xD;&#xA;def: getRawAsil(asil : String): String = if&#xD;&#xA;&#x9;asil.trim().matches('QM\\((A|B|C|D)\\)') then&#xD;&#xA;&#x9;&#x9;'QM'&#xD;&#xA;&#x9;else if ( asil.trim().matches('A\\((A|B|C|D)\\)') or asil.trim().matches('B\\((B|C|D)\\)') or asil.trim().matches('C\\((C|D)\\)') or asil.trim().matches('D\\((D)\\)') ) then&#xD;&#xA;&#x9;&#x9;&#x9;asil.trim().substring(1,1)&#xD;&#xA;&#x9;&#x9;else&#xD;&#xA;&#x9;&#x9;&#x9;'NONE'&#xD;&#xA;&#x9;&#x9;endif&#xD;&#xA;&#x9;endif&#xD;&#xA;&#x9;&#xD;&#xA;def: hasSameRawContext(first : String,second:String): Boolean =&#xD;&#xA;&#x9;if ( getRawAsil(first)=getRawAsil(second))then&#xD;&#xA;&#x9;&#x9;true&#xD;&#xA;&#x9;else&#xD;&#xA;&#x9;&#x9;false&#xD;&#xA;&#x9;endif&#xD;&#xA;&#x9;&#xD;&#xA;-- this function is checking val matches with any of these combinations QM(A|B|C|D) or A(A|B|C|D) or B(B|C|D) or C(C|D) or D(D)&#xD;&#xA;def:isConextAsil(val:String):Boolean = if (val.trim().matches('QM\\((A|B|C|D)\\)') or val.trim().matches('A\\((A|B|C|D)\\)') or val.trim().matches('B\\((B|C|D)\\)') or val.trim().matches('C\\((C|D)\\)') or val.trim().matches('D\\((D)\\)') ) then&#xD;&#xA;&#x9;&#x9;&#x9;true&#xD;&#xA;&#x9;&#x9;else&#xD;&#xA;&#x9;&#x9;&#x9;false&#xD;&#xA;&#x9;&#x9;endif&#xD;&#xA;&#xD;&#xA;-- checking asil is lower for source or target with context combinations; example ( QM(B),A(B) ) or ( D, A(B) )&#xD;&#xA;def: isASILIncreased(source:String,target:String):Boolean=&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;if(isConextAsil(source)) then&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;if(isConextAsil(target)) then&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;if(hasSameRawContext( source,target)) then&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;isHigher(getAsilContext(source),getAsilContext(target))&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;else &#xD;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;if&#x9;isHigher(getRawAsil(source),getRawAsil(target)) then&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;true&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;else&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9; &#x9;&#x9;isHigher(getAsilContext(source),getAsilContext(target))&#x9;&#x9;&#x9;&#x9;&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9; &#x9;&#x9;endif&#x9;&#x9;&#x9;&#x9;&#x9; &#xD;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;endif&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;else&#x9;&#x9;&#x9;&#x9;&#x9;&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;isHigher(getAsilContext(source),target)&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;endif&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;else&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;if(isConextAsil(target)) then&#x9;&#x9;&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;isHigher(source,getAsilContext(target))&#x9;&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;else&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;isHigher(source,target)&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;endif&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;endif&#xD;&#xA;&#xD;&#xA;inv:&#xD;&#xA;let&#xD;&#xA;&#x9;reqContributions:Bag(entities::Relation)=self.sourceRelations-&gt;select(rel| rel.oclIsKindOf(SafetyReqRelation) and (rel.oclAsType(SafetyReqRelation).kind = SafetyReqRelationKind::UNSPECIFIED or rel.oclAsType(SafetyReqRelation).kind = SafetyReqRelationKind::INDEPENDENCY) and rel.target.oclIsKindOf(SafetyRequirement)),&#xD;&#xA;&#x9;targets:Bag(SafetyRequirement)= reqContributions-&gt;collect(rel| rel.target),&#x9;&#x9;&#xD;&#xA;&#x9;MessageArg1:Bag(String)= targets-&gt;select(target| isASILIncreased(self.asil,target.asil) ).identifier,&#xD;&#xA; MessageArg2:String= self.identifier&#xD;&#xA;in&#xD;&#xA;MessageArg1-&gt;isEmpty()&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" mediniIdentifier="0052">
<target xmi:id="_gsAu8NUCEeKAJpTEiBQAAQ" class="safetygoals::SafetyRequirement"/>
</OCLConstraints:Constraint>
<OCLConstraints:Constraint xmi:id="_0WtFNDo2EeOmV9sq6aLt0Q" description="Checks that failure rate distributions add to 100.0% for each system model element" message="The failure rate distribution percentages for the failure modes of {0} do not add to 100.0%. Value is: {1}" constraintExpression="inv:&#xD;&#xA;if self.oclIsTypeOf(sysml::SysMLPart) or self.oclIsTypeOf(sysml::SysMLPortUsage) or self.oclIsTypeOf(sysml::SysMLBlock) then&#xD;&#xA;&#x9;let&#xD;&#xA;&#x9;&#x9;permanentFailures:Bag(safetyModel::FailureMode) = self.failures-&gt;collect(f|f.oclAsType(safetyModel::FailureMode))-&gt;select(f:safetyModel::FailureMode|f.failureType = safetyModel::FailureType::PERMANENT)&#xD;&#xA;&#x9;in&#xD;&#xA;&#x9;if not permanentFailures-&gt;isEmpty() and self.failureRateMode &lt;&gt; safetyModel::FailureRateMode::FROM_FAILURE_MODES and self.failureRate &lt;&gt; 0 then&#xD;&#xA;&#x9;&#x9;let&#xD;&#xA;&#x9;&#x9; total :Real =permanentFailures.failureRateDistribution-&gt;iterate(p:Real; sum:Real=0.0|sum+p),&#xD;&#xA;&#x9; &#x9; var :Real = 100 - total,&#x9;&#xD;&#xA;&#x9;&#x9; MessageArg1 :Real = &#xD;&#xA;&#x9; &#x9;&#x9;if var.abs() &lt;= 0.00001 then&#xD;&#xA;&#x9;&#x9; &#x9;&#x9;100&#xD;&#xA;&#x9;&#x9;&#x9;else&#xD;&#xA;&#x9;&#x9;&#x9; total&#xD;&#xA;&#x9;&#x9;&#x9;endif&#xD;&#xA;&#x9;&#x9;in&#xD;&#xA;&#x9;&#x9;MessageArg1=100.0&#x9;&#x9;&#xD;&#xA;&#x9;else &#xD;&#xA;&#x9;&#x9;true&#xD;&#xA;&#x9;endif&#xD;&#xA;else&#xD;&#xA;true&#xD;&#xA;endif" mediniIdentifier="0024">
<target xmi:id="_0WtFNTo2EeOmV9sq6aLt0Q" class="sysml::SysMLElement"/>
</OCLConstraints:Constraint>
<OCLConstraints:Constraint xmi:id="_qISGAQIJEeqWudVttih-0g" severity="WARNING" description="Checks for events with zero probability due to a zero failure rate at an element" message="The ''{0}'' has zero probability due to a zero failure rate at an element" constraintExpression="inv:&#xD;&#xA;if not self.probabilityData.oclIsUndefined() then&#xD;&#xA;&#x9;-- probability is derived&#xD;&#xA;&#x9;if self.probabilityData.oclIsKindOf(FTA::TimeDependentProbabilityModel) then&#xD;&#xA;&#x9;&#x9;let&#xD;&#xA;&#x9;&#x9;&#x9;data:FTA::TimeDependentProbabilityModel = self.probabilityData.oclAsType(FTA::TimeDependentProbabilityModel)&#xD;&#xA;&#x9;&#x9;in&#xD;&#xA;&#x9;&#x9;&#x9;if data.lambdaDerived then&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;-- check failure rate provider&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;if self.represents.oclIsUndefined() then&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;false&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;else&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;if self.represents.oclIsKindOf(sysml::SysMLElement) then&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;self.represents.oclAsType(sysml::SysMLElement).failureRate&lt;&gt;0.0&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;else&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;if self.represents.oclIsKindOf(FMEA::PlainFailureMode) then&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;self.represents.oclAsType(FMEA::PlainFailureMode).failureRate&lt;&gt;0.0&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;else&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;if self.represents.oclIsKindOf(safetyModel::FailureMode) then&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;self.represents.oclAsType(safetyModel::FailureMode).failureRate&lt;&gt;0.0&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;else&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;true&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;endif&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;endif&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;endif&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;endif&#xD;&#xA;&#x9;&#x9;&#x9;else&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;data.lambda&lt;&gt;0.0&#xD;&#xA;&#x9;&#x9;&#x9;endif&#xD;&#xA;&#x9;else&#xD;&#xA;&#x9;&#x9;true&#xD;&#xA;&#x9;endif&#xD;&#xA;else&#xD;&#xA;&#x9;true&#xD;&#xA;endif" mediniIdentifier="0044">
<target xmi:id="_qISGAgIJEeqWudVttih-0g" class="FTA::Event"/>
</OCLConstraints:Constraint>
<OCLConstraints:Constraint xmi:id="_T_3yjgwqEeSW27aUFfiZXA" description="FTA models should not contain loops" message="FTA connection is part of a loop" constraintExpression="inv:&#xD;&#xA;not self.isInLoop()" mediniIdentifier="0015">
<target xmi:id="_T_3yjwwqEeSW27aUFfiZXA" class="FTA::Connection"/>
</OCLConstraints:Constraint>
<OCLConstraints:Constraint xmi:id="_T_3ykQwqEeSW27aUFfiZXA" severity="WARNING" description="Checks whether there are events with the same id." message="There are events with same id as ''{0}''." constraintExpression="inv:&#xD;&#xA;-- ignore all events in Analysis model&#xD;&#xA;if (not self.id.oclIsUndefined() and (self.id&lt;&gt;'')) and ( not self.eContainer().oclIsKindOf(AnalysisModel)) then&#xD;&#xA; &#x9;FTA::EventNode.allInstances()-&gt;select(event|not event.eContainer().oclIsKindOf(AnalysisModel))-&gt;select(event|event.id=self.id).event-&gt;asSet()-&gt;size()&lt;=1&#xD;&#xA;else&#xD;&#xA;&#x9;true&#xD;&#xA;endif" mediniIdentifier="0031">
<target xmi:id="_T_3ykgwqEeSW27aUFfiZXA" class="FTA::EventNode"/>
</OCLConstraints:Constraint>
<OCLConstraints:Constraint xmi:id="_FKlSkLOJEeSmb_XB5NxHYg" description="Check whether each event in the fault tree is connected to a gate or another event" message="{0} is an unconnected event" constraintExpression="inv: self.outputs-&gt;size()&gt;0 or self.transferGates-&gt;size() &gt;0 or self.effectiveKind = FTA::EventType::TOP_LEVEL" mediniIdentifier="0102">
<target xmi:id="_FKlSkrOJEeSmb_XB5NxHYg" class="FTA::EventNode"/>
</OCLConstraints:Constraint>
<OCLConstraints:Constraint xmi:id="_mNpjgLOMEeSmb_XB5NxHYg" description="Checks that either all failure modes of a FMEDA component have category 'no part' or none" message="{0} has failure mode with category 'no part' and failure modes with other categories." constraintExpression="inv:&#xD;&#xA;if self.failureModes-&gt;isEmpty() then&#xD;&#xA; &#x9;true&#xD;&#xA;else&#xD;&#xA; &#x9;if self.oclIsTypeOf(FMEA::Component) then -- detached FMEA&#xD;&#xA;&#x9;&#x9;-- either all or no failure mode with category 'no part'&#xD;&#xA; &#x9;&#x9;if self.failureModes-&gt;exists(fm|fm.oclAsType(FMEA::PlainFailureMode).failureCategory = safetyModel::FailureCategory::NoPart) then &#xD;&#xA;&#x9; &#x9;&#x9;self.failureModes-&gt;forAll(fm| fm.oclAsType(FMEA::PlainFailureMode).failureCategory = safetyModel::FailureCategory::NoPart)&#xD;&#xA;&#x9;&#x9;else&#xD;&#xA;&#x9;&#x9;&#x9;true&#xD;&#xA;&#x9;&#x9;endif &#xD;&#xA;&#x9;else -- derived FMEA&#xD;&#xA;&#x9;&#x9;let&#xD;&#xA;&#x9;&#x9;&#x9;-- only interested in failure modes&#xD;&#xA;&#x9;&#x9;&#x9;effectiveFailureModes:Sequence(safetyModel::FailureMode) = self.failureModes-&gt;select(entry|entry.element.oclIsKindOf(safetyModel::FailureMode))-&gt;collect(entry|entry.element.oclAsType(safetyModel::FailureMode))&#xD;&#xA;&#x9;&#x9;in&#xD;&#xA;&#x9;&#x9;&#x9;-- either all or no failure mode with category 'no part'&#xD;&#xA;&#x9;&#x9;&#x9;if effectiveFailureModes-&gt;exists(fm|fm.failureCategory = safetyModel::FailureCategory::NoPart) then&#xD;&#xA;&#x9; &#x9;&#x9;&#x9;effectiveFailureModes-&gt;forAll(fm|fm.failureCategory = safetyModel::FailureCategory::NoPart)&#xD;&#xA;&#x9;&#x9;&#x9;else&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;true&#xD;&#xA;&#x9;&#x9;&#x9;endif &#xD;&#xA;&#x9;&#x9;endif&#xD;&#xA;endif&#xD;&#xA;" mediniIdentifier="0011">
<target xmi:id="_mNpjgbOMEeSmb_XB5NxHYg" class="FMEA::ComponentEntry"/>
</OCLConstraints:Constraint>
<OCLConstraints:Constraint xmi:id="_Qjat4LObEeSmb_XB5NxHYg" description="Check that each gate has at least one input" message="Gate {0} has no input" constraintExpression="inv: self.inputs-&gt;size()&gt;0" mediniIdentifier="0103">
<target xmi:id="_Qjat4bObEeSmb_XB5NxHYg" class="FTA::LogicalGate"/>
</OCLConstraints:Constraint>
<OCLConstraints:Constraint xmi:id="_4Zz-sLOcEeSmb_XB5NxHYg" description="Check whether each gate in the FTA is connected towards the top-level event" message="{0} is unconnected " constraintExpression="inv: self.outputs-&gt;size()&gt;0" mediniIdentifier="0101">
<target xmi:id="_4Zz-sbOcEeSmb_XB5NxHYg" class="FTA::Gate"/>
</OCLConstraints:Constraint>
<OCLConstraints:Constraint xmi:id="_Eq2DILjaEeS27qiRpL-hCQ" description="Checks that ASIL of system model element is same or higher than ASIL of parent unless system model element has independence flag set (ISO 26262-4 7.4.2.3)" message="ASIL for {0} is lower than required by its parent " constraintExpression="inv:&#xD;&#xA;let&#xD;&#xA;&#x9;info:safetyModel::SafetyInformation=self.safetyInformation,&#xD;&#xA;&#x9;container:de::ikv::medini::kernel::MediniObject=self.mediniGetContainer()&#xD;&#xA;in&#xD;&#xA;&#x9;-- only parts, port usages, and functions/activities support ASIL&#xD;&#xA;&#x9;if (self.oclIsKindOf(sysml::SysMLPart) or self.oclIsKindOf(sysml::SysMLPortUsage) or self.oclIsKindOf(sysml::SysMLActivity)) and (not info.oclIsUndefined()) then&#xD;&#xA;&#x9;&#x9;if (not info.independent) and (not container.oclIsUndefined()) then&#xD;&#xA;&#x9;&#x9;&#x9;if container.oclIsKindOf(sysml::SysMLElement) and not container.mediniGetContainer().oclIsUndefined() then&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;-- model does not have ASIL&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;if not container.oclAsType(sysml::SysMLElement).safetyInformation.oclIsUndefined() then&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;info.compareAsil(container.oclAsType(sysml::SysMLElement).safetyInformation)&gt;=0&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;else&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;true&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;endif&#xD;&#xA;&#x9;&#x9;&#x9;else&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;true&#xD;&#xA;&#x9;&#x9;&#x9;endif&#xD;&#xA;&#x9;&#x9;else&#xD;&#xA;&#x9;&#x9;&#x9;true&#xD;&#xA;&#x9;&#x9;endif&#xD;&#xA;&#x9;else&#xD;&#xA;&#x9;&#x9;true&#xD;&#xA;&#x9;endif&#xD;&#xA;" mediniIdentifier="0046">
<target xmi:id="_Eq2DIbjaEeS27qiRpL-hCQ" class="sysml::SysMLElement"/>
</OCLConstraints:Constraint>
<OCLConstraints:Constraint xmi:id="_5CxcQBaGEeazA6MyomEVow" description="Checks that all hardware metrics worksheets which calculate individual metrics have at least one safety goal assigned" message="''{0}'' calculates individual metrics but has no goal assigned" constraintExpression="inv:&#xD;&#xA;(not self.individualMetrics) or (self.safetyGoal-&gt;notEmpty())" mediniIdentifier="0053">
<target xmi:id="_5CxcQRaGEeazA6MyomEVow" class="dc::DCWorksheet"/>
</OCLConstraints:Constraint>
<OCLConstraints:Constraint xmi:id="_5CyqYBaGEeazA6MyomEVow" description="Checks that sibling failure entries for the same failure modes have disjoint evaluated goal selections" message="''{0}'' has safety goals selected for evaluation which are also selected for sibling for same failure mode" constraintExpression="-- returns all siblings for the same element (including self)&#xD;&#xA;def: getSiblings(): Collection(dc::DCFailureModeEntry)&#xD;&#xA;&#x9;= self.component.failureModes-&gt;select(fe|fe.oclIsKindOf(dc::DCFailureModeEntry) and fe.element = self.element)-&gt;collect(fe|fe.oclAsType(dc::DCFailureModeEntry))&#xD;&#xA;&#xD;&#xA;inv:&#xD;&#xA;&#x9;-- selected goals must be disjoint, empty selection means all&#xD;&#xA;&#x9;getSiblings()-&gt;forAll(first, second|(first &lt;&gt; second) implies (&#xD;&#xA;&#x9;&#x9;let&#xD;&#xA;&#x9;&#x9;&#x9;firstSelectedGoals:Set(ecore::EObject) = first.evaluatedFor,&#xD;&#xA;&#x9;&#x9;&#x9;secondSelectedGoals:Set(ecore::EObject) = second.evaluatedFor&#xD;&#xA;&#x9;&#x9;in&#xD;&#xA;&#x9;&#x9;&#x9;firstSelectedGoals-&gt;notEmpty() and secondSelectedGoals-&gt;notEmpty() and firstSelectedGoals-&gt;intersection(secondSelectedGoals)-&gt;isEmpty()&#xD;&#xA;&#x9;&#x9;)&#xD;&#xA;&#x9;)" mediniIdentifier="0054">
<target xmi:id="_5CyqYRaGEeazA6MyomEVow" class="dc::DCFailureModeEntry"/>
</OCLConstraints:Constraint>
<OCLConstraints:Constraint xmi:id="_5Cz4gBaGEeazA6MyomEVow" description="Checks that component entries are marked as safety related only for safety goals the worksheet is analyzing" message="''{0}'' is safety related for safety goals which are not configured for the hardware metrics worksheet" constraintExpression="inv:&#xD;&#xA;&#x9;self.safetyRelated or self.worksheet.oclAsType(dc::DCWorksheet).safetyGoal-&gt;includesAll(self.safetyRelatedFor)" mediniIdentifier="0055">
<target xmi:id="_5Cz4gRaGEeazA6MyomEVow" class="dc::DCComponentEntry"/>
</OCLConstraints:Constraint>
<OCLConstraints:Constraint xmi:id="_5C0fkBaGEeazA6MyomEVow" description="Checks that failure entries are evaluated only for safety goals the component is safety related for" message="''{0}'' is evaluated for safety goals which are not configured safety related for the component" constraintExpression="inv:&#xD;&#xA;&#x9;self.evaluatedFor-&gt;isEmpty() or &#xD;&#xA;&#x9;&#x9;let&#xD;&#xA;&#x9;&#x9;&#x9;component:dc::DCComponentEntry = self.component.oclAsType(dc::DCComponentEntry)&#xD;&#xA;&#x9;&#x9;in&#xD;&#xA;&#x9;&#x9;&#x9;if component.safetyRelated then&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;component.worksheet.oclAsType(dc::DCWorksheet).safetyGoal-&gt;includesAll(self.evaluatedFor)&#xD;&#xA;&#x9;&#x9;&#x9;else&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;component.safetyRelatedFor-&gt;includesAll(self.evaluatedFor)&#xD;&#xA;&#x9;&#x9;&#x9;endif" mediniIdentifier="0056">
<target xmi:id="_5C0fkRaGEeazA6MyomEVow" class="dc::DCFailureModeEntry"/>
</OCLConstraints:Constraint>
<OCLConstraints:Constraint xmi:id="_5C1tsBaGEeazA6MyomEVow" description="Checks that failure entries have only safety mechanisms selected which are also configured for the corresponding failure mode" message="''{0}'' has safety mechanisms selected which are not configured for the corresponding failure mode" constraintExpression="inv:&#xD;&#xA;&#x9;&#x9;self.element.oclAsType(safetyModel::FailureMode).spfSafetyMechanisms-&gt;includesAll(self.spfSafetyMechanisms)&#xD;&#xA;&#x9;and&#xD;&#xA;&#x9;&#x9;self.element.oclAsType(safetyModel::FailureMode).mpfSafetyMechanisms-&gt;includesAll(self.lmpfSafetyMechanisms)" mediniIdentifier="0057">
<target xmi:id="_5C1tsRaGEeazA6MyomEVow" class="dc::DCFailureModeEntry"/>
</OCLConstraints:Constraint>
<OCLConstraints:Constraint xmi:id="_PkIWwKprEea2d5K9aLHs9Q" description="Checks if each safety goal with ASIL C or ASIL D has a FTA traced (ISO 26262-4 7.4.3.1)" message="Safety Goal {1} has no FTA traced" constraintExpression="inv:&#xD;&#xA;let&#xD;&#xA;MessageArg1:String= self.identifier&#xD;&#xA;in&#xD;&#xA;if (self.asil='C' or self.asil='D') then&#xD;&#xA; -- any FTA model, event (node), gate, connection traced?&#xD;&#xA; not (self.mediniGetTracedElements(FTA::FTAElement)-&gt;isEmpty() and self.mediniGetTracedElements(FTA::EventNode)-&gt;isEmpty())&#xD;&#xA;else&#xD;&#xA;&#x9;true&#xD;&#xA;endif&#xD;&#xA;" mediniIdentifier="0004">
<target xmi:id="_PkIWwaprEea2d5K9aLHs9Q" class="safetygoals::SafetyGoal"/>
</OCLConstraints:Constraint>
<OCLConstraints:Constraint xmi:id="_SWQgIKprEea2d5K9aLHs9Q" severity="WARNING" description="Checks for valid failure mode detection coverage wrt. safety mechanisms." message="Too high failure mode coverage for {2} given for ''{0}'' wrt. its safety mechanisms." constraintExpression="--context dc::DCFailureModeEntry&#xD;&#xA;&#xD;&#xA;&#x9;&#xD;&#xA;def:&#xD;&#xA;&#x9;doGetMaxDC(maxDC:Real, mechanisms: Sequence(safetyModel::SafetyMechanism)):Real&#xD;&#xA;&#x9;= &#x9;if maxDC &gt;= 99.0 or mechanisms-&gt;isEmpty() then&#xD;&#xA;&#x9;&#x9;&#x9;maxDC&#xD;&#xA;&#x9;&#x9;else&#xD;&#xA;&#x9;&#x9;&#x9;let&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;mechanism:safetyModel::SafetyMechanism= mechanisms-&gt;first(),&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;dcValue:Real=&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;if mechanism.oclIsKindOf(safetyModel::SafetyMechanism) then&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;let&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;theDC:safetyModel::DCCoverage= mechanism.oclAsType(safetyModel::SafetyMechanism).maxDC&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;in&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;if theDC=safetyModel::DCCoverage::LOW then&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;60.0&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;else&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;if theDC=safetyModel::DCCoverage::MEDIUM then&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;90.0&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;else&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;if theDC=safetyModel::DCCoverage::HIGH then&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;99.0&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;else&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;100.0 -- case NONE&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;endif&#x9;&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;endif&#x9;&#x9;&#x9;&#x9;&#x9;&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;endif&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;else&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;100.0&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;endif&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;in&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;if mechanisms-&gt;size()&gt;=2 then&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;doGetMaxDC(maxDC.max(dcValue), mechanisms-&gt;subSequence(2,mechanisms-&gt;size()))&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;else&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;maxDC.max(dcValue)&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;endif&#xD;&#xA;&#x9;&#x9;endif&#xD;&#xA;&#x9;&#x9;&#xD;&#xA;def:&#xD;&#xA;&#x9;getMaxDC(mechanisms:Sequence(safetyModel::SafetyMechanism)):Real&#xD;&#xA;&#x9;= doGetMaxDC(0.0, mechanisms)&#xD;&#xA;&#xD;&#xA;inv:&#xD;&#xA;let&#xD;&#xA;&#x9;failureMode:safetyModel::FailureMode= self.element.oclAsType(safetyModel::FailureMode)&#xD;&#xA;in&#xD;&#xA; if failureMode.failureType = safetyModel::FailureType::TRANSIENT&#xD;&#xA; then&#xD;&#xA; true&#xD;&#xA; else&#xD;&#xA;&#x9;let&#xD;&#xA;&#x9;&#x9;maxSPFDC:Real= self.getMaxDC(failureMode.spfSafetyMechanisms-&gt;asSequence()),&#xD;&#xA;&#x9;&#x9;maxLFDC:Real= self.getMaxDC(failureMode.mpfSafetyMechanisms-&gt;asSequence()),&#xD;&#xA;&#x9;&#x9;MessageArg1:String= if maxSPFDC&lt;self.spfCoverage then 'single-point failure' else '' endif,&#xD;&#xA;&#x9;&#x9;MessageArg2:String= if maxLFDC&lt;self.lmpfCoverage then&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;if MessageArg1&lt;&gt;'' then&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;MessageArg1.concat(' and latent failure') -- append&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;else&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;'latent failure'&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;endif&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9; else&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;MessageArg1&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9; endif&#xD;&#xA;&#x9;in&#xD;&#xA;&#x9;MessageArg2=''&#xD;&#xA;endif" mediniIdentifier="0040">
<target xmi:id="_SWQgIaprEea2d5K9aLHs9Q" class="dc::DCFailureModeEntry"/>
</OCLConstraints:Constraint>
<OCLConstraints:Constraint xmi:id="_XEgX8KprEea2d5K9aLHs9Q" description="Checks that for every checked task in a checklist a check date is set." message="A checked task in checklist {1} misses a properly set checking date." constraintExpression="-- determine the checklist&#xD;&#xA;def: getChecklist(item:ChecklistItem):Checklist&#xD;&#xA;&#x9;= if item.eContainer().oclIsUndefined() then&#xD;&#xA;&#x9;&#x9;&#x9;null -- not in a resource&#xD;&#xA;&#x9;&#x9;else&#xD;&#xA;&#x9;&#x9;&#x9;if item.eContainer().oclIsKindOf(Checklist) then&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;item.eContainer().oclAsType(Checklist) -- found the containing checklist&#xD;&#xA;&#x9;&#x9;&#x9;else&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;if item.eContainer().oclIsKindOf(ChecklistItem) then&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;getChecklist(item.eContainer().oclAsType(ChecklistItem))&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;else&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;null -- unknown container type&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;endif&#xD;&#xA;&#x9;&#x9;&#x9;endif&#xD;&#xA;&#x9;&#x9;endif&#xD;&#xA;&#xD;&#xA;inv:&#xD;&#xA;let&#xD;&#xA;&#x9;checklist:Checklist = getChecklist(self),&#xD;&#xA;&#x9;MessageArg1:String = if checklist.oclIsUndefined() then 'unknown' else checklist.name endif&#xD;&#xA;in&#xD;&#xA;if (self.checked) then&#xD;&#xA;&#x9;self.isDateValid()&#xD;&#xA;else &#xD;&#xA;&#x9;true&#xD;&#xA;endif" mediniIdentifier="0027">
<target xmi:id="_XEgX8aprEea2d5K9aLHs9Q" class="checklist::ChecklistItem"/>
</OCLConstraints:Constraint>
<OCLConstraints:Constraint xmi:id="_bqXIwKprEea2d5K9aLHs9Q" severity="INFO" description="Checks that checklist tasks have model artifact assigned in case the corresponding checklist template has assigned artifact types for this task." message="There is a checked task in checklist {1} which has no model artifacts assigned although the corresponding checklist template says so." constraintExpression="-- determine the checklist&#xD;&#xA;def: getChecklist(item:ChecklistItem):Checklist&#xD;&#xA;&#x9;= if item.eContainer().oclIsUndefined() then&#xD;&#xA;&#x9;&#x9;&#x9;null -- not in a resource&#xD;&#xA;&#x9;&#x9;else&#xD;&#xA;&#x9;&#x9;&#x9;if item.eContainer().oclIsKindOf(Checklist) then&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;item.eContainer().oclAsType(Checklist) -- found the containing checklist&#xD;&#xA;&#x9;&#x9;&#x9;else&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;if item.eContainer().oclIsKindOf(ChecklistItem) then&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;getChecklist(item.eContainer().oclAsType(ChecklistItem))&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;else&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;null -- unknown container type&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;endif&#xD;&#xA;&#x9;&#x9;&#x9;endif&#xD;&#xA;&#x9;&#x9;endif&#xD;&#xA;&#xD;&#xA;inv:&#xD;&#xA;let&#xD;&#xA;&#x9;checklist:Checklist = getChecklist(self),&#xD;&#xA;&#x9;MessageArg1:String = if checklist.oclIsUndefined() then 'unknown' else checklist.name endif&#xD;&#xA;in&#xD;&#xA;if (self.checked and not self.artifactTypes-&gt;isEmpty()) then&#xD;&#xA;&#x9;not (self.artifacts-&gt;isEmpty())&#xD;&#xA;else&#xD;&#xA;&#x9;true&#xD;&#xA;endif" mediniIdentifier="0028">
<target xmi:id="_bqXIwaprEea2d5K9aLHs9Q" class="checklist::ChecklistItem"/>
</OCLConstraints:Constraint>
<OCLConstraints:Constraint xmi:id="_Kg0yUMGBEeimSKDM1drJhw" severity="WARNING" description="Checks for parts with part number but no type assigned" message="{0} has a part number but no type is assigned" constraintExpression="inv:&#xD;&#xA;if not ( self.partNumber = '' or self.partNumber.oclIsUndefined())&#xD;&#xA;then &#xD;&#xA; &#x9;not self.theType.oclIsUndefined()&#xD;&#xA; else&#xD;&#xA; true&#xD;&#xA; endif" mediniIdentifier="0108">
<target xmi:id="_Kg0yUcGBEeimSKDM1drJhw" class="sysml::SysMLPart"/>
</OCLConstraints:Constraint>
<OCLConstraints:Constraint xmi:id="_RXDDQMGBEeimSKDM1drJhw" description="Checks whether each part number is uniquely allocated to a single type" message="The partnumber {1} is duplicated." constraintExpression="inv:&#xD;&#xA;let&#xD;&#xA;MessageArg1:String= self.partNumber&#xD;&#xA;in&#xD;&#xA;if ((not self.partNumber.oclIsUndefined()) and (self.partNumber&lt;&gt;'')) then&#x9;&#xD;&#xA;&#x9;&#x9;sysml::SysMLBlock.allInstances()-&gt;one(element|element.partNumber = self.partNumber)&#xD;&#xA;else&#xD;&#xA;&#x9;true&#xD;&#xA;endif" mediniIdentifier="0107">
<target xmi:id="_RXDDQcGBEeimSKDM1drJhw" class="sysml::SysMLBlock"/>
</OCLConstraints:Constraint>
<OCLConstraints:Constraint xmi:id="_bElfkMGBEeimSKDM1drJhw" severity="INFO" description="Checks whether each safety requirement is shown on a diagram" message="Requirement {1} is not shown on any diagram" constraintExpression="inv: &#xD;&#xA;let&#xD;&#xA;MessageArg1:String= self.identifier&#xD;&#xA;in&#xD;&#xA;self.mediniGetOpposites('element')-&gt;exists(o|o.oclIsKindOf(notation::Node))" mediniIdentifier="0105">
<target xmi:id="_bElfkcGBEeimSKDM1drJhw" class="safetygoals::SafetyRequirement"/>
</OCLConstraints:Constraint>
<OCLConstraints:Constraint xmi:id="_cMlpcMGBEeimSKDM1drJhw" severity="INFO" description="Checks whether each SysML element is shown on a diagram" message="{0} is not shown on any diagram" constraintExpression="inv:&#xD;&#xA;if (self.oclIsKindOf(SysMLFailable) and not (self.oclIsKindOf(SysMLConnector))&#xD;&#xA;&#x9;and (self.failureRateMode &lt;&gt; safetyModel::FailureRateMode::FROM_CATALOG) -- to exclude HW parts from a BOM&#xD;&#xA;&#x9;)&#xD;&#xA;then &#xD;&#xA;&#x9;self.mediniGetOpposites('element')-&gt;exists(o|o.oclIsKindOf(notation::Node)) &#xD;&#xA;else&#xD;&#xA; &#x9;true&#xD;&#xA;endif" mediniIdentifier="0106">
<target xmi:id="_cMlpccGBEeimSKDM1drJhw" class="sysml::SysMLElement"/>
</OCLConstraints:Constraint>
<OCLConstraints:Constraint xmi:id="_zikkkALAEem9sJSEURFe6A" description="Check whether each hazardous event with a safety goal also is associated to a malfunction" message="{0} has a safety goal but no associated malfunction" constraintExpression="inv:&#xD;&#xA;let&#xD;&#xA;&#x9;safetyGoal:safetygoals::SafetyGoal = self.getProfilePropertyValue('ISO26262_safetyGoal')-&gt;first().oclAsType(safetygoals::SafetyGoal)&#xD;&#xA;in&#xD;&#xA;&#xD;&#xA;(not (safetyGoal.oclIsUndefined())) implies self.malfunctions-&gt;size()&gt;0" mediniIdentifier="0113">
<target xmi:id="_zikkkQLAEem9sJSEURFe6A" class="hazard::HazardousEvent"/>
</OCLConstraints:Constraint>
<OCLConstraints:Constraint xmi:id="_1lbNIALAEem9sJSEURFe6A" description="Check whether each hazardous event with a safety goal also is associated to a hazard " message="{0} has a safety goal but no associated hazard" constraintExpression="inv:&#xD;&#xA;let&#xD;&#xA;&#x9;safetyGoal:safetygoals::SafetyGoal = self.getProfilePropertyValue('ISO26262_safetyGoal')-&gt;first().oclAsType(safetygoals::SafetyGoal)&#xD;&#xA;in&#xD;&#xA;&#xD;&#xA;(not (safetyGoal.oclIsUndefined())) implies not self.hazard.oclIsUndefined()" mediniIdentifier="0112">
<target xmi:id="_1lbNIQLAEem9sJSEURFe6A" class="hazard::HazardousEvent"/>
</OCLConstraints:Constraint>
<OCLConstraints:Constraint xmi:id="_mIfIkALBEem9sJSEURFe6A" severity="WARNING" description="Check whether the hazard of this situation is used in the failure net of the related malfunction" message="{2}: Hazard &quot;{3}&quot; does not occur as top level effect in failure net for malfunction {1}" constraintExpression="inv:&#xD;&#xA;let&#xD;&#xA; MessageArg1 : String = if self.malfunctions-&gt;size() &gt; 0 then self.malfunctions-&gt;first().id else '' endif,&#xD;&#xA; MessageArg2 : String = self.id,&#xD;&#xA; MessageArg3 : String = self.hazard.name,&#xD;&#xA; tle:Sequence(safetyModel::Hazard) = self.malfunctions-&gt;first().oclAsType(safetyModel::Malfunction).getProfilePropertyValue('top_level_effect')&#xD;&#xA;in&#xD;&#xA;&#x9;&#x9;not(self.hazard.oclIsUndefined()) implies tle-&gt;includes(self.hazard)&#xD;&#xA;&#xD;&#xA;" mediniIdentifier="0111">
<target xmi:id="_mIfIkQLBEem9sJSEURFe6A" class="hazard::HazardousEvent"/>
</OCLConstraints:Constraint>
<OCLConstraints:Constraint xmi:id="_eDGfIMGBEeimSKDM1drJhw" description="Checks wether FTA element is shown on diagram" message="{0} is not shown on any diagram" constraintExpression="inv: self.mediniGetOpposites('element')-&gt;exists(o|o.oclIsKindOf(notation::Node))" mediniIdentifier="0104">
<target xmi:id="_eDGfIcGBEeimSKDM1drJhw" class="FTA::Node"/>
</OCLConstraints:Constraint>
<OCLConstraints:Constraint xmi:id="_j2eL8MGBEeimSKDM1drJhw" severity="INFO" description="Check whether there exists for each functional safety requirement a technical safety requirement." message="There is no technical safety requirement allocated to functional requirement {1}." constraintExpression="inv:&#xD;&#xA;let&#xD;&#xA;MessageArg1:String= self.identifier&#xD;&#xA;in&#xD;&#xA;if self.kind= safetygoals::SafetyReqKind::FUNCTIONAL&#xD;&#xA;then&#xD;&#xA;self.targetRelations-&gt;exists(rel|rel.source.oclIsTypeOf(SafetyRequirement) and rel.source.oclAsType(SafetyRequirement).kind= safetygoals::SafetyReqKind::TECHNICAL)&#xD;&#xA;else&#xD;&#xA;true&#xD;&#xA;endif" mediniIdentifier="0100">
<target xmi:id="_j2eL8cGBEeimSKDM1drJhw" class="safetygoals::SafetyRequirement"/>
</OCLConstraints:Constraint>
<OCLConstraints:Constraint xmi:id="_M1IHIMibEeiciPcxq-kTYA" severity="WARNING" description="Check whether failure rate catalogs are used for the determination of failure rates" message="{0} is not using a failure rate catalog for the failure rate prediction" constraintExpression="inv:&#xD;&#xA; &#x9;self.partNumber&lt;&gt;'' implies self.failureRateMode = safetyModel::FailureRateMode::FROM_CATALOG&#xD;&#xA;&#xD;&#xA;" mediniIdentifier="0110">
<target xmi:id="_M1IHIcibEeiciPcxq-kTYA" class="sysml::SysMLBlock"/>
</OCLConstraints:Constraint>
<OCLConstraints:Constraint xmi:id="_Y5wT4BiuEemhPYKw8yONPA" description="Checks that failure modes have unique names within the same scope" message="The ''{0}'' has no unique name" constraintExpression="def: uniqueFailureModeName(failure:FMEA::PlainFailureMode):Boolean = &#xD;&#xA;-- apply to failure modes that have a name set only&#xD;&#xA;if ((not failure.name.oclIsUndefined()) and (failure.name &lt;&gt; '')) then&#xD;&#xA;&#x9;-- apply to failure modes in detached FMEA sheets&#xD;&#xA;&#x9;if (failure.mediniGetContainer().oclIsKindOf(FMEA::Component)) then&#xD;&#xA;&#x9;&#x9;let&#xD;&#xA;&#x9;&#x9;&#x9;container:FMEA::Component = self.mediniGetContainer().oclAsType(FMEA::Component)&#xD;&#xA;&#x9;&#x9;in&#xD;&#xA;&#x9;&#x9;&#x9;-- there must be only one failure mode with that name&#xD;&#xA;&#x9;&#x9;&#x9;container.failureModes-&gt;one(element|&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;if element.oclIsKindOf(FMEA::PlainFailureMode) then&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;element.oclAsType(FMEA::PlainFailureMode).name = failure.name&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;else&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;false&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;endif&#xD;&#xA;&#x9;&#x9;&#x9;)&#xD;&#xA;&#x9;else&#xD;&#xA;&#x9;&#x9;true&#xD;&#xA;&#x9;endif&#xD;&#xA;else&#xD;&#xA;&#x9;true&#xD;&#xA;endif&#xD;&#xA;&#xD;&#xA;def: uniqueFailureModeName(failure:safetyModel::FailureMode):Boolean = &#xD;&#xA;-- apply to failure modes that have a name set only&#xD;&#xA;if ((not failure.name.oclIsUndefined()) and (failure.name &lt;&gt; '')) then&#xD;&#xA;&#x9;-- apply to failure modes in SysMLelements containers&#xD;&#xA;&#x9;if (failure.mediniGetContainer().oclIsKindOf(sysml::SysMLElement)) then&#xD;&#xA;&#x9;&#x9;let&#xD;&#xA;&#x9;&#x9;&#x9;container :sysml::SysMLElement= failure.mediniGetContainer().oclAsType(sysml::SysMLElement)&#xD;&#xA;&#x9;&#x9;in&#xD;&#xA;&#x9;&#x9;&#x9;-- there must be only one failure mode with that name&#xD;&#xA;&#x9;&#x9;&#x9;container.failures-&gt;one(element|element.name = failure.name)&#xD;&#xA;&#x9;else&#xD;&#xA;&#x9;&#x9;true&#xD;&#xA;&#x9;endif&#xD;&#xA;else&#xD;&#xA;&#x9;true&#xD;&#xA;endif&#xD;&#xA;&#xD;&#xA;inv:&#xD;&#xA;if self.oclIsKindOf(FMEA::PlainFailureMode) then&#xD;&#xA;&#x9;-- failure mode in detached FMEA&#xD;&#xA;&#x9;uniqueFailureModeName(self.oclAsType(FMEA::PlainFailureMode))&#xD;&#xA;else if self.element.oclIsKindOf(safetyModel::FailureMode) then&#xD;&#xA;&#x9;&#x9;-- failure mode refered from derived FMEA&#xD;&#xA;&#x9;&#x9;uniqueFailureModeName(self.element.oclAsType(safetyModel::FailureMode))&#xD;&#xA;&#x9;else&#xD;&#xA;&#x9;&#x9;true&#x9;&#x9;&#xD;&#xA;&#x9;endif&#xD;&#xA;endif&#xD;&#xA;&#xD;&#xA;" mediniIdentifier="0041">
<target xmi:id="_Y5wT4RiuEemhPYKw8yONPA" class="FMEA::FailureEntry"/>
</OCLConstraints:Constraint>
<OCLConstraints:Constraint xmi:id="_ljkUEBiuEemhPYKw8yONPA" severity="WARNING" description="Checks for failure modes with failure rate 0.0" message="The ''{0}'' has failure rate 0.0" constraintExpression="inv:&#xD;&#xA;if self.oclIsKindOf(FMEA::PlainFailureMode) then&#xD;&#xA;&#x9;-- failure mode in detached FMEA &#xD;&#xA;&#x9;&#x9;self.oclAsType(FMEA::PlainFailureMode).failureRate&lt;&gt;0.0&#xD;&#xA;else if self.element.oclIsKindOf(safetyModel::FailureMode) then&#xD;&#xA;&#x9;&#x9;-- failure mode in derived FMEA&#xD;&#xA;&#x9;&#x9;if self.component.failureRate &gt;0&#xD;&#xA;&#x9;&#x9;then&#xD;&#xA;&#x9;&#x9;&#x9;self.element.oclAsType(safetyModel::FailureMode).failureRate&lt;&gt;0.0&#xD;&#xA;&#x9;&#x9;else&#xD;&#xA;&#x9;&#x9;&#x9;true&#xD;&#xA;&#x9;&#x9;endif&#xD;&#xA;&#x9; else&#xD;&#xA;&#x9; &#x9;true&#xD;&#xA;&#x9; endif&#xD;&#xA;endif" mediniIdentifier="0045">
<target xmi:id="_ljkUERiuEemhPYKw8yONPA" class="FMEA::FailureEntry"/>
</OCLConstraints:Constraint>
<OCLConstraints:Constraint xmi:id="_ekTegCR4Eem7IbokExUh5g" description="Check for consistency in direction and type of connected ports" message="Connector {0} between ports {1} and {2}: Mismatch in port direction and/or port type" constraintExpression="&#xD;&#xA;def: parents(element:sysml::SysMLElement):Set(sysml::SysMLElement) =&#xD;&#xA;&#x9;if not element.oclIsUndefined()&#xD;&#xA;&#x9;then&#xD;&#xA;&#x9;&#x9;parents(element.the_owner.oclAsType(sysml::SysMLElement))-&gt;including(element)&#xD;&#xA;&#x9;else&#xD;&#xA;&#x9;&#x9;Set{}&#xD;&#xA;&#x9;endif&#xD;&#xA;&#x9;&#xD;&#xA;def: matches(dir1 : sysml::SysMLPortUsage, dir2 :sysml::SysMLPortUsage): Boolean = &#xD;&#xA;&#x9;if dir1.direction = sysml::SysMLFlowDirection::inout or dir2.direction = sysml::SysMLFlowDirection::inout&#xD;&#xA;&#x9;then true &#xD;&#xA;&#x9;else &#xD;&#xA;&#x9;if not(dir2.the_owner = dir1.the_owner) and (parents(dir2.the_owner.oclAsType(sysml::SysMLElement))-&gt;includes(dir1.the_owner.oclAsType(sysml::SysMLElement))&#xD;&#xA;&#x9;or parents(dir1.the_owner.oclAsType(sysml::SysMLElement))-&gt;includes(dir2.the_owner.oclAsType(sysml::SysMLElement)))&#xD;&#xA;&#x9;then &#xD;&#xA;&#x9;&#x9;&#x9;dir1.direction = dir2.direction -- going inward&#xD;&#xA;&#x9;&#x9;else &#xD;&#xA;&#x9;&#x9;&#x9;dir1.direction &lt;&gt; dir2.direction &#xD;&#xA;&#x9;&#x9;endif&#xD;&#xA;&#x9;endif&#x9;&#xD;&#xA;&#x9;&#x9;&#xD;&#xA;inv:&#xD;&#xA;let&#xD;&#xA;&#x9;source: sysml::SysMLPortUsage = self.theConnectorEnd-&gt;first().role,&#xD;&#xA;&#x9;target : sysml::SysMLPortUsage = self.theConnectorEnd-&gt;last().role,&#xD;&#xA;&#x9;MessageArg1 : String = source.name, &#xD;&#xA;&#x9;MessageArg2 : String = target.name &#xD;&#xA;&#xD;&#xA;in &#xD;&#xA;if&#xD;&#xA;&#x9;source.oclIsTypeOf(sysml::SysMLPortUsage) and target.oclIsTypeOf(sysml::SysMLPortUsage)&#xD;&#xA;then&#xD;&#xA;&#x9;if&#xD;&#xA;&#x9;&#x9;not source.direction.oclIsUndefined() and not target.direction.oclIsUndefined()&#xD;&#xA;&#x9;&#x9;then &#xD;&#xA;&#x9;&#x9;&#x9;matches(source, target) and ((source.type = target.type) or (source.type.oclIsUndefined() or target.type.oclIsUndefined()) or (source.type ='' or target.type ='')) -- add also for oclUndefined and ''&#xD;&#xA;&#x9;&#x9;else&#xD;&#xA;&#x9;&#x9;&#x9;true&#xD;&#xA;&#x9;&#x9;endif&#xD;&#xA;else&#xD;&#xA;&#x9;true&#xD;&#xA;endif" mediniIdentifier="0114">
<target xmi:id="_ekTegSR4Eem7IbokExUh5g" class="sysml::SysMLConnector"/>
</OCLConstraints:Constraint>
<OCLConstraints:Constraint xmi:id="_Zhk4sPAREemxD416Z3DJbQ" severity="WARNING" description="Checks that the severity has been set or been derived." message="Invalid severity value 0 or no efffect for failure mode &quot;{0}" constraintExpression="inv:&#xD;&#xA;not self.element.oclIsTypeOf(dc::DCFailureModeEntry) implies&#xD;&#xA;&#x9;&#x9;if self.failureEffects-&gt;size()&gt;0 &#xD;&#xA;&#x9;&#x9;&#x9;then self.element.oclAsType(safetyModel::CauseEffect).effectiveSeverity &gt;0&#xD;&#xA;&#x9;&#x9;else&#xD;&#xA;&#x9;&#x9;&#x9;true&#xD;&#xA;&#x9;&#x9;endif" mediniIdentifier="0115">
<target xmi:id="_Zhk4sfAREemxD416Z3DJbQ" class="FMEA::FailureEntry"/>
</OCLConstraints:Constraint>
<OCLConstraints:Constraint xmi:id="_98Yo0AuwEeqjYeKjV-7wuQ" description="Checks whether correct detection/occurence values are set" message="Invalid occurence/detection value of 0 for failure cause &quot;{1}&quot; " constraintExpression="inv:&#xD;&#xA;let &#xD;&#xA;&#x9;mg:safetyModel::MeasureGroup = self.element.oclAsType(safetyModel::MeasureGroup),&#xD;&#xA; &#x9;MessageArg1 : String =self.failureCause.element.oclAsType(safetyModel::Failure).name&#xD;&#xA;in&#xD;&#xA;(not self.detection.oclIsUndefined() ) and (not self.occurrence.oclIsUndefined()) and (self.detection &gt;0 ) and (self.occurrence&gt;0)" mediniIdentifier="0116">
<target xmi:id="_98Yo0QuwEeqjYeKjV-7wuQ" class="FMEA::MeasureEntry"/>
</OCLConstraints:Constraint>
<OCLConstraints:Constraint xmi:id="_ClvZkAuxEeqjYeKjV-7wuQ" description="Check whether each requirement is allocated to an architecture element" message="Requirement {1} is not allocated to any architecture element" constraintExpression="inv:&#xD;&#xA;let&#xD;&#xA;MessageArg1:String= self.identifier&#xD;&#xA;in&#xD;&#xA;self.mediniGetTracedElements(sysml::SysMLElement)-&gt;size() &gt;0" mediniIdentifier="0117">
<target xmi:id="_ClvZkQuxEeqjYeKjV-7wuQ" class="safetygoals::SafetyRequirement"/>
</OCLConstraints:Constraint>
<OCLConstraints:Constraint xmi:id="_XUBTwLbJEeq4nLYb_uFa7w" severity="WARNING" description="Check consistency for probability derivation" message="Event {0} is not using failure rate of represented component/failure mode" constraintExpression="inv:&#xD;&#xA;if self.event.probabilityData.oclIsTypeOf(FTA::ExponentialProbabilityModel) &#xD;&#xA;then &#xD;&#xA;not self.represents.oclIsUndefined() implies self.event.probabilityData.oclAsType(FTA::ExponentialProbabilityModel).lambdaDerived =true&#xD;&#xA;else true&#xD;&#xA;endif&#xD;&#xA;" mediniIdentifier="0118">
<target xmi:id="_XUBTwbbJEeq4nLYb_uFa7w" class="FTA::EventNode"/>
</OCLConstraints:Constraint>
<OCLConstraints:Constraint xmi:id="_SVCMMMtMEeqMld0pKRt16Q" description="Checks for duplicate failure modes within the same context element" message="{0} has duplicated failure mode(s): {1}" constraintExpression="inv:&#xD;&#xA;let MessageArg1:Set(String) = self.failures.name-&gt;select(n:String|not self.failures.name-&gt;one(t:String|t=n)) -&gt;asSet()&#xD;&#xA;&#xD;&#xA;in&#xD;&#xA;MessageArg1-&gt;size()= 0" mediniIdentifier="0119">
<target xmi:id="_SVCMMctMEeqMld0pKRt16Q" class="sysml::SysMLElement"/>
</OCLConstraints:Constraint>
<OCLConstraints:Constraint xmi:id="_7YDHUBRuEeukRuldB7DbTA" severity="INFO" description="Checks if each safety goal is associated to a hazardous event" message="The safety goal ''{1}'' is not associated to a hazardous event" constraintExpression="inv:&#xD;&#xA;let&#xD;&#xA;&#x9;hardousEvents:Set(hazard::HazardousEvent)=self.getCrossReferencedElements()-&gt;select(e| e.oclIsKindOf(hazard::HazardousEvent))-&gt;collect(oclAsType(hazard::HazardousEvent)),&#xD;&#xA;&#x9;MessageArg1:String= self.identifier&#xD;&#xA;in&#xD;&#xA;if hardousEvents-&gt;any(e|e.getProfilePropertyValue('ISO26262_safetyGoal')-&gt;first() = self)&#xD;&#xA;.oclIsUndefined() then&#xD;&#xA;&#x9;false&#xD;&#xA;else &#xD;&#xA;&#x9;true&#xD;&#xA;endif&#xD;&#xA;" mediniIdentifier="0006">
<target xmi:id="_7YDHURRuEeukRuldB7DbTA" class="safetygoals::SafetyGoal"/>
</OCLConstraints:Constraint>
<OCLConstraints:Constraint xmi:id="_Po4GMNnCEeuX-ICPw3dJ4g" severity="WARNING" description="Check for Severity Override" message="{0} overides inherited severity" constraintExpression="inv:&#xD;&#xA;self.effects-&gt;size() &gt; 0 implies self.severity = 0&#xD;&#xA;&#xD;&#xA;-- in order to prevent overriding the inherited at all, this constraint can also be set to seveity error and switched to live mode" mediniIdentifier="0120">
<target xmi:id="_Po4GMdnCEeuX-ICPw3dJ4g" class="safetyModel::CauseEffect"/>
</OCLConstraints:Constraint>
<OCLConstraints:Constraint xmi:id="_7K_uQG_WEeytpeg4mErRPQ" description="Check that each HW Element Type in a library has at least one failure mode" message="{0} has no failure modes defined." constraintExpression="-- should only be run for HW Library projects&#xD;&#xA;inv:&#xD;&#xA;self.failures-&gt;size() &gt;0" mediniIdentifier="0109b">
<target xmi:id="_7K_uQW_WEeytpeg4mErRPQ" class="sysml::SysMLBlock"/>
</OCLConstraints:Constraint>
<OCLConstraints:Constraint xmi:id="_-SviUG_WEeytpeg4mErRPQ" description="Check that each HW Element Type has at least one failure mode" message="{0} has no failure modes defined." constraintExpression="inv:&#xD;&#xA; self.failureRate &gt; 0 implies self.failureModes -&gt;size() &gt;0" mediniIdentifier="0109a">
<target xmi:id="_-SviUW_WEeytpeg4mErRPQ" class="dc::DCComponentEntry"/>
</OCLConstraints:Constraint>
</xmi:XMI>