Académique Documents
Professionnel Documents
Culture Documents
Richard C. Linger
2
0270-5257/93 $03.00 @ 1993 IEEE
testing are returned to the development team for cor- A traditional project experiencing, say, five
rection. If quality is not acceptable, the software is errors/ KLO C in function testing may have encount-
removed from testing and returned to the develop- ered 25 or more errors pcr KLOC when measured
ment team for rework and rever~lcation. from f~st execution in unit testing. Quality compar-
The process of Cleanroom development and cer- isons between traditional and Cleanroom software
tflcation is carried out incrementally. Integration is are meaningful when measured from fu-st execution.
continuous, and system functionality grows with the Experience has shown that there is a qualitative
addition of successive increments. When the final difference in the complexity of errors found in
increment is complete, the system is complete. Cleanroom and traditional code, Errors left behind
Because at each stage the harmonious operation of by Cleanroom correctness vefilcation, if any, tend to
future increments at the next level of refinement is be simple mistakes easily found and fixed by statis-
predefmed by increments already in execution, inter- tical testing, not deep design or interface errors,
face and design errors are rare, Cleanroom errors are not only infrequent, but
The Cleanroom process is being successfully usually simple as well.
applied in IBM and other organizations. The tech- Highlights of Cleanroom projects reported in
nology requires some training and practice, but Table 1 are described below:
builds on existing skills and software engineering
practices. It is readily applied to both new system IBM Flight Control. A HH60 helicopter avionics
development and re-engineering and extension of component was developed on schedule in three
existing systems. The IBM Cleanroom Software increments comprising 33 KLOC of JOVIAL [6].
Technology Center (CSTC) [4] provides technology A total of 79 corrections were required during statis-
transfer support to Cleanroom teams through educa- tical certification for an error rate of 2.3 errors per
tion and consultation. KLOC for verit3ed software with no prior execution
or debugging.
3
I Table 1. C1.atImOm Qwtlii Results
1987 I Clean roOm IBM Flight Control: Helicopter Avionics System Component ● Certification testing failure r-ate: 2.3 ermrs/KLOC
Software
I I
33 KLOC (Jovial)
● En-or-fix redu-d 5x
fhglIIW@
● Completed ahead of stied U1e
1988 Cleanroom IBM COBOL Structuring Facility Product for automatically ● IBMs first Cleanroom product
Soflware restructuring COBOL programs
● Certification testing failure rate: 3.4 ermrs/KLOC
Engineering 85 KLoC (PL/1)
● Productivity 740 LOCfPfvf
1989 Partial Cleanroom NASA Satellite Control Project 1 ● Certification testing failure rste: 4.S errms/KLOC
Software 40 KLOC (FORTRAN)
● 50.percsnt improvement in quality
Engineering
“ Productivity 780 LOC/PM
1990 Cleanroom University of Tennessee: Clean mom tool ● Certification testing failure rate: 3.0 errom/KLOC
Softwars 12 KLOC (Ada)
Engineering
1990 CfeanrOOm Martin Mariettw Automated documentation system ● First compilation: no errors found
Softwars l.g KLOC (FOXBASE)
● Certification testing failurs rate: 0.0 errors/KLOC (no
Engineering
errors found)
E
SoftWars First increment 0.6 KLOC (C)
● Certification testing failure rate: 0.0 emm’s/KLOC (“o
Engineering
errors found)
1991 Partial Cleanroom IBM System Product ● Testing failure rate: 2.6 errors/KLOC
Software Three increments, total 107 KLOC (mixed languages)
● Productivity 4S6 LOC/PM
Engineering
1991 Cieanroom IBM Language Product ● Testing failurs rate: 2.1 emom/KLOC
First increment 21.9 KLOC (PL/X)
I 1992 I Partial Cleanroom IBM Knowledge Based System Application ● Testing Failuiw Rate 3.5 en-ors/KLOC
Software 17.8 KLOC (TIRS)
Engineering
I 1992 I Cleanroom NASA Satellite Control Projects 2 and 3 ● Testing Failurs Rat= 4.2 emors/KLOC
170 KLoC (FORTRAN)
1993 I Partial Cieanroom IBM LAN Softwars ● Testing Failure Rata 0.8 ermrs/KLOC
I I Software
Engineering
,
First increment 4.8 KLOC (C)
NASA Satellite Control Project 1. The Coarse/Fine averages. Some 607’0 of the programs compiled cor-
Attitude Dete rrnination System (CFADS) of the rectly on the f~at attempt.
NASA Attitude Ground Support System (AGSS)
was the fwst Cleanroom project carried out by the Martin Marietta Automated Documentation System.
Software Engineering Laboratory (SEL) of the A four-person Cleanroom team developed the proto-
NASA Goddard Space Flight Center [9]. The type of the Automated Production Control Doc-
system, comprised of 40 KLOC of FORTRAN, umentation Systemr a relational data base
exhibited a certflcation fh.ilure rate of 4.5 errors per application of 1820 lines programmed in FOXBASE.
KLOC. Productivity was 780 LOC per person- No compilation errors were found, and no fir.ihwes
month, an 80°/0 improvement over previous SEL were encountered in statistical testing and quality
certflcation. The software was certified at target
4
levels of reliability and cor&dence. Team members IBM Knowledge Based System Application. A five-
attributed error-free compilation and failure-free person team developed a prototype knowledge-based
testing to the rigor of the Cleanroom methodology system for the FM Air Tra.file Control System.
[10]. The team reported a total of 63 errors for the 17.8
KLOC application, for a rate of 3.5 errors/KLOC.
IBM System Software. A four-person Cleanroom The fact that Cleanroom errors tend to be simple
team developed the frost increment of a system soft- mistakes was borne out by project experience; only
ware product in C. The increment of 0.6 KLOC two of the 63 errors were class~led as severe, and
compiled with no errors, and underwent certflcation only five required design changes. The team devel-
through 130 statistical tests with no errors found. oped a special design language for knowledge-based
Subsequent use in another environment resulted in applications, together with proof rules for correctness
one specKlcation change. verification.
IBM System Product. A Cleanroom organization of NASA Satellite Control Projects 2 and 3. A 20
50 people developed a complex system software KLOC attitude determination subsystem of the
product. The system, written in PL/1, C, R13XX, Solar, Anomalous, and Magnetospheric Particle
and TIRS, was developed in three increments Explorer satellite flight dynamics system was the
totaling 107 KLOC, with an average of 2,6 second Cleanroom project carried out by the Soft-
errors/KLOC found in testing [11]. Causal analysis ware Engineering Laboratory of the NASA Goddard
of errors in the f~st increment revealed that five of Space Flight Center. The third project was a 150
its eight components experienced no errors whatso- KLOC flight dynamics system for the ISTP
ever in testing. The project reported development Wind/Polar satellite, These projects reported a com-
team productivity of 486 LOC per person-month. bined error rate of 4.2 errors/KLOC in testing [13].
IBM Language Product. A seven-person Cleanroom IBM Device Controller. A five-person team devel-
team developed an extension to a language product. oped two increments of device controller design and
The fust increment of 21.9 KLOC was up and microcode in 40 KLOC of C, including 30.5 KLOC
cycling in less than half the time normally required, of function deffitions. Box structure spec~lcation
and exhibited a certflcation error rate of 2.1 of chip set semantics revealed a number of hardware
errors/KLOC in testing. errors prior to any execution. The multiple
processor, bus architecture device processes multiple
IBM Image Product Component. A 3.5 KLOC real-time input and output data streams. The
image product component was developed to com- project reported a failure rate of 1.8 errors/KLOC in
press and decompress data from a Joint Photo- testing.
graphic Expert Group (JPEG) data stream. The
component exhibited three errors in testing, all IBM Database Transaction Processor. A five-person
simple mistakes. No additional errors have been team developed the fwst increment of a host-based
found in subsequent use. database transaction processor in 8.5 KLOC of
JOVIAL. Rigorous use of correctness verit3cation
IBM Printer Application, An eleven-member team resulted in a failure rate of 1.8 errors/KLOC in
developed the fust increment of a graphics layout testing, with no design errors encountered. The
editor in C under 0S/2 Presentation Manager. The team reported that correctness verflcation reviews
editor operates in a complex environment of vendor- were far more effective in detecting errors than were
developed code that exports more than 1000 func- traditional inspections.
tions, and uses many of the 800 functions of 0S/2
PM. The fust increment of 6.7 KLOC exhibited a IBM LAN Software. A four-person team developed
rate of 5.1 errors/KLOC in testing [12]. All but 1.9 the fwst increment of a LAN-based object server in
errors/KLOC were attributed to the vendor code 4.8 KLOC of C, resulting in a failure rate of 0.8
interface and PM and C misunderstandings. errors/KLOC in testing, The team utilized a popular
case tool for recording spec~lcations and designs.
5
Cleanroom management by incremental
development install atlm, stubbed p.s”el navi gat! on,
sign on, Incr 1 $tubbed primary functions
Management planning and control in Cleanroom sign off
6
necting objects comprising a system architecture [17,
18].
Custafn.r R.qul ruwnt B Without a rigorous spec~lcation technology, there
was little incentive in the past to devote much effort
to the spec~lcation process. Specifications were fre-
quently written in natural language, with inevitable
+&
ambiguities and omissions, and often regarded as
throwaway stepping stones to the code. Box struc-
I I tures, however, provide an economic incentive for
9
I narsmmnta I
DWO I npmcnt
Plonnlng I precise
tions
spec~lcation. Initial box structure specifica-
often reveal gaps and misunderstandings in user
requirements that would ordinarily be discovered
“’F’+’”” later
project.
There
in development
are
with system specification,
function
two
at high
engineering
namely, deftig
for users, and deftig
cost
problems
the right
the right structure for
and risk to
associated
the
+
the specification itself. Box structures address the
fwst problem by precisely deffig current under-
standings of required function at each stage of devel-
opment for informed review and rnoditlcation.
The second problem deals with scale-up in
complex specifications, namely, how to organize
+
F1 Statlstlaal
Tsstln~
myriad
coherent
structures
detaits
abstractions
incorporate
of behavior
for human
the crucial
and processing
understanding.
mathematical
into
Box
prop-
J Intwfoll Tlmmm
erty of referential transparency, such that the infor-
mation content of an abstraction, say a black box, is
sufficient to define its refinement to state box and
clear box forms without reference to other specKlca-
tion parts. This property permits specifications of
MTTF Estimateg
J large systems to be hierarchically
loss of precision at high levels
organized,
or of details
with
at low
no
levels.
Three fundamental principles underlie the box
Figure 2. The Cleanroom Life Cycle structure design process [17]:
7
The black box of an object is a precise specifica- history that must be retained as state data between
tion of external, user-visible behavior in all possible transitions to achieve required black box behavior.
circumstances of use. The object may be an entire The transition function of a state box is
system or system part of any size. The user may be
a person or another object. A black box accepts a (S, OS) + (R, NS),
stimulus (S) from a user and produces a response
(R) before the next stimulus is processed. Each where OS and NS represent old state and new state,
response of a black box is determined by its current respectively. While the external behavior of a state
stimulus history (S H), with black box transition box is identical to its corresponding black box, the
function stimulus history is replaced by reference to old state
and generation of new state as required by each tran-
(S, SH + R). sition.
State boxes correspond closely to the traditional
Any software system or system part exhibits black view of objects as encapsulations of state data and
box behavior in that its next response is determined services, or methods, on that data. In this view,
by the history of stimuli it has received. In simple stimuli and responses are inputs and outputs, respec-
illustration, imagine a hand calculator and two stim- tively, of specitlc service invocations.
ulus histories The clear box of an object is derived from its state
box by deftig a procedure to carry out the state
Clear 713 and Clear 713+ box transition function. The transition function of a
clear box is thus
Given a next stimulus of 6, the two histories produce
a responses of (S, OS) ~ (R, NS) by procedure.
input state to an output state. This transformation, z and absolute [set n to minimum
value of xl of z and y] [setu to minimum
known as a program function, corresponds to a ... of z and y]
au IFy<z
mathematical function, that is, it defines a mapping ... THEN
~ :=
Y
from a domain to a range by a particular rule. ELSE
“:=~
Program functions can be derived from control
FI
structures. For example, for integers x, y, and z, the
00
program function of the sequence, ...
DO
Figure 3. Stepwise Refinement of a Design Fragment
z := abs (y)
with Intended Functions for Verification
w := max(x, z)
OD
conditions make use of function composition for
is, in concurrent assignment form, sequence, case analysis for alternation, and function
composition and case analysis in a recursive equation
w, z := max(x, abs(y)), abs(y)
OD [f]
DO
is, in English, Does g fol lowed by h do f?
9;
h
set odd x to 1, even x to O 00
9
for iteration. For sequence, one condition must be
checked, for alternation, two conditions, and for iter- Program: Subproofs:
--------- ----------
ation, three conditions, as shown in Figure 4. The
conditions
pendent,
are language and subject matter inde-
II [fl]
00
gl
fl = [Do gl; gz; [fz] 00] ?
10
of physical properties of items in the population. This process, known as statistical usage testing
But in the case of software products, all copies are [6], amounts to testing software the way users intend
identical, bit for bit, so where are the statistics? to use it. The entire focus of statistical testing is on
It turns out that software has a statistical property external system behavior, not internals of design and
of great interest to developers and users, namely, its implementation as in conventional coverage testing.
execution behavior. That is, how long on average Cleanroom certtilcation teams have deep knowledge
will a software product execute before it fails, say by of expected usage, but no knowledge of design inter-
abending, producing incorrect output, etc.? Thus, nals.
the process of statistical quality control in software is As noted, the role of a Cleanroom certitlcation
to 1) sample the essentially infinite population of team is not to debug software, but rather to certify
possible user executions of a product based on the its quality through statistical testing techniques. The
frequency of expected usage, 2) measure the quality certtilcation may show adequate quality, but if not,
of the sample by determining g if the executions are the software will be returned to the development
correct, 3) extrapolate the quality of the sample to team for rework,
the population of possible executions, and 4) if the In practice, Cleanroom quality certtilcation is
quality is inadequate, identify and correct flaws in carried out in three steps, as follows:
the development process, for example, improvements
to inadequate correctness verification, Step 1: Specify usage probability distributions.
Usage probability y distributions are models of
intended usage of a software product. They define
all possible usage patterns and scenarios, including
r
erroneous and unexpected usage, together with their
[0 := odd.members [Q) I I even_members (01 1 probabilities of occurrence. Usage probability dis-
PROC Odd_Before_Even (ALT Q)
tributions represent the virtually infiite population
OATA
odds : queue of integer [ initializes to empty ]
of possible executions of a soft ware product, together
evens : queue of integer [ initializes to empty ]
with their expected frequencies of use,
x : integer
ATAO Distributions are defined by the cert~lcation team
based on box structure specitlcations of system func-
tion, plus information on system usage probabilities
obtained from prospective users, actual usage of
prior versions, etc. Formal grammars permit
x := end(0)
seq
1 [ x is
I true
IF odd(x)
odd -> odds := odds II x
-> evens := evens II x ] 1 seq
1
wdo
3
compact
and review.
representations of distributions for analysis
THEN ite
end[odds) := x 2
Step 2 Randomize test cases against usage proba-
ELSE
end(evens) := x
\ bility distributions. Test cases are derived from the
FI
distributions, such that every test represents actual
OD
usage and will effectively rehearse user experience
II
[0 := U II odds,
with the product. Because the test cases are com-
odds := empty 1
WILE odds <> empty pletely prescribed by the distributions, test case pro-
00 wdo
duction is a mechanical, and automatable, process.
x := end(odds) seq
end(0) := x 1, 3 In miniature illustration, Figure 7 depicts a usage
00 J specification and corresponding test case generation
k [0
00
evens
WHILE evens
:= 0
: = empty
.>
II evens,
]
empty
wdo
for a program
Delete
tribution,
(D), Query
with
sirnp~led
four
(Q),
user stimuli
and Print
for illustration,
(P).
to Update
shows
A usage dis-
projected
(U),
x
end(q)
:= end[evens)
:= x 1, seq
3 probabilities
the four stimuli,
of use of 32, 14, 46, and 8 percent for
respectively (omitting scenarios of
1
00 use, etc., for simplicity). These probabilities are
sEO = .eque..e
11
Usage Probabi 1i ti es:
usage
nigh quality Cmd.1
Program Possi bi I I ty Distribution tfTTF . . . ,x...d +,t.1
Sti MUIi Di stri but ion Interval test #J. ee”tl.” ****
0 (delete) 14% 32 - 45
tlTTF
0 (query) 48$ 46 - 91
Estlnute
P (print] B$ 92 - 99
1 29 11 47 52 26 94 UUOQUP
2 62 98 39 79 82 65 OUDOOO
3 83 32 58 41 36 17 UDODOU
4 36 48 86 &2 28 77 DDOUUO
Figure 8. Two Sample MTrF Graphs Produced by the
... ... ... Cleanroom Certification Model
12
found or not. If found, an error may be low rate, 8. A Success Story at Pratt & Whitney: On Track for
high rate or in between, That is, coverage testing is the Fu~ure with IBMs VS COBOL II and COBOL
not biased to fmd errors in any particular rate order. Structuring Facility, publication GK20-2326, IBM
Corporation, White Plains, NY,
Finding and fixing low-rate errors has little effect on
MTTF and the user perception of quality. But 9. Kouchakdjian, A., S. Green, and V. R. Basili, “Eval-
finding and fixing errors in fiiilure-rate order has dra- uation of the Cleanroom Methodology in the Soft-
ware Engineering Laboratory.” Proc. Fourteenth
matic effect, with each correction resulting in sub-
Annual software Engineering Workshop, NASA
stantial improvement in MTTF. In fact, statistical
Goddard Space Flight Center, Greenbelt, MD,
usage testing is more than 20 times more effective at November 1989.
extending MTTF than is coverage testing [5].
10. Trammell, C. J., L. 11. Binder, and C. E. Snyder,
“The Automated Production Control System: A Case
Acknowledgements Study in Cleanroom Software Engineering,” ACM
Transactions on Sof[ware Engineering and Method-
The author wishes to thank Kim I-Iathaway for
ology, Vol. 1, No. 1, January 1992, pp. 81-94.
her contributions and assistance in developing this
paper. Suggestions by Michael Deck, Philip 11. Hausler, Philip A., “A Recent Cleanroom Success
Story: The Redwing Project,” Proc. Seventeenth
Hausler, Ilarlan Mills, Mark Pleszkoch, and Alan
Annual Software Engineering Workshop, NASA
Spangler were appreciated. Special acknowledge-
Goddard Space Flight Center, Greenbelt, MD,
ment is due to the members of the Cleanroom teams December 1992.
whose quality results are reported in this paper, and
12. Deck, M. D., P. IIausler, and R.C. Linger, “Recent
who are setting new standards of professional excel-
Experiences with Cleanroom Software Engineering,”
lence in software development. Proc. 1992 IBM Software Development Conference,
Toronto, Canada, 1992
2. Adams, E. N., “Optimizing Preventive Service of So[t- 15. Mills, H. D., R. C. Linger, and A, R. Hevner, Princi-
ware Pro ducts,” IBM Journal of Research and DeveI- ples of Information Systems Analysis and Design,
oprnent, January, 1984. Academic Press, San Diego, CA, 1986.
3. Mills, H. D., M. Dyer, and R. C, Linger, “Cleanroom 16. Mills, H. D., R. C. Linger, and A. R. Hevner, “Box
Software Engineering,” IEEE Software, September, Structured Information Systems,” IBM Systems
1987, pp. 19-25. Journal, Vol. 26, No. 4, 1987, pp. 393-413.
4. Linger, R, C. and R, A, Spangler, “The IBM 17. Mills, H. D., “Stepwise Refinement and Verification
Cleanroom Software Engineering Technology in Ilox-Structured Systems,” IEEE Computer, June,
Transfer Program,” Proc. SEI Software Engineering 1988.
Education Conference, IEEE Computer Society Press,
18. Hevner, A. R. and H. D. Mills, “Box Structured
San Diego, CA, October 5-7, 1992.
Methods for Systems Development with Objects,”
5. Cobb, R. H. and H. D. Milk, “Engineering Soltware IBM Systems Journal (to appear).
Under Statistical Quality Control,” IEEE Sof/ware,
19. Pleszkoch, M. G., P. A. Hausler, A. R. Hevner, and
November, 1990, pp. 44-54.
R. C. Linger, “Function-Theoretic Principles of
6. Curritt, P. A., M. Dyer, and H. D. Mills, “Certifying Program Understanding,” Proc. 23rd Hawaii Znterma-
the Reliability of So ftware,” IEEE Trans. on Software tional Conference on System Sciences, IEEE Com-
Engineering, Vol. SE-1 2, No. 1, January, 1986, pp. puter Society Press, January, 1990, pp. 74-81.
3-11.
20. Linger, R. C., H. D. Mills, and B. I. Wht, Structured
7. Linger, R. C. and H. D. Mills, “A Case Study in Programming: Theory and Practice, Addison-Wesley,
Cieanroom Software Engineering: The IBM COBOL Reading, MS, 1979.
Structuring Facility,” Proc. 12th International Com-
21. Poore, J. H. and H. D. Mills, “Bringing Software
puter Science and Applications Conference, 1EEE
Under Statistical Quality Control,” Quality Progress,
Computer Society Press, October, 1988.
November 1988.
13