cleanroom software engineering

30
CleanRoom Software Engineering Authors: Harian D.Mills, Information System Institute Michael Dyer and Richard C.Linger, IBM Federal Systems Division September 1987 Presented By Mei, Yu Date: 21 th Apr 2003

Upload: levi

Post on 31-Jan-2016

67 views

Category:

Documents


0 download

DESCRIPTION

CleanRoom Software Engineering. Authors: Harian D.Mills, Information System Institute Michael Dyer and Richard C.Linger, IBM Federal Systems Division. September 1987. Presented By Mei, Yu Date: 21 th Apr 2003. Overview. Introduction – CleanRoom priorities. CleanRoom Experience. - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: CleanRoom Software Engineering

CleanRoom Software Engineering

Authors:Harian D.Mills, Information System Institute

Michael Dyer and Richard C.Linger, IBM Federal Systems Division

September 1987

Presented By Mei, Yu Date: 21th Apr 2003

Page 2: CleanRoom Software Engineering

Overview

1. Introduction – CleanRoom priorities.2. CleanRoom Experience.3. Management Perspective.4. Statistical Quality Control.5. Mathematical Verification.6. CleanRoom Software Engineering.7. Statistical Basis – Errors/Failure Rates.8. Certifying Statistical Quality.9. Conclusion

Page 3: CleanRoom Software Engineering

Software vs. Quality Control

Recent Experiences demonstrates• Software can be engineered under Statistical Quality

Control. • Certified reliability statistics can be provided with

delivered software.

IBM’s Cleanroom Process has uncovered:• Identified a synergy between Mathematical Verification

and statistical testing of software. • A major difference between Mathematical Fallibility and

debugging fallibility in people.

Page 4: CleanRoom Software Engineering

Two Priorities of Cleanroom Software Engineering

1) Defect prevention rather than defect removal (any defects not prevented should be removed). This first priority is achieved by using human mathematical verification in place of program debugging to prepare software for system test.

2) To provide valid, statistical certification of the software’s quality through representative-user testing at the system level. The certification takes into account the growth of reliability achieved during system testing before delivery.

Page 5: CleanRoom Software Engineering

Experience with the Cleanroom process were three projects

• An IBM Language Product (40,000 lines of code)

• An Air Force Contract Helicopter Flight Program (35,000 lines).

• A NASA Contract Space-Transportation Planning System (45,000 lines).

Page 6: CleanRoom Software Engineering

• Human verification could replace debugging in software development. • Informal human verification can produce software sufficiently robust to go to system test without debugging. • Human verification need take no more time than debugging. All three projects showed productivity equal to or better than expected for ordinary software development.

Major Finding In The Three Cases:

Page 7: CleanRoom Software Engineering

Due to the combination of Formal Design Methods and Mathematical based Verification. More than 90% of the total product defects were found before first execution.

Marked contrast to, more customary experience of finding 60 percent of the product defect.

Reason: Probably directly related to the added care and attention given to design in lieu of rushing into code and relying on testing to achieve product quality.

Positive Development Effect

Page 8: CleanRoom Software Engineering

1) Drop in the Total Defect Count ( by almost half) which highlights the Cleanroom focus on Error Prevention as opposed to Error Detection.

2) With Industrial average at 50 to 69 errors per 1000 lines of code, halving these numbers is significant.

Second Encouraging Trend

Page 9: CleanRoom Software Engineering

• Advance technology product , comparable in complexity to a complier, was formally specified and then designed in a Process-Design Language.

• Specification text exceeded design text by about four to one.

• Every control structure in the design text was verified in formal, Mathematics–based group inspection, so the product proved very robust.

IBM language product Experience

Page 10: CleanRoom Software Engineering

The first phase of development (20,000 lines) had just 53 errors found during testing.

Such experiments indicated that Clean Room Processing gave better productivity and quality than with interactive debugging and integration – even the first time you see it.

Benefit:

Page 11: CleanRoom Software Engineering

At first glance, Statistical Quality Control( S.Q.C) and Software Development seem incompatible. Why?

• S.Q.C seems to apply to manufacturing, especially manufacturing of multiple copies of a previously specified and designed part of the product.

• Software development seems to be a one-of-a-kind logical process with no statistical properties at all. After all, if the software ever fails under certain conditions, it will always fail under those conditions.

Management Perspective

Page 12: CleanRoom Software Engineering

A Relation Between S.Q.C and Software Development

• By rethinking the process of S.Q.C from a management perspective, we find a way to put software development under S.Q.C with significant management benefits.

• Statistics come from Usage of the software, not from its Intrinsic Properties.

• So, engineering software under S.Q.C requires us to specify its Statistical Usage along with its functional behavior.

Page 13: CleanRoom Software Engineering

Is a practical process to place software development under S.Q.C. In a process under S.Q.C, sampling of output is directly fed back into the process to control quality.

Once the discipline of S.Q.C is in place, management can see the development process and can control process changes to control product quality.

Cleanroom Software Engineering (C.S.E)

Page 14: CleanRoom Software Engineering

Benefits Of C.S.E:• Permits a sharper structuring of development work between Specification, Design and Testing, with clearer accountability for each part of the process.

• Structuring increases management’s ability to monitor work in progress.

• Forces early problems (like hardware or specification instability) into the open, giving all levels of management an opportunity to resolve them.

• Requires stable Specifications as its basis.

• Establishes a clear accountability between specification and development, keeping management in control of specification changes.

Page 15: CleanRoom Software Engineering

Begins with an agreement between a producer and receiver. A critical part of this agreement, is how to measure quality, particularly Statistical Quality.

Example of an agreement for simple products: “ 99 percent of certain filaments are to exhibit an electrical resistance of within 10% of a fixed value”.

For Even the simplest of products, there is no absolute best statistical measure of quality.

It finally comes down to a judgment of business and management.

Statistical Quality Control (S.Q.C)

Page 16: CleanRoom Software Engineering

A new Basis for the Certification of software Quality

Is based on a new software engineering process.

Requires a software specification and a probability distribution on scenarios of the software’s use.

Defines a testing procedure and a prescribed computation from test data results.

Provides a certified statistical quality of delivered software.

Represents scientific and engineering judgment which is a reasonable way to measure statistical quality of software.

Page 17: CleanRoom Software Engineering

Certification of Software Quality

is given in terms of its measured reliability over a probability distribution of usage scenarios in statistical testing. Is an ordinary process in business. Has a fact-finding process, followed by a prescribed computation. Example: Bank, the fact-finding produces assets and liabilities. Computation subtracts the sum of the liabilities from the sum of the assets. There are other measures of importance besides net worth just as there are other measures for software than reliability. So a certification of software quality is a business measure, part of the overall consideration in producing and receiving software.

Page 18: CleanRoom Software Engineering

Once a basis for measuring statistical quality of delivered software is available, creating a management process for statistical quality control is relatively straight forward.

The Cleanroom process had been designed to carry out this principle. It calls for the development of the software in increments that permit realistic measurements of statistical quality during development, with provision for improving the measured quality by additional testing, by process changes or by both methods.

The Cleanroom Process

Page 19: CleanRoom Software Engineering

Software Engineering without mathematical verification is no more than a buzzword.

In contrast, learning the rigor of mathematical verification leads to behavioral modification in both individuals and teams of programmers.

Two main behavioral effects are readily observable: 1) Communication among programmers becomes much more

precise, especially about program specifications. 2) A premium is placed on the simplest programs possible to

achieve specified function and performance.

If a program looks hard to verify, it is the program that should be revised and not the verification. The result is high productivity in producing software that requires little or no debugging.

Mathematical Verification

Page 20: CleanRoom Software Engineering

C.S.E uses M.V. to replace program debugging before release to statistical testing. This M.V. is done by people, based on standard Software Engineering practices. We find that:

1. Human Verification is synergistic with statistical testing- that mathematical fallibility is very different from debugging fallibility.

2. Errors of mathematical fallibility are much easier to discover in statistical testing than are errors of debugging fallibility.

Cleanroom Software Engineering (C.S.E) AND Mathematical Verification (M.V)

Page 21: CleanRoom Software Engineering

• Cleanroom verified software exhibited higher quality.• For the verified software, fewer errors were injected.• Errors required less time to Find and Fix.• The verified software also experienced better field quality.• Findings from an early Cleanroom project indicate that verified software was responsible for less than 10 percent of severe failures. These findings substantiate that verified Software contains fewer defects and those defects are simpler and have less effect on product execution.

Cleanroom Verification AND Traditional Debugging Techniques Comparison

Page 22: CleanRoom Software Engineering

Functional Verification

Is the method of human mathematical verification used in Cleanroom development.

Different than the method of axiomatic verification.

Based on functional semantics and on the reduction of software verification.

Scales up to reasoning for million-line systems in top-level design as well as for hundred-line programs at the bottom level. So, effective is in the small amount of backtracking required in large systems designed top-down with functional verification.

Page 23: CleanRoom Software Engineering

Cleanroom Software Engineering

The Cleanroom software engineering process is an evolutionary step in software development:

It is evolutionary in eliminating debugging because more and more program design has been developed in design languages that must be verified rather than executed.

It is evolutionary in statistical testing because with higher quality programs at the outset, representative-user testing is correspondingly a greater and greater fraction of the total testing effort.

Synergism between human verification and statistical testing: People are fallible with human verification, but the errors they leave behind for system testing are much easier to find and fix than those left behind from debugging.

Page 24: CleanRoom Software Engineering

Cleanroom Model

The Cleanroom design methods use a limited set of design primitives to capture software logic. They use module and procedure primitives to package software designs into products.

In the Cleanroom Model, Structural testing that requires knowledge of the design is replaced by formal verification.

Functional testing is retained and can be performed with two goals:

1) Demonstrate that the product requirements are correctly implemented in the software.

2) Provide a basis for product-reliability prediction.

Page 25: CleanRoom Software Engineering

Good methodology produces post-delivery levels under one error per thousand lines. Such numbers are irrelevant and misleading when software reliability is considered. Users do not see errors in software, they see failures in execution, so the measurement of times between failures is more relevant. Effort to reduce errors would automatically increase reliability. It turns out that every major IBM software product has an extremely high error-failure rate variation. Fixing such errors will reduce the number of errors by more than half, but the decrease in product failure rate will be imperceptible. More precisely, removal of more than 60 % of the errors only decrease the failure rate by less than 3 %.

Statistical Basis

Page 26: CleanRoom Software Engineering

Examples illustrate that failures represent different levels of severity, beginning with three major levels:

1) Terminating Failures. 2) Permanent Failures ( Not terminating). 3) Sporadic Failures.

These failures can be determined by history of usage of the product and probability distribution of usage histories provides a statistical basis for Software Quality Control.

Three different levels of failures

Page 27: CleanRoom Software Engineering

Estimation of the reliability of software under Cleanroom development, the problem is more complicated for two reasons:

• In each Cleanroom increment, results of system testing may indicate software changes to correct failures found.

• With each classroom increment release, untested new software will be added to software already under test.

Certifying Statistical quality

Page 28: CleanRoom Software Engineering

To aggregate the testing experience for an increment release, we define a model of reliability change with parameters M and R for the Mean Time To Failure (MTTF) after c software changes,

Of the form MTTF = MRc .

M - Initial MTTF of the release.

R - Observed Effectiveness Ratio for improving MTTF with software changes.

Model of Reliability Change

Page 29: CleanRoom Software Engineering

Mean Time To Failure (MTTF)

1. MTTF and the rate of change in MTTF can be useful decision tools for project management.

2. MTTF and a known rate of change in MTTF, decisions on releasability can be based on an evaluation of life-cycle costs rather than on just marketing effect.

3. When the software is delivered, the average cost for each failure must include both the direct costs of repair and the indirect costs to the users. Judgments could then be made about the profitability of continuing tests to minimize lifetime costs.

Page 30: CleanRoom Software Engineering

Conclusion

Software quality can be engineered under statistical quality control and delivered with better quality. The Cleanroom process gives management an engineering approach to release reliable products.

(End)