a system dynamics model of software evolution [paper]

21
15 May 2001 (c) All rights reserved. Juan F. Ramil 89c.lect2[charts] - 1 - A System Dynamics Model of Software Evolution (revised version of charts 15 May 2001) University of Sannio 3 May 2001 Juan F Ramil (presenting a modelling work undertaken jointly with Dr Goel Kahen) Department of Computing Imperial College 180 Queen's Gate London SW7 2BZ tel. +44 (0) 20 7594 8216 fax. +44 (0) 20 7594 8215 [email protected] http://www.doc.ic.ac.uk/~ramil

Upload: nenad-bulatovic

Post on 21-Jul-2016

10 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: A System Dynamics Model of Software Evolution [Paper]

15 May 2001 (c) All rights reserved. Juan F. Ramil 89c.lect2[charts]- 1 -

A System Dynamics Model of Software Evolution(revised version of charts 15 May 2001)

University of Sannio3 May 2001

Juan F Ramil(presenting a modelling work undertaken jointly with Dr Goel Kahen)

Department of ComputingImperial College

180 Queen's GateLondon SW7 2BZ

tel. +44 (0) 20 7594 8216fax. +44 (0) 20 7594 8215

[email protected]://www.doc.ic.ac.uk/~ramil

Page 2: A System Dynamics Model of Software Evolution [Paper]

15 May 2001 (c) All rights reserved. Juan F. Ramil 89c.lect2[charts]- 2 -

Objectives

• To illustrate the top-down modelling approach followed in FEAST, which is basedon successive refinement starting with a simplified high-level process view

To introduce the application ofsystem dynamics simulation models as a tool

to plan, manage and control software evolution processes

• To provide an example of evolution process model developed in FEAST

Page 3: A System Dynamics Model of Software Evolution [Paper]

15 May 2001 (c) All rights reserved. Juan F. Ramil 89c.lect2[charts]- 3 -

• Study of OS/360 and other systems during late 60s and early 70s led to- dynamic models of program growth such as:

Belady and Lehman 1972,75; Riordan 1977 and Woodside 1979

• Such models replicated observed growth trends over time and releases- suggested management guidelines

• In late 80s and early 90s that dynamic modelling of software processes gains wider interestbut with focus on ab initio development

- triggered, at least in part, by Abdel-Hamid’s book on Software Project Dynamics

• Not wide interest in dynamic modelling of long-term evolution, with a few exceptions

• This contrasts with the fact that evolution - not ab initio development - consumes largestportion of effort in software organisations

• Process models developed in FEAST project (http://www.dse.doc.ic.ac.uk/~mml.feast)address situation by focusing on long-term evolution

- models are generally consistent with observations in laws of software evolution- reflect input from industrial collaborators

Early Models of Evolution Dynamics

Page 4: A System Dynamics Model of Software Evolution [Paper]

15 May 2001 (c) All rights reserved. Juan F. Ramil 89c.lect2[charts]- 4 -

This loop is starting point for process modelling in FEAST

Evolution: Closing the LoopApplication

Concept

Computational Procedures

and Algorithms

Program Definition

Requirements Analysis

Operational Program

Application DomainPredictive

Views

Evolving Understanding and Structure

Theories, Models, Procedures, Laws

of Application and System Domains

Program

Exogenous Change

• Installation, introduction into usage closes major feedback loop

• Driver of continuing software system evolution

Page 5: A System Dynamics Model of Software Evolution [Paper]

15 May 2001 (c) All rights reserved. Juan F. Ramil 89c.lect2[charts]- 5 -

• Several classifications of maintenance and evolution activity have beenproposed over the years

- Focus has been on types such as fixing, adaptation, and enhancement- See, for example, Chapin N, Hale JE, Khan KM, Ramil JF and Tan WG, Types of SoftwareEvolution and Software Maintenance, Journal of Software Maintenance and Evolution: Res. andPractice, Volume 13, Issue # 1, January-February, 2001, pp. 1-30

Lehman’s proposal (1974) includes 2 classes of activity (or effort)

• Progressive activity - directed to achieve increase functionality, better performance and ingeneral to change the behaviour of the software as perceived by users

• Anti-regressive activity - undertaken to control complexity and its growth and in principlenot altering properties of software as experience by users

Examples of anti-regressive work:restructuring, rewriting, re-engineering, re-documentation, removing dead code orduplicates, refactoring, moving to components and/or higher level languages, etc, etc.

Basis for a dynamic model exploring role of increasing complexity

Progressive and Anti-regressive Activity

Page 6: A System Dynamics Model of Software Evolution [Paper]

15 May 2001 (c) All rights reserved. Juan F. Ramil 89c.lect2[charts]- 6 -

• Complexity seen as anti-regressive work deficit - a process metrics, becomes operationaldefinition of software complexity

• Some assumptions:

Total_effort (e.g. person-hours per month) = Progressive_effort + Anti_Regressive_effortAnti-Regressive Effort = Total Effort * Anti_Regressive_Work_Fraction

0 <= Anti_Regressive_Work_Fraction <= 1.0

• Insufficient anti-regressive work will lead to complexity increase

• Excessive anti-regressive work will lead to resource waste

• Optimum value for Anti_Regressive_Work_Fraction somewhere in-between

A system dynamic model to explore this issue followsIt is presented in a step-by-step fashion to demonstrate successive refinement

approach, see for example, Zurcher FW and Randell B, Iterative Multi-Level Modeling - AMethodology for Computer System Design, IBM Res. Div. Rep. RC-1938, Nov. 19678. Also in Proc. IFIP

Congress 1968, Edinburgh, Aug 5 - 10, 1968, pp D-138 - 142

A Model of Lehman’s 2nd law - Increasing Complexity

Page 7: A System Dynamics Model of Software Evolution [Paper]

15 May 2001 (c) All rights reserved. Juan F. Ramil 89c.lect2[charts]- 7 -

Base Model

Work WaitingImplementation

WorkImplemented

Exogenous work requests

Page 8: A System Dynamics Model of Software Evolution [Paper]

15 May 2001 (c) All rights reserved. Juan F. Ramil 89c.lect2[charts]- 8 -

First RefinementWork Waiting

CumulativeWork

Released

Implementation

WorkImplemented

Release

Exogenous work requests

RELEASE TIMING

<TIMESTEP>

USER CHANGEREACTION

DELAY

USER CHANGEREACTION

MULTIPLIER

Endogenous work requests

Endogenous work request = delay3(USER CHANGE REACTION MULTIPLIER *Release,USER CHANGEREACTION DELAY)Vensim provides several functions, such as delay3, to simulate dynamic effects. See reference manual for detailsThis equation is an starting point to model impact of the release work in the usage domain. It awaits empiricalvalidation - in the simulation results presented later, the actual value of Work_Waiting has no impact

Page 9: A System Dynamics Model of Software Evolution [Paper]

15 May 2001 (c) All rights reserved. Juan F. Ramil 89c.lect2[charts]- 9 -

Individual Productivity vs Team Size - A Proposed Formulation

Following Abdel-Hamid and Madnick: Productivity = Potential_Productivity*Communication_Losses

• In a group of size n, number of communication channels is n(n-1)/2

Assuming that the loss per communication link is constant impact on software development rate of team can be modelled, for example, by function that decreases as the size of the team increases:

Communication Losses in percent = {1-[k(n-1)n]/100} ~ [1- (k n2/100)]

where n is the team size (number of people in the team) and k is a suitable constant, obtained fromempirical data

Abdel-Hamid and Madnick, for example, have suggested that for a team of 30 people,50 percent of the effort is subsumed by communication activity and hence unavailable forsoftware development - this observations leads to k = 0.06

Communication Losses

Page 10: A System Dynamics Model of Software Evolution [Paper]

15 May 2001 (c) All rights reserved. Juan F. Ramil 89c.lect2[charts]- 10 -

Productivity vs Team Size - A Proposed Formulation

Productivity = Potential Productivity*Communication_Losses

• Many factors can be considered here - e.g. motivation, learning

Assuming that the gain in potential productivity due to synergy can be modelled, for example, by function that increases as the size of the team increases:

Synergy = {a + b(n/n+c)}

where n is the team size (number of people in the team) and a,b and c are suitably selected constants,obtained from empirical data

Potential Productivity

• We refer to Abdel-Hamid and Madnick’s book for detailed discussion

• Consider here only one aspect, the increase of individual productivity due to build-up of theexperience base as a team grows in size - we refer to it here as synergy

• Many factors can be considered here

Page 11: A System Dynamics Model of Software Evolution [Paper]

15 May 2001 (c) All rights reserved. Juan F. Ramil 89c.lect2[charts]- 11 -

Individual Productivity vs Team Size - A Proposed Formulation

Communication Losses

���������������������������

����������������������������

����������������������������

��������������

����������������������������

��������������

�����������������������������

���������������

�����������������������������

��������������

��������������

����������������������������

��������������

��������������

�����������������������������

������������������

Impact of Comunication Losses

0 10 20 30 40Prod

uctiv

ity o

f an

Indi

vidu

al T

eam

M

embe

r

Team Size

��������

��������

���������

���������

���������

����������������������

�������������

��������������������������������������������������

������������

������������������������

�������������������������

�������������������������

���������������

���

Impact of Synergy on Productivity

0 20 40Pr

oduc

tivity

of a

n In

divi

dual

Tea

m

Mem

ber

Team Size

Potential Productivity

����������

����������

���������������������������������������

������������������������������

������������������������������

���������������

�������������������������������

����������������

�������������������������������

���������������

���������������

�����������������������������

��������������

��������������

�����������������������������

���������������

������������������

���

Synergy and Communication LossesCombined Impact

0 10 20 30 40

Prod

uctiv

ity o

f an

Indi

vidu

al

Team

Mem

ber

Team Size

• Of course, one will need to be calibrate behaviour to real data - for the moment, an startingpoint

Combined Effect

• Behaviour is qualitatively as expected - quantitative detail will certainly vary from project toproject and organisation to organisation

Page 12: A System Dynamics Model of Software Evolution [Paper]

15 May 2001 (c) All rights reserved. Juan F. Ramil 89c.lect2[charts]- 12 -

Third Refinement

Productivity = NOMINAL PRODUCTIVITY * (0.67+(0.7*TEAM SIZE/ (TEAM SIZE + 0.7))) *max(0,1-(0.0006*TEAM SIZE*(TEAM SIZE-1)))

Implementation = Progressive Effort * Productivity

Progressive Effort = TEAM SIZE

Progressive effort Productivity

TEAM SIZE

Work Waiting

NOMINALPRODUCTIVITY

CumulativeWork

Released

Implementation

WorkImplemented

Release

Exogenous work requests

RELEASE TIMING

<TIMESTEP>

USER CHANGEREACTION

DELAY

USER CHANGEREACTION

MULTIPLIER

Endogenous work requests

Page 13: A System Dynamics Model of Software Evolution [Paper]

15 May 2001 (c) All rights reserved. Juan F. Ramil 89c.lect2[charts]- 13 -

Productivity vs Anti-Regressive Deficit - A Proposed Formulation

• f() defined using Vensim “Look Up Table” feature

• Of course, one would need to be calibrated to real data - for the moment, an starting point

• One may expect that productivity lossincreases as Anti_regressive_deficitgrows

Anti_regressive_deficit = Cumulative_Work_Implemented - Cumulative_Anti_regressive_Activity

Look Up Table

00.1

0.20.3

0.40.5

0.60.70.80.9

1

0 1000 2000 3000

Anti Regressive DeficitLo

ss in

Pro

duct

ivity

(per

c.)

Impact_on_Productivity

• What is the relationship between Productivity_loss and Anti_regressive_deficit?

• If Anti_regressive_deficit < 0 then Productivity_loss = 0 otherwise Productivity_loss = f(Anti_regressive_deficit)

Page 14: A System Dynamics Model of Software Evolution [Paper]

15 May 2001 (c) All rights reserved. Juan F. Ramil 89c.lect2[charts]- 14 -

Fourth Refinement

Productivity = NOMINAL PRODUCTIVITY *(0.67+(0.7*TEAM SIZE/ (TEAM SIZE + 0.7))) * MAX(0,1-(0.0006*TEAM SIZE*(TEAM SIZE-1)))*Productivity Loss

Progressive Effort = (TEAM SIZE-Anti regressive effort)

Anti regressive effort = TEAM SIZE*ANTI REGRESSIVE WORK FRACTION

ANTI REGRESSIVEWORK FRACTION

Progressive effort

Anti regressive effort

Productivity

TEAM SIZE

Cumulative Antiregressive Activity

Work Waiting

NOMINALPRODUCTIVITY

CumulativeWork

Released

Implementation

WorkImplemented

Cumulative WorkImplemented

Release

Exogenous work requests

RELEASE TIMING

Anti Regressive Deficit

Anti regressive work

Productivity Loss

Productivity Loss =f(Anti Regressive

Deficit)

<TIMESTEP>

USER CHANGEREACTION

DELAY

USER CHANGEREACTION

MULTIPLIER

Endogenous work requests

Page 15: A System Dynamics Model of Software Evolution [Paper]

15 May 2001 (c) All rights reserved. Juan F. Ramil 89c.lect2[charts]- 15 -

Example of Model Output

• Rate of functionality released to users- a possible indicator of evolution success- represented in model by Cumulative Fielded Functionality CMF

• Models enables to study effects of different allocation of resources, e.g.arwf 0 pc: no resources allocated to anti regressive workarwf 40 pc: 40 percent of resources allocated to anti regressive workarwf 60 pc: 60 percent of resources allocated to anti regressive work

• Exploring consequences of various values Anti_Regressive_Work_Fraction (arwf)

Page 16: A System Dynamics Model of Software Evolution [Paper]

15 May 2001 (c) All rights reserved. Juan F. Ramil 89c.lect2[charts]- 16 -

An Example of Model’s Output (cont.)• Anti_Regressive_Work_Fraction (arwf) = 40 percent provides largest growth after 200 months

Next step, model refinement to reflect higher level of process detail

• Simulation results support the convenience of an appropriate level of anti-regressive activity in a software process

• Anti_Regressive_Work_Fraction (arwf) = 0 percent maximises short-term behaviour

Graph for Cumulative Work Released

6,000

4,500

3,000

1,500

00 20 40 60 80 100 120 140 160 180 200

Time (Month)

Cumulative Work Released : arwf 0 pc Cumulative Module ChangesCumulative Work Released : arwf 60 pc Cumulative Module ChangesCumulative Work Released : arwf 40 pc Cumulative Module ChangesCumulative Work Released : arwf 20 pc Cumulative Module Changes

Page 17: A System Dynamics Model of Software Evolution [Paper]

15 May 2001 (c) All rights reserved. Juan F. Ramil 89c.lect2[charts]- 17 -

Further extended and refined model

Submision Flow

Preparationflow

ACCEPTEDTARGET

SYSTEM TYPEMULTIPLIER

Validation and Integration effortRELEASEPOLICY

CumulativeFielded

Functionality

Progressive effort

Acceptance FlowWork

Accepted

Other additions andchanges identified

PREPARATIONPRODUCTIVITY FACTOR

TEAM SIZE

Softwarerelease

Demand obsolescense

Implementationflow

RequirementChange flow

IN PROGRESSTARGET

Work Prepared forImplementation

Integration flow

VALIDATION ANDINTEGRATION

EFFORTMULTIPLIER

PREPARATION EFFORTMULTIPLIER

Work Readyto Release Work Implemented

Fielded FunctionalitySatisfying Current

Needs

NORMALPRODUCTIVITY

TIME STEP

Work Identified

FPROGRESSIVE

FRACTION

<Time>

ProductivityChange plus defect

discovery factor

Preparation effort

INTEGRATIONPRODUCTIVITY

FACTOR

In Progress

Page 18: A System Dynamics Model of Software Evolution [Paper]

15 May 2001 (c) All rights reserved. Juan F. Ramil 89c.lect2[charts]- 18 -

Further refinement

Anti regressive work

Submision Flow

PreparationFlow

ACCEPTEDTARGET

SYSTEM TYPEMULTIPLIER

Validation and Integration effortRELEASEPOLICY

CumulativeFielded

Functionality

Progressive effort

INTEGRATIONSUCCESSFACTOR

Acceptance FlowWork

Accepted

Anti regressive effort

Additions andChanges Identified

by Others

Rejected asneedingrework

PREPARATIONPRODUCTIVITY FACTOR

TEAM SIZE

Softwarerelease

Demand obsolescense

Implemented

RequirementChange flow

IN PROGRESSTARGET

Work Prepared forImplementation

Successfullyintegrated

VALIDATION ANDINTEGRATION

EFFORTMULTIPLIER

PREPARATION EFFORTMULTIPLIER

Work Readyto Release

Work Implemented

Cumulative AntiRegressive Work

Fielded FunctionalitySatisfying Current

Needs

NORMALPRODUCTIVITY

TIME STEP

Work Identified

FPROGRESSIVE

FRACTION

<Time>

Productivity

CumulativeProgressive

Work

Change plus defectdiscovery factor

Preparation effort

INTEGRATIONPRODUCTIVITY

FACTOR

In Progress

Page 19: A System Dynamics Model of Software Evolution [Paper]

15 May 2001 (c) All rights reserved. Juan F. Ramil 89c.lect2[charts]- 19 -

Some Modelling Tips

• Avoid, if and when possible, construction of very large models- large models involve risk of getting out of intellectual control

• One needs externally imposed discipline- identify sub-systems in the model- refine step-by-step as more detail needs to be reflected in model- achieve model realism with the smallest possible number of variables and relationships

• Quantification of soft factors - not straight forward- examples of soft factors: work pressure, motivation, knowledge, expertise- look for what has change or is likely to change - constant aspects can be in generalfactored out from the model

• Start data collection as soon as possible, making use of cheap, available records, first- data collection is expensive and must be well justified- modelling unprecedented situations and/or without reference modes is difficult

• Warning - Large differences in quantitative detail may be expected from process to processThus, a model must be calibrated to real data reflecting a particular software evolutionprocess before its use as policy assessment tool

Page 20: A System Dynamics Model of Software Evolution [Paper]

15 May 2001 (c) All rights reserved. Juan F. Ramil 89c.lect2[charts]- 20 -

Simulation, Process Improvement and Process Maturity Level

• Example: CMM - Capability Maturity Model, developed at SEI, CMU- considers level 1 - less mature- to level 5 - most mature processes

• Christie argues that simulation can play a role at any level

For further details see:Christie A, Simulation in Support of CMM-based Process Improvement, Journal of Systems and

Software, Vol. 46, Nos. 2/3, 1999, pp 107 - 112

• Process maturity- higher maturity presumes higher degree of repeatability, improved performance

Page 21: A System Dynamics Model of Software Evolution [Paper]

15 May 2001 (c) All rights reserved. Juan F. Ramil 89c.lect2[charts]- 21 -

Role of Process Modelling - a Caveat

• According to Tom DeMarco - in a recent presentation at Imperial College - these are someof the skills that a manager in a software organisation requires -note that most of themare people skills, such as

- hiring

- thanksgiving

- praising

- conflict resolution

- team work - in particular, works as a team with other managers

• Simulation models, metrics, estimation techniques offer only a tool- Barry Boehm recommends to rely on more than one model or tool- Our view is that use of process models should nor lead to a mechanistic view ofprocess neither diminish human role, but understand implications of policies,mitigate risks

- product and process management - e.g. simulation techniques