Analysis and construction of software measures Jean-Marc Desharnais.

Slides:



Advertisements
Similar presentations
Artificial Intelligence
Advertisements

Critical Reading Strategies: Overview of Research Process
Introducing Formal Methods, Module 1, Version 1.1, Oct., Formal Specification and Analytical Verification L 5.
Experiments and Variables
SOFTWARE TESTING. INTRODUCTION  Software Testing is the process of executing a program or system with the intent of finding errors.  It involves any.
Detailed Design Kenneth M. Anderson Lecture 21
Software Metrics II Speaker: Jerry Gao Ph.D. San Jose State University URL: Sept., 2001.
1 A Framework for Measurement Valérie Paulus, Miguel Lopez, Gregory Seront, Simon Alexandre.
Software metrics Selected key concepts. Introduction Motivation:  Management:  Appraisal  Assurance  Control  Improvement  Research:  Cause-effect.
Planning Value of Planning What to consider when planning a lesson Learning Performance Structure of a Lesson Plan.
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.
Chapter 18 Testing Conventional Applications
Chapter One: The Science of Psychology
Introduction to Theory & Research Design
Assessment Statements  The Internal Assessment (IA) Rubric IS the assessment statement.
Estimating Software Size Part I. This chapter first discuss the size estimating problem and then describes the PROBE estimating method used in this book.
University of Toronto Department of Computer Science © 2001, Steve Easterbrook CSC444 Lec22 1 Lecture 22: Software Measurement Basics of software measurement.
Software Testing Content Essence Terminology Classification –Unit, System … –BlackBox, WhiteBox Debugging IEEE Standards.
Chapter One: The Science of Psychology. Ways to Acquire Knowledge Tenacity Tenacity Refers to the continued presentation of a particular bit of information.
1 Software Quality CIS 375 Bruce R. Maxim UM-Dearborn.
A Taxonomy of Evaluation Approaches in Software Engineering A. Chatzigeorgiou, T. Chaikalis, G. Paschalidou, N. Vesyropoulos, C. K. Georgiadis, E. Stiakakis.
Representing variables according to the ISO/IEC standard.
Chapter 1: Introduction to Statistics. 2 Statistics A set of methods and rules for organizing, summarizing, and interpreting information.
Software Metrics  The measurement of a particular characteristic of a software program's performance or efficiency. (
Measurement theory - for the interested student Erland Jonsson Department of Computer Science and Engineering Chalmers University of Technology.
GODFREY HODGSON HOLMES TARCA
CSD 5100 Introduction to Research Methods in CSD Observation and Data Collection in CSD Research Strategies Measurement Issues.
On the Representation of Intangible Objects such as Software in a Measurement Context Miguel Lopez Valérie Paulus Grégory Seront Simon Alexandre.
By: TARUN MEHROTRA 12MCMB11.  More time is spent maintaining existing software than in developing new code.  Resources in M=3*(Resources in D)  Metrics.
This chapter is extracted from Sommerville’s slides. Text book chapter
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.”
Measurement Theory Michael J. Watts
Software Metrics Software Engineering.
Experimental Research Methods in Language Learning Chapter 16 Experimental Research Proposals.
Agenda Introduction Overview of White-box testing Basis path testing
1 Estimation Function Point Analysis December 5, 2006.
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
Variables and their Operational Definitions
Enabling Reuse-Based Software Development of Large-Scale Systems IEEE Transactions on Software Engineering, Volume 31, Issue 6, June 2005 Richard W. Selby,
Scale2 1 Measurement Scales The “richness” of the measure.
Research Design. Selecting the Appropriate Research Design A research design is basically a plan or strategy for conducting one’s research. It serves.
CSc 461/561 Information Systems Engineering Lecture 5 – Software Metrics.
Question paper 1997.
MOI UNIVERSITY SCHOOL OF BUSINESS AND ECONOMICS CONCEPT MEASUREMENT, SCALING, VALIDITY AND RELIABILITY BY MUGAMBI G.K. M’NCHEBERE EMBA NAIROBI RESEARCH.
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.
Variables It is very important in research to see variables, define them, and control or measure them.
Chapter 7 Measuring of data Reliability of measuring instruments The reliability* of instrument is the consistency with which it measures the target attribute.
Major Science Project Process A blueprint for experiment success.
SOFTWARE TESTING. Introduction Software Testing is the process of executing a program or system with the intent of finding errors. It involves any activity.
Chapter 6 - Standardized Measurement and Assessment
Software Measurement: A Necessary Scientific Basis By Norman Fenton Presented by Siv Hilde Houmb Friday 1 November.
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided with permission by.
The Psychologist as Detective, 4e by Smith/Davis © 2007 Pearson Education Chapter One: The Science of Psychology.
Lecture №4 METHODS OF RESEARCH. Method (Greek. methodos) - way of knowledge, the study of natural phenomena and social life. It is also a set of methods.
These slides are designed to accompany Software Engineering: A Practitioner’s Approach, 7/e (McGraw-Hill 2009). Slides copyright 2009 by Roger Pressman.1.
Department of Mathematics Computer and Information Science1 CS 351: Database Management Systems Christopher I. G. Lanclos Chapter 4.
© Houghton Mifflin Harcourt Publishing Company Section 1 What Is Physics? Preview Objectives Physics The Scientific Method Models Hypotheses Controlled.
SOFTWARE TESTING LECTURE 9. OBSERVATIONS ABOUT TESTING “ Testing is the process of executing a program with the intention of finding errors. ” – Myers.
Planning to Implement CCSS-M Function Cluster:
Measurement Theory Michael J. Watts
Software Metrics 1.
Software Testing.
Recent trends in estimation methodologies
Software Engineering (CSI 321)
CPSC 873 John D. McGregor GQM.
Halstead software science measures and other metrics for source code
Chapter 19 Technical Metrics for Software
Software Metrics SAD ::: Fall 2015 Sabbir Muhammad Saleh.
Presentation transcript:

Analysis and construction of software measures Jean-Marc Desharnais

Analysis of software measures Scale and units McCabe Albrecht Function Point Halstead Measure The following presentation is inspire from Dr. Alain Abran documents that I am using with his permission. A book should be published in a near future.Dr. Alain Abran

Scale and units

Scale numbering Nominal Ordinal Interval Ratio Absolute

Exercise Scale Function Point Analysis (FPA) is using Adjusted and Unadjusted point; Unadjusted FPA is the total number of point based on total components based on their type, their complexity and the points giving by the 5 tables; Adjusted FPA is: Unadjusted FPA * by an adjustment factor between 0.65 and 1.35 This adjustment factor is coming from 14 questions quote between 0 and 5 (14 * (0) 5 = 70)/100 = (0) 0.7; = 0.7 What is inappropriate in this approach?

Analysis of software measures Scale and units McCabe Albrecht Function Point Halstead Measure

McCabe Cyclomatic Complexity Number This short presentation will show that McCabe: measure software design has some ambiguity as much the measure interpretation Measurement concepts and measurement instruments are based on imprecise empirical representations

Mc Cabe and complexity Prior to investigating the explicit and implicit definitions behind the McCabe ‘cyclomatic complexity number’, it is interesting to survey how complexity has been defined (characteristics of the measure);

Complexity definition: IEEE Degree to which a system or component has a design or implementation that is difficult to understand and verify; complexity is a property of the design implementation; also a relationship to on the effort needed to understand and verify the design implementation. Two different entities are involved in the definition, process (effort) and product (design or source code)

Complexity and McCabe By adding the label ‘complexity’ to the expression ‘Cyclomatic Number’, McCabe leads the reader to believe that the attribute he considered is the complexity of a source code program, but does not explicitly document this claim by association. What some authors say about complexity?

Complexity: Evans et al. Degree of complication of a system or system component; Determined by such factors as the number and intricacy of interfaces, the number and intricacy of conditional branches, the degree of nesting, and the types of data structures. Note: many concepts to be measured.

Complexity: Whitmire Also include computational, psychological and representational complexity; Computational: hardware resources to execute the software Psychological: complexity of the problem solved by the software, characteristics of the software (size, cohesion, coupling, etc.) Representational: complexity that includes knowledge and experience of the problem.

Cyclomatic complexity number McCabe analysis is based on measurement concepts in the graph theory and transpose on software measurement; Cyclomatic number is: v(G) = e − n + p (1) e = edges; n = nodes (vertices); p = separates components

Simple example E (edge or arrow) = 4 N (nodes or square) = 5 P = 1 (connected component) + 1 (virtual edge) v(G) = E – N + P v(G)= 4 – 5 +2 =1

Exercise What is the complexity ? Edge = Node = V(G) = E – N + P

Answer Edge = 16 Node = 13 V(G) = =5

Definition of units Left side of the equation: Units of v(G) derived from the definition: maximum number of linearly independent cycles in a strongly connected graph; Strongly connected graph explain indirectly the meta- model. Right side of the equation: Three distinct types of units: edges, nodes and 'separate components'; Numerical assignment rule: add and subtract.

Definition of unit not clear Different types of units are involved; At the level of each unit different types of units cannot be added (edge and node); Needed to be transposed into a higher level of abstraction (ex: apple and orange have a higher abstraction of fruit); Graph theory has not documented clearly how the units are manipulated in their measurement procedure; There is a lack of clarity. In Zuse, a proof of the scale type associated with the cyclomatic number is suggested

Analysis: Definition of the measured Entity The entity measured by the Cyclomatic Complexity Number is a control flow graph. According to McCabe, the measured entity is the source code of a given module, which corresponds to a function or a subroutine.

Analysis: Definition of the measured Entity But, do graphs correctly represent the source code entity in order to measure its Cyclomatic Number? In other words, is the assumption concerning the one- to-one relation of a given module source code and its corresponding graph verified?

Analysis: Definition of the measured Entity One source code of one module is related to one and only one graph. But the contrary is not necessarily true; that is, one graph can be related to one or many source codes. So, it is not obvious that the final source code corresponds to the measured graph. Moreover, McCabe suggests to use this Cyclomatic Number in order to plan the testing effort (ex: test the more complex modules).

Source code and graph Source code 1 Graph 1 Source code 2 Source code 3 Graph 2

Interpretation in measurement We should explore: whether or not there is a relationship across multiple variables? what are the strengths of such relationships? how much these relationships vary (or not) under various conditions?

McCabe complexity McCabe by adding the term ‘complexity’ to the ‘cyclomatic number’ has explicitly made an association between this number and a concept of complexity: but has neither described explicitly such association; nor associated quantitative numbers to this association; nor described under which conditions it would hold for particular quantities.

Interpretation in industry Ratio scale or exponential scale ? Program A Cyclomatic number = 10 Program B Cyclomatic number = 5 Testing program A versus program B: is A more than twice the testing time than B? Practitioners build their own interpretation scale without clear rules and non measurement-related convention.

Conclusion McCabe Artificially labeling the Cyclomatic Number as a ‘complexity’ concept has led to considerable ambiguity on the use of this Number as a measurement number rather than as a qualitative empirical model which varies according to the empirical contexts. The key problem of measurement units: Related concepts have not been either adequately explored or adequately explained. Without such knowledge and insights, it is difficult to improve such a design.

Analysis of software measures Scale and units McCabe Albrecht Function Point Halstead Measure The following presentation is inspire from Dr. Alain Abran documents that I am using with his permission. A book should be published in a near future.Dr. Alain Abran

Albrecht Function Point Alan Albrecht was the first to propose in 1979 a new way of quantifying software size Size was based on the users view of the software functional size of software was proposed as a generic measure of the “output” of the development process It allows a comparison of projects in which software was developed using different programming languages

Albrecht Function Point (continued) Approach proposed by Albrecht is characterized by its empirical nature It was a quite useful method to solve 60’s and 70’s problems, but more difficult to apply in modern software development (Alain Abran) Note: Dr. Abran article will publish in December 2009

Albrecht (global vision)

Unadjusted count There are two main parts: The measurement process for the logical data files ; The measurement process for the transactions. Ret = Record Element Type

Validity of the model It must be noted that, neither in the original Albrecth’s paper nor in the IFPUG’s documentation: none of the relations of these models is based on any experimentally justified theories in any precise framework they are only described in a set of rules established by a consensus within the normative committee of IFPUG, the Counting Practices Committee.

Unadjusted FPA The final results, (unadjusted) function points, are most difficult to interpret: Many implicit dimensions; Use of different types of measurement; Mix of measurement scale types; No mathematical significance unless the validity of each transformation can be demonstrated theoretically or empirically.

Value Adjustment factors 14 general questions with 6 characteristics for each (counting 0 as one); Classify as 0 to 5 (ordinal); Each 14 general questions result (characteristic number) is add (interval); Classification in the previous step of a system characteristic is next multiplied by an ‘impact’ of each answer. Ex: question 1 answer is 2 then 0.02 (ratio).

Analysis of software measures Scale and units McCabe Albrecht Function Point Halstead Measure The following presentation is inspire from Dr. Alain Abran documents that I am using with his permission. A book should be published in a near future.Dr. Alain Abran

Halstead Measures According to Halstead, a computer program is: an implementation of an algorithm considered to be a collection of tokens that can be classified as either operators or operands.

Halstead operators and operands By counting the tokens and determining which are operators and which are operands The following base measures can be collected: n 1 : Number of distinct operators. n 2 : Number of distinct operands. N 1 : Total number of occurrences of operators. N 2 : Total number of occurrences of operands. Number of potential operators Number of potential operands

Operator or operand Unfortunately, there is a problem in distinguishing between operators and operands Halstead has not explicitly described the generic measurable concepts of operators and operands He assume that the example he gave was explicit enough

Example of algorithms use 10 equations are based on the results of 6 based measures: n1, n2, N1, N2, n1* and n2* Example: length (N) of a program P is: N = N1 + N2. Example: vocabulary (n) of a program P is: n = n1 + n2 There are also volume, level, difficulty, estimator, intelligent content, programming effort, programming “time”.

Halstead measures In summary, the Halstead measures, as designed almost thirty years ago, do not meet a key design criterion of measures in engineering and the physical sciences. The implementation of the measurement functions of Halstead’s measures has been interpreted in different ways than the goals specified by Halstead in their designs. For example, the program length (N) has been interpreted as a measure of program complexity, which is a different characteristic of a program.