Elusive Bugs: Can you catch them all? Hong Zhu Department of Computing and Communications technology Oxford Brookes University, Oxford OX33 1HX, UK Email:

Slides:



Advertisements
Similar presentations
Chapter 15 Debugging. Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display Debugging with High Level Languages.
Advertisements

Debugging Techniques1. 2 Introduction Bugs How to debug Using of debugger provided by the IDE Exception Handling Techniques.
Starting Out with C++, 3 rd Edition 1 Chapter 1. Introduction to Computers and Programming.
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 23 Slide 1 Software testing.
16/13/2015 3:30 AM6/13/2015 3:30 AM6/13/2015 3:30 AMIntroduction to Software Development What is a computer? A computer system contains: Central Processing.
©Ian Sommerville 2000Software Engineering, 6th edition. Chapter 19Slide 1 Verification and Validation l Assuring that a software system meets a user's.
Chapter 2: Input, Processing, and Output
The future is bright with clouds Hong Zhu Dept of Computing and Communications technology Oxford Brookes University, Oxford OX33 1HX, UK
Applied Software Project Management Andrew Stellman & Jennifer Greene Applied Software Project Management Applied Software.
Software Issues Derived from Dr. Fawcett’s Slides Phil Pratt-Szeliga Fall 2009.
Chapter 9 Introduction to Procedures Dr. Ali Can Takinacı İstanbul Technical University Faculty of Naval Architecture and Ocean Engineering İstanbul -
CH07: Writing the Programs Does not teach you how to program, but point out some software engineering practices that you should should keep in mind as.
Software Testing Verification and validation planning Software inspections Software Inspection vs. Testing Automated static analysis Cleanroom software.
Dr. Pedro Mejia Alvarez Software Testing Slide 1 Software Testing: Building Test Cases.
Computer Programming and Basic Software Engineering 4. Basic Software Engineering 1 Writing a Good Program 4. Basic Software Engineering.
Testing. What is Testing? Definition: exercising a program under controlled conditions and verifying the results Purpose is to detect program defects.
Testing. Definition From the dictionary- the means by which the presence, quality, or genuineness of anything is determined; a means of trial. For software.
1. Topics to be discussed Introduction Objectives Testing Life Cycle Verification Vs Validation Testing Methodology Testing Levels 2.
CS 501: Software Engineering Fall 1999 Lecture 16 Verification and Validation.
Programming Lifecycle
Testing and Debugging Version 1.0. All kinds of things can go wrong when you are developing a program. The compiler discovers syntax errors in your code.
Testing. 2 Overview Testing and debugging are important activities in software development. Techniques and tools are introduced. Material borrowed here.
DEBUGGING. BUG A software bug is an error, flaw, failure, or fault in a computer program or system that causes it to produce an incorrect or unexpected.
C++ Programming Language Lecture 2 Problem Analysis and Solution Representation By Ghada Al-Mashaqbeh The Hashemite University Computer Engineering Department.
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 22 Slide 1 Software Verification, Validation and Testing.
1 Lecture 2 : Computer System and Programming. Computer? a programmable machine that  Receives input  Stores and manipulates data  Provides output.
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 20 Slide 1 Critical systems development 3.
CSE 332: C++ debugging Why Debug a Program? When your program crashes –Finding out where it crashed –Examining program memory at that point When a bug.
The basics of the programming process The development of programming languages to improve software development Programming languages that the average user.
Java Basics Hussein Suleman March 2007 UCT Department of Computer Science Computer Science 1015F.
Chapter 8 Lecture 1 Software Testing. Program testing Testing is intended to show that a program does what it is intended to do and to discover program.
Design - programming Cmpe 450 Fall Dynamic Analysis Software quality Design carefully from the start Simple and clean Fewer errors Finding errors.
Testing Chapter 23 IB103 Week 12 (part 3). Verify that a complex (any) program works correctly, that the program meets specifications The chapter reviews.
User-Defined Functions II TK1914: C++ Programming.
Software Testing Mehwish Shafiq. Testing Testing is carried out to validate and verify the piece developed in order to give user a confidence to use reliable.
TESTING FUNDAMENTALS BY K.KARTHIKEYAN.
The Hashemite University Computer Engineering Department
Error Handling Tonga Institute of Higher Education.
Chapter Topics 2.1 Designing a Program 2.2 Output, Input, and Variables 2.3 Variable Assignment and Calculations 2.4 Variable Declarations and Data Types.
Programming & Debugging. Key Programming Issues Modularity Modifiability Ease of Use Fail-safe programming Style Debugging.
1 The Software Development Process ► Systems analysis ► Systems design ► Implementation ► Testing ► Documentation ► Evaluation ► Maintenance.
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 23 Slide 1 Software testing.
Debugging Watch and Text Output Alice. Debugging Techniques Several techniques are helpful in eliminating errors (bugs) in programs: careful design incremental.
CSE 332: C++ expressions Expressions: Operators and Operands Operators obey arity, associativity, and precedence int result = 2 * 3 + 5; // assigns 11.
COMPUTER PROGRAMMING I SUMMER Understand Different Types of Programming Errors.
OCR A Level F453: The function and purpose of translators Translators a. describe the need for, and use of, translators to convert source code.
Debugging and Testing Hussein Suleman March 2007 UCT Department of Computer Science Computer Science 1015F.
Debuggers. Errors in Computer Code Errors in computer programs are commonly known as bugs. Three types of errors in computer programs –Syntax errors –Runtime.
Testing and Debugging UCT Department of Computer Science Computer Science 1015F Hussein Suleman March 2009.
Testing Tutorial 7.
Testing and Debugging PPT By :Dr. R. Mall.
Chapter 2: Input, Processing, and Output
Software Testing An Introduction.
Chapter 8 – Software Testing
Testing and Debugging.
Software Design and Development
Chapter 1. Introduction to Computers and Programming
Chapter Topics 2.1 Designing a Program 2.2 Output, Input, and Variables 2.3 Variable Assignment and Calculations 2.4 Variable Declarations and Data Types.
Chapter 18 Software Testing Strategies
Using local variable without initialization is an error.
Software testing strategies 2
Design and Programming
Introduction CSC 111.
When your program crashes
Test Case Test case Describes an input Description and an expected output Description. Test case ID Section 1: Before execution Section 2: After execution.
Software Verification and Validation
Software Verification and Validation
Chapter 2: Input, Processing, and Output
Software Verification and Validation
Scratch Programming Lesson 7 Debugging.
Presentation transcript:

Elusive Bugs: Can you catch them all? Hong Zhu Department of Computing and Communications technology Oxford Brookes University, Oxford OX33 1HX, UK

Program Debugging Current state of art? – Automation: Much work have been reported in the literature on automated debugging Input: – positive and negative test executions (traces) Output: – suggested location of bug(s) – Suggested correction of the bugs(s) – Empirical: Effectiveness of automated debugging tools are demonstrated by experiments and case studies Measurements: – percentage of bugs correctly located over all know bugs – Percentage of bugs correctly corrected

Experiences of debugging: Story 1 Year: 1996 Project: NDRASS – An Automated Tools for Requirements Analysis Support System What happened: – Phenomena: A procedure executes correctly for the first two calls, but does not produce the correct output even on the same parameters as the first call. – The bug: A local variable is declared as static. Lesson learned: – Bugs may be not in the statements.

Experiences of debugging: Story 2 Year: 1987 Project: – Meta-Programming for transformational software development Development environment: – Turbo-Pascal on PC 286 Program can declare variable to store data up to 64K; DOS OS/hardware have 640K memory; No graphic user interface. Phenomena: – The program has random errors: cannot find where the faults are! A piece of code is correct sometime, but not always correct! The bug: – Need one more slide to explain.

Heap Pointer A Pointer B … A^ := C^; … Pointer C … B^ := … … x1 := Exp1(B^); … The pieces of code where failure occurred: … B^ := … … x 2:= Exp2(B^); … The defect in code: The lesson learned: Bugs may be not in the piece of code where failure is observed.

Experiences of debugging: Story 3 Year: 1981 Project: – Checking the independency of the axioms of propositional logic using Hilbert method Development environment: – Modular-II on PDP-11 micro-computer Phenomena: – A piece of code is rather simple, and looks correct (I read it for so many times, and cannot find any problem.) – The output is not what I expected – Change the code to an equivalent one, the problem disappeared Lesson learned: – Bug may be not in your code! In this case, the bug is in the compiler! See AST 2011 proceedings for testing compilers and the findings of such bugs!

Where will your bugs be in the future? PaaS Platform IaaS (Cloud infrastructure/hardware) Code (service) Meta-data Data Code (service) Meta-data Data Tenant User Tenant User Illustration of Cloud computing architecture Watch out! New breeds of bugs are coming from the clouds!