Using Set Operations on Code Coverage Data to Discover Program Properties by Nick Rutar.

Slides:



Advertisements
Similar presentations
Object Oriented Analysis And Design-IT0207 iiI Semester
Advertisements

Computer Science 2212a/b - UWO1 Structural Testing Motivation The gcov Tool An example using gcov How does gcov do it gcov subtleties Further structural.
November 2005J. B. Wordsworth: J5DAMQVT1 Design and Method Quality, Verification, and Testing.
Dynamically Discovering Likely Program Invariants to Support Program Evolution Michael D. Ernst, Jake Cockrell, William G. Griswold, David Notkin Presented.
Ch6: Software Verification. 1 Statement coverage criterion  Informally:  Formally:  Difficult to minimize the number of test cases and still ensure.
Dynamically Discovering Likely Program Invariants to Support Program Evolution Michael D. Ernst, Jake Cockrell, William G. Griswold, David Notkin Presented.
Information Modeling: The process and the required competencies of its participants Paul Frederiks Theo van der Weide.
Portability CPSC 315 – Programming Studio Spring 2008 Material from The Practice of Programming, by Pike and Kernighan.
How to Program in C++ CHAPTER 3: INPUT & OUTPUT INSTRUCTOR: MOHAMMAD MOJADDAM.
1 Software Testing and Quality Assurance Lecture 5 - Software Testing Techniques.
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 16 Slide 1 User interface design.
Software Life Cycle Model
CSE 332: C++ program structure and development environment C++ Program Structure (and tools) Today we’ll talk generally about C++ development (plus a few.
1CMSC 345, Version 4/04 Verification and Validation Reference: Software Engineering, Ian Sommerville, 6th edition, Chapter 19.
Test Design Techniques
CSC 8310 Programming Languages Meeting 2 September 2/3, 2014.
Review of C++ Programming Part II Sheng-Fang Huang.
Software Testing Sudipto Ghosh CS 406 Fall 99 November 9, 1999.
©Ian Sommerville 2000Software Engineering, 6th edition. Chapter 19Slide 1 Verification and Validation l Assuring that a software system meets a user's.
Object Oriented Software Development
© Janice Regan, CMPT 128, Jan CMPT 128 Introduction to Computing Science for Engineering Students Creating a program.
Software Testing. Definition To test a program is to try to make it fail.
Imperative Programming
CIS Computer Programming Logic
المحاضرة الثالثة. Software Requirements Topics covered Functional and non-functional requirements User requirements System requirements Interface specification.
1 Debugging and Testing Overview Defensive Programming The goal is to prevent failures Debugging The goal is to find cause of failures and fix it Testing.
GNU gcov (1/4) [from Wikipedia] gcov is a source code coverage analysis and statement- by-statement profiling tool. gcov generates exact counts of the.
JAVA SERVER PAGES. 2 SERVLETS The purpose of a servlet is to create a Web page in response to a client request Servlets are written in Java, with a little.
IF-ELSE IF-ELSE STATEMENT SWITCH-CASE STATEMENT Computer Programming Asst. Prof. Dr. Choopan Rattanapoka and Asst. Prof. Dr. Suphot Chunwiphat.
Watching Software Run Brian ChessNov 18, Success is foreseeing failure. – Henry Petroski.
Problem Solving Techniques. Compiler n Is a computer program whose purpose is to take a description of a desired program coded in a programming language.
Lecture 1 Introduction Figures from Lewis, “C# Software Solutions”, Addison Wesley Richard Gesick.
16 October Reminder Types of Testing: Purpose  Functional testing  Usability testing  Conformance testing  Performance testing  Acceptance.
Property of Jack Wilson, Cerritos College1 CIS Computer Programming Logic Programming Concepts Overview prepared by Jack Wilson Cerritos College.
 Learn about control structures  Examine relational and logical operators  Explore how to form and evaluate logical (Boolean) expressions  Learn how.
SilkTest 2008 R2 SP1: Silk4J Introduction. ConfidentialCopyright © 2008 Borland Software Corporation. 2 What is Silk4J? Silk4J enables you to create functional.
Java Basics Hussein Suleman March 2007 UCT Department of Computer Science Computer Science 1015F.
Week 14 Introduction to Computer Science and Object-Oriented Programming COMP 111 George Basham.
Chapter 1: Fundamental of Testing Systems Testing & Evaluation (MNN1063)
Software Engineering1  Verification: The software should conform to its specification  Validation: The software should do what the user really requires.
CSE 332: C++ Statements C++ Statements In C++ statements are basic units of execution –Each ends with ; (can use expressions to compute values) –Statements.
The Development Process Compilation. Compilation - Dr. Craig A. Struble 2 Programming Process Problem Solving Phase We will spend significant time on.
Winter 2007SEG2101 Chapter 121 Chapter 12 Verification and Validation.
C++ Namespaces, Exceptions CSci 588: Data Structures, Algorithms and Software Design All material not from online sources copyright © Travis Desell, 2011.
Testing Overview Software Reliability Techniques Testing Concepts CEN 4010 Class 24 – 11/17.
Lecture #1: Introduction to Algorithms and Problem Solving Dr. Hmood Al-Dossari King Saud University Department of Computer Science 6 February 2012.
Chapter 1: Introduction to Computers and Programming.
Revisiting building. Preprocessing + Compiling 2 Creates an object file for each code file (.c ->.o) Each.o file contains code of the functions and structs.
Part 1 The Basics of Information Systems. Purpose of Information Systems Information systems ◦ Collects, stores and organizes information ◦ Retrieves.
Windows Programming Lecture 06. Data Types Classification Data types are classified in two categories that is, – those data types which stores decimal.
Testing It is much better to have a plan when testing your programs than it is to just randomly try values in a haphazard fashion. Testing Strategies:
CSE 332: C++ Exceptions Motivation for C++ Exceptions Void Number:: operator/= (const double denom) { if (denom == 0.0) { // what to do here? } m_value.
UC Marco Vieira University of Coimbra
Lab 7 Control-Flow Testing
Testing Tutorial 7.
CSE687 – Object Oriented Design
A bit of C programming Lecture 3 Uli Raich.
CPSC 315 – Programming Studio Spring 2012
Verification and Validation
Verification and Validation
John D. McGregor Session 9 Testing Vocabulary
Conversions of the type of the value of an expression
Cryptography This week we are going to use OpenSSL
Portability CPSC 315 – Programming Studio
GNU gcov (1/4) [from Wikipedia]
PPT1: How failures come to be
Coding Concepts (Basics)
ReSharper Dainius Kreivys.
GNU gcov (1/4) [from Wikipedia]
CSE 1020:Software Development
Presentation transcript:

Using Set Operations on Code Coverage Data to Discover Program Properties by Nick Rutar

Motivation Many Programs already have code coverage data  Various Code Coverage Tools Available  Widely Explored Area of Research  Regression tests with coverage data becoming more common Code coverage data contains wealth of information about the program Data usually limited to how program reports it Want to milk the data for all it is worth  Possibly useful for finding errors in the program

Code Coverage Three Main Types  Statement Every line of code  Conditional Every decision in program (if/else)  Path Every path in the program Program usually Instrumented  Dynamic or Static Usually presented as a composite of separate tests

Using Set Operations Why use set operations? Most developers familiar with sets Data for statement coverage maps nicely onto sets Possible to manipulate data easily and give glimpses of properties of the code Most code coverage tools implicitly use sets anyway

Set Operations Union  Traditional Coverage Intersection  Lines ran on all tests Difference  Potential for Locating Errors  Probably biggest stretch from what data is currently being used for

Set Operations At Work int main(int argc, char *argv) { int x, y, z; x = y = z =0; if (argc == 2) x = atoi(argv[1]); if (x == 1) y = 3; else if (x == 2) y = 4; if (y > 0) z = 5; else z = -2; return z; } Inputs No input 1 Union Intersection Difference 2

Off the Beaten Path Sets Diff, - Union, U Intersection, I U/I Bad Sets - U Good Sets  Sometimes give better basis for finding bad code  Closest example of prior work only dealt with one bad run at a time Any given test - itself  Gives you the empty set U (I of Sets & (U/I Bad Sets - U Good Sets))  Gives you a very rough slice of program that went bad Manipulate data as seen fit for what you are looking for …

Other Code Coverage Info Pareto principle  Better known as rule  Pareto noticed 80% of the land in Italy owned by 20% of people  Shows up in all kinds of domains Nick’s high school - 80% of girls dated 20% of the boys  Software rule 20% of the lines of code is 80% of the runtime of the software Code Coverage often has frequency information Use that information for performance bottlenecks

Implementation Create tool that can use the set information Implementation details  Created in Java  Based on output of format from LCOV coverage tool  Takes in pre-generated coverage information as input  Supports Union, Difference, and Intersection  Supports Frequency Information

Demo

Evaluation Test Large Program against its regression test  Use Dyninst for evaluation C++ program that does binary instrumentation 100+ Source Files ~30,000 LOC instrumented to create coverage data Nightly build already has coverage capability with regression tests  Verify Union matches coverage data given by tool  Use Difference to try to find errors Series of tests with various inputs See which inputs cause failure and locate lines to discover error

Future Work For the Tool  Create Template for Insertion into program This program doesn’t care what language you are using Just needs input format to generate initial sets Specify format in text file, program uses it to input data  Better Visualization to specify points of interest Highlight source code that still has active lines  Usability Write now more of a proof of concept than a battle hardened tool In General  More evaluation of using Diff for finding errors in the program  Evaluation of software bottlenecks  IDE integration

Questions???