t. e. potok - university of tennessee cs 594 software engineering lecture 3 dr. thomas e. potok...

24
T. E. Potok - University of Tennessee CS 594 Software Engineering Lecture 3 Dr. Thomas E. Potok [email protected] 865-574-0834

Upload: marianna-wood

Post on 02-Jan-2016

215 views

Category:

Documents


2 download

TRANSCRIPT

Page 1: T. E. Potok - University of Tennessee CS 594 Software Engineering Lecture 3 Dr. Thomas E. Potok potokte@ornl.gov 865-574-0834

T. E. Potok - University of Tennessee

CS 594 Software Engineering

Lecture 3Dr. Thomas E. [email protected]

865-574-0834

Page 2: T. E. Potok - University of Tennessee CS 594 Software Engineering Lecture 3 Dr. Thomas E. Potok potokte@ornl.gov 865-574-0834

Software Engineering CS 594

T. E. Potok - University of Tennessee

2

Agenda

Review COCOMO PERT

Page 3: T. E. Potok - University of Tennessee CS 594 Software Engineering Lecture 3 Dr. Thomas E. Potok potokte@ornl.gov 865-574-0834

Software Engineering CS 594

T. E. Potok - University of Tennessee

3

AMI Update

200 jobs per day AMI has received a quote from

Acme Consulting of $40K to do the work in 2 months

Ballpark price range for AMI is $20-$30K.

Page 4: T. E. Potok - University of Tennessee CS 594 Software Engineering Lecture 3 Dr. Thomas E. Potok potokte@ornl.gov 865-574-0834

Software Engineering CS 594

T. E. Potok - University of Tennessee

4

Linear Regression

Where is an estimate of the mean of Y, and are numerical estimated of the parameters

Sample Regression Line

0

5

10

15

20

25

0 2 4 6 8 10 12

iii EY iY

Page 5: T. E. Potok - University of Tennessee CS 594 Software Engineering Lecture 3 Dr. Thomas E. Potok potokte@ornl.gov 865-574-0834

Software Engineering CS 594

T. E. Potok - University of Tennessee

5

Many early studies applied regression Data gathered from multiple

software project Log-linear relationship found

between project size and effort

Where PM are person-months, KLOC is thousands of lines of code

ln(PM) = ln() + ln(KLOC)+ .

Page 6: T. E. Potok - University of Tennessee CS 594 Software Engineering Lecture 3 Dr. Thomas E. Potok potokte@ornl.gov 865-574-0834

Software Engineering CS 594

T. E. Potok - University of Tennessee

6

Derivation

KLOCPM

KLOCePM

eePM

eePM

ee

KLOCPM

Y

EY

KLOC

KLOC

KLOCPM

iii

)ln(

)ln(

)ln()ln(

)ln()ln(

)ln()ln(

Page 7: T. E. Potok - University of Tennessee CS 594 Software Engineering Lecture 3 Dr. Thomas E. Potok potokte@ornl.gov 865-574-0834

Software Engineering CS 594

T. E. Potok - University of Tennessee

7

Typical Effort Vs Project Size Curve

Typical Log-linear Effort Curve

0

2000

4000

6000

8000

10000

12000

14000

0 100000 200000 300000 400000 500000 600000

Lines of code

Eff

ort

Page 8: T. E. Potok - University of Tennessee CS 594 Software Engineering Lecture 3 Dr. Thomas E. Potok potokte@ornl.gov 865-574-0834

Software Engineering CS 594

T. E. Potok - University of Tennessee

8

Constructive Cost Model (COCOMO) Developed by Barry Boehm Statistical model of software

development effort and time. Base on results from 63 projects

completed at TRW. Basic model is a log-linear regression

model that fits the 63 projects Productivity ranges:

– 20 - 1250 LOC/PM

Page 9: T. E. Potok - University of Tennessee CS 594 Software Engineering Lecture 3 Dr. Thomas E. Potok potokte@ornl.gov 865-574-0834

Software Engineering CS 594

T. E. Potok - University of Tennessee

9

Basic COCOMO

Organic - small to medium size, familiar projects– Person-months=2.4(KLOC)1.05

– Development-time = 2.5(PM).38

Semidetached - intermediate– Person-months=3.0(KLOC)1.12

– Development-time = 2.5(PM).35

Embedded - ambitious, tightly constrained– Person-months=3.6(KLOC)1.20

– Development-time = 2.5(PM).32

Page 10: T. E. Potok - University of Tennessee CS 594 Software Engineering Lecture 3 Dr. Thomas E. Potok potokte@ornl.gov 865-574-0834

Software Engineering CS 594

T. E. Potok - University of Tennessee

10

COCOMO ModelsCOCOMO Models

0

1000

2000

3000

4000

5000

6000

7000

0 100 200 300 400 500 600

Thousands of lines of code

Per

son

-mo

nth

s

Organic

Semidetached

Embedded

Page 11: T. E. Potok - University of Tennessee CS 594 Software Engineering Lecture 3 Dr. Thomas E. Potok potokte@ornl.gov 865-574-0834

Software Engineering CS 594

T. E. Potok - University of Tennessee

11

Cost Drivers

Product Attributes– Required Reliability– Database Size– Product Complexity

Computer Attributes– Execution Time Constraints – Main storage constraints– Virtual Machine Volatility– Computer turnaround time

Page 12: T. E. Potok - University of Tennessee CS 594 Software Engineering Lecture 3 Dr. Thomas E. Potok potokte@ornl.gov 865-574-0834

Software Engineering CS 594

T. E. Potok - University of Tennessee

12

More Cost Drivers

Personnel Attributes– Analyst Capability– Application Experience– Programmer Capability– Virtual Machine Experience– Programming Language Experience

Project Attributes– Modern Programming Practices– Use of Software Tools– Required Development Schedule

Page 13: T. E. Potok - University of Tennessee CS 594 Software Engineering Lecture 3 Dr. Thomas E. Potok potokte@ornl.gov 865-574-0834

Software Engineering CS 594

T. E. Potok - University of Tennessee

13

Example

Need to produce 10,000 LOC, 10 KLOC. Small project, familiar development Use organic model:

– Person-months=2.4(10)1.05 =26.9 Person-months– Development-time = 2.5(26.9).38 =8.7 Months– Average People = 26.9 PM/8.7 Months = 3 People

Linear model 3 people would take 16.5 months, at 50 person-months

Page 14: T. E. Potok - University of Tennessee CS 594 Software Engineering Lecture 3 Dr. Thomas E. Potok potokte@ornl.gov 865-574-0834

Software Engineering CS 594

T. E. Potok - University of Tennessee

14

Example

We also know that the design experience is low – Analyst, - 1.19– application, - 1.13– programmer experience is low. - 1.17

Yet the programming experience is high - .95 Adjustment factor 1.19*1.13*1.17*.95 = 1.49 PM = 26.9*1.49 = 40 Person-months Development time = 10.2 Months People = 3.9 People

Page 15: T. E. Potok - University of Tennessee CS 594 Software Engineering Lecture 3 Dr. Thomas E. Potok potokte@ornl.gov 865-574-0834

Software Engineering CS 594

T. E. Potok - University of Tennessee

15

Drawbacks

COCOMO has to be calibrated to your environment.

Very sensitive to change. – Over a person-year difference in a 10

KLOC project with minor adjustments Broad brush model that can

generate significant errors

Page 16: T. E. Potok - University of Tennessee CS 594 Software Engineering Lecture 3 Dr. Thomas E. Potok potokte@ornl.gov 865-574-0834

Software Engineering CS 594

T. E. Potok - University of Tennessee

16

COCOMO 2.0

Includes – COTS and reusable software– Degree of understanding of requirements and

architectures– Schedule constraints– Project size– Required reliability

Three Types of models– Application Composition - Prototyping or RAD– Early Design - Alternative evaluation– Post-architecture - Detailed estimates

Page 17: T. E. Potok - University of Tennessee CS 594 Software Engineering Lecture 3 Dr. Thomas E. Potok potokte@ornl.gov 865-574-0834

Software Engineering CS 594

T. E. Potok - University of Tennessee

17

COCOMO Summary

Quick and easy to use Provides a reasonable estimate Needs to be calibrated Results must be treated as ball

park values unless substantial validation has been performed.

Page 18: T. E. Potok - University of Tennessee CS 594 Software Engineering Lecture 3 Dr. Thomas E. Potok potokte@ornl.gov 865-574-0834

Software Engineering CS 594

T. E. Potok - University of Tennessee

18

PERT

Project Evaluation and Review Technique– Developed for the Navy Polaris

Missile Program– Directed Acyclic Graphs of project

activities– Used for estimation and control of a

project

Page 19: T. E. Potok - University of Tennessee CS 594 Software Engineering Lecture 3 Dr. Thomas E. Potok potokte@ornl.gov 865-574-0834

Software Engineering CS 594

T. E. Potok - University of Tennessee

19

Example

Start project Gather requirements Document

requirements Create design Document design Review design Create code Document code

Define test cases Test code Demonstrate Finish project

To create our 10K program we need the following activities

Page 20: T. E. Potok - University of Tennessee CS 594 Software Engineering Lecture 3 Dr. Thomas E. Potok potokte@ornl.gov 865-574-0834

Software Engineering CS 594

T. E. Potok - University of Tennessee

20

PERT Example

Start Req Design Review Code Test Demo Finish

DocReq

DocDesign

DocCode

TestCase

Page 21: T. E. Potok - University of Tennessee CS 594 Software Engineering Lecture 3 Dr. Thomas E. Potok potokte@ornl.gov 865-574-0834

Software Engineering CS 594

T. E. Potok - University of Tennessee

21

Duration Estimates

Tasks Minimum Average Maximum Critical PathStart project 0 0 0 YGather requirements 3 5 7 YDocument requirements 2 3 5 NCreate design 5 9 13 YDocument design 2 3 5 NReview design 1 2 3 YCreate code 7 12 20 YDocument code 2 4 7 NDefine test cases 3 5 8 NTest code 5 7 12 YDemonstrate 1 2 3 YFinish project 0 0 0 Y

Page 22: T. E. Potok - University of Tennessee CS 594 Software Engineering Lecture 3 Dr. Thomas E. Potok potokte@ornl.gov 865-574-0834

Software Engineering CS 594

T. E. Potok - University of Tennessee

22

Critical Path Estimate

Tasks Minimum Average Maximum Critical PathStart project 0 0 0 YGather requirements 3 5 7 YCreate design 5 9 13 YReview design 1 2 3 YCreate code 7 12 20 YTest code 5 7 12 YDemonstrate 1 2 3 YFinish project 0 0 0 YTotal 22 37 58

Page 23: T. E. Potok - University of Tennessee CS 594 Software Engineering Lecture 3 Dr. Thomas E. Potok potokte@ornl.gov 865-574-0834

Software Engineering CS 594

T. E. Potok - University of Tennessee

23

Completion Probability

Triangular Distribution

0.000

0.010

0.020

0.030

0.040

0.050

0.060

20 25 30 35 40 45 50 55 60

Duration

Pro

bab

ility

Probability

Page 24: T. E. Potok - University of Tennessee CS 594 Software Engineering Lecture 3 Dr. Thomas E. Potok potokte@ornl.gov 865-574-0834

Software Engineering CS 594

T. E. Potok - University of Tennessee

24

Cumulative Completion Probability

Triangular Distribution

0.000

0.100

0.200

0.300

0.400

0.500

0.600

0.700

0.800

0.900

1.000

20 25 30 35 40 45 50 55 60

Duration

Cu

mu

lati

ve P

rob

abil

ity

Cumulative Probability

80% Probability ofCompletion in 46 days