Software Metrics II Speaker: Jerry Gao Ph.D. San Jose State University URL: Sept., 2001.

Slides:



Advertisements
Similar presentations
These courseware materials are to be used in conjunction with Software Engineering: A Practitioners Approach, 6/e and are provided with permission by R.S.
Advertisements

Software Engineering Metrics for specification Quality Metrics are used to access the quality of the analysis model n r =n f +n nf WHERE n r= Total No.
Requirements Engineering n Elicit requirements from customer  Information and control needs, product function and behavior, overall product performance,
Software Configuration Management Speaker: Jerry Gao Ph.D. San Jose State University URL:
Software Quality Metrics
Software Engineering II - Topic: Software Process Metrics and Project Metrics Instructor: Dr. Jerry Gao San Jose State University
A GOAL-BASED FRAMEWORK FOR SOFTWARE MEASUREMENT
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided with permission by.
1 These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 5/e and are provided with permission by.
Technical Metrics for Software Chapter 18. Chapter Assistance -- Michael Jager January 9, Chapter Outline D Software Quality D A Framework.
System Engineering Instructor: Dr. Jerry Gao. System Engineering Jerry Gao, Ph.D. Jan System Engineering Hierarchy - System Modeling - Information.
Software Process and Product Metrics
Introduction to Software Testing
1 Software Testing Techniques CIS 375 Bruce R. Maxim UM-Dearborn.
Chapter 15 Software Product Metrics
Software Engineering Laboratory, Department of Computer Science, Graduate School of Information Science and Technology, Osaka University 1 Refactoring.
1 Software Quality CIS 375 Bruce R. Maxim UM-Dearborn.
Chapter 6 : Software Metrics
1 These slides are designed to accompany Software Engineering: A Practitioner’s Approach, 7/e (McGraw-Hill 2009). Slides copyright 2009 by Roger Pressman.
SOFTWARE DESIGN.
Software Measurement & Metrics
1. Software Metric- A definition 2. Types of Software metrics 3. Frame work of product metrics 4. Product metrics.
1 Software Engineering: A Practitioner’s Approach, 6/e Chapter 15b: Product Metrics for Software Software Engineering: A Practitioner’s Approach, 6/e Chapter.
Product Metrics An overview. What are metrics? “ A quantitative measure of the degree to which a system, component, or process possesses a given attribute.”
Version control – Project repository, version management capability, make facility, issue/bug tracking Change control Configuration audit – compliments.
1 Chapter 15 Product Metrics for Software Software Engineering: A Practitioner’s Approach, 6th edition by Roger S. Pressman.
1 ECE 453 – CS 447 – SE 465 Software Testing & Quality Assurance Lecture 23 Instructor Paulo Alencar.
Software Metrics (Part II). Product Metrics  Product metrics are generally concerned with the structure of the source code (example LOC).  Product metrics.
Software Quality Metrics
Lecture 4 Software Metrics
1 Introduction to Software Engineering Lecture 1.
Chapter 12: Design Phase n 12.1 Design and Abstraction n 12.2 Action-Oriented Design n 12.3 Data Flow Analysis n Data Flow Analysis Example n
Design Concepts and Principles Instructor: Dr. Jerry Gao.
1 COSC 4406 Software Engineering COSC 4406 Software Engineering Haibin Zhu, Ph.D. Dept. of Computer Science and mathematics, Nipissing University, 100.
Software Metrics.
Measurement and quality assessment Framework for product metrics – Measure, measurement, and metrics – Formulation, collection, analysis, interpretation,
Software Maintenance Speaker: Jerry Gao Ph.D. San Jose State University URL: Sept., 2001.
© 2006 Pearson Addison-Wesley. All rights reserved 2-1 Chapter 2 Principles of Programming & Software Engineering.
1 Software Engineering: A Practitioner’s Approach, 6/e Chapter 15a: Product Metrics for Software Software Engineering: A Practitioner’s Approach, 6/e Chapter.
1 These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 5/e and are provided with permission by.
West Virginia University Sherif Yacoub, Hany H. Ammar, and Ali Mili A UML Model for Analyzing Software Quality Sherif Yacoub, Hany H. Ammar, and Ali Mili.
Hussein Alhashimi. “If you can’t measure it, you can’t manage it” Tom DeMarco,
Software Measurement: A Necessary Scientific Basis By Norman Fenton Presented by Siv Hilde Houmb Friday 1 November.
Metrics "A science is as mature as its measurement tools."
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided with permission by.
Chapter : 23 Product Metrics. A Framework For Product Metrics Measure, Metric, And Indicator A measure provides an indication of the extent, amount, dimension,
Architectural Complexity  A useful technique for assessing the overall complexity of a proposed architecture is to consider dependencies between components.
DESIGN PROCESS AND CONCEPTS. Design process s/w design is an iterative process through which requirements are translated into a “blueprint” for constructing.
SOFTWARE DESIGN & SOFTWARE ENGINEERING Software design is a process in which data, program structure, interface and their details are represented by well.
Software Configuration Management
Software Metrics 1.
Design Characteristics and Metrics
Halstead’s software science: An analystical model
Lecture 15: Technical Metrics
Lecture 9- Design Concepts and Principles
For University Use Only
Chapter 30 Product Metrics
Introduction to Software Testing
Halstead software science measures and other metrics for source code
Lecture 9- Design Concepts and Principles
Software Test Automation and Tools
Presented by Trey Brumley and Ryan Carter
Chapter 19 Technical Metrics for Software
Metrics for process and Projects
Software Engineering: A Practitioner’s Approach, 6/e Chapter 15 Product Metrics for Software copyright © 1996, 2001, 2005 R.S. Pressman & Associates,
6. Software Metrics.
Coupling Interaction: It occurs due to methods of a class invoking methods of other classes. Component Coupling: refers to interaction between two classes.
Chapter 8: Design: Characteristics and Metrics
Presentation transcript:

Software Metrics II Speaker: Jerry Gao Ph.D. San Jose State University URL: Sept., 2001

Topic: Software Metrics II - Technical Metrics for Software - Software Measurement and Technical Software Metrics - Software Quality Metrics - Metrics for the Analysis Model - Metrics for the Design Model - Metrics for Source Code - Metrics for Testing - Metrics for Maintenance Jerry Gao Ph.D.9/2001 Presentation Outline All Rights Reserved

Jerry Gao Ph.D.9/2001 Overview of Software Technical Metrics Topic: Software Metrics II - Technical Metrics for Software Technical metrics help software engineers gain insight into the design and construction of the product they build. Objectives of technical metrics: - assist in the evaluation of the analysis and design models - provide an indication of the complexity of procedural design & coding - facilitate the design of more effective testing Technical metrics provide a basis from which analysis, design, coding, and testing can be assessed and evaluated objectively in an quantitative way. Who use it? Software Engineers What are the steps? - Derive software measures and metrics - Collect required data - Compute and analysis based on the guidelines and rules - Gain insights from the results interpretation - Recommendation and feedback

Jerry Gao Ph.D.9/2001 Measurement Process Activities Topic: Software Metrics II - Technical Metrics for Software A measurement process can be characterized by five activities: - Formulation: The derivation of software resources and metrics that are appropriate for the representation of the software. - Collection: The mechanism used to accumulate data required to derive the formulated metrics. - Analysis: The computation of metrics and the application of mathematical tools. - Interpretation: the evaluation of metrics results in an effort to gain insight into the quality of the representation. - Feedback: Recommendation derived from the interpretation.

Jerry Gao Ph.D.9/2001 Measurement Principles Topic: Software Metrics II - Technical Metrics for Software The formulation principles: - Set up measurement objectives before data collection. - Define technical metrics in an unambiguous manner. - Derive metrics based on a theory that is valid for the domain of application. - Modify metrics to best accommodate specific products and processes. Collection and analysis principles: - Whenever possible, data collection and analysis should be automated. - Valid statistical techniques should be applied to establish relationships between internal product attributes and external quality features. - Interpretative guidelines and recommendations should be established for each metric.

Jerry Gao Ph.D.9/2001 The Attributes of Effective Software Metrics Topic: Software Metrics II - Technical Metrics for Software Basic rules: - Easy to understand and practical. - Not to be too complex and esoteric. Basic attributes: - Simple and computable - Empirically and intuitively persuasive - Consistent and objectives - Consistent in its use of units and dimensions - Programming language independent - An effective mechanism for high-quality feedback

Jerry Gao Ph.D.9/2001 Metrics for Software Quality Topic: Software Metrics II - Technical Metrics for Software

Jerry Gao Ph.D.9/2001 Metrics for the Analysis Model Topic: Software Metrics II - Technical Metrics for Software

Jerry Gao Ph.D.9/2001 Metrics for the Design Model - Architecture Design Metrics Topic: Software Metrics II - Technical Metrics for Software Architectural design metrics focus on characteristics of the program architecture with an emphasis on the architectural structure and the effectiveness of modules. These are black-box based metrics, and detailed structures about components are needed. Card and Glass define three software design complexity measures: structural complexity, data complexity, and system complexity Structural complexity: S(i) = f 2 out (i) where f out (i) is the fan-out of module i Data complexity: D(i) = V(i) / [ f out (i) + 1] where V(I) is the number of input and output variables that are passed to and from module i. System complexity: C(i) = S(i) + D(i)

Jerry Gao Ph.D.9/2001 Metrics for The Design Model - Morphology Metrics Topic: Software Metrics II - Technical Metrics for Software a cbed fg h klji qrpnm Node Arc width depth

Jerry Gao Ph.D.9/2001 Metrics for the Design Model - Architecture Design Metrics Topic: Software Metrics II - Technical Metrics for Software Fenton suggests a number of simple morphology metrics that enable different program architectures to be compared using a set of straightforward dimensions. Size = n + a where n is the number of nodes and a is the number of arcs. For the architecture shown in Figure Size = = 35 Depth = the longest path from the root to a leaf node. Example in Figure 19.5, depth = 4. Width = maximum number of nodes at any one level of the architecture. Example in Figure 19.5, width = 6.

Jerry Gao Ph.D.9/2001 Metrics for the Design Model - Component-Level Design Metrics Topic: Software Metrics II - Technical Metrics for Software Component-level design metrics focus on internal characteristics of a software component and include measures of the “three Cs” (a) module cohesion, (b) coupling, and (c ) complexity These metrics require knowledge of the internal working of the components. Cohesion metrics: (define 5 concepts and measures) - To determine the cohesiveness of a module in terms of data and functions Coupling metrics: - To measure the connectivity between modules - To measure the coupling of a module to global data & environment Complexity metrics: - To determine the complexity of program control flow

Jerry Gao Ph.D.9/2001 Metrics for the Design Model - Component-Level Design Metrics Topic: Software Metrics II - Technical Metrics for Software Coupling metrics: For data and control flow coupling: d i = number of input data parameters c j = number of input control parameters d 0 = number of output data parameters c 0 = number of output control parameters For global coupling: g d = number of global variables used as data g c = number of global variables used as control For environment coupling: w = number of modules called (fan-out) r = number of modules calling the module under consideration (fan-in) Mc = K/Mwhere K =1, M = d i + (a * C j ) + d 0 + (b* c 0 ) + g d + (c * g c ) + w +r

Jerry Gao Ph.D.9/2001 Metrics for the Design Model - Architecture Design Metrics Topic: Software Metrics II - Technical Metrics for Software Fenton suggests a number of simple morphology metrics that enable different program architectures to be compared using a set of straightforward dimensions. Size = n + a where n is the number of nodes and a is the number of arcs. For the architecture shown in Figure Size = = 35 Depth = the longest path from the root to a leaf node. Example in Figure 19.5, depth = 4. Width = maximum number of nodes at any one level of the architecture. Example in Figure 19.5, width = 6.

Jerry Gao Ph.D.9/2001 Metrics for Source Code Topic: Software Metrics II - Technical Metrics for Software Halstead’s theory of software science is one of the best known software metrics for software source code. It proposed the first analytical “laws” for software. Software science assigns quantitative laws to the development of computer software using a set of primitive measures.  1 = the number of distinct operator that appear in a program  2 = the number of distinct operators that appear in a program N 1 = the total number of operators occurrences N 2 = the total number of operand occurrences Halstead uses these primitives to develop expressions for - the overall program length - the potential minimum volume (for an algorithm) - the actual volume (in bits) - the program level ( a measure of software complexity) - the language level (a constant for a given language) - others, such as development effort and time

Jerry Gao Ph.D.9/2001 Metrics for Source Code Topic: Software Metrics II - Technical Metrics for Software Halstead shows that the program length N can be estimated N = n 1 log 2  1 + n 2 log 2  2 and program volume may be defined V = N log 2 (  1 +  2 ) = (N 1 + N 2 ) log 2 (  1 +  2 ) where N = N 1 + N 2 V will vary with programming language and represents the volume information (in bits) required to specify a program. Program level L and difficulty D can be computed L = V * / VD = 1/L Where V and V* are two different implementations based on the same set of the requirements

In Software Science a metric was proposed expressing effort (E) to implement the software. It is defined as E = V / LE = V / L* Where L* is the estimate of the program level. Inserting the previous;y obtained expression we derive E = V / V* = (N log 2  ) 2 / V* Topic: Software Metrics II - Technical Metrics for Software Jerry Gao Ph.D.9/2001 Metrics for Source Code

Jerry Gao Ph.D.9/2001 Metrics for Testing Topic: Software Metrics II - Technical Metrics for Software

Jerry Gao Ph.D.9/2001 Metrics for Maintenance Topic: Software Metrics II - Technical Metrics for Software There are some metrics developed explicitly for maintenance activities. IEEE Std suggests a software maturity index (SMI) that provides an indication of the stability of software product based on changes that occur for each release of the product. M T = the number of modules in the current release F C = the number of modules in the current release that have been changed F a = the number of modules in the current release that have been added F d = the number of modules from the proceeding release that were deleted in the current release The software maturity index is computed as follows: SMI = [ M T - (F a + F C + F d ) ] / M T As SMI --> 1.0, the product begins to stabilize.