You are on page 1of 26

LECTURE -11

SOFTWARE ENGINEERING
SOFTWARE COST ESTIMATION

1
HALSTEAD'S SOFTWARE SCIENCE

An analytical technique to estimate:


o size,
o development effort,
o development time.

Halstead used a few primitive program parameters


o number of operators and operands

Derived expressions for:


o over all program length,
o potential minimum volume
o actual volume, language level, effort, and
o development time.

2
HALSTEAD'S SOFTWARE SCIENCE

List of Operators in ANCI C:


o ≤ ,≥ ,() ,[], ; , != , &&, | , *, CASE, INT, Scanf, Printf, If , Goto, Continue,
While
Operands are those variable and constants used in conjunction with
operators in Expression.
Example : in Following program segment
Int func ( int a, int b)
{ ……..
a= &b
}
Operators : {}, () are operators. ‘int’ ‘func’ ‘a’ ‘b’ are not
operaneds/operators as they are part of function definition. However,
‘func’ ‘,’ ‘;’ are considered as operators if there is function call
statement func(a,b); in the program segment. ‘a’ ‘b’ are considered as
operands.
3
HALSTEAD'S SOFTWARE SCIENCE

Length of Program :
o Let ƞ1 and ƞ2 be number of unique operators and operands used in programs.
o Let N1 and N2 be total number of operators and operands used in the program.
o The length of a Program is defined as total usage of operators and operends.
Length of program (L) = N1 + N2
Program vocabulary is number of unique operators and operends.
o Program Vocabulary (ƞ) = ƞ1 + ƞ2

Program Volume
Length of a program depends on the choice of the operators and operands,
therefore, for the same programming problem, the length and volume would depend
on the programming style.
Program Volume (V) = N log2(ƞ)

Potential Minimum Volume


PMV ( V* ) is defined as most succinct program in which a problem can be coded.
If an algorithm operates om input and out data d1, d2 , d3 ..dn, the most succinct
program would be f(d1, d2 , d3 ..dn) ; for which ƞ1 = 2, ƞ2 = ƞ
4
Therefore V* = ( 2 + ƞ2 ) log2(2 + ƞ2 )
HALSTEAD'S SOFTWARE SCIENCE

Program Level (L):


The level of the program is defined as a measure of abstraction provided by the programing
language.
Program Level (L) = V* / V
This implies that higher the level of language, less efforts it takes to develop a program in that
language.

Efforts ( required to develop a program (E))


This can be obtained by dividing the program volume with level of programming language. Thus
, the effort E represent volume of mental discrimination used to develop a program.
E = V/L = V2/V
The programmers’ time (T) is defined as T = E/S, where S represents speed of mental
discriminations. Usually for a normal programmer its recommended value is 18.

5
HALSTEAD'S SOFTWARE SCIENCE

Length Estimation :
o The length of a program can be calculated by counting the number of total
number of operators and operands. However, the Length can be estimated on the
basis of number of unique operators and operends.
The Estimated Length of a Program (N) = ƞ1 log2(ƞ1 ) + ƞ2 log2(ƞ2 )

6
STAFFING LEVEL ESTIMATION
Number of personnel required during any development project:
 not constant.
Norden in 1958 analyzed many R&D projects, and observed:

 Rayleigh curve represents the number of full-time personnel required at any time.

E = K/ td2 x t x e ˄(-t2 /2td2)

Where E = Effort required at time t ( Indication of no of developers)


K = K is area of Curve
td = time when curve attains it maximum vaule

This is applicable to only R & D projects/

7
RAYLEIGH CURVE

Rayleigh curve is Rayleigh Curve


specified by two
parameters: Effort
 td the time at which
the curve reaches its
maximum
td
 K the total area under
Time
the curve.
L=f(K, td)

8
PUTNAM’S MODEL ( FOR STAFFING ESTIMATION)
In 1976, Putnam studied the problem of staffing of software projects:
 observed that the level of effort required in software development efforts has a
similar envelope.
 found that the Rayleigh-Norden curve
 relates the number of delivered lines of code to effort and development time.

Putnam analysed a large number of army projects, and derived the


expression:

L=Ck K 1/3 td4/3

o K is the effort expended (in Person Month) and L is the size in KLOC.
o td is the time to develop the software.
o Ck is the state of technology constant
o reflects factors that affect programmer productivity

9
PUTNAM’S WORK
o Ck=2 for poor development environment
o no methodology, poor documentation, and review, etc.
o Ck=8 for good software development environment
o software engineering principles used
o Ck=11 for an excellent environment

10
RAYLEIGH CURVE
Very small number of engineers are needed at the beginning of a project
 carry out planning and specification.
As the project progresses:
 more detailed work is required,
 number of engineers slowly increases and reaches a peak.
Putnam observed that:
 the time at which the Rayleigh curve reaches its maximum value
 corresponds to system testing and product release.
 After system testing,
 the number of project staff falls till product installation and delivery
From the Rayleigh curve observe that:
o approximately 40% of the area under the Rayleigh curve is to the left of td
o and 60% to the right.

11
EFFECT OF SCHEDULE CHANGE ON COST

Using the Putnam's expression for L,


K=L3/ (Ck3 td4 )

Or, K=C /td4

For the same product size, C =L3/Ck3 is a constant.


Therefore , K1/K2 = td24/td14

12
EFFECT OF SCHEDULE CHANGE ON COST

Observe:
 a relatively small compression in delivery schedule
 can result in substantial penalty on human effort.
Also, observe:
 benefits can be gained by using fewer people over a somewhat longer time span.

:Example :
If the estimated development time is 1 year, then in order to develop the product in 6
months,
Compute the effects on Cost of development ?

13
EFFECT OF SCHEDULE CHANGE ON COST
If the estimated development time is 1 year, then in order to develop the product in 6
months,
 the total effort and hence the cost increases 16 times.
 In other words, the relationship between effort and the chronological delivery time
is highly nonlinear

Putnam model indicates extreme penalty for schedule compression


 and extreme reward for expanding the schedule.
Putnam estimation model works reasonably well for very large systems,
 but seriously overestimates the effort for medium and small systems.
Boehm observed:
 “There is a limit beyond which the schedule of a software project cannot be
reduced by buying any more personnel or equipment.”
 This limit occurs roughly at 75% of the nominal time estimate.

14
EFFECT OF SCHEDULE CHANGE ON COST

Q If a project manager accepts a customer demand to compress the development


time by more than 25%

Compute the feasibility of the project with respect to Cost Escalation ?

15
EFFECT OF SCHEDULE CHANGE ON COST

Q If a project manager accepts a customer demand to compress the development


time by more than 25%

 very unlikely to succeed.


 every project has only a limited amount of parallel activities
 sequential activities cannot be speeded up by hiring any number of additional
engineers.
 many engineers have to sit idle.

16
JENSEN MODEL
Jensen model is very similar to Putnam model.
 attempts to soften the effect of schedule compression on effort
 makes it applicable to smaller and medium sized projects.
Jensen proposed the equation:

L=Cte td K1/2
 Where,
 Cte is the effective technology constant,
 td is the time to develop the software, and
 K is the effort needed to develop the software.
Effect of Compression as per Jensen’s Model

K1/K2 = td22/td12

17
EFFECT OF SCHEDULE CHANGE ON COST

Q If a project manager accepts a customer demand to compress the development


time by 50%

Compute the feasibility of the project with respect to Cost Escalation using
Putnam and Jensen work. ?
What if the project is of R&D ( Putnam Estimation ) ?

18
ORGANIZATION STRUCTURE
Functional Organization:
 Engineers are organized into functional groups, e.g.
 specification, design, coding, testing, maintenance, etc.
 Engineers from functional groups get assigned to different projects
Advantages of Functional Organization
o Specialization
o Ease of staffing
o Good documentation is produced
o different phases are carried out by different teams of engineers.
o Helps identify errors earlier.
Project Organization
Engineers get assigned to a project for the entire duration of the project
 Same set of engineers carry out all the phases
Advantages:
 Engineers save time on learning details of every project.
 Leads to job rotation 19
TEAM STRUCTURE
Problems of different complexities and sizes require different
team structures:
 Chief-programmer team
 Democratic team
 Mixed organization

20
DEMOCRATIC TEAMS
Suitable for:
 small projects requiring less than five or six engineers
 research-oriented projects
A manager provides administrative leadership:
 at different times different members of the group provide technical leadership.
Democratic organization provides
 higher morale and job satisfaction to the engineers
 therefore leads to less employee turnover.
Suitable for less understood problems,
 a group of engineers can invent better solutions than a single individual
Disadvantage of Democratic Teams
 team members may waste a lot time arguing about trivial points:
 absence of any authority in the team

21
CHIEF PROGRAMMER TEAM
A senior engineer provides technical leadership:
 partitions the task among the team members.
 verifies and integrates the products developed by the
members.
Works well when
 the task is well understood
 also within the intellectual grasp of a single individual,
 importance of early completion outweighs other factors
 team morale, personal development, etc.
Chief programmer team is subject to single point failure:
 too much responsibility and authority is assigned to the chief
programmer.

22
MIXED CONTROL TEAM ORGANIZATION
Draws upon ideas from both:
 democratic organization and
 chief-programmer team organization.
Communication is limited
 to a small group that is most likely to benefit from it.
Suitable for large organizations.

23
TEAM ORGANIZATION

Democratic Team
Chief Programmer team

24
MIXED TEAM ORGANIZATION

25
26

You might also like