Professional Documents
Culture Documents
Lecture No. 13
Module 75:
Introduction to Software Verification
Introduction to Software Verification
Software development
lifecycle models and
processes
Waterfall model
Spiral model
Rapid Application
Development (RAD)
Evolutionary prototyping
Etc.
Each stage can potentially
contain issues such as:
Misconceptions
Misunderstandings
Errors…
Introduction to Software Verification
We need to spend time and
financial resources to fix these
errors or bugs in the following
manner (ref: textbook):
Cost to fix a bug increases
exponentially (10x)
i.e., it increases tenfold as
time increases
E.g., a bug found during
specification costs $1 to fix.
… if found in design cost is
$10
… if found in code cost is
$100
… if found in released
software cost is $1000
Module 76:
Verification Methods
Verification Methods
Verification is process of
assessing a software product
or system during a particular
phase
to determine if it meets
requirements or conditions
that were specified at the
beginning of that phase.
It is a static process and it
includes substantiation of
artifacts such as
SRS, SDS,
design and
Code / program.
Verification Methods
Informal
Walkthrough
Peer Review
Inspection
Verification Methods
Applications
SRS verification
Design verification
Code verification
…
Each step in adopted
application development
lifecycle requires verification
before an artifact becomes
a milestone and goes to the
next stage.
Module 77:
Walkthrough
Walkthrough
Example–issue Classification
Severe
Defects that may cause
incorrect results or behavior
Moderate
Defects that may affect
limited areas of functionality
that can either be worked
around or ignored.
Minor
Defects that can be
overlooked with no loss of
functionality.
Module 79:
Inspections for Verification
Inspection for Verification
Inspection is led by a
trained moderator, who is
not the author. Inspection is
most formal and driven by
checklists and rules.
involvement of a team of 3 to 6
members,
1. Planning
Entry criteria: what to
inspect
Team size: about 4
persons
Developers/testers from
similar projects
Inspectors are not authors
2. Overview
Author-inspectors meeting
General background
information
functional/structural/inf
o., intentions
Fagan Inspections for Verification
4. Inspection (generic:
collection)
Meeting to collect /
consolidate individual
inspection results
Team leader/meeting
moderator (1)
Reader/presenter:
summarize/paraphrase for
individual pieces
Defect identification, but
not solutions
No more than 2 hours
Inspection report
Fagan Inspections for Verification
5. Rework
Author's response
Defect fixing (solutions)
6. Follow-up
Resolution verification
by moderator
Re-inspection?
Fagan inspection in
practice
Widely used in industry
Evaluation studies
Variations and other
inspections
Module 81:
Examples of Checklists for SRS document Inspections
Examples of Checklists for SRS Inspections
Importance of checklists
Represent industrial best
practices as templates
Provide a means of use of
preexisting knowledge base
and lessons learnt
Help conduct inspections /
audits in an efficient and
appropriate manner
Artifact specific checklists
We discuss example checklists
for
SRS, Code…
We have SRS and checklist as
input to inspection
Examples of Checklists for SRS Inspections
General (SRS
requirements) Checklist
functional overview of system
provided?
software and hardware
environments been specified?
assumptions that affect
implementation stated?
Has every definition, acronym
and abbreviation been defined
in glossary, if they are correct?
Are requirements, interfaces,
constraints, definitions, etc.
listed in appropriate sections?
Examples of Checklists for SRS Inspections
Functional Requirements
Checklist
Have all requirements
communicated by customer
been specified?
Are all inputs to a function
sufficient to perform the
required function?
Are undesired events /
inputs considered and their
required responses
specified?
Are all use case
descriptions provided?
Are all misuse cases
documented?
Examples of Checklists for SRS Inspections
Interface Checklist
…
Non-functional Requirements
Checklist
…
Requirements Quality
…
…
Examples of Checklists for SRS Inspections
Structure
…
Variables
…
Comments
…
Loop and branches
…
General
…
Module 83:
Examples of Checklists for User Documentation Inspections
Checklists for User Documentation Inspections
Example of documentation
review checklist:
Does title page include
required information
The purpose of document is
clear and complete.
All known audiences /
customers / users are
described thoroughly and
accurately.
Scope of document is
accurate and complete.
Product version numbers /
release dates are accurate.
Table of contents clear
Checklists for User Documentation Inspections
We need
Moderator
Team members
Authors
Checklists
Reporting forms
Artifact for
inspection/review (Code)
Let author presents code and
moderator conducts
Planning, Overview,
Preparation and
inspection with two
team members
Code Review Example
Checklist
Follows coding conventions No stack traces are printed
Variables not used with null values
Names are simple and if possible Code is not repeated or duplicated
short and are spelt correctly
There is an else block for every if
Names contain units where clause even if it is empty
applicable No complex, negatively named or
Enums are used instead of int long Boolean expressions
constants where applicable No empty blocks of code
All class, variable, and method Constructors don’t accept null values
modifiers are correct. Arrays checked for out of bound
There is no commented out code Catch clauses are appropriately used
Exceptions not ignored, if caught.
There is no dead code Files/Sockets/Cursors and other
Debugging code is absent resources are properly closed.
Code Review Example
Code Review Example
Issues Classification
Severe
Defects that may cause
incorrect results or behavior
Moderate
Defects that may affect
limited areas of functionality
that can either be worked
around or ignored.
Minor
Defects that can be
overlooked with no loss of
functionality.
Code Review Example
Example Issue Log Form
Code Review Example
Issues found
Severe
Try-catch block not
implemented
Moderate
Constructor not present
Missing class, function and
variable comments.
Minor
No naming convention
followed e.g., Hungarian
notation is not followed for
variable names, function
names etc.
Code Review Example
Next steps:
Review meeting
Consolidated and
comprehensive listing of
issues prepared.
Shared with key
stakeholders
Authors are given time to
rework
Moderator (or representative)
verifies if the corrections are
made.