First, let's reread the definitions:
(From www.faa.gov/aircraft/air_cert/design_approvals/air_software/cast/cast_papers/media/cast-10.pdf)
DO-178B / ED-12B includes the following definitions:
Condition
A Boolean expression that does not contain Boolean operators.
Decision
A Boolean expression consisting of conditions and zero or more Boolean operators. A solution without a Boolean operator is a condition. If any condition appears more than once in a decision, each event is an excellent condition.
Solution Coverage
Each entry and exit point in the program is called at least once, and each decision in the program took all possible results at least once.
Changed Status / Decision Making
Each entry and exit point into the program is called at least once, each condition in the decision in the program accepted all possible results at least once, each decision in the program accepted all possible results at least once, and each condition in the solution was shown independently affect the outcome of the decision. It is shown that the condition independently affects the result of the solution, simply changing this condition while maintaining all the other possible conditions.
So, to solve "(A or B) and (C or D)" we have four conditions: A, B, C and D
For each condition, we must find a pair of test vectors that show that the condition "independently affects the outcome of the solution."
For the unique cause of MC / DC, only the value of the condition in question can vary in a pair of test vectors.
For example, consider condition A. The following pair of test vectors covers condition A:
(A or B) and (C or D) = Z TFTFTFFTFF
With this pair of test vectors (TFTF, FFTF), only the values of A and Z (solution) are changed.
Then we look for pairs for conditions B, C, and D.
Using the RapiCover graphical interface (a tool for checking the suitability of code from Rapita Systems - www.rapitasystems.com/products/rapicover), we can see a complete set of test vectors (observed or absent) to fully cover all the conditions of the solution.
Screenshot RapiCover
Vector V3 (yellow in the screenshot above) is not used in any pair of independence. Vector V6 (in red in the screenshot) is missing to cover MC / DC condition D.
This is for determining the "unique cause" of MC / DC.
Now for "disguising MC / DC":
“Masking MC / DC” requires that the value of one condition can change in a pair of test vectors is weakened, provided that any other change is masked by Boolean operators in the expression.
For example, consider a pair of vectors for condition D:
(A or B) and (C or D) = Z TFFTTTFFFF
We can represent these two test vectors in the expression tree:
and / \ or1 or2 / \ / \ ABCD and and [T] [F] / \ / \ or1 or2 or1 or2 [T] [T] [T] [F] / \ / \ / \ / \ ABCDABCD [T] [F][F] [T] [T] [F][F] [F]
This is a pair for a unique reason for MC / DC.
Now consider a new pair of test vectors for condition D:
(A or B) and (C or D) = Z FTFTTTFFFF
Again we can represent these two test vectors in the expression tree:
and and [T] [F] / \ / \ or1 or2 or1 or2 [T] [T] [T] [F] / \ / \ / \ / \ ABCDABCD [F] [T][F] [T] [T] [F][F] [F]
This is a pair for masking MC / DC, because although the values for 3 conditions (A, B and D) have changed, conditions A and B have been masked by the Boolean operator 'or1' (that is, the value of “A or B” does not change).
So, to mask the MCDC, the independence pair for all conditions D can be:
Screenshot RapiCover