Martin Hoffman Monica Hoffman. Goal To determine if a correlation exists between specified internal and dependability (external) metrics.

Slides:



Advertisements
Similar presentations
Path Analysis Why path analysis for test case design?
Advertisements

1 Ivan Marsic Rutgers University LECTURE 15: Software Complexity Metrics.
INTRODUCTION TO PROGRAMMING
 2005 Pearson Education, Inc. All rights reserved Introduction.
Introduction to C Programming
Learning Objectives Explain similarities and differences among algorithms, programs, and heuristic solutions List the five essential properties of an algorithm.
CMSC 345, Version 11/07 SD Vick from S. Mitchell Software Testing.
Metrics Project and Process Metrics. Why do we measure? Assessing project status Allows us to track risks Before they go critical Adjust workflow See.
© Copyright 1992–2005 by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved. Tutorial 4 – Introducing Algorithms, Pseudocode and.
Software Testing and Quality Assurance
 2007 Pearson Education, Inc. All rights reserved Introduction to C Programming.
Data types and variables
Chapter 2 Data Types, Declarations, and Displays
Introduction to C Programming
1 Software Testing and Quality Assurance Lecture 5 - Software Testing Techniques.
3. Software product quality metrics The quality of a product: -the “totality of characteristics that bear on its ability to satisfy stated or implied needs”.
Uncertainty in Measurement
Fundamentals of Python: From First Programs Through Data Structures
1 The Relationship of Cyclomatic Complexity, Essential Complexity and Error Rates Mike Chapman and Dan Solomon
Cyclomatic Complexity Dan Fleck Fall 2009 Dan Fleck Fall 2009.
ECE355 Fall 2004Software Reliability1 ECE-355 Tutorial Jie Lian.
University of Toronto Department of Computer Science © 2001, Steve Easterbrook CSC444 Lec22 1 Lecture 22: Software Measurement Basics of software measurement.
Objectives You should be able to describe: Data Types
IB Chemistry Chapter 11, Measurement & Data Processing Mr. Pruett
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 2: Introduction to C++ Starting Out with C++ Early Objects Seventh.
Testing. Definition From the dictionary- the means by which the presence, quality, or genuineness of anything is determined; a means of trial. For software.
Cmpe 589 Spring Software Quality Metrics Product  product attributes –Size, complexity, design features, performance, quality level Process  Used.
CSC 201 Analysis and Design of Algorithms Lecture 03: Introduction to a CSC 201 Analysis and Design of Algorithms Lecture 03: Introduction to a lgorithms.
©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 20 Slide 1 Defect testing l Testing programs to establish the presence of system defects.
Chapter 9 Designing Databases Modern Systems Analysis and Design Sixth Edition Jeffrey A. Hoffer Joey F. George Joseph S. Valacich.
© Copyright 1992–2005 by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved. Tutorial 4 – Wage Calculator Application: Introducing.
D-1 University of Washington Computer Programming I Lecture 4: Arithmetic Expressions © 2000 UW CSE.
Copyright © 2009 Pearson Education, Inc. Publishing as Pearson Addison-Wesley STARTING OUT WITH Python Python First Edition by Tony Gaddis Chapter 2 Input,
Software Engineering 2003 Jyrki Nummenmaa 1 SOFTWARE PRODUCT QUALITY Today: - Software quality - Quality Components - ”Good” software properties.
By: TARUN MEHROTRA 12MCMB11.  More time is spent maintaining existing software than in developing new code.  Resources in M=3*(Resources in D)  Metrics.
Product Metrics An overview. What are metrics? “ A quantitative measure of the degree to which a system, component, or process possesses a given attribute.”
Software Metrics Software Engineering.
OHTO -99 SOFTWARE ENGINEERING “SOFTWARE PRODUCT QUALITY” Today: - Software quality - Quality Components - ”Good” software properties.
Software Metrics (Part II). Product Metrics  Product metrics are generally concerned with the structure of the source code (example LOC).  Product metrics.
© Copyright 1992–2004 by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved. Chapter 2 Chapter 2 - Introduction to C Programming.
Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Slide 9- 1 Homework, Page 786 Evaluate the expression by hand, then check.
Copyright © 2012 Pearson Education, Inc. Publishing as Pearson Addison-Wesley C H A P T E R 2 Input, Processing, and Output.
Software Metrics Cmpe 550 Fall Software Metrics.
Software Engineering 2004 Jyrki Nummenmaa 1 SOFTWARE PRODUCT QUALITY Today: - Software quality - Quality Components - ”Good” software properties.
The Binomial Distribution
Software Engineering – University of Tampere, CS DepartmentJyrki Nummenmaa SOFTWARE PRODUCT QUALITY Today: - Software quality -
1 7.3 RANDOM VARIABLES When the variables in question are quantitative, they are known as random variables. A random variable, X, is a quantitative variable.
D-1 University of Washington Computer Programming I Lecture 4: Arithmetic Expressions © 2000 UW CSE.
ALGORITHMS AND FLOWCHARTS. Why Algorithm is needed? 2 Computer Program ? Set of instructions to perform some specific task Is Program itself a Software.
Copyright © 2011 by The McGraw-Hill Companies, Inc. All rights reserved. McGraw-Hill/Irwin Chapter 5 Discrete Random Variables.
CS223: Software Engineering Lecture 21: Unit Testing Metric.
White Box Testing. Agenda White-box vs Black-box Program Flow Controls White-box Test Methods Exercises Complexity Q&A.
Testing Integral part of the software development process.
Lecture 1 Gunjeet kaur Dronacharya group of institutions.
Static Software Metrics Tool
Introduction to Algorithms
PROGRAMMING THE BASIC COMPUTER
Software Metrics 1.
ALGORITHMS AND FLOWCHARTS
Chapter 13 & 14 Software Testing Strategies and Techniques
Lecture 17 Software Metrics
Cyclomatic Complexity
Assembler CASE Tool.
Halstead software science measures and other metrics for source code
Cyclomatic Complexity
Asst. Dr.Surasak Mungsing
Software Engineering Lecture #35
Introduction to Algorithms
Software Testing “If you can’t test it, you can’t design it”
Chapter 13 & 14 Software Testing Strategies and Techniques 1 Software Engineering: A Practitioner’s Approach, 6th edition by Roger S. Pressman.
Presentation transcript:

Martin Hoffman Monica Hoffman

Goal To determine if a correlation exists between specified internal and dependability (external) metrics.

The Experiment UVa Online Judge Informal specifications in natural language Results of Online Judge were not used 59 specifications were selected

Sample Specification Problem E - Ones Given any integer 0 <= n <= not divisible by 2 or 5, some multiple of n is a number which in decimal notation is a sequence of 1's. How many digits are in the smallest such a multiple of n? Time limit – seconds Sample input Output for sample input

Selection of Programs Programs must compile and run within predetermined time and memory resources Programs written in C/C++ Must succeed for at least one demand Only the first successful submission of each author was used Program size smaller than 40kB No lookup tables allowed 71,917 submissions (avg.1219 per specification)

Internal Metrics Lines of Code (LOC) Number of comment lines Halstead Volume Describes the size of the implementation. V = N * log2(n) N is the total number of operators and operands n is the total number of unique operators and operands McCabe’s Cyclomatic Complexity (CC) Measures complexity based on program paths. M = N+1 where N is the number of binary decisions. Three way decisions count as 2 binary decisions N-way case statements count as n-1 binary decisions

Dependability Metrics Number of defects (D) D = 0 for the correct submission D = 1 for the penultimate submission There afterwards, each prior submission which displays a different behavior from the one after it increases D by 1. Probability of Failure on Demand (PFD) For some specifications a complete test was used where possible. For the remaining specifications, part of the demand space was tested completely or a random test was performed. # of demands = 2,500 or 10,000 for all specifications PFD = fraction of demands which program fails.

Correlations Correlation between internal software metrics were derived for each of 59 specifications.

Correlation Histograms

Findings Strong correlations CC vs. LOC (mean=0.78) Halstead Volume vs. CC (mean =0.75) Halstead Volume vs. LOC (mean =0.82)

Density Plots

Findings (cont.) Strong relationship between LOC and Volume/CC Mean Volume vs. mean LOC (correlation = 0.97) Mean CC vs. mean LOC (correlation = 0.95) Formulas to determine mean Volume = 45 x LOC – 428 CC = 0.22 x LOC Informally, every five lines of C/C++ code contains a branch

Findings (cont.) Internal software metrics of incorrect vs. correct programs Lines of Code On average, no difference Comment lines Correct programs have an average of 10% more comments Halstead Volume On average, no difference Cyclomatic Complexity On average, no difference

Findings (cont.) Correlations between internal metrics and dependability metrics Lines of Code Correlation between LOC and number of defects and probability of failure on demand (PFD) is close to zero Number of comment lines Correlation between number of comment lines and number of defects and (PFD) is close to zero Cyclomatic Complexity and Halstead Volume No correlation between these and number of defects or PFD (Probability of Failure on Demand)

Disagreements Ambiguities Histograms labels were unclear. Lacked a clear definition of a specification/demand. Definition of a defect in the dependability metrics. Size of programs (< 1000 LOC) Definition of LOC

References M. van der Meulen and M. A. Revilla. Correlations between Internal Software Metrics and Software Dependability in a Large population of Small C/C++ Programs.  2007 S.H. Kan. Metrics and Models in Software Quality Engineering, Second Edition. Pearson Education, Inc Pages