SOFTWARE COMPLEXITY MEASUREMENT USING MULTIPLE CRITERIA ABSTRACT

Similar documents
Taxonomy Dimensions of Complexity Metrics

ONE-STACK AUTOMATA AS ACCEPTORS OF CONTEXT-FREE LANGUAGES *

Empirical Evaluation and Critical Review of Complexity Metrics for Software Components

SNS College of Technology, Coimbatore, India

Application of Object Oriented Metrics to Java and C Sharp: Comparative Study

Software complexity Methodologies Comparisons. Paper Reference Number: 6 Name of the Presenter: masoud rafighi

Towards Cohesion-based Metrics as Early Quality Indicators of Faulty Classes and Components

Principal Component Analysis of Lack of Cohesion in Methods (LCOM) metrics

Quantify the project. Better Estimates. Resolve Software crises

2014, IJARCSSE All Rights Reserved Page 303

VISUALIZING NP-COMPLETENESS THROUGH CIRCUIT-BASED WIDGETS

Procedia Computer Science

An Object Oriented Runtime Complexity Metric based on Iterative Decision Points

Reusability Metrics for Object-Oriented System: An Alternative Approach

The Relationship between Slices and Module Cohesion

Vragen. Intra-modular complexity measures. The uses relation. System structure: inter-module complexity

An Object-Oriented Metrics Suite for Ada 95

Using Metrics To Manage Software Risks. 1. Introduction 2. Software Metrics 3. Case Study: Measuring Maintainability 4. Metrics and Quality

Risk-based Object Oriented Testing

Analysis of operations and parameters involved in interface for CBSE

Metrics and OO. SE 3S03 - Tutorial 12. Alicia Marinache. Week of Apr 04, Department of Computer Science McMaster University

A Complete and Comprehensive Metrics Suite for Object-Oriented Design Quality Assessment

Efficient Regression Test Model for Object Oriented Software

Evolutionary Decision Trees and Software Metrics for Module Defects Identification

MACHINE LEARNING BASED METHODOLOGY FOR TESTING OBJECT ORIENTED APPLICATIONS

Scenario-based Synthesis of Annotated Class Diagrams in UML

Statecharts 1.- INTRODUCTION 1.- INTRODUCTION

Application of a Fuzzy Inference System to Measure Maintainability of Object-Oriented Software

Object Oriented Measurement

Evaluation of a Business Application Framework Using Complexity and Functionality Metrics

HOW AND WHEN TO FLATTEN JAVA CLASSES?

Toward a definition of run-time object-oriented metrics

Technical Metrics for OO Systems

ITT Technical Institute. SD1420 Introduction to Java Programming Onsite and Online Course SYLLABUS

Analysis of complexity metrics of a software code for obfuscating transformations of an executable code

CS 6V Using Reverse Engineering Practices to Improve Systems-of-Systems Understanding. Tom Hill

Outline. Problem statement

Level: M.Ed. Credit Hour: 3 (2+1) Semester: Second Teaching Hour: 80(32+48)

Effectiveness of software metrics for object-oriented system

White Box Testing with Object Oriented programming

Impact of Dependency Graph in Software Testing

Investigation of Metrics for Object-Oriented Design Logical Stability

Visualization of Object Oriented Modeling from the Perspective of Set theory

A New Weighted Composite Complexity Measure for Object-Oriented Systems

Gujarat University M. Sc. Computer Science [S. F.] Semester-1 Syllabus Gujarat Arts & Science College, Ahmedabad.

2015, IJARCSSE All Rights Reserved Page 31

An Approach for Quality Control Management in Object Oriented Projects Development

GOMS Lorin Hochstein October 2002

A Novel Method for the Comparison of Graphical Data Models

How do we measure product and project progress?? Why is software incomparable to traditional quality of manufactured goods?

Utilizing Computational Intelligence to Assist in Software Release Decision

Optimum Alphabetic Binary Trees T. C. Hu and J. D. Morgenthaler Department of Computer Science and Engineering, School of Engineering, University of C

An approach to quantifying the run-time behaviour of Java GUI applications

Static Metrics. Feature Brief

Anale. Seria Informatică. Vol. XVI fasc Annals. Computer Science Series. 16 th Tome 1 st Fasc. 2018

Evaluating the Effect of Inheritance on the Characteristics of Object Oriented Programs

A Complexity Measure Based on Information Contained in the Software

IMPACT OF DEPENDENCY GRAPH IN SOFTWARE TESTING

An Empirical Evaluation of Test Adequacy Criteria for Event-Driven Programs

International Journal of Software and Web Sciences (IJSWS) EVALUATING TESTABILITY OF OBJECT ORIENTED SYSTEM

COP 1170 Introduction to Computer Programming using Visual Basic

Łabiak G., Miczulski P. (IIE, UZ, Zielona Góra, Poland)

Modeling and Simulation of Quality of Service for Composite Web Services

FROM MEASUREMENT OF SOFTWARE FUNCTIONAL SIZE TO MEASUREMENT OF COMPLEXITY

ACM / /0262 $

ABSTRACT 2. Related Work 1. Introduction 1 NNGT Journal: International Journal of Software Engineering Volume 1 July 30,2014

Software re-use assessment for quality M. Ramachandran School of Computing and Mathematical Sciences, Jo/m Moores C/mrerszZ?/,

CHAPTER 4 OBJECT ORIENTED COMPLEXITY METRICS MODEL

A Complete Bibliography of the Proceedings Volumes of the ACM Symposia on the Theory of Computing ( )

ICAD A USE CASE BASED OBJECT-ORIENTED SOFTWARE DESIGN APPROACH USING THE AXIOMATIC DESIGN THEORY

A Comparative Study on State Programming: Hierarchical State Machine (HSM) Pattern and State Pattern

Keywords: Binary Sort, Sorting, Efficient Algorithm, Sorting Algorithm, Sort Data.

Flight Systems are Cyber-Physical Systems

ITT Technical Institute. SD2720 Advanced Software Development Using Java Onsite and Online Course SYLLABUS

A New Reduction from 3-SAT to Graph K- Colorability for Frequency Assignment Problem

ITT Technical Institute. CS420 Application Security Onsite Course SYLLABUS

CHAPTER 4 HEURISTICS BASED ON OBJECT ORIENTED METRICS

A Study of Software Metrics

RAPTOR: A VISUAL PROGRAMMING ENVIRONMENT FOR TEACHING OBJECT-ORIENTED PROGRAMMING *

MULTIPLE CHOICE. Choose the one alternative that best completes the statement or answers the question.

Methodologies of Software Complexity Evaluation for Software written by Object Oriented Languages

Program: B.E. (Electronics and Telecommunication Engineering)

DEVELOPING A COMPLEXITY METRIC FOR INNER CLASSES

ITT Technical Institute. IT302 Linux System Administration Onsite Course SYLLABUS

Software Metrics. Lines of Code

Audit, Code Quality and Change Management

Chapter : Analysis Modeling

Keywords Code cloning, Clone detection, Software metrics, Potential clones, Clone pairs, Clone classes. Fig. 1 Code with clones

Accessing Your Profile Online

Maintainability and Agile development. Author: Mika Mäntylä

Presenter: Dong hyun Park

Case Study on Testing of Web-Based Application: Del s Students Information System

Cate: A System for Analysis and Test of Java Card Applications

Iteration vs Recursion in Introduction to Programming Classes: An Empirical Study

Theoretical Validation of Inheritance Metrics for Object-Oriented Design against Briand s Property

.NET as a Teaching Tool

Bachelor of Science Information Studies School of Information Program Summary

International Journal of Advanced Research in Computer Science and Software Engineering

Java 2. Course Outcome Summary. Western Technical College. Course Information. Course History. Course Competencies

Report and Opinion 2014;6(10) Measurement Of Software Complexity In Object Oriented Systems Abstract

Transcription:

SOFTWARE COMPLEXITY MEASUREMENT USING MULTIPLE CRITERIA Bhaskar Raj Sinha, Pradip Peter Dey, Mohammad Amin and Hassan Badkoobehi National University, School of Engineering, Technology, and Media 3678 Aero Court, San Diego, CA 92123, U.S.A. { bsinha, pdey, mamin, hbadkoob}@nu.edu ABSTRACT One of the challenges in software development is measuring and estimating software complexity at various levels of development. It is difficult to manage a software project without having well-developed measuring techniques. The term software complexity is used to indicate the testability, maintainability, readability, and/or comprehensibility of a program. In the past, complexity is often measured by code size (lines of code), but that does not provide a measure of how difficult it is to understand or code the program. This research describes a quantitative method to measure software complexity, thus enabling us to apply appropriate resources towards developing, testing and maintaining the software. Using code abstractions in statechart diagrams, adequate measurement of software complexity is demonstrated. INTRODUCTION It has been estimated that a major part of business expenditures in computing is the maintenance of software. Since billions of lines of code (LOC) are estimated to exist worldwide, the software maintenance represents an Information Systems (IS) activity of considerable importance. Resource allocation for maintaining software needs to be based on certain aspects of software. Many measures of software complexity have been proposed for this and various other reasons [1-6, 10-15]. Most of these, although giving a good representation of complexity, do not specify a procedure for easy measurement. The McCabe metric [12] defines and assesses code complexity by the number of control edges created by the code, providing an objective, high-level measure of a program's complexity. Halstead s method [6, 11] is based on the mathematical relationships among the number of variables, the complexity of the code, and the type of programming statements. Other methods to measure software complexity include code coverage, which is often used in testing, and specification-based methods, such as function point method [1] and its variations. Another method, the task complexity model, establishes measures to capture the complexity in the input and output data, in data manipulation and in relationships between software components. Another method defines complexity by examining the cognitive weights of the control structures in the software. A Metrics Suite for Object Oriented Design was introduced by Chidamber and Kemerer [3] on metrics specifically for object oriented code. They introduce six OO complexity metrics; weighted methods per class, coupling between object classes, response for a class, number of children, depth of inheritance tree and lack of cohesion of methods. Other methods used to measure software complexity are the Branching complexity

(Sneed Metric), Data access complexity (Card Metric), Data complexity (Chapin Metric) [2], and the Decisional complexity (McClure Metric) [13]. This research describes a quantitative method to measure software complexity combining certain aspects of the function point method [3], LOC, coding complexity abstractions, and statechart diagrams [6-7]. The role of iterative development of graphical user interfaces and use of objects such as buttons were not considered in the original function point method [1]. Statechart diagrams [6-7] are usually developed before the implementation phase and therefore the results of the complexity measure are known at an early stage of the development process enabling us to apportion resources toward developing, testing, and maintaining software. The statecharts are augmented with some basic building block coding abstractions in order to obtain a comprehensive complexity value of the software system in combination with certain aspects of the function point. SOFTWARE COMPLEXITY MEASUREMENT MODEL Statechart diagrams are software models that represent dynamic aspects of software [7-8]. Statechart diagrams can represent any arbitrary computational problem, because they are equivalent to Turing Machines [9]. A statechart diagram can be augmented with complexity values of code building block abstractions in order to obtain a numeric value for the complexity of the entire software system. Flow graph techniques enable us in quantifying fundamental properties of software. Basic programming primitives are analyzed for their execution paths. These building blocks may be combined to determine the number of execution paths in a piece of code. Sequential code: Figure 1 shows the flow graph for a sequential code. Number of execution paths is one. If ( ) then : Figure 2 shows the flow graph for an If ( ) then construct. Number of execution paths is two one when the test fails and the other when the test is true. If ( ) then else : Figure 3 shows the flow graph for an If ( ) then else construct. Number of execution paths is two. If ( ) and ( ) then : Figure 4 shows the flow graph for an If ( ) and ( ) then construct. Number of execution paths is three. If ( ) or ( ) then : Figure 5 shows the flow graph for an If ( ) or ( ) then construct. Number of execution paths is three. Do While ( ): Figure 6 shows the flow graph for a Do While ( ) construct. Number of execution paths is two.

While ( ) Do : Figure 7 shows the flow graph for a While ( ) Do construct. Number of execution paths is two. For ( ): Figure 8 shows the flow graph for a For ( ) construct. Number of execution paths is two. Switch ( ): Figure 9 shows the flow graph for a Switch ( ) construct. Number of execution paths is N. This is determined from the number of cases handled by the switch statement. Using the coding abstractions of these primitives, a statechart diagram is augmented by adding numeric values to the transitions of the diagram based on the path value as shown in Figure 10. Assume that a small software project started with the following initial description of requirements: Develop a software system for computing the volume of two types of storage units: box-storage and cylinder-storage. Users should be able to enter inputs interactively using a Graphical User Interface (GUI). After studying the requirements, software engineers would discover that the system has to be web-based and it should be available 24/7. Users should be able to access the software without any login ID. The software engineers would then prepare a Software Requirements Specification (SRS) document and then proceed with requirements reviews and software design. In the design phase, a statechart diagram would be developed which specifies different states of the software according to its dynamic aspects. Figure 10 shows

a statechart diagram augmented with complexity values obtained from program building blocks suggested above. In a statechart diagram, a state is shown with a rounded rectangle. A state is a collection of values. Change in values results in a new state. A transition is an event or operation that transforms one state to another. The initial state is indicated by a small solid circle and the final state by a bull's eye. Figure 10: A State-Chart Diagram for computing volume of Box and Cylinder units The complexity measure of the software, called the complexity index, is initially estimated at the design stage and then calculated at the release time after the implementation and testing. Table 1 shows the estimation at the design phase using a statechart diagram and some additional features of the software, some of which were suggested by function point research. Contributing Factors Estimated Values for the example software Annotations 1 Total number of execution paths of the augmented state chart 2 Total number of edges 8 See Figure 10 14 Adding the numbers on the edges of Figure 10 3 10 points for each nested loop 0 No nested loop 4 5 points for each object referenced 110 22 * 5 5 10 points for each data-structure 10 Vector in Java 6 10 points for each external file 7 20-100 points for GUI 2 8 10 points for each interface with another system 9 One point for each 20 Lines of Code 5 Estimated 100 LOC 10 10 points for providing security with login ID and password 11 100 points for additional level of security such as dealing with credit cards, social security number etc. Complexity index 167 Table 1: Complexity Index Estimation at the design phase no such security measure

The estimated complexity index of the software was 167 as shown in Table 1. The software needed an expanding data-structure such as a vector; therefore 10 points are allocated in item# 5 of Table 1. The effort for GUI was comparatively low as indicated in Figure 11; therefore 20 points were assigned for item#7. The software was implemented using Object Oriented programming techniques in Java. Figure 11 shows a screen-shot of the running program. After the development of the example software, the actual complexity index was calculated at the release time. The complexity index of the software is 173 as shown in Table 2 which is very close to the initial estimation shown in Table 1. There were 23 actual objects as compared to the estimated 22 objects such as button. The actual LOC was 121 compared to 100 estimated earlier. Figure 11: A screen-shot of the working software Contributing Factors Values for the Annotations example software 1 Total number of execution paths of the augmented state chart 14 Adding the numbers on the edges of Figure 10 2 Total number of edges 8 See Figure 10 3 10 points for each nested loop 0 No nested loop 4 5 points for each object referenced 115 23 * 5 (for twenty-three objects) 5 10 points for each data-structure 10 Vector in Java 6 10 points for each external file 7 20-100 points for GUI 2 8 10 points for each interface with another system 9 One point for each 20 lines of code 6 For 121 LOC 10 10 points for providing security with login ID and password 11 100 points for additional level of security such as dealing with credit cards, social security number etc. Complexity index 173 Table 2: Complexity Index Calculation

CONCLUSION A measurement method for software complexity is described which was influenced by the function point method [1]. It is justified by formal reasoning of statechart diagrams combined with informal intuitive reasoning of code building block abstractions and GUI efforts. Comparison of estimated and actual values based on an example demonstrates the viability of the method. This study may be extended with other constructs, including unstructured logic, interrupt handlings, process creation, web programming and other decisions. This method may also be used to estimate the impact of software complexity on the costs of software maintenance projects in IS environments. REFERENCES [1] Albrecht, A, & Gaffney, Jr. J. Software Function, Source Lines of Code, and Development Effort Prediction: A Software Science Validation, IEEE transactions on Software Engineering, Volume 9 Issue 6, Pages 639-648, 1983. [2] Chapin, N., A Measure of Software Complexity, Proceedings of the 1979 National Computer Conference, New York, pages 995 1002, 1979. [3] Chidamber, S. R., Kemerer, C. F. A Metrics Suite for Object Oriented Design, IEEE Transactions on Software Engineering, Vol. 20(6), 476-493, 1994. [4] Curtis, B., Sheppard, S.B., Milliman, P., Borst, M.A., Love, T. Information Systems Programs, Space Division, General Electric Company. IEEE Transactions on Software Engineering, Volume 5 Issue 2, March 1979, Pages 96-104, IEEE Press Piscataway, NJ, USA. [5] Gorsline, G., and Fainter, R. Program Complexity Measures. ACM/NBS 19th Annual Technical Symposium. Gaithersburg, Maryland, June 1980. [6] Halstead, M. H., Elements of Software Science, Elsevier North-Holland, 1977. [7] Harel, D., Statecharts: A visual formalism for complex systems, Science of Computer Programming, v.8 n.3, p.231-274, 1987 [8] Harel, D., Politi, M., Modeling Reactive Systems with Statecharts: The Statemate Approach, McGraw-Hill, 1998. [9] Hopcroft, E., Motwani, R., Ullman, D., Introduction to Automata Theory, Languages, and Computation, Pearson Education, 2007. [10] Kearney, J. K., Sedlmeyer, R. L., Thompson, W. B., Gray, M. A., Adler, M. A. Software Complexity Measurement, Communications of the ACM, Volume 29, Number 11, 1986. [11] Marco, L. Measuring Software Complexity, Enterprise Systems Journal, April 1997. [12] McCabe, T. J., Software Complexity, IEEE Transactions on Software Engineering. P.308-320, Issue 4, Volume SE-2, December 1976. [13] McClure, C. L., A Model for Program Complexity Analysis, Proceedings of the 3rd international conference on Software engineering, p.149-157, May 10-12, 1978, Atlanta, Georgia, United States, 1978. [14] Tran-Cao, D., Lévesque, G., Meunier, J. Measuring Software Functional Size: Towards an Effective Measurement of Complexity. ICSM 2002: 370-376, 2002. [15] Weyuker, E. J., Evaluating Software Complexity Measures, IEEE Transactions on Software Engineering, Vol. 14. No. 9, 1988.