SLIDE 16 16
Examples: Failures, Faults, and Errors
- ERROR => Node 6 should be X:= C*(A+2*B)
- Error – but no Fault or Failure
- Inputs: A = 2, B = 1
- Executed Path => (1,2,4,5,7,8)
- Fault is not Revealed
◘ Node 6 is not executed
Error – Fault – No Failure
Input: A=-2, B=-1 1: Input A,B 2:
A>0? 3: C :=0 4: C := A*B
True False
Lecture Notes 3 46
p , Executed Path => (1,2,3,5,6,8) Fault Not Revealed
because C = 0
Need select proper test cases Definitions of C at Nodes 3 and 4 both affect the use of C at node 6 Path (1,2,4,5,6,8) will reveal the failure
but only if B <> 0 (e.g. Inputs (A=1,B=-2) )
3: C : 0 4: C : A B 5: B>0?
6: X := C*(A+2*A) 7: X := A+B 8: Output X True False
Examples: Failures, Faults, and Errors
- ERROR => Node 6 should be X:= C*(A+2*B)
- Error – but no Fault or Failure
- Inputs: A = 2, B = 1
- Executed Path => (1,2,4,5,7,8)
- Fault is not Revealed
◘ Node 6 is not executed
- Error – Fault – No Failure
- Inputs: A = -2, B = -1
1: Input A,B 2:
A>0? 3: C :=0 4: C := A*B
True False
Lecture Notes 3 47
p ,
- Executed Path => (1,2,3,5,6,8)
- Fault Not Revealed
◘ because C = 0
Need select proper test cases Definitions of C at Nodes 3 and 4 both affect the use of C at node 6 Path (1,2,4,5,6,8) will reveal the failure
but only if B <> 0 (e.g. Inputs (A=1,B=-2) )
3: C : 0 C 5: B>0?
6: X := C*(A+2*A) 7: X := A+B 8: Output X True False
Examples: Failures, Faults, and Errors
- ERROR => Node 6 should be X:= C*(A+2*B)
- Error – but no Fault or Failure
- Inputs: A = 2, B = 1
- Executed Path => (1,2,4,5,7,8)
- Fault is not Revealed
◘ Node 6 is not executed
- Error – Fault – No Failure
- Inputs: A = -2, B = -1
1: Input A,B 2:
A>0? 3: C :=0 4: C := A*B
True False
Lecture Notes 3 48
p ,
- Executed Path => (1,2,3,5,6,8)
- Fault Not Revealed
◘ because C = 0
- Need select proper test cases
- Definitions of C at Nodes 3 and 4
both affect the use of C at node 6
- Path (1,2,4,5,6,8) will reveal the failure
◘ but only if B <> 0 ◘ e.g. Inputs: A = 1, B = -2
3: C : 0 C 5: B>0?
6: X := C*(A+2*A) 7: X := A+B 8: Output X True False