Software Metrics in Static Program Analysis



Similar documents
Unit 11: Software Metrics

Analysis Of Source Lines Of Code(SLOC) Metric

Mining Metrics to Predict Component Failures

Dr Ralf Huuck Curriculum Vitae

Tool Support for Inspecting the Code Quality of HPC Applications

Master of Sciences in Informatics Engineering Programming Paradigms 2005/2006. Final Examination. January 24 th, 2006

Quality Analysis with Metrics

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

Chap 4. Using Metrics To Manage Software Risks

Recovering Business Rules from Legacy Source Code for System Modernization

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

Different Approaches to White Box Testing Technique for Finding Errors

International Journal of Computer Science Trends and Technology (IJCST) Volume 3 Issue 4, Jul-Aug 2015

Design and Code Complexity Metrics for OO Classes. Letha Etzkorn, Jagdish Bansiya, and Carl Davis. The University of Alabama in Huntsville

A New Cognitive Approach to Measure the Complexity of Software s

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

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

Real-time Streaming Analysis for Hadoop and Flume. Aaron Kimball odiago, inc. OSCON Data 2011

Baseline Code Analysis Using McCabe IQ

International Journal of Software Engineering and Knowledge Engineering c World Scientific Publishing Company

Static vs. Dynamic. Lecture 10: Static Semantics Overview 1. Typical Semantic Errors: Java, C++ Typical Tasks of the Semantic Analyzer

Component visualization methods for large legacy software in C/C++

An Exception Monitoring System for Java

SOFTWARE REQUIREMENTS

Debugging. Common Semantic Errors ESE112. Java Library. It is highly unlikely that you will write code that will work on the first go

EPL603 Topics in Software Engineering


Technical paper review. Program visualization and explanation for novice C programmers by Matthew Heinsen Egan and Chris McDonald.

Function Point Measurement from Java Programs

CSE 373: Data Structure & Algorithms Lecture 25: Programming Languages. Nicki Dell Spring 2014

Measuring the Effect of Code Complexity on Static Analysis Results

Project Knowledge Management Based on Social Networks

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

Using Eclipse CDT/PTP for Static Analysis

I. INTRODUCTION. International Journal of Computer Science Trends and Technology (IJCST) Volume 3 Issue 2, Mar-Apr 2015

Regression Verification: Status Report

Securing PHP Based Web Application Using Vulnerability Injection

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

Software Defect Prediction Tool based on Neural Network

J a v a Quiz (Unit 3, Test 0 Practice)

Lecture 9. Semantic Analysis Scoping and Symbol Table

How To Understand Software Engineering

The role of Software Metrics on Software Development Life Cycle

Reducing Technical Debt Using Maintainability Index

Using Clang to Visualize Large Codebases. Nathan Hawes and Ben Barham Oracle Labs Australia October 2014

CSE 308. Coding Conventions. Reference

Static analysis on integration level

Thomas Jefferson High School for Science and Technology Program of Studies Foundations of Computer Science. Unit of Study / Textbook Correlation

1 White-Box Testing by Stubs and Drivers

Requirements. Version Control History. Implementation Technology. Software Process. Developers

Probabilistic Assertions

Database Application Developer Tools Using Static Analysis and Dynamic Profiling

CS 241 Data Organization Coding Standards

Programming Languages

GameTime: A Toolkit for Timing Analysis of Software

Fast Matching of Binary Features

Mining a Change-Based Software Repository

Analyzing Java Software by Combining Metrics and Program Visualization

Experiment Design and Analysis of a Mobile Aerial Wireless Mesh Network for Emergencies

1 External Model Access

Detecting Software Vulnerabilities Static Taint Analysis

StaRVOOrS: A Tool for Combined Static and Runtime Verification of Java

Fault Analysis in Software with the Data Interaction of Classes

A Complexity Measure Based on Cognitive Weights

Mining Repositories to Assist in Project Planning and Resource Allocation

Research Statement Immanuel Trummer

EXTENDED ANGEL: KNOWLEDGE-BASED APPROACH FOR LOC AND EFFORT ESTIMATION FOR MULTIMEDIA PROJECTS IN MEDICAL DOMAIN

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

Simplifying Failure-Inducing Input

Introducing Tetra: An Educational Parallel Programming System

Software Engineering & Architecture

Measuring Software Complexity to Target Risky Modules in Autonomous Vehicle Systems

Horizontal Aggregations In SQL To Generate Data Sets For Data Mining Analysis In An Optimized Manner

Analysis and Evaluation of Quality Metrics in Software Engineering

Algorithm & Flowchart & Pseudo code. Staff Incharge: S.Sasirekha

Cassandra. References:

Software Protection through Code Obfuscation

A Multi-layered Domain-specific Language for Stencil Computations

Obfuscation: know your enemy

Software Analysis Visualization

USING SPECTRAL RADIUS RATIO FOR NODE DEGREE TO ANALYZE THE EVOLUTION OF SCALE- FREE NETWORKS AND SMALL-WORLD NETWORKS

Complexity Metrics for Business Process Models

Research Article Predicting Software Projects Cost Estimation Based on Mining Historical Data

Prediction of Software Development Faults in PL/SQL Files using Neural Network Models

System Requirement Specification for A Distributed Desktop Search and Document Sharing Tool for Local Area Networks

Software quality improvement via pattern matching

Quantitative Evaluation of Software Quality Metrics in Open-Source Projects

APPROACHES TO SOFTWARE TESTING PROGRAM VERIFICATION AND VALIDATION

PostgreSQL Functions By Example

Software Testing. Quality & Testing. Software Testing

Transcription:

www.redlizards.com Software Metrics in Static Program Analysis ICFEM, 11/18/2010 Andreas Vogelsang 1, Ansgar Fehnker 2, Ralf Huuck 2, Wolfgang Reif 3 1 Technical University of Munich 2 NICTA, Sydney 3 University of Augsburg

Motivation Problems Maintainability Complexity Extensibility Causes Detection Localization Impact Measures Controlling Quality Continuous Early detection Software Metrics Static Program Analysi 11/18/2010 Software Metrics in Static Program Analysis - Andreas Vogelsang 2

Software Metrics You can t control what you can t measure Tom DeMarco. Controlling Software Projects. 1986 IEEE Standard 1061: Input: SW data Output: single numerical value degree to which a software possesses a given attribute Challenges: Definition, Visualization, Computation 11/18/2010 Software Metrics in Static Program Analysis - Andreas Vogelsang 3

Example Cyclomatic Complexity Thomas J. McCabe, 1976 Number of linearly independent paths through the control flow of a function If-then-else branching increases the possible ways through the function Cyclomatic Complexity is 2 int foo (int i) { if (i > 0) { return i; } else { return i; } } 11/18/2010 Software Metrics in Static Program Analysis - Andreas Vogelsang 4

Static Program Analysis Analyzing without executing Input: program code Early detection of bugs and design flaws Goanna 1 Bug detection for C/C++ programs Control Flow Extraction Model Checking 1 www.redlizards.com Fehnker et al. Model Checking Software at Compile Time Proceedings of the 1st IEEE & IFIP International Symposium on Theoretical Aspects of Software Engineering 11/18/2010 Software Metrics in Static Program Analysis - Andreas Vogelsang 5

Contributions Metric definition language Syntax Denotational semantics Automatic computation Generic visualization 11/18/2010 Software Metrics in Static Program Analysis - Andreas Vogelsang 6

Definition - GMSL Syntax Goanna Metric Specification Language Definition of metrics using AST query functions METRIC name (scope) WITH counting_variables DEF expression METRIC nb_methods (c IN classes()) WITH @n=methods_of_class(c) DEF @n AST classes() @n=2 @n=3 methods_of_class 11/18/2010 Software Metrics in Static Program Analysis - Andreas Vogelsang 7

GMSL examples METRIC largest_method(c IN classes()) WITH @lm = MAX loc(m) OVER m IN methods_of_class(c) DEF @lm METRIC cyclomatic_complexity(c IN classes()) WITH @cc = SUM cyc_comp(m) OVER m IN methods_of_class(c) DEF @cc METRIC LCOM_HS(c IN classes()) WITH @m = methods_of_class(c), @a = fields_of_class(c), Henderson-Sellers. Object-oriented metrics Prentice-Hall, pp.142-147, 1996. @s = SUM method_access(f,c) OVER f IN fields_of_class(c) DEF (@s/@a - @m)/(1 - @m) 11/18/2010 Software Metrics in Static Program Analysis - Andreas Vogelsang 8

Denotational semantics for GMSL General idea: A metric declaration describes a function that, given a certain environment, maps some nodes of a program to real numbers 11/18/2010 Software Metrics in Static Program Analysis - Andreas Vogelsang 9

Visualizations Time view: Metric view: Scope view: Correlation view: 11/18/2010 Software Metrics in Static Program Analysis - Andreas Vogelsang 10

Summary and Future Work Integration of Software Metrics in Static Program Analysis User-defined metrics Case study on Audacity (~90,000 LOC) Detection of several design flaws Future work Integration into commercial product Performance Tuning Language extensions 11/18/2010 Software Metrics in Static Program Analysis - Andreas Vogelsang 11

www.redlizards.com Thanks for listening Any questions?