newton's law of motion in software development processes?

37
Software Process Control 1 Aditya P. Mathur Department of Computer Sciences Purdue University, West Lafayette Visiting Profesor, BITS, Pilani Research collaborators: João Cangussu (CS, UT Dallas) Ray. A. DeCarlo (ECE, Purdue University) Monday November 10, 2003 Newton's Law of Motion in Software Development Processes? Presentation at: Indian Institute of Technology, Kanpur, In

Upload: ria-mullen

Post on 02-Jan-2016

29 views

Category:

Documents


1 download

DESCRIPTION

Newton's Law of Motion in Software Development Processes?. Aditya P. Mathur Department of Computer Sciences Purdue University, West Lafayette Visiting Profesor, BITS, Pilani Research collaborators: João Cangussu (CS, UT Dallas) Ray. A. DeCarlo (ECE, Purdue University). - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Newton's Law of Motion in Software Development Processes?

Software Process Control 1

Aditya P. MathurDepartment of Computer SciencesPurdue University, West LafayetteVisiting Profesor, BITS, Pilani

Research collaborators:João Cangussu (CS, UT Dallas)Ray. A. DeCarlo (ECE, Purdue

University)

Monday November 10, 2003

Newton's Law of Motion in Software Development Processes?

Presentation at:Indian Institute of Technology, Kanpur, India

Page 2: Newton's Law of Motion in Software Development Processes?

Software Process Control 2

Research Question

Can we control the Software Development Process in a manner similar to how physical systems and processes are controlled ?

The central problem in control is to find a technically feasible way to act on a given process so that the process adheres, as closely as possible to some desired behavior.

The fundamental control problem (Ref: Control System Design by G. C. Goodwin et al., Prentice Hall, 2001)

Furthermore, this approximate behavior should be achieved in the face of uncertainty of the process and in the presence of uncontrollable external disturbances acting on the process.

Page 3: Newton's Law of Motion in Software Development Processes?

Software Process Control 3

Research Methodology

1. Understand how physical systems are controlled?

2. Understand how software systems relate to physical systems. Are there similarities? Differences?

3. Understand the theory and practice of the control of physical systems. Can we borrow from this theory?

4. Adapt control theory to the control of SDP and develop models and methods to control the SDP.

5. Study the behavior of the models and methods in real-life settings and, perhaps, improve the model and methods.

6. Repeat steps 6 and 7 until you are thoroughly bored or get rich.

Page 4: Newton's Law of Motion in Software Development Processes?

Software Process Control 4

Feedback Control

Specifications

ProgramEffort +

f(e)Additionaleffort What is f ?

-

RequiredQuality

rQ

ObservedQuality

oQ

oQr

Qe −=

Page 5: Newton's Law of Motion in Software Development Processes?

Software Process Control 5

Software Development Process: Definitions

A Software Development Process (SDP) is a sequence of well defined activities used in the production of software.

An SDP usually consists of several sub-processes that may or may not operate in a sequence. The Design Process, the Software Test Process, and the Configuration Management Process are examples of sub-processes of the SDP.

Page 6: Newton's Law of Motion in Software Development Processes?

Software Process Control 6

Software Development Process: A Life Cycle

RequirementsElicitation

RequirementsAnalysis

Integrate/Test

Design

Code/Unit test

System test More test DeployNot all feedback loopsare shown.

Page 7: Newton's Law of Motion in Software Development Processes?

Software Process Control 7

Current Focus

Software Test Process (STP): System test phase

Objective:Control the STP so that the quality of the tested software is as desired.

Quantification of quality of software:• Number of remaining errors• Reliability

Page 8: Newton's Law of Motion in Software Development Processes?

Software Process Control 8

Problem Scenario

cp1 cp2 cp3 cp4 cp5 cp6 cp7 cp8 cp9

cpi = check point i

rf

schedule set bythe manager

Approximation of how r is likely to change

r0 observed

deadline

r -

num

ber

ofre

mai

ning

err

ors

t- time

t0

Page 9: Newton's Law of Motion in Software Development Processes?

Software Process Control 9

Our Approach

Controllerrerror(t)

w’f

+

+

wf+wf

+

wf+wf

+

robserved(t)

rexpected(t)

Actual STP

sc r0

STP State Model

sc r0

Initial Settings(wf,)

wf

Test Manager

wf: workforce : quality of the test process

Page 10: Newton's Law of Motion in Software Development Processes?

Software Process Control 10

Physical and Software Systems: An Analogy

Dashpot

Rigid surface

External force

Xequilibrium

X: Position

Number of remainingerrors

Spring Force

Effective Test Effort

Block

Software

Mass of the blockSoftware

complexity

Quality of thetest process

Viscosity

Xcurrent

SpringTo err isHuman

Page 11: Newton's Law of Motion in Software Development Processes?

Software Process Control 11

Physical Systems: Laws of Motion [1]

First Law:

Every object in a state of uniform motion tends to remain in that state of motion unless an external force is applied to it.

Does not (seem to) apply to testing because the number of errors does not change when no external effort is applied to the application.

Page 12: Newton's Law of Motion in Software Development Processes?

Software Process Control 12

Physical Systems: Laws of Motion [2]

Newton’s Second Law:

The relationship between an object's mass m, its acceleration a, and the applied force F is F = ma.

CDM First Postulate:

The relationship between the complexity Sc of an application, its rate of reduction in the number of remaining errors, and the applied effort E is E=Sc .

r..

Page 13: Newton's Law of Motion in Software Development Processes?

Software Process Control 13

Physical Systems: Laws of Motion [3]

Third Law:

For every action force, there is an equal and opposite reaction force.

When an effort is applied to test software, it leads to (mental) fatigue on the tester.

Unable to quantify this relationship.

Page 14: Newton's Law of Motion in Software Development Processes?

Software Process Control 14

CDM First Postulate

The magnitude of the rate of decrease of the remaining errorsis directly proportional to the net applied effort and inverselyproportional to the complexity of the program under test.

cc

srs

r EE &&&& =⇒=

This is analogous to Newton’s Second Law of motion.

Page 15: Newton's Law of Motion in Software Development Processes?

Software Process Control 15

CDM Second Postulate

The magnitude of the effective test effort is proportional to theproduct of the applied work force and the number of remaining errors.

for an appropriate .

Analogy with the spring:

Note: While keeping the effective test effort constant, a reduction in r requires an increase in workforce.

Page 16: Newton's Law of Motion in Software Development Processes?

Software Process Control 16

CDM Third Postulate

The error reduction resistance is proportional to the errorreduction velocity and inversely proportional to the overallquality of the test phase.

rer &

ξ 1=

for an appropriate ξ.

Analogy with the dashpot:

Note: For a given quality of the test phase, a larger error reduction velocity leads to larger resistance.

Page 17: Newton's Law of Motion in Software Development Processes?

Software Process Control 17

State Model

Fd: Disturbance

x(t) = Ax(t) + B u(t).

etr eeE −=Force (effort) balance equation:

Page 18: Newton's Law of Motion in Software Development Processes?

Software Process Control 18

Computing the feedback-Question

Question:

What changes to the process parameters will achieve the desired r(T+T) ?

r(T): the number of remaining errors at time T

r(T+T): the desired number of remaining errors attime T+T

Given:

Page 19: Newton's Law of Motion in Software Development Processes?

Software Process Control 19

Computing the feedback-Answer

From basic matrix theory:

The largest eigenvalue of a linear system dominates the rate of convergence.

Hence we need to adjust the largest eigenvalue of the system so that the response converges to the desired value within the remaining weeks (T). This can be achieved by maintaining:

teTrtTr −=+ max)()( λObtain the desired eigenvalue.

Page 20: Newton's Law of Motion in Software Development Processes?

Software Process Control 20

Computing the feedback-Calculations (λmax)

Compute the desired λmax

teTrtTr −=+ max)()( λGiven the constraint:

We know that the eigenvalues of our model are the roots of its characteristic polynomial of the A matrix.

Page 21: Newton's Law of Motion in Software Development Processes?

Software Process Control 21

Computing the feedback-Calculations (λmax)

[ ]

c

f

c

cc

f

s

w

s

ss

wAI

ˆ

ˆ

ˆ

ˆ1

detdet

2 ζλ

γ

ξλ

γ

ξλ

ζλ

λ

++=

⎥⎥

⎢⎢

+

−=−

fwff wwandwhere +=+= ˆˆ

We use the above equation to calculate the space of changes to w and such that the system maintains its desired eigenvalue.

f

Page 22: Newton's Law of Motion in Software Development Processes?

Software Process Control 22

Computing the feedback-Input to the Manager

The space of changes in the workforce and the quality of the process is made available to the test manager in the form of suggestions for possible process changes.

The test manager may decide to select a combination of these values for implementation or simply ignore them.

So far, in each of the two commercial studies we carried out, the manager ignored the suggestions given using the model.

Page 23: Newton's Law of Motion in Software Development Processes?

Software Process Control 23

Case Study I: The Razorfish Project

Project Goal: translate 4 million lines of Cobol code to SAP/R3

A tool has been developed to achieve the goal of this project.

Goal of the test process: (a) Test the generated code, not the tool. (b) Reduce the number of errors by about 85%.

Page 24: Newton's Law of Motion in Software Development Processes?

Software Process Control 24

Razorfish Project Test Process

output 1

run run

output 2

Transformer SSAP R/3SCobol

Select a Test Profile

input

continuetesting yes

modify

=no

Page 25: Newton's Law of Motion in Software Development Processes?

Software Process Control 25

Razorfish Project: Results (intermediate)

85% reduction achieved.

If the process parameters are not altered then the goal is reached in about 35 weeks.

Prediction using feedback

Prediction using the model

Project data

Expected behavior

Page 26: Newton's Law of Motion in Software Development Processes?

Software Process Control 26

Alternatives from Feedback: STP Quality

Desired eigenvalue=-0.152Improving quality alone will not help inachieving the goal.

Page 27: Newton's Law of Motion in Software Development Processes?

Software Process Control 27

Alternatives from Feedback: Workforce

Desired eigenvalue=-0.152 Changing the workforce alone can produce the desired results.

Page 28: Newton's Law of Motion in Software Development Processes?

Software Process Control 28

Alternatives from Feedback: STP quality and workforce

Set of valid choices for changing the quality and the workforce

Page 29: Newton's Law of Motion in Software Development Processes?

Software Process Control 29

Razorfish Project Results (final)

The project was completed in 32 weeks. The model predicted 85% error reduction in 35 weeks.

Page 30: Newton's Law of Motion in Software Development Processes?

Software Process Control 30

Case Study 2: Company X P1: Week 9

•Start of the study•1 week = 5 working days•Estimated R0 = 557•70% reduction –

10 weeks•90% reduction -

16 weeks

Page 31: Newton's Law of Motion in Software Development Processes?

Software Process Control 31

Company X P1: Week 12

•No recalibration•Estimated R0 = 557•70% reduction –

10 weeks(confirming previous prediction)•90% reduction -

14 weeks

Note: for 90% error reduction, the change in 14wks vs. 16wks from the previous slide is due to an increase in the number of testers from 5 to 7

Page 32: Newton's Law of Motion in Software Development Processes?

Software Process Control 32

Company X P1: Week 14

•Recalibration•Estimated R0 = 758 (agressive)•70% reduction –

13.6 weeks•90% reduction -

21.6 weeks

Page 33: Newton's Law of Motion in Software Development Processes?

Software Process Control 33

Company X P1: End of Phase 1

Page 34: Newton's Law of Motion in Software Development Processes?

Software Process Control 34

Company X P1: Summary

21.2 weeks21

13.6 weeks

13.4 weeks76463518

21.4 weeks

2113.6

weeks13.4

weeks75859016

21.6 weeks

--13.6

weeks--75853514

14 weeks--10 weeks10 weeks55745812

16 weeks--10 weeks--5572819

EstimatedActualEstimate

d Actual

90% Defect Reduction

70% Defect ReductionEstimated

R0

Observ-ed

Defect #Week

Page 35: Newton's Law of Motion in Software Development Processes?

Software Process Control 35

Summary

Analogy between physical and software systems presented.

The notion of feedback control of software processes introduced.

Two case studies described.

Parameter estimation techniques used for model calibration. Made use of system identification techniques.

Page 36: Newton's Law of Motion in Software Development Processes?

Software Process Control 36

Ongoing Research

Expansion of the model to include the entire SDP: ongoing project in collaboration with Guidant Corporation (detailed model).

Sensitivity analysis (completed, IEEE TSE May 2003)

r is more sensitive to changes in the model parameters during the early stages of the test process than during the later stages.

An improvement in the quality of the STP is more effective than an increase in the workforce.

Brook’s Law was also observed during the analysis.

Page 37: Newton's Law of Motion in Software Development Processes?

Software Process Control 37

Physical Systems: Control

Controllability

Is it possible to control X (r) by adjusting Y (workforce and process quality)?

Observability

Does the system have distinct states that cannot be unambiguously identified by the controller ?

Robustness

Will control be regained satisfactorily after an unexpected disturbance?