SlideShare a Scribd company logo
1 of 22
Download to read offline
Cleanroom Software Engineering
Introduction
• Proposed by Mills Dyer and Linger during 1980s
• The philosophy focuses on defect avoidance rather
than defect removal
• Avoids costly defect removal processes by writing
code increments right the first time and verify that
correctness before testing
 Cleanroom software engineering involves the integrated
use of
- software engineering modeling
- program verification
- statistical software quality assurance.
 Verifies design specification using mathematically-based
proof of correctness
 Relies heavily on statistical use testing to uncover high
impact errors
 Generally follows an incremental development process
What is it?
Cleanroom is Shift in Pracrice
• From
– Individual
craftsmanship
– Sequential
development
– Individual unit
testing
– Informal coverage
testing
– Unknown reliability
– Informal design
• To
– Peer reviewed
engineering
– Incremental
development
– Team correctness
verification
– Statistical usage testing
– Measured reliability
– Disciplined engineering
specification and design
Benefits
• Zero failures in the field
– that’s the goal any way
– a realistic expectation is < 5 failures per KLOC on first program
execution in the first team project
• Short development cycles
– results from use incremental strategy and avoidance of rework
– new teams should experience a two-fold productivity increase on
the first project and continue the increase
• Longer product life
– investments detailed specifications and usage models help keep a
product viable longer
Why are Cleanroom Techniques
Not Widely Used
 Some people believe cleanroom techniques are too
theoretical, too mathematical, and too radical for use in real
software development
 Relies on correctness verification and statistical quality
control rather than unit testing (a major departure from
traditional software development)
 Organizations operating at the ad hoc level of the
Capability Maturity Model, do not make rigorous use of the
defined processes needed in all phases of the software life
cycle
The Cleanroom Process Model
A pipeline of software increments is developed by small independent
software teams. As each increment is certified it is integrated into the
whole
 Increment Planning: adopts the incremental strategy. The functionality
of each increment, its projected size and a cleanroom development
schedule is created
 Requirements Gathering: defines a description of customer level
requirements (for each increment)
 Box Structure Specification: describes the functional specification. Box
structures isolate and separate the creative definition of behavior, data and
procedures at each level of refinement
 Formal Design: specifications (called “black boxes”) are iteratively
refined (with an increment) to become analogous to architectural and
procedural designs (called “state boxes” and “clear boxes,” respectively)
The Cleanroom Process Model
The Cleanroom Process Model
 Correctness Verification: verification begins with the highest level box
structure (specification) and moves toward design detail and code using
a set of “correctness questions.” If these do not demonstrate that the
specification is correct, more formal (mathematical) methods for
verification are used
 Code Generation, Inspection and Verification: the box structure
specifications, represented in a specialized language, are transmitted into
the appropriate programming language.
 Statistical Test Planning: a suite of test cases that exercise of
“probability distribution” of usage are planned and designed
 Statistical Usage Testing: execute a series of tests derived from a
statistical sample (the probability distribution noted above) of all
possible program executions by all users from a targeted population
 Certification: once verification, inspection and usage testing have been
completed (and all errors are corrected) the increment is certified as
ready for integration.
What makes Cleanroom Different?
 It makes explicit use of statistical quality control.
 It verifies design specifications using a mathematically
based proof of correctness.
 It implements testing techniques that have a high
likelihood of uncovering high impact errors.
Functional Specification
 Cleanroom SE complies with the operational analysis principles by
using a method called Box Structure Specification.
 A “Box” encapsulates the system (or some aspect of the system) at
some level in detail.
 Through a process of elaboration or stepwise refinement, boxes are
refined into a hierarchy where each box has referential
transparency.
 The information content of each box specification is sufficient to
define its refinement, without depending on implementation of any
other box.
 Three types of boxes are used.
 Black Box
 State Box
 Clear Box
Box Structure Specification
12
black box
state box clear box
Black Box
• Specifies a set of transition rules that describe the behavior of
system components as responses to specific stimuli, makes use of
inheritance in a manner similar to classes
• Specifies system function by mapping all possible stimulus
histories to all possible responses.
• The function f, is applied to the sequence, S* of inputs, S and
transforms them into an output(Response) R .
S*  R
stimulus history  responses
• Generalization of a state machine, encapsulates the data
and operations similar to an object, the inputs (stimuli) and
outputs (responses) are represented, data that must be
retained between transitions is encapsulated
• The state is the encapsulation of the stimulus history
• State variables are invented to save any stimuli that need to
retained
S x T  R x T
stimuli X state data  responses X state data
State Box
• Contains the procedural design of the state box, in a manner
similar to structured programming
• Specifies both data flow and control flow
S x T  R x T
stimuli X state data  responses X state data
• State update and response production is allowed
Clear Box
Box Principles
• Transaction closure of stimuli and responses
– users and uses are considered including security and
error recovery
• State migration within box hierarchy
– downward migration of state data is possible whenever
new black boxes are created inside a clear box
– upward migration of state date is desirable when
duplicate data is updated in several places in the tree
• Common services
– reusable boxes from library
Design Refinement & Verification
If a function f is expanded into a sequence g and h, the
correctness condition for all input to f is:
• Does g followed by h do f?
When a function f is refined into a conditional (if-then-
else), the correctness condition for all input to f is:
• Whenever condition <c> is true does g do f and
whenever <c> is false, does h do f?
When function f is refined as a loop, the correctness
conditions for all input to f is:
• Is termination guaranteed?
• Whenever <c> is true does g followed by f do f, and
whenever <c> is false, does skipping the loop still do
f?
Design Verification Advantages
• Reduces verification to a finite process
• Improves quality
• Lets cleanroom teams verify every line of code
• Results in near zero levels of defects
• Scales up to larger systems and higher levels
• Produces better code than unit testing
Certification Steps
• Usage scenarios must be created
• Usage profile is specified
• Test cases generated from the usage profile
• Tests are executed and failure data are recorded
and analyzed
• Reliability is computed and recorded
Statistical Testing
• Generation of test cases
– each test case begins in a start state and represents a random walk
through the usage model ending at a designated end state
• Control of statistical testing
– a well-defined procedure is performed under specified conditions
– each performance is a trial and can be used as part of an empirical
probability computation
• Stopping criteria for testing
– when testing goals or quality standards are achieved
– when the difference between the predicted usage chain and the
actual testing chain becomes very small
Reliability Estimation
ConfidenceLevel
Reliability 90% 95% 99% 99.9%
.9 22 29 44 66
.95 45 59 90 135
.99 230 299 459 688
.999 2302 2995 4603 6905
The binomial distribution can be used to estimate the
number of error-free test cases are needed to assume a
given level of reliability at a specified confidence level.
Cleanroom Certification Models
• Sampling model
– determines the number if random cases that need to be
executed to achieve a particular reliability level
• Component model
– allows analyst to determine the probability that a given
component in a multi-component system fails prior to
completion
• Certification model
– projected overall reliability of system

More Related Content

What's hot

Software testing & its technology
Software testing & its technologySoftware testing & its technology
Software testing & its technology
Hasam Panezai
 
New software testing-techniques
New software testing-techniquesNew software testing-techniques
New software testing-techniques
Fincy V.J
 

What's hot (20)

Reliability growth models
Reliability growth modelsReliability growth models
Reliability growth models
 
Testing of Object-Oriented Software
Testing of Object-Oriented SoftwareTesting of Object-Oriented Software
Testing of Object-Oriented Software
 
Object oriented testing
Object oriented testingObject oriented testing
Object oriented testing
 
Testing Object-Oriented Systems: Lessons Learned
Testing Object-Oriented Systems: Lessons LearnedTesting Object-Oriented Systems: Lessons Learned
Testing Object-Oriented Systems: Lessons Learned
 
Complexity metrics and models
Complexity metrics and modelsComplexity metrics and models
Complexity metrics and models
 
Research issues in object oriented software testing
Research issues in object oriented software testingResearch issues in object oriented software testing
Research issues in object oriented software testing
 
Testing Technique
Testing TechniqueTesting Technique
Testing Technique
 
Rayleigh model
Rayleigh modelRayleigh model
Rayleigh model
 
Defect removal effectiveness
Defect removal effectivenessDefect removal effectiveness
Defect removal effectiveness
 
Software testing and analysis
Software testing and analysisSoftware testing and analysis
Software testing and analysis
 
SDLC models testing
SDLC models testingSDLC models testing
SDLC models testing
 
SDLC vs STLC
SDLC vs STLCSDLC vs STLC
SDLC vs STLC
 
Software testing & its technology
Software testing & its technologySoftware testing & its technology
Software testing & its technology
 
Testing Throughout the Software Life Cycle (2013)
Testing Throughout the Software Life Cycle (2013)Testing Throughout the Software Life Cycle (2013)
Testing Throughout the Software Life Cycle (2013)
 
Fundamentals of Testing Section 1/6
Fundamentals of Testing   Section 1/6Fundamentals of Testing   Section 1/6
Fundamentals of Testing Section 1/6
 
Testing strategies part -1
Testing strategies part -1Testing strategies part -1
Testing strategies part -1
 
CTFL Module 02
CTFL Module 02CTFL Module 02
CTFL Module 02
 
Software Engineering (Process Models)
Software Engineering (Process Models)Software Engineering (Process Models)
Software Engineering (Process Models)
 
New software testing-techniques
New software testing-techniquesNew software testing-techniques
New software testing-techniques
 
Software engineering- system testing
Software engineering- system testingSoftware engineering- system testing
Software engineering- system testing
 

Similar to Unit 1 sepm cleanroom engineering

System models of sdlc- v model
System models of sdlc- v modelSystem models of sdlc- v model
System models of sdlc- v model
Minal Kashyap
 
Mt s11 test_design
Mt s11 test_designMt s11 test_design
Mt s11 test_design
TestingGeeks
 
Requirement verification & validation
Requirement verification & validationRequirement verification & validation
Requirement verification & validation
Abdul Basit
 
Test data documentation ss
Test data documentation ssTest data documentation ss
Test data documentation ss
AshwiniPoloju
 

Similar to Unit 1 sepm cleanroom engineering (20)

Cleanroom Software Engineering By NADEEM AHMED FROM DEPALPUR
Cleanroom Software Engineering By NADEEM AHMED FROM DEPALPURCleanroom Software Engineering By NADEEM AHMED FROM DEPALPUR
Cleanroom Software Engineering By NADEEM AHMED FROM DEPALPUR
 
Class9_SW_Testing_Strategies.pdf
Class9_SW_Testing_Strategies.pdfClass9_SW_Testing_Strategies.pdf
Class9_SW_Testing_Strategies.pdf
 
Software engineering Testing technique,test case,test suit design
Software engineering Testing technique,test case,test suit designSoftware engineering Testing technique,test case,test suit design
Software engineering Testing technique,test case,test suit design
 
System models of sdlc- v model
System models of sdlc- v modelSystem models of sdlc- v model
System models of sdlc- v model
 
Statistical test based model in software engineering
Statistical test based model in software engineeringStatistical test based model in software engineering
Statistical test based model in software engineering
 
Unit 3 for st
Unit 3 for stUnit 3 for st
Unit 3 for st
 
Man.ppt
Man.pptMan.ppt
Man.ppt
 
SOC Verification using SystemVerilog
SOC Verification using SystemVerilog SOC Verification using SystemVerilog
SOC Verification using SystemVerilog
 
Test Levels & Techniques
Test Levels & TechniquesTest Levels & Techniques
Test Levels & Techniques
 
System testing
System testingSystem testing
System testing
 
software Engineering process
software Engineering processsoftware Engineering process
software Engineering process
 
11 whiteboxtesting
11 whiteboxtesting11 whiteboxtesting
11 whiteboxtesting
 
Software Engineering Important Short Question for Exams
Software Engineering Important Short Question for ExamsSoftware Engineering Important Short Question for Exams
Software Engineering Important Short Question for Exams
 
Software Testing
Software Testing Software Testing
Software Testing
 
Mt s11 test_design
Mt s11 test_designMt s11 test_design
Mt s11 test_design
 
Gd test kieu_test
Gd test kieu_testGd test kieu_test
Gd test kieu_test
 
Requirement verification & validation
Requirement verification & validationRequirement verification & validation
Requirement verification & validation
 
Test data documentation ss
Test data documentation ssTest data documentation ss
Test data documentation ss
 
Unit iii
Unit iiiUnit iii
Unit iii
 
module 1.pptx
module 1.pptxmodule 1.pptx
module 1.pptx
 

More from KanchanPatil34

More from KanchanPatil34 (20)

Unit 2_2 Binary Tree as ADT_General Tree.pdf
Unit 2_2 Binary Tree as ADT_General Tree.pdfUnit 2_2 Binary Tree as ADT_General Tree.pdf
Unit 2_2 Binary Tree as ADT_General Tree.pdf
 
Unit 2_1 Tree.pdf
Unit 2_1 Tree.pdfUnit 2_1 Tree.pdf
Unit 2_1 Tree.pdf
 
Unit 2_3 Binary Tree Traversals.pdf
Unit 2_3 Binary Tree Traversals.pdfUnit 2_3 Binary Tree Traversals.pdf
Unit 2_3 Binary Tree Traversals.pdf
 
Unit 1_SLL and DLL.pdf
Unit 1_SLL and DLL.pdfUnit 1_SLL and DLL.pdf
Unit 1_SLL and DLL.pdf
 
Unit 1_Stack and Queue using Linked Organization.pdf
Unit 1_Stack and Queue using Linked Organization.pdfUnit 1_Stack and Queue using Linked Organization.pdf
Unit 1_Stack and Queue using Linked Organization.pdf
 
PAI Unit 3 Paging in 80386 Microporcessor
PAI Unit 3 Paging in 80386 MicroporcessorPAI Unit 3 Paging in 80386 Microporcessor
PAI Unit 3 Paging in 80386 Microporcessor
 
PAI Unit 3 Multitasking in 80386
PAI Unit 3 Multitasking in 80386PAI Unit 3 Multitasking in 80386
PAI Unit 3 Multitasking in 80386
 
PAI Unit 2 Segmentation in 80386 microprocessor
PAI Unit 2 Segmentation in 80386 microprocessorPAI Unit 2 Segmentation in 80386 microprocessor
PAI Unit 2 Segmentation in 80386 microprocessor
 
PAI Unit 2 Protection in 80386 segmentation
PAI Unit 2 Protection in 80386 segmentationPAI Unit 2 Protection in 80386 segmentation
PAI Unit 2 Protection in 80386 segmentation
 
SE PAI Unit 2_Data Structures in 80386 segmentation
SE PAI Unit 2_Data Structures in 80386 segmentationSE PAI Unit 2_Data Structures in 80386 segmentation
SE PAI Unit 2_Data Structures in 80386 segmentation
 
SE PAI Unit 5_Timer Programming in 8051 microcontroller_Part 1
SE PAI Unit 5_Timer Programming in 8051 microcontroller_Part 1SE PAI Unit 5_Timer Programming in 8051 microcontroller_Part 1
SE PAI Unit 5_Timer Programming in 8051 microcontroller_Part 1
 
SE PAI Unit 5_Timer Programming in 8051 microcontroller_Part 2
SE PAI Unit 5_Timer Programming in 8051 microcontroller_Part 2SE PAI Unit 5_Timer Programming in 8051 microcontroller_Part 2
SE PAI Unit 5_Timer Programming in 8051 microcontroller_Part 2
 
SE PAI Unit 5_Serial Port Programming in 8051 micro controller_Part 3
SE PAI Unit 5_Serial Port Programming in 8051 micro controller_Part 3SE PAI Unit 5_Serial Port Programming in 8051 micro controller_Part 3
SE PAI Unit 5_Serial Port Programming in 8051 micro controller_Part 3
 
SE PAI Unit 5_Serial Port Programming in 8051 microcontroller_Part 2
SE PAI Unit 5_Serial Port Programming in 8051 microcontroller_Part 2SE PAI Unit 5_Serial Port Programming in 8051 microcontroller_Part 2
SE PAI Unit 5_Serial Port Programming in 8051 microcontroller_Part 2
 
SE PAI Unit 5_Serial Port Programming in 8051 microcontroller_Part 1
SE PAI Unit 5_Serial Port Programming in 8051 microcontroller_Part 1SE PAI Unit 5_Serial Port Programming in 8051 microcontroller_Part 1
SE PAI Unit 5_Serial Port Programming in 8051 microcontroller_Part 1
 
SE PAI Unit 5_IO programming in 8051
SE PAI Unit 5_IO programming in 8051SE PAI Unit 5_IO programming in 8051
SE PAI Unit 5_IO programming in 8051
 
Unit 5_Interrupt programming in 8051 micro controller - part 2
Unit 5_Interrupt programming in 8051 micro controller - part 2Unit 5_Interrupt programming in 8051 micro controller - part 2
Unit 5_Interrupt programming in 8051 micro controller - part 2
 
Unit 5_interrupt programming_Part 1
Unit 5_interrupt programming_Part 1Unit 5_interrupt programming_Part 1
Unit 5_interrupt programming_Part 1
 
8051 interfacing
8051 interfacing8051 interfacing
8051 interfacing
 
Unit 3 se pai_ivt and idt
Unit 3 se pai_ivt and idtUnit 3 se pai_ivt and idt
Unit 3 se pai_ivt and idt
 

Recently uploaded

Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Dr.Costas Sachpazis
 
result management system report for college project
result management system report for college projectresult management system report for college project
result management system report for college project
Tonystark477637
 
AKTU Computer Networks notes --- Unit 3.pdf
AKTU Computer Networks notes ---  Unit 3.pdfAKTU Computer Networks notes ---  Unit 3.pdf
AKTU Computer Networks notes --- Unit 3.pdf
ankushspencer015
 

Recently uploaded (20)

MANUFACTURING PROCESS-II UNIT-1 THEORY OF METAL CUTTING
MANUFACTURING PROCESS-II UNIT-1 THEORY OF METAL CUTTINGMANUFACTURING PROCESS-II UNIT-1 THEORY OF METAL CUTTING
MANUFACTURING PROCESS-II UNIT-1 THEORY OF METAL CUTTING
 
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service NashikCall Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
 
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINEDJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
 
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
 
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdfONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
 
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINEMANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
 
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
 
Coefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxCoefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptx
 
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
 
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptx
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptxBSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptx
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptx
 
UNIT-III FMM. DIMENSIONAL ANALYSIS
UNIT-III FMM.        DIMENSIONAL ANALYSISUNIT-III FMM.        DIMENSIONAL ANALYSIS
UNIT-III FMM. DIMENSIONAL ANALYSIS
 
Russian Call Girls in Nagpur Grishma Call 7001035870 Meet With Nagpur Escorts
Russian Call Girls in Nagpur Grishma Call 7001035870 Meet With Nagpur EscortsRussian Call Girls in Nagpur Grishma Call 7001035870 Meet With Nagpur Escorts
Russian Call Girls in Nagpur Grishma Call 7001035870 Meet With Nagpur Escorts
 
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
 
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete RecordCCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
 
result management system report for college project
result management system report for college projectresult management system report for college project
result management system report for college project
 
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
 
AKTU Computer Networks notes --- Unit 3.pdf
AKTU Computer Networks notes ---  Unit 3.pdfAKTU Computer Networks notes ---  Unit 3.pdf
AKTU Computer Networks notes --- Unit 3.pdf
 
UNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its PerformanceUNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its Performance
 
Introduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxIntroduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptx
 

Unit 1 sepm cleanroom engineering

  • 2. Introduction • Proposed by Mills Dyer and Linger during 1980s • The philosophy focuses on defect avoidance rather than defect removal • Avoids costly defect removal processes by writing code increments right the first time and verify that correctness before testing
  • 3.  Cleanroom software engineering involves the integrated use of - software engineering modeling - program verification - statistical software quality assurance.  Verifies design specification using mathematically-based proof of correctness  Relies heavily on statistical use testing to uncover high impact errors  Generally follows an incremental development process What is it?
  • 4. Cleanroom is Shift in Pracrice • From – Individual craftsmanship – Sequential development – Individual unit testing – Informal coverage testing – Unknown reliability – Informal design • To – Peer reviewed engineering – Incremental development – Team correctness verification – Statistical usage testing – Measured reliability – Disciplined engineering specification and design
  • 5. Benefits • Zero failures in the field – that’s the goal any way – a realistic expectation is < 5 failures per KLOC on first program execution in the first team project • Short development cycles – results from use incremental strategy and avoidance of rework – new teams should experience a two-fold productivity increase on the first project and continue the increase • Longer product life – investments detailed specifications and usage models help keep a product viable longer
  • 6. Why are Cleanroom Techniques Not Widely Used  Some people believe cleanroom techniques are too theoretical, too mathematical, and too radical for use in real software development  Relies on correctness verification and statistical quality control rather than unit testing (a major departure from traditional software development)  Organizations operating at the ad hoc level of the Capability Maturity Model, do not make rigorous use of the defined processes needed in all phases of the software life cycle
  • 8. A pipeline of software increments is developed by small independent software teams. As each increment is certified it is integrated into the whole  Increment Planning: adopts the incremental strategy. The functionality of each increment, its projected size and a cleanroom development schedule is created  Requirements Gathering: defines a description of customer level requirements (for each increment)  Box Structure Specification: describes the functional specification. Box structures isolate and separate the creative definition of behavior, data and procedures at each level of refinement  Formal Design: specifications (called “black boxes”) are iteratively refined (with an increment) to become analogous to architectural and procedural designs (called “state boxes” and “clear boxes,” respectively) The Cleanroom Process Model
  • 9. The Cleanroom Process Model  Correctness Verification: verification begins with the highest level box structure (specification) and moves toward design detail and code using a set of “correctness questions.” If these do not demonstrate that the specification is correct, more formal (mathematical) methods for verification are used  Code Generation, Inspection and Verification: the box structure specifications, represented in a specialized language, are transmitted into the appropriate programming language.  Statistical Test Planning: a suite of test cases that exercise of “probability distribution” of usage are planned and designed  Statistical Usage Testing: execute a series of tests derived from a statistical sample (the probability distribution noted above) of all possible program executions by all users from a targeted population  Certification: once verification, inspection and usage testing have been completed (and all errors are corrected) the increment is certified as ready for integration.
  • 10. What makes Cleanroom Different?  It makes explicit use of statistical quality control.  It verifies design specifications using a mathematically based proof of correctness.  It implements testing techniques that have a high likelihood of uncovering high impact errors.
  • 11. Functional Specification  Cleanroom SE complies with the operational analysis principles by using a method called Box Structure Specification.  A “Box” encapsulates the system (or some aspect of the system) at some level in detail.  Through a process of elaboration or stepwise refinement, boxes are refined into a hierarchy where each box has referential transparency.  The information content of each box specification is sufficient to define its refinement, without depending on implementation of any other box.  Three types of boxes are used.  Black Box  State Box  Clear Box
  • 12. Box Structure Specification 12 black box state box clear box
  • 13. Black Box • Specifies a set of transition rules that describe the behavior of system components as responses to specific stimuli, makes use of inheritance in a manner similar to classes • Specifies system function by mapping all possible stimulus histories to all possible responses. • The function f, is applied to the sequence, S* of inputs, S and transforms them into an output(Response) R . S*  R stimulus history  responses
  • 14. • Generalization of a state machine, encapsulates the data and operations similar to an object, the inputs (stimuli) and outputs (responses) are represented, data that must be retained between transitions is encapsulated • The state is the encapsulation of the stimulus history • State variables are invented to save any stimuli that need to retained S x T  R x T stimuli X state data  responses X state data State Box
  • 15. • Contains the procedural design of the state box, in a manner similar to structured programming • Specifies both data flow and control flow S x T  R x T stimuli X state data  responses X state data • State update and response production is allowed Clear Box
  • 16. Box Principles • Transaction closure of stimuli and responses – users and uses are considered including security and error recovery • State migration within box hierarchy – downward migration of state data is possible whenever new black boxes are created inside a clear box – upward migration of state date is desirable when duplicate data is updated in several places in the tree • Common services – reusable boxes from library
  • 17. Design Refinement & Verification If a function f is expanded into a sequence g and h, the correctness condition for all input to f is: • Does g followed by h do f? When a function f is refined into a conditional (if-then- else), the correctness condition for all input to f is: • Whenever condition <c> is true does g do f and whenever <c> is false, does h do f? When function f is refined as a loop, the correctness conditions for all input to f is: • Is termination guaranteed? • Whenever <c> is true does g followed by f do f, and whenever <c> is false, does skipping the loop still do f?
  • 18. Design Verification Advantages • Reduces verification to a finite process • Improves quality • Lets cleanroom teams verify every line of code • Results in near zero levels of defects • Scales up to larger systems and higher levels • Produces better code than unit testing
  • 19. Certification Steps • Usage scenarios must be created • Usage profile is specified • Test cases generated from the usage profile • Tests are executed and failure data are recorded and analyzed • Reliability is computed and recorded
  • 20. Statistical Testing • Generation of test cases – each test case begins in a start state and represents a random walk through the usage model ending at a designated end state • Control of statistical testing – a well-defined procedure is performed under specified conditions – each performance is a trial and can be used as part of an empirical probability computation • Stopping criteria for testing – when testing goals or quality standards are achieved – when the difference between the predicted usage chain and the actual testing chain becomes very small
  • 21. Reliability Estimation ConfidenceLevel Reliability 90% 95% 99% 99.9% .9 22 29 44 66 .95 45 59 90 135 .99 230 299 459 688 .999 2302 2995 4603 6905 The binomial distribution can be used to estimate the number of error-free test cases are needed to assume a given level of reliability at a specified confidence level.
  • 22. Cleanroom Certification Models • Sampling model – determines the number if random cases that need to be executed to achieve a particular reliability level • Component model – allows analyst to determine the probability that a given component in a multi-component system fails prior to completion • Certification model – projected overall reliability of system