Towards a Multi-paradigm Complexity Measure

Slides:



Advertisements
Similar presentations
Metrics for OO Design Distinct & measurable characteristics of OO design:- Size:-it is defined as – population,volume,length & functionality Population.
Advertisements

Software Metrics for Object Oriented Design
Presentation of the Quantitative Software Engineering (QuaSE) Lab, University of Alberta Giancarlo Succi Department of Electrical and Computer Engineering.
Software Metrics Software Engineering.
1 Predicting Bugs From History Software Evolution Chapter 4: Predicting Bugs from History T. Zimmermann, N. Nagappan, A Zeller.
Prediction of fault-proneness at early phase in object-oriented development Toshihiro Kamiya †, Shinji Kusumoto † and Katsuro Inoue †‡ † Osaka University.
Figures – Chapter 24.
Metrics for Object Oriented Design Shyam R. Chidamber Chris F. Kemerer Presented by Ambikadevi Damodaran.
March 25, R. McFadyen1 Metrics Fan-in/fan-out Lines of code Cyclomatic complexity Comment percentage Length of identifiers Depth of conditional.
Nov R. McFadyen1 Metrics Fan-in/fan-out Lines of code Cyclomatic complexity* Comment percentage Length of identifiers Depth of conditional.
Page 1 Building Reliable Component-based Systems Chapter 7 - Role-Based Component Engineering Chapter 7 Role-Based Component Engineering.
Software engineering for real-time systems
Object-Oriented Metrics
March R. McFadyen1 Software Metrics Software metrics help evaluate development and testing efforts needed, understandability, maintainability.
1 Complexity metrics  measure certain aspects of the software (lines of code, # of if-statements, depth of nesting, …)  use these numbers as a criterion.
Predicting Class Testability using Object-Oriented Metrics M. Bruntink and A. van Deursen Presented by Tom Chappell.
Object Oriented Metrics XP project group – Saskia Schmitz.
1 An exploratory investigation on the Invasiveness of Environmental Modeling Frameworks 18 th IMACS World Congress, MODSIM09 Cairns, Australia July 2009.
Cyclomatic Complexity Dan Fleck Fall 2009 Dan Fleck Fall 2009.
Metrics.
Software Metrics *** state of the art, weak points and possible improvements Gordana Rakić, Zoran Budimac Department of Mathematics and Informatics, Faculty.
Lecture 17 Software Metrics
Software Engineering Laboratory, Department of Computer Science, Graduate School of Information Science and Technology, Osaka University 1 Refactoring.
Paradigm Independent Software Complexity Metrics Dr. Zoltán Porkoláb Department of Programming Languages and Compilers Eötvös Loránd University, Faculty.
Software Measurement & Metrics
Compiler Support for Profiling C++ Template Metaprograms József Mihalicza, Norbert Pataki, Zoltán Porkoláb Eötvös Loránd University Faculty of Informatics.
Quality Assessment for CBSD: Techniques and A Generic Environment Presented by: Cai Xia Supervisor: Prof. Michael Lyu Markers: Prof. Ada Fu Prof. K.F.
The CK Metrics Suite. Weighted Methods Per Class b To use this metric, the software engineer must repeat this process n times, where n is the number of.
1 OO Metrics-Sept2001 Principal Components of Orthogonal Object-Oriented Metrics Victor Laing SRS Information Services Software Assurance Technology Center.
The CK Metrics Suite. Weighted Methods Per Class b To use this metric, the software engineer must repeat this process n times, where n is the number of.
Concepts of Software Quality Yonglei Tao 1. Software Quality Attributes  Reliability  correctness, completeness, consistency, robustness  Testability.
Software Engineering Research Group, Graduate School of Engineering Science, Osaka University 1 Evaluation of a Business Application Framework Using Complexity.
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.
Meta IFL 2007 Freiburg1 Meta - Towards a Functional-Style Interface for C++ Template Metaprograms * Ádám Sipos, Zoltán Porkoláb, Norbert Pataki, Viktória.
1 Metrics and lessons learned for OO projects Kan Ch 12 Steve Chenoweth, RHIT Above – New chapter, same Halstead. He also predicted various other project.
An Automatic Software Quality Measurement System.
CSc 461/561 Information Systems Engineering Lecture 5 – Software Metrics.
Measurement and quality assessment Framework for product metrics – Measure, measurement, and metrics – Formulation, collection, analysis, interpretation,
Daniel Liu & Yigal Darsa - Presentation Early Estimation of Software Quality Using In-Process Testing Metrics: A Controlled Case Study Presenters: Yigal.
Object-Oriented (OO) estimation Martin Vigo Gabriel H. Lozano M.
Ontology Support for Abstraction Layer Modularization Hyun Cho, Jeff Gray Department of Computer Science University of Alabama
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided with permission by.
Object Oriented Metrics
Software Engineering Lecture 19: Object-Oriented Testing & Technical Metrics.
1 OO Technical Metrics CIS 375 Bruce R. Maxim UM-Dearborn.
Software Engineering Object Oriented Metrics. Objectives 1.To describe the distinguishing characteristics of Object-Oriented Metrics. 2.To introduce metrics.
CS223: Software Engineering Lecture 21: Unit Testing Metric.
OBJECT-ORIENTED DESIGN JEAN SIMILIEN. WHAT IS OBJECT-ORIENTED DESIGN? Object-oriented design is the process of planning a system of interacting objects.
Csontos Péter, Porkoláb Zoltán Eötvös Loránd Tudományegyetem, Budapest ECOOP 2001 On the complexity of exception handling.
Static Software Metrics Tool
Object Oriented Metrics
Pragmatics 4 Hours.
A Hierarchical Model for Object-Oriented Design Quality Assessment
Assessment of Geant4 Software Quality
Software Metrics 1.
Course Notes Set 12: Object-Oriented Metrics
Design Characteristics and Metrics
Object-Oriented Metrics
CS427: Software Engineering I
Design Metrics Software Engineering Fall 2003
A Pluggable Tool for Measuring Software Metrics from Source Code
Design Metrics Software Engineering Fall 2003
Lecture 17 Software Metrics
Measurement of Software
Cyclomatic Complexity
Mei-Huei Tang October 25, 2000 Computer Science Department SUNY Albany
Predicting Fault-Prone Modules Based on Metrics Transitions
Software Metrics SAD ::: Fall 2015 Sabbir Muhammad Saleh.
Software Metrics using EiffelStudio
Chapter 8: Design: Characteristics and Metrics
Presentation transcript:

Towards a Multi-paradigm Complexity Measure Zoltán Porkoláb and Ádam Sillye Department of Programming Languages and Compilers Eötvös Loránd University, Faculty of Informatics Budapest, Hungary e-mail: {gsd, madic}@elte.hu

The structure of the presentation The role of the software metrics Metrics: an overview Object-oriented software metrics Multiparadigm programming The AV-graph Empirical results SPLST 2005 Tartu, Estonia

Role of software metrics Cost of the software Specification Design Implementation Testing & Bug-fixing Maintenance More than 70% of cost is for testing and maintenance (Zuse 1998) Software quality SPLST 2005 Tartu, Estonia

Software metrics Software metrics: Measuring the development process (process metrics) Measuring the product (product metrics) Product metrics: External metrics: Reliability metrics Functional metrics Efficiency metrics Internal product metrics: Size Complexity Style SPLST 2005 Tartu, Estonia

Product metrics Size metrics: LOC, eLOC Ignore the semantics Structural metrics: McCabe 1976 Motivation: predict testing efforts For structured programs: V(G) = p + 1 Howatt and Baker 1989 Motivation: involve nesting level SN(G) = |N|+ND(G) Kell? : V(G) = e – n + 2p ciclomatic number SPLST 2005 Tartu, Estonia

Object-oriented metrics Chidamber-Kemerer (1994) OO metrics suite: WMC (Weighted Methods per Class) DIT (Depth of Inheritance Tree, DIT) NOC (Number of Child Classes) CBO (Coupling Between Object Classes) fan-in and fan-out RFC (Response for Class) LCOM (Lack of Cohesion in Methods) Chidamber - Kemerer Henderson - Sellers RFC: a hivo ill a hivott metodusok szama SPLST 2005 Tartu, Estonia

Software paradigm evolution Evolution of software paradigm Non-structured programs (McCabe CCN) Structured programming (+nesting level) Object-oriented programming (OO Metrics) Class, inheritance, virtual function Generative programming Aspect-Oriented (Kitzales 1994) ?? Template metaprogramming (Veldhuizen 1994) ?? Intentional programming (Simonyi 1995) ?? Java generics (Pizza, GJ: 199X, Java5: 2004) ?? SPLST 2005 Tartu, Estonia

Multiparadigm programming Multiparadigm programming (Coplien 1998) Different domains are described by different ways Simultaneous usage of paradigms The Challenge How to compare programs written in different paradigms? How to measure multiparadigm programs? SPLST 2005 Tartu, Estonia

Paradigm-independent Software Metrics Applicable for programs written in different paradigms or in mixed-paradigm environment Based on general programming language features which are paradigm- and language-independent The paradigm-dependent attributes are derived from these features SPLST 2005 Tartu, Estonia

Components Control Structure of Program Most of the programs share the same control statements Complexity of Data Types Reflects the complexity of data types used (like classes) Complexity of Data Access Connection between control structure and data Direction of data flow Nesting depth SPLST 2005 Tartu, Estonia

AV-graph data node output node input node smain P1 tmain b P4 a c d1 SPLST 2005 Tartu, Estonia

AV-graph metrics = |A| + S (ND(G) + |L|) |N| number of nodes nd(n) = | Pred(n) | nesting depth of node ‘n’ ND(G) = S nd(n) for all nodes C(G) = |N’| + ND(G) C(O) = |N’| + S ND(G) = |A| + S (ND(G) + |L|) SPLST 2005 Tartu, Estonia

Class Complexity Control structures Complexity of method control structures Complexity of data types Local variables in methods Attributes (could be complex types) Coupling between classes Inheritance Complexity of data handling Connection between control structure and data SPLST 2005 Tartu, Estonia

Complexity of Class sset_next_month P1 tsnm b a c sset_next_day P2 e class date { public: void set_next_month() { if ( month == 12 ) { month = 1; year = year + 1; } else { month = month + 1; } } void set_next_day() { if ( month == 1 || month == 3 || ... || month == 12 ) if ( day == 31 ) set_next_month(); else day = day + 1; else if ( day == 30 ) set_next_month(); private: int year, month, day; }; sset_next_month P1 tsnm b a c sset_next_day P2 e P3 g f P4 d1 d3 d2 SPLST 2005 Tartu, Estonia

Complexity of Class class date { public: void set_next_month() { if ( month == 12 ) { month = 1; year = year + 1; } else { month = month + 1; } } void set_next_day() { if ( month == 1 || month == 3 || ... || month == 12 ) if ( day == 31 ) set_next_month(); else day = day + 1; else if ( day == 30 ) set_next_month(); private: int year, month, day; }; SPLST 2005 Tartu, Estonia

Our Measuring tool Supported languages Java 1.3 Java 1.4 (assert) Future directions: Java 5 (generics) C# and C++ Implementation ANTLR User interface: standalone application and Eclipse Plug-in Ouput CSV XML SPLST 2005 Tartu, Estonia

Applied Metrics Object-Oriented Metrics Inner Class Depth Inheritance level Number of Children Number of Methods Number of Fields LCOM Henderson-Sellers LCOM* Fan-out SPLST 2005 Tartu, Estonia

Applied Metrics Size Metrics eLOC Number of Statements McCabe Howatt-Baker AV-graph SPLST 2005 Tartu, Estonia

Test Data 367.000 eLOC 300.000 eLOC 5.000 eLOC 7.000 eLOC 900.000 eLOC Java Standard Library 1.4.2 367.000 eLOC jBOSS 3.2.3 300.000 eLOC Omg.org.CORBA 5.000 eLOC The measure tool (with mostly generated parser) 7.000 eLOC Eclipse 3.0M6 900.000 eLOC 17.000 class – more than 1.5 million lines SPLST 2005 Tartu, Estonia

Results No statistical correlation between the OO and multi paradigm metrics: OO metrics only measure the big picture MPM considers more properties: higher density The structural complexity of methods extremely increases the overall complexity SPLST 2005 Tartu, Estonia

Conclusion Multiparadigm programming requires software complexity measurement Independent from paradigm-specific notions Based on common features Paradigm-specific features must/can be expressed by those common features SPLST 2005 Tartu, Estonia