diff --git a/symptom_ex_process/algorithm.tex b/symptom_ex_process/algorithm.tex index f04e4af..a06c74b 100644 --- a/symptom_ex_process/algorithm.tex +++ b/symptom_ex_process/algorithm.tex @@ -157,36 +157,73 @@ $$ dtc(F) = TC $$ \COMMENT { Each set $tc_j$ is a `test case' } %\STATE { $ \forall j \in J | tc_j \in TC $ } \COMMENT {Ensure the test cases are complete and unique} + \STATE { $ TC := \emptyset $ } \COMMENT{Initialise set of test cases} + \STATE { $ j := 1 $ } \COMMENT{Initialise index of test cases} + + \FORALL { $ f \in F $ } + \STATE{$ tc_j := f $} \COMMENT{ Assign one test case per single fault mode } + \STATE{ $ j := j + 1 $} + \ENDFOR + + \STATE { Let $ptc$ be a provisional test case } \COMMENT{ Determine Test cases with simultaneous failure modes } + + \IF{DoubleFaultChecking} + + \STATE { Let $ptc$ be a provisional test case } + \FORALL { $ f1,f2 \in F $ } + \STATE { $ ptc := \{ f1,f2 \} $ } \COMMENT{Make a provisional test case} + %\STATE { FINDING ERRORS IN LATEX SOURCE IS FUCKING ANNOYING} + %% OK maybe you can't have comments after IF: half an hour wasted... + \IF { $ \mathcal{ISUNITARYSTATE}(ptc) $ } % \COMMENT{Ensure the chosen failure mode set is unitary state compliant} + \STATE{ $ j := j + 1 $} % latex bug hunt game what fun ! #2 + \STATE { $ tc_j := ptc $} + \STATE { $ TC := TC \cup tc_j $ } + \ENDIF + \ENDFOR + \ENDIF + + + + + + \FORALL { $ ptc \in \mathcal{P}(F) $ } %%\mathcal{P} F $ } + %%\STATE { $ ptc \in \mathcal{P} F $ } \COMMENT{Make a provisional test case} + \IF { $\mathcal{CHOSEN}(ptc) \wedge ptc \not\in TC \wedge \mathcal{ISUNITARYSTATE}(ptc)$ } %%% \COMMENT{IF this combination of faults is chosen as an additional Test case include it in TC} + \STATE{ $ j := j + 1 $} % latex bug hunt game #1 + \STATE { $ tc_j := ptc $} + \STATE { $ TC := TC \cup tc_j $ } + \ENDIF + \ENDFOR + \FORALL { $tc_j \in TC$ } %\ENSURE {$ tc_j \in \bigcap FG_{cfm} $} - \ENSURE {$ tc_j \in \mathcal{P}(F)$} + \ENSURE {$ tc_j \in \mathcal{P}(F) $ } % \mathcal{P}(F)$} \COMMENT { require that the test case is a member of the powerset of $F$ } %\ENSURE { $ \forall \; j2 \; \in J ( \forall \; j1 \; \in J | tc_{j1} \neq tc_{j2} \; \wedge \; j1 \neq j2 ) $} \ENSURE { $\forall j1,j2 \in J \; such\; that\; tc_{j1} \neq tc_{j2} \; \wedge \; j1 \neq j2 $} \COMMENT { Test cases must be unique } \ENDFOR - - - \IF{Single fault checking} - \STATE { let $f$ represent a component failure mode } - %\ENSURE { That all failure modes are represented in at least one test case } - \ENSURE { $ \forall f \;such\;that\; (f \in F)) \wedge (f \in \bigcup TC) $ } - \COMMENT { This corresponds to checking that at least each failure mode is considered at - least once in the analysis; more rigorous cardinality constraint - checks may be required for some safety standards} - \ENDIF - - \IF{Double fault checking} - \STATE { let $f1,f2$ represent component failure modes, and $c$ any component in the functional group } - %\ENSURE { That all failure modes are represented in at least one test case } - \ENSURE { $ \forall f1,f2 \;where\; (f1,f2) \not\in c\;such\;that\; (f1,f2 \in F)) \wedge ( \{f1,f2\} \in \bigcup TC) $ } - \COMMENT { This corresponds to checking that each possible double failure mode is considered - as a test case; more rigorous cardinality constraint - checks may be required for some safety standards. Note if both failure modes - in the check are sourced from the same component $c$, the test case is impossible - under unitary state failure mode conditions} - \ENDIF - +% +% \IF{Single fault checking} +% \STATE { let $f$ represent a component failure mode } +% %\ENSURE { That all failure modes are represented in at least one test case } +% \ENSURE { $ \forall f \;such\;that\; (f \in F)) \wedge (f \in \bigcup TC) $ } +% \COMMENT { This corresponds to checking that at least each failure mode is considered at +% least once in the analysis; more rigorous cardinality constraint +% checks may be required for some safety standards} +% \ENDIF +% +% \IF{Double fault checking} +% \STATE { let $f1,f2$ represent component failure modes, and $c$ any component in the functional group } +% %\ENSURE { That all failure modes are represented in at least one test case } +% \ENSURE { $ \forall f1,f2 \;where\; (f1,f2) \not\in c\;such\;that\; (f1,f2 \in F)) \wedge ( \{f1,f2\} \in \bigcup TC) $ } +% \COMMENT { This corresponds to checking that each possible double failure mode is considered +% as a test case; more rigorous cardinality constraint +% checks may be required for some safety standards. Note if both failure modes +% in the check are sourced from the same component $c$, the test case is impossible +% under unitary state failure mode conditions} +% \ENDIF +% \RETURN $TC$ % some european standards % imply checking all double fault combinations\cite{en298} }