Professional Documents
Culture Documents
c
Copyright Nancy Leveson, Sept. 1999
�
Basic Testing Guidelines
c
Copyright Nancy Leveson, Sept. 1999
Basic Testing Guidelines (2)
Basic Testing Guidelines (3)
The probability of the existence of more errors in a section
of a program is proportional to the number of errors already
found in it.
prob.
of
more
errors
Building Assurance (Confidence)
Dynamic Analysis
Static Analysis
c
Copyright Nancy Leveson, Sept. 1999
Dynamic Analysis
Testing
Black Box
White Box
Coverage analysis
Assertions
Also all invalid input (e.g., testing Ada compiler requires all
White Box Testing
loop 20x 20 19 18 14
5 + 5 + 5 + ... + 5 = 10
= 100 trillion
(control−flow graph)
White Box Testing (con’t)
2) Could test every path and program may still have errors!
Static Analysis
Syntax checks
(enforce standards)
Human Reviews
Checklists (inspections)
Walkthroughs (reviews)
�
Static Analysis (con’t)
Symbolic execution
A := X + 5 B = 2 * (X + 5)
B := 2 * A
if 2 * (X + 5) > 0
If B>0 then C := |B| − 1
then |2 * (X + 5)| − 1
else C := |B| + 1
else |2 * (X + 5)| + 1
Formal verification
Use theorem proving methods to show equivalence of
code and a formal specification of required behavior.
� �
Formal Design Reviews
�
Structured Walkthroughs
in walkthrough session.
atmosphere.
�
Benefits of Walkthroughs
�
Software Inspections
�