HIS Source Code Metrics



Similar documents
Herstellerinitiative Software (OEM Initiative Software)

Fundamentals of Measurements

for Source Code MathWorks Automotive Conference June 23 rd 2010 A project with Renault, PSA, Valeo, Delphi, MathWorks Presenters: Thierry Cambois -

Software Metrics. Lord Kelvin, a physicist. George Miller, a psychologist

Quality Analysis with Metrics

The «SQALE» Analysis Model An analysis model compliant with the representation condition for assessing the Quality of Software Source Code

Improving Quality with Software Metrics

Die wichtigsten Use Cases für MISRA, HIS, SQO, IEC, ISO und Co. - Warum Polyspace DIE Embedded Code-Verifikationslösung ist.

Unit 11: Software Metrics

Reducing Technical Debt Using Maintainability Index

FUNCTION POINT ANALYSIS: Sizing The Software Deliverable. BEYOND FUNCTION POINTS So you ve got the count, Now what?

A New Cognitive Approach to Measure the Complexity of Software s

Programming by Contract vs. Defensive Programming: A Comparison of Run-time Performance and Complexity

Baseline Code Analysis Using McCabe IQ

Mining Metrics to Predict Component Failures

Definitions. Software Metrics. Why Measure Software? Example Metrics. Software Engineering. Determine quality of the current product or process

CSTE Mock Test - Part III Questions Along with Answers

Open Source Tools. The Magazine for Professional Testers. December 2010

Glossary of Object Oriented Terms

How They Do It in Switzerland Outsource the Code, Insource the Quality

Analysis and Evaluation of Quality Metrics in Software Engineering

APPROACHES TO SOFTWARE TESTING PROGRAM VERIFICATION AND VALIDATION

Automotive CAE Integration.

Complexity Analysis of Simulink Models to improve the Quality of Outsourcing in an Automotive Company. Jeevan Prabhu August 2010

How To Develop A Car

Module 10. Coding and Testing. Version 2 CSE IIT, Kharagpur

Software Requirements Metrics

ISO Introduction

Making Visio Diagrams Come Alive with Data

The automotive industry is making great efforts to improve. Uniform standards in software development are an important

ECE 495 Project 3: Shocker Actuator Subsystem and Website Design. Group 1: One Awesome Engineering

Tool Support for Inspecting the Code Quality of HPC Applications

Cost-Benefit Analysis of the Quality Measurement System of EB tresos

Code quality analysis in open source software development

Software Testing & Analysis (F22ST3): Static Analysis Techniques 2. Andrew Ireland

Best Practices for Verification, Validation, and Test in Model- Based Design

Exploring the Quality of Free/Open Source Software: a Case Study on an ERP/CRM System

EVALUATING METRICS AT CLASS AND METHOD LEVEL FOR JAVA PROGRAMS USING KNOWLEDGE BASED SYSTEMS

TEST METRICS AND KPI S

Test automation: Open source compared to commercial software

Different Approaches to White Box Testing Technique for Finding Errors

Software Metrics in Static Program Analysis

Do students like tool usage in a Software Engineering course?

we keep you ahead consulting Product Lifecycle Management.

Site Quality Metrics OTC perspective. Veronica Cruz, PhD Executive VP/COO. May 13, 2014 Quality Session 3

Problems and Measures Regarding Waste 1 Management and 3R Era of public health improvement Situation subsequent to the Meiji Restoration

Development Effort & Duration

METHODOLOGIES AND TOOLS FOR THE SOFTWARE QUALITY ASSURANCE COURSE *

Krishna Institute of Engineering & Technology, Ghaziabad Department of Computer Application MCA-213 : DATA STRUCTURES USING C

Static analysis on integration level

Idea: Measuring the Effect of Code Complexity on Static Analysis Results

Static Analysis of Dynamic Properties - Automatic Program Verification to Prove the Absence of Dynamic Runtime Errors

AAI CORPORATION TEXTRON SYSTEMS SUPPLIER RATING SYSTEM QA-SP48 Rev. E

IT Change Management Policy

C++ INTERVIEW QUESTIONS

A universal method to create complex reports in Excel

Introduction to Computers and Programming. Testing

Counting Infrastructure Software

Chap 4. Using Metrics To Manage Software Risks

INTERNATIONAL JOURNAL OF PURE AND APPLIED RESEARCH IN ENGINEERING AND TECHNOLOGY

Source Code Security Analysis Tool Functional Specification Version 1.0

Miguel Lopez, Naji Habra

ONLINE-SEARCH IN THE DIGIBIB-PORTAL OF DANUBE UNIVERSITY LIBRARY KREMS

Development of AUTOSAR Software Components within Model-Based Design

Manufacturing View. User View. Product View. User View Models. Product View Models

A Review and Analysis of Software Complexity Metrics in Structural Testing

Measuring Software Complexity to Target Risky Modules in Autonomous Vehicle Systems

ITIL QUALIFICATION SCHEME & ROLE-BASED TRAINING MATRIX WHITE PAPER

Continuous Integration Build-Test-Delivery (CI-BTD) Framework in compliance with ISO26262

Software Testing Interview Questions

Software Life Cycle Processes

Automotive SPICE & ISO/CD Their Mutual Relationship

CS 451 Software Engineering Winter 2009

Simulation in design of high performance machine tools

Software Architecture

Graphing Made Easy for Project Management

Using Code Quality Metrics in Management of Outsourced Development and Maintenance

Meeting DO-178B Software Verification Guidelines with Coverity Integrity Center

Early Software Reliability

Writing Reports BJECTIVES ONTENTS. By the end of this section you should be able to :

TEACHING QUALITY ASSURANCE AND PROJECT MANGEMENT TO UNDERGRDUATE COMPUTING STUDENTS IN PAKISTAN

Volume I, Section 4 Table of Contents

TL 9000 Requirements Handbook, Release 5.5. Changes from Release 5.0

University of Dayton Department of Computer Science Undergraduate Programs Assessment Plan DRAFT September 14, 2011

Requirements Evolution of an Avionics Safety-Critical Industrial Case Study Predictive Changes Risk/Cost Analyses

Simple and error-free startup of the communication cluster. as well as high system stability over long service life are

Prediction of Business Process Model Quality based on Structural Metrics

Software Development for Multiple OEMs Using Tool Configured Middleware for CAN Communication

Montgomery County Government Enterprise Architecture Performance Architecture

You are in the Configuration Management Business

t Tests in Excel The Excel Statistical Master By Mark Harmon Copyright 2011 Mark Harmon


Concepts of QJ-Pro. Page 1 Copyright 2004 GPL License. All rights reserved.

UNIVERSAL TECHNICAL INSTITUTE

PayBiz Bank Accounts

Measuring Software Product Quality

Using the TASKING Software Platform for AURIX

Life Cycle Quality Gates

Advanced Testing Techniques

Does the Act of Refactoring Really Make Code Simpler? A Preliminary Study

Transcription:

HIS Source Code Metrics Stand: 01.04.2008 Version: 1.3.1 Autor: Kuder, Helmar Mitarbeit: Audi BMW Group DaimlerChrysler Porsche Volkswagen Albrecht Korn, Erwin Haunschild Dr. Bernhard Kalusche Helmar Kuder, Martin Huber, Andreas Krüger, Dr. Eric Sax (MBtech GmbH) Dr. Rüdiger Dorn, Jesper Hansson Herbert Tschinkel, Jörg Kluge HIS-SC-Metriken.1.3.1_e.doc S. 1 / 8

Inhaltverzeichnis 1 BACKGROUND... 3 1.1 General... 3 1.2 Reference Documents... 3 1.3 Glossary... 3 2 OUTLINE... 4 2.1 Metric Groups... 4 2.2 Variation of Metrics... 4 3 METRICS MEASUREMENT... 5 3.1 Metrics with limits... 5 3.2 Metrics without limits... 8 History Version Date Change 1.0 31.05.2005 First Official Version 1.1 30.11.2005 Range Reference to the Document, "HIS requirements for Software Test" New Glossary. 1.2 14.02.2006 Implementation of Tables 3-1 and 3-2, spelling corrections, limit value for ap-cg-cycle, 'Binding' Metrics without limits 1.3 11.05.2007 Update comments for metrics CALLING, stability index Si, NOMV, NOMVPR and ap_cg_cycle. 1.3.1 01.04.2008 Adding titel for ap_cg_cycle: number of recursions HIS-SC-Metriken.1.3.1_e.doc Version: 1.3.1 S. 2 / 8

1 Background 1.1 General HIS (Hersteller initiative Software - Manufacturer's software initiative) five working groups from the Automotive manufacturer's Audi, BMW Group, DaimlerChrysler, Porsche and Volkswagen whose goal is the production of agreed standards within the areas of Standard software modules for networks, Development of process maturity, Software test, Software tools and Programming of ECU's. Software Metrics are the basis for efficient project and quality management. With software Metrics statements can be made about the quality of the software product and the software development process. In this document HIS specifies a fundamental set of Metrics to be used in the evaluation of software. 1.2 Reference Documents Table 1-1 Reference Documents Document HIS Subset MISRA C 1.0.2 ISO/IEC 9899:1999 Definition Cyclomatic Complexity Title General Subset of the MlSRA C Guidelines Dated: 22.03.2004; Version: 1.0.2 Programming languages - C Stand: 1999 Complexity Metric (Arthur H. Watson, Thomas J. McCabe; Computer Systems Laboratory; National Institute of Standards and Technology; Gaithersburg, MD 20899-0001; United States of Americe) Date: August 1996 http://hissa.nist.gov/hhrfdata/artifacts/itldoc/235/chapter2.htm 1.3 Glossary Metric A measure (Metric) is the objective allocation of a value to an entity, in order to characterise a specific feature. (Source: German-language group of users for software Metrics and expenditure estimates http://www.dasma. Statement An action that can be implemented on an individual basis. (Source [ISO/IEC 9899:1999]; Kapitel 6.8: A statement specifies an action to be performed. ) HIS-SC-Metriken.1.3.1_e.doc Version: 1.3.1 S. 3 / 8

2 Outline 2.1 Metric Groups The fixed Metrics are raised on the basis of a "compilable unit"' 1. A Metric Statement should be raised for each function. 2.2 Variation of Metrics The software supplier is responsible for the documentation of the measured values in accordance with the software Metrics defined in this document. A fundamental distinction exists between Metrics which only need to be documented (table 3-2 Metrics without boundary limits) and in Metrics (table 3-1 Metrics with boundary limits), with which a violation of the boundary limit will lead to further action. All metrics have to be reported, all violations of the agreed boundary limits at the function level have to be justified. Correction of violations of the boundary limits of the metrics is user-specific (e.g. Functional Software, Operating System) and OEM-Specific. Each OEM could specify, for example, outside of the definitions in Table 3-l, which we'll call the "Green range", wider ranges within which he accepts the software subject to rework, the "Yellow range " or completely rejects it, the "Red range 'I. 1 Different Analysis tools define "compilable unit" to be "total software " even if the external interfaces refer to the opposite (partial extent), i.e. Limit values can differ dependent on whether "total software "or "partial extent " is being referenced. HIS-SC-Metriken.1.3.1_e.doc Version: 1.3.1 S. 4 / 8

3 Metrics Measurement 3.1 Metrics with limits Table 3-1 Metrics with limits Metric Description Comment Range Comment Density COMF Relationship of the number of comments (outside of and within fubctions) to the number of statements Comprehensibility, clarity in the code. With violation documentation to decide on the acceptance or rejection. According to its definition the value cannot be > 1 For example Logiscope: COMF = (BCOM + BCOB) / STMT > 0,2 For example QA-C: COMF = (STM28 / STM22) paths PATH non cyclic remark paths (i.e. minimum number of necessary cases of test) Measurement for the reduction of PATH:Allocation into several functions, Display in sub-functions. For example Logiscope: ct_path, PATH 1-80 For example QA-C: STPTH Go to Statements GOTO Go to Statements This drastically increases the number of paths and thus reduces testability For example Logiscope: ct_goto, GOTO 0 For example QA-C: STGTO Cyclomatic Complexity v(g) In accordance with the Cyclomatic Number [Definition Cyclomatic Complexity ] Measurement for the decrease in v(g): Allocation across several functions with paging into and out of sub-functions. For example Logiscope: ct_vg, VG, ct_cyclo For example CodeSurfer: vg 1-10 For example QA-C: STCYC Calling Functions CALLING By how many subfunctions is this function called? The range 1 to 5 only makes sense when the entire system is analysed. With subsystems and libraries 0 to 5 is permissible. For the complete system there is the exception of main(), since this will only be called by the Start-up-Code. For example Logiscope: dc_calling, NBCALLING 0-5 For example QA-C: STM29 called functions CALLS How many different functions does this function call? Calling the same subfunction counts only once. Examine width of nesting For example Logiscope: dc_calls, DRCT_CALLS For example QA-C: STCAL 0-7 HIS-SC-Metriken.1.3.1_e.doc Version: 1.3.1 S. 5 / 8

Metric Description Comment Range Complexity of the function, need for stack Function Parameters PARAM How complex is the function interface? Structures and Arrays hide the complexity in the same way. For example Logiscope: ic_param 0-5 For example QA-C: STPAR Instructions per function STMT How complex is the function? Empty functions fall through For example Logiscope: lc_stat, STMT For example QA-C: STST3 1-50 call Levels LEVEL Depth of nesting of a function. Maximum nesting levels within a function + 1 For example Logiscope: LEVL 0-4 For example QA-C: STMIF return points RETURN return points within a function Complexify of a function, Maintainability of a function, When does a function return. 0 = a function without a specific return statement 0-1 For example Logiscope: RETU For example QA-C: STM19 To be collected at a function level or at the total software level. The stability index S i The stability index supplies a measure of the number of the changes (changes, deletions, additions) between two versions of a piece of software. Stability Index Si = (STMT - (S change + S new + S del ))/STMT The value is per definition <= 1. The lower this value of this metric the more changes the new software version contains. If no changes had been made overall then the value of this metric would be 1. As might be expected the stability index for two early successive versions of a piece of software will be rather low and should always then continue to rise for the later versions. 0-1 For example Logiscope: not supported For example QA-C: not supported HIS-SC-Metriken.1.3.1_e.doc Version: 1.3.1 S. 6 / 8

Metric Description Comment Range Language scope VOCF The language scope is an indicator of the cost of maintaining/changing functions. VOCF = (N1 + N2) / (nl + n2), where nl = different operators N1 = Sum of all Operators n2 = different Operands N2 = Sum of all Operands Higher value = similar or duplicated code portions; Calls inlout of sub-functions need to be considered For example Logiscope: VOCF For example QA-C: Ermittelbar aus STOPN (n2), STOPT (n1), STM21 (N1), STM22 (N2) 1-4 NOMV NOMVPR recursions ap_cg_cycle Total number of the violations of the Rules of the [HIS Subset MISRA C 1.0.2]. NOMV = MISRA HIS Subset violations violations of each rule of the [HIS Subset MISRA C 1.0.2], Classified according to the rules. NOMVRP = MISRA violations per rule Call graph recursions Compliance of HIS rules within the Software production process For example Logiscope: nicht vorhanden For example QA-C: can be determined over Compliance Report. Compliance of HIS rules within the software production process. Should also contain a rule to identify,,dead Code For example Logiscope: nicht vorhanden For example QA-C: can be determined over Compliance Report. Recursions over one or more functions. For example Logiscope: ap_cg_cycle, GA_CYCLE For example QA-C: STNRA 0 0 0 HIS-SC-Metriken.1.3.1_e.doc Version: 1.3.1 S. 7 / 8

3.2 Metrics without limits The Metrics specified in the following table represent pure measured values which must still be documented in every case. Table 3-2 Metrics without limits Metric Description Comment Range S change STMT(changed) The number of statements in a piece of software which have changed between the previous and the current version of the software. Evaluation of the extent of change since the last official software release. This value is needed for the calculation of the stability index of Si. For example Logiscope: not supported For example QA-C: not supported S del STMT(deleted) The number of statements in a piece of software which have been deleted between the previous and the current version of the software. Evaluation of the extent of change since the last official software release. This value is needed for the calculation of the stability index of Si. For example Logiscope: not supported For example QA-C: not supported S new STMT(new) The number of statements in a piece of software which have added between the previous and the current version of the software. Evaluation of the extent of change since the last official software release. This value is needed for the calculation of the stability index of Si. For example Logiscope: not supported For example QA-C: not supported HIS-SC-Metriken.1.3.1_e.doc Version: 1.3.1 S. 8 / 8