# Checking for Conflict of a Set of Requirements

Use Mathematical Logic to evaluate absence of Conflict in a Requirement Set (3 of 3 part series).

For a requirement set to be Consistent it needs to be Unique and without Conflict. This post explores a method to test for Conflict – see previous post for a test for Uniqueness.

What does it mean for two requirements to be in conflict? Let’s first adopt the language of mathematical logic: a requirement is equivalent to a conditional statement ‘when X then Y’, where ‘when X’ is the antecedent and ‘Y’ is the consequent. Given two antecedents are evaluated to be true but specify different consequents then the two requirements are in conflict.

Here’s how to test for Conflict:

Let say:

• Req1: When [Left_Input_Device is active] AND [Right_Input_Device is active], then the SOI shall activate Middle_Output_Device.
• Req2: When [Left_Input_Device is active] AND [Right_Input_Device is inactive], then the SOI shall activate Middle_Output_Device.
• Req3: When [Left_Input_Device is inactive] OR [Right_Input_Device is inactive], then the SOI shall de-activate Middle_Output_Device.
1. Abstract the requirement with symbols of operands and operators. R1 becomes L ∧ R → M, R2 becomes ¬ L ∧ ¬R → M and R3 becomes ¬L ∨ ¬R → ¬M
2. Find the disjunction of antecedents that have the same consequents. As R1 and R2 have the same consequent (M) therefore we can replace them with their disjunction, R1_2: (L ∧ R) ∨ (¬ L ∧ ¬R)→ M. You may use associative laws to simplify this to L → M.
3. Create a truth table for the antecedents of the requirements. Let’s say A(1) is the antecedent of R1, A(2) for R2 and A(x) for the antecedent of requirement x.
4. Now we can leverage the methods that were used for Completeness and Uniqueness to test for Conflict. If a combination in a logic truth table is Complete and is NOT Unique then it follows that the requirements are in Conflict. In mathematical logic the above method can be written as (∃x A(x) ∧ (∃x∃y (A(x) ∧ A(y) ∧ (x ≠ y))) which in plain English is… ‘There is at least one antecedent that is true AND there are at least two antecedents which are true’.
5. Now test all combinations in the truth table for a Contradiction (which is all combinations in a truth table are false). Essentially you are seeing whether there the test for conflict is a contradiction. If it is (a contradiction) then the assertion that the requirement is in Conflict is false.

If, and only if, a requirement set is Unique and not in Conflict can the set is said to be Consistent!

There you go! This wraps up a three-part post describing methods grounded in Mathematical Logic to test for Consistency and Completeness of a set of requirements.