Lecture#5
Lecture#5
Pre-release
Defect prevention, detection, removal
Several approaches including development methodologies, programming
techniques, debugging tools, testing, beta tests, etc.
DEALING WITH PRE-/POST-RELEASE DEFECTS
After release
Defect containment (activities aim at minimizing the negative impact of these
remaining faults)
Dormant defects (The faults left in the finished software products are often
called “dormant defects”, which may stay dormant for some time, but have the
potential of causing problems to customers and users of the products)
Known /unknown defects
Bug reports
Cost factor
GRAPHICAL DEPICTION OF THE CLASSIFICATION
SCHEME
Forming a series of barriers represented by dotted broken lines. Each barrier removes
or blocks defect sources, or prevents undesirable consequences.
QA AS BARRIERS
Dealing with errors, faults, and failures
Removing or blocking defect sources
Preventing undesirable consequences
A CLASSIFICATION SCHEME
QA activities as attempting to prevent, eliminate, reduce, or contain various
specific problems associated with different aspects of defects
QA alternatives classify these into three generic categories
DEFECT PREVENTION
Defect prevention activities assume that there are known error sources or
missing /incorrect actions that result in fault injections
If human misconceptions are the error sources, education, and training can
help us remove these error sources
If imprecise designs and implementations that deviate from product
specifications or design intentions are the causes for faults, formal methods
can help us prevent such deviations
If non-conformance to selected processes or standards is the problem
that leads to fault injections, then process conformance or standard
enforcement can help use prevent the injection of related faults
If certain tools or technologies can reduce fault injections under
similar environments, they should be adopted
FORMAL METHODS
Formal methods provide a way to eliminate certain error sources and
verify the absence of related faults
Include formal specification and formal verification
In Formal specification, an unambiguous set of product specifications is
given so that customer requirements, as well as environmental constraints
and design intentions, are correctly reflected, thus reducing the chances
of accidental fault injections
Formal verification checks the conformance of software design or code
against these formal specifications, thus ensuring that the software is
fault-free with respect to its formal specifications
OTHER DEFECT PREVENTION TECHNIQUES
Software methodologies or technologies can also help reduce the chances
of fault injections. Many of the problems with low-quality “fat software”
could be addressed by disciplined methodologies and return to essentials
for high-quality “lean software” (Wirth, 1995)
Lean programming is a paradigm for the development and
production of computer programs that are based on the principles
of optimizing efficiency and minimizing waste
Similarly, the use of the information-hiding principle (Parnas, 1972) can
help reduce the complexity of program interfaces and interactions among
different components, thus reducing the possibility of related problems.
OTHER DEFECT PREVENTION TECHNIQUES
A better-managed process can also eliminate many systematic problems
For example, not having a defined process or not following it for system configuration
management may lead to inconsistencies or interface problems among different
software components.
Ensuring appropriate process definition and conformance helps eliminate some
such error sources. Enforcement of selected standards for certain types of products
and development activities also reduces fault injections
Specific software tools can also help reduce the chances of fault injections
For example, a syntax-directed editor that automatically balances out each open
parenthesis, “{”, with a close parenthesis, “}”, can help reduce syntactical problems in
programs written in the C language
DEFECT REDUCTION
Inspection
Testing
Other techniques
DEFECT REDUCTION
Due to large size and high complexity of most software systems, the
defect reduction activities can only reduce the number of faults to a fairly
low level, but not completely eliminate them
For software systems where failure impact is substantial, such as many
real-time control software sub-systems used in medical, nuclear,
transportation, and other embedded systems, this low defect level and
failure risk may still be inadequate
DEFECT CONTAINMENT
Few faults may be triggered under rare conditions or unusual dynamic
scenarios, making it unrealistic to attempt to generate the huge number of
test cases to cover all these conditions or to perform exhaustive inspection
based on all possible scenarios.
Break the causal relation between these faults and the resulting failures,
thus “tolerating” these faults
Or contain the failures by reducing the resulting damage
SAFETY ASSURANCE AND FAULT CONTAINMENT
For safety critical systems, the primary concern is our ability to prevent
accidents from happening, where an accident is a failure with a severe
consequence.
Even low failure probabilities for software are not tolerable in such systems
if these failures may still likely lead to accidents.
Specific techniques for safety critical systems based on analysis of hazards
Hazard: a precondition to accident
SAFETY ASSURANCE AND FAULT CONTAINMENT
Hazard elimination through simplification, decoupling, elimination of
specific human errors, and reduction of hazardous materials or conditions
Hazard reduction through design for controllability (for example, automatic
pressure release in boilers), use of locking devices (for example, hardware
software interlocks), redundancy
SAFETY ASSURANCE AND FAULT CONTAINMENT
Hazard control through reducing exposure, isolation, and containment (for
example, barriers between the system and the environment), and fail-safe
design (fail in a safe state without causing further damages).
Damage control through escape routes, safe abandonment of products,
materials, and devices for limiting physical damages to equipment's or
people. These techniques reduce the severity of accidents, thus limiting
the damage caused by these accidents and related software failures
DIFFERENT TYPES OF PEER REVIEWS
Code review is systematic examination (often as peer review) of computer
source code
Pair programming is a type of code review where two persons develop
code together at the same workstation
Inspection Technical review is a is a very formal type of peer review where
the reviewers are following a well-defined process to find defects