Imperfect Debugging in Software Reliability



Similar documents
Bayesian Statistics in One Hour. Patrick Lam

Probabilistic Models for Big Data. Alex Davies and Roger Frigola University of Cambridge 13th February 2014

11. Time series and dynamic linear models

Gaussian Processes to Speed up Hamiltonian Monte Carlo

Markov Chain Monte Carlo Simulation Made Simple

Modeling and Analysis of Call Center Arrival Data: A Bayesian Approach


Tutorial on Markov Chain Monte Carlo

Message-passing sequential detection of multiple change points in networks

PS 271B: Quantitative Methods II. Lecture Notes

Simple Linear Regression Inference

CHAPTER 2 Estimating Probabilities

Web-based Supplementary Materials for Bayesian Effect Estimation. Accounting for Adjustment Uncertainty by Chi Wang, Giovanni

Big Data, Statistics, and the Internet

Supplement to Call Centers with Delay Information: Models and Insights

Errata and updates for ASM Exam C/Exam 4 Manual (Sixteenth Edition) sorted by page

C. Wohlin, M. Höst, P. Runeson and A. Wesslén, "Software Reliability", in Encyclopedia of Physical Sciences and Technology (third edition), Vol.

Basics of Statistical Machine Learning

Credit Risk Models: An Overview

Inference on Phase-type Models via MCMC

A Latent Variable Approach to Validate Credit Rating Systems using R

A Bootstrap Metropolis-Hastings Algorithm for Bayesian Analysis of Big Data

Hedging Options In The Incomplete Market With Stochastic Volatility. Rituparna Sen Sunday, Nov 15

3. Regression & Exponential Smoothing

The Dirichlet-Multinomial and Dirichlet-Categorical models for Bayesian inference

Binomial lattice model for stock prices

Financial Market Microstructure Theory

Model Selection and Claim Frequency for Workers Compensation Insurance

STA 4273H: Statistical Machine Learning

A Bayesian Antidote Against Strategy Sprawl

A LOGNORMAL MODEL FOR INSURANCE CLAIMS DATA

Part 2: One-parameter models

Maximum Likelihood Estimation

6.0 RELIABILITY ALLOCATION

Spatial Statistics Chapter 3 Basics of areal data and areal data modeling

Bayesian Statistics: Indian Buffet Process

Factorial experimental designs and generalized linear models

Using SAS PROC MCMC to Estimate and Evaluate Item Response Theory Models

Statistical Machine Learning

Christfried Webers. Canberra February June 2015

Bayesian coalescent inference of population size history

Package zic. September 4, 2015

Centre for Central Banking Studies

Model-based Synthesis. Tony O Hagan

Recent Developments of Statistical Application in. Finance. Ruey S. Tsay. Graduate School of Business. The University of Chicago

Basic Bayesian Methods

1 Prior Probability and Posterior Probability

Stock Price Dynamics, Dividends and Option Prices with Volatility Feedback

CHAPTER 6: Continuous Uniform Distribution: 6.1. Definition: The density function of the continuous random variable X on the interval [A, B] is.

Confidence Intervals for Exponential Reliability

The Exponential Distribution

Bayesian Approaches to Handling Missing Data

CCNY. BME I5100: Biomedical Signal Processing. Linear Discrimination. Lucas C. Parra Biomedical Engineering Department City College of New York

Introduction to Markov Chain Monte Carlo

Analysis of Bayesian Dynamic Linear Models

Multiple Choice Models II

Math 431 An Introduction to Probability. Final Exam Solutions

Department of Mathematics, Indian Institute of Technology, Kharagpur Assignment 2-3, Probability and Statistics, March Due:-March 25, 2015.

Section 5. Stan for Big Data. Bob Carpenter. Columbia University

CHAPTER 3 EXAMPLES: REGRESSION AND PATH ANALYSIS

MATH4427 Notebook 2 Spring MATH4427 Notebook Definitions and Examples Performance Measures for Estimators...

The Heston Model. Hui Gong, UCL ucahgon/ May 6, 2014

3F3: Signal and Pattern Processing

GLMs: Gompertz s Law. GLMs in R. Gompertz s famous graduation formula is. or log µ x is linear in age, x,

Generating Random Numbers Variance Reduction Quasi-Monte Carlo. Simulation Methods. Leonid Kogan. MIT, Sloan , Fall 2010

Chapter 13 Introduction to Nonlinear Regression( 非 線 性 迴 歸 )

Monte Carlo Methods in Finance

I. Basic concepts: Buoyancy and Elasticity II. Estimating Tax Elasticity III. From Mechanical Projection to Forecast

More details on the inputs, functionality, and output can be found below.

Linda K. Muthén Bengt Muthén. Copyright 2008 Muthén & Muthén Table Of Contents

2. Linear regression with multiple regressors

Parallelization Strategies for Multicore Data Analysis

Course 4 Examination Questions And Illustrative Solutions. November 2000

BayesX - Software for Bayesian Inference in Structured Additive Regression

Bayesian Analysis for the Social Sciences

Monte Carlo and Empirical Methods for Stochastic Inference (MASM11/FMS091)

Statistics Graduate Courses

Principle of Data Reduction

Electronic Theses and Dissertations UC Riverside

A General Approach to Variance Estimation under Imputation for Missing Survey Data

Final Mathematics 5010, Section 1, Fall 2004 Instructor: D.A. Levin

Alessandro Birolini. ineerin. Theory and Practice. Fifth edition. With 140 Figures, 60 Tables, 120 Examples, and 50 Problems.

Lecture notes: single-agent dynamics 1

Integrated Resource Plan

Package EstCRM. July 13, 2015

Reject Inference in Credit Scoring. Jie-Men Mok

Chapter 2: Binomial Methods and the Black-Scholes Formula

The Kelly criterion for spread bets

Transcription:

Imperfect Debugging in Software Reliability Tevfik Aktekin and Toros Caglar University of New Hampshire Peter T. Paul College of Business and Economics Department of Decision Sciences and United Health Care July 9, 2013 1/26 Tevfik Aktekin and Toros Caglar Imperfect Debugging in Software Reliability

Outline Outline: What is Meant by Software Reliability and Debugging? Motivation and Uncertainties of Interest Very Brief Overview of Software Reliability Models The Proposed Model and Its Bayesian Inference Numerical Applications of the Proposed Model Investigating The Existence of Perfect vs. Imperfect Debugging in Software Data 2/26 Tevfik Aktekin and Toros Caglar Imperfect Debugging in Software Reliability

What is Meant by Software Reliability? Definition Software Reliability: Can be defined as the probability of successful performance of software for a specified time interval under certain conditions. The fact that the software runs without any problems implies that the code is generating the intended output. A failure is said to occur on a piece of software, when a fault (or a so called bug) causes the software to fail. Note: If a failure does not occur for a period of time, this does not necessarily imply that the software is bug free. 3/26 Tevfik Aktekin and Toros Caglar Imperfect Debugging in Software Reliability

Debugging Stage in Software Reliability The goal of software testing (i.e. debugging) is to detect/fix software faults (bugs) inherent in the software code and to decide when to release the software. Software testing is expensive. Thus, there is a trade-off between releasing a reasonably good piece of software and keeping to debug. There are many examples of buggy software being released and negatively affecting sales (first impression in the market in gaming software for instance). The testing stage consists of several consecutive program executions. Whenever a failure occurs, the software engineer attempts to fix the problem. As the faults reveal themselves and are eliminated by the software engineer, the reliability of the software tends to increase if no new faults are introduced to the software during the elimination stage. 4/26 Tevfik Aktekin and Toros Caglar Imperfect Debugging in Software Reliability

Perfect vs. Imperfect Debugging Definition Perfect Debugging: If during the debugging stage the fault which caused the failure has been eliminated permanently and no new faults are introduced, then a perfect debugging is said to have occurred (software reliability gets better). Definition Imperfect Debugging: Loosely speaking, if during the debugging stage a fault is detected and is not eliminated permanently (ex: by introducing new faults), then an imperfect debugging is said to have occurred (software reliability stays the same or worsens). Note that there are many possible definitions of imperfect debugging (dealing with multiple faults vs. a single fault or the type of software being dealt with as in gaming vs. word processing). 5/26 Tevfik Aktekin and Toros Caglar Imperfect Debugging in Software Reliability

What is Meant by Software Reliability? P(T θ) is usually referred to as a software reliability model, where T represents the time to failure of a piece of software. It represents the probability that a particular piece of software will fail in a given interval. P(T t θ) for some t 0 represents the reliability function of T. Note that here the notion of time is based on the mission time t, in other words the time during which the software is executed. 6/26 Tevfik Aktekin and Toros Caglar Imperfect Debugging in Software Reliability

Statistical Motivation and Uncertainties of Interest Carry out inference on the unknown parameters such as the number of faults inherent in the code and fault detection rate after each stage of testing. Obtain the (predictive) reliability function after each debugging stage as a function of the parameters of interest. P(T i+1 t θ, D). (1) Making a decision on whether to stop the testing and release the software based on the reliability assessment of the software at time t. 7/26 Tevfik Aktekin and Toros Caglar Imperfect Debugging in Software Reliability

Software Reliability Models in Literature The following two can be considered to be the building blocks for most of the current software reliability models: Jelinski and Moranda (JM) Model (1972) Each fault is permanently removed upon failure (perfect debugging). Each fault contributes equally to the failure rate at any stage of the testing. Littlewood and Verall (LV) Model (1973) Both assumptions from the JM Model have been relaxed by the LV Model; perfect debugging and equally likely contributions from faults at each stage of debugging. 8/26 Tevfik Aktekin and Toros Caglar Imperfect Debugging in Software Reliability

Proposed Model Consider modeling of a multiplicative failure rate model whose components are evolving stochastically over testing stages (an NHPP type model). Proposed model is based on the Jelinski Moranda (JM) model as is the case for most subsequent work in the software reliability literature. Two of the main assumptions of the JM model is that every fault contributes equally to the failure rate at any stage of testing and that each fault is removed permanently upon failure. Consider the case where each fault is removed permanently upon failure, along with the possibility of introducing new faults during debugging. 9/26 Tevfik Aktekin and Toros Caglar Imperfect Debugging in Software Reliability

Proposed Model and Definitions t i,fori =1,...,N: time until failure during (or prior to) the ith stage of testing. φ i,fori =1,...,N: fault detection rate per fault during (or prior to) the ith stage of testing. λ i,fori =1,...,N: the number of faults present on the software code during (or prior to)the ith stage of testing. λ 1 : the number of faults present on the software code during (or prior to) the first stage of testing (i.e. prior o testing). Note that λ i swillbefunctionsofλ 1 and φ i s. φ i λ i : the failure rate of the software during (or prior to) the ith stage of testing. 10 / 26 Tevfik Aktekin and Toros Caglar Imperfect Debugging in Software Reliability

Proposed Model Assume that the inter-failure times, t i, are exponentially distributed. The likelihood would be L(Φ, Λ; D) = N φ i λ i exp{ t i φ i λ i }, (2) i=1 where Φ = {φ 1,...,φ N },Λ={λ 1,...,λ N } and D = {t 1,...,t N }. Therefore the joint posterior of Φ and Λ would be given by p(φ, Λ D) N φ i λ i exp{ t i φ i λ i }p(φ)p(λ). (3) i=1 11 / 26 Tevfik Aktekin and Toros Caglar Imperfect Debugging in Software Reliability

Modeling the fault detection rate per fault, φ i φ i s be given by the following power law relationship: φ i = φ β i 1 ν i, for i =1,...,N, (4) where ν i LN(0, σ 2 ). We can obtain the following the linear model in logarithms: log(φ i )=βlog(φ i 1 )+ɛ i, for i =1,...,N, (5) where ɛ i = log(ν i ). (5) is a first order autoregressive process of the latent fault detection rates per fault in the log scale. The conditional distributions of log(φ i )s can be written as log(φ i ) log(φ i 1 ),β N(βlog(φ i 1 ),σ 2 ), for i =1,...,N, (6) Note the scale of the inter-failure times (all above one in our numerical example). φ i s were all fractions and β was found to be between zero and one. To keep the interpretation of β consistent, it is always possible to rescale the data such that they are all above one. 12 / 26 Tevfik Aktekin and Toros Caglar Imperfect Debugging in Software Reliability

Modeling the fault detection rate per fault, φ i The relationship implied by (4) also dictates the type of debugging that occurs during the ith debugging stage. If φ i <φ i 1, then perfect debugging is said to have occurred. If φ i φ i 1, then imperfect debugging is said to have occurred. In other words, when a failure is detected at the (i 1)th failure epoch, a fault has been detected and repaired, however a new fault was introduced during the same debugging stage. β determines on average how the fault detection rate per fault is changing from stage to stage. For instance, when 0 <φ i 1 < 1andβ>1then perfect debugging tends to occur, conversely when 0 <β<1 then imperfect debugging tends to occur. 13 / 26 Tevfik Aktekin and Toros Caglar Imperfect Debugging in Software Reliability

Modeling the total number of faults, λ i Conditional on whether perfect or imperfect debugging has occurred during the previous debugging stage, the total number of faults left in the software code,λ i,isassumedtohavethefollowing structure λ i = λ i 1 γ i, for i =1,...,N (7) where γ i =1,withprobabilityp(φ i <φ i 1 ) =0,withprobabilityp(φ i φ i 1 )fori =1,...,N. In (7), γ i is a Bernoulli process whose probability of success is the probability of perfect debugging, p(φ i <φ i 1 ). When perfect debugging occurs, λ i goes down by one unit, since the fault that has caused the failure has been found and fixed. When imperfect debugging occurs, λ i stays the same, since the fault that has caused the failure has been found and fixed, however a new fault has been introduced while fixing the previous one. 14 / 26 Tevfik Aktekin and Toros Caglar Imperfect Debugging in Software Reliability

Other Model Priors For the model on φ i s, and σ 2 Gamma(a, b) (8) β U(c, d) (9) and for the initial fault detection rate, φ 1,weassumethefollowing φ 1 LN(e, f ) (10) For the initial number of inherent faults, λ 1,weassumethe following λ 1 Poisson(θ) (11) with θ Gamma(g, h). (12) 15 / 26 Tevfik Aktekin and Toros Caglar Imperfect Debugging in Software Reliability

Markov Chain Monte Carlo Estimation Goal: To generate samples from N p(φ,λ 1,θ,β,σ 2 D) φ i X i exp{ t i φ i λ i }p(φ β, σ 2 )p(λ 1 θ)p(β)p(σ 2 )p(θ). (13) i=1 In (13), the conditional joint prior distribution for φ i susing the chain rule and dropping terms that are independent can be obtained as p(φ β,σ 2 )=p(φ N φ N 1,β,σ 2 )...p(φ 2 φ 1,β,σ 2 )p(φ 1 ). (14) 16 / 26 Tevfik Aktekin and Toros Caglar Imperfect Debugging in Software Reliability

Markov Chain Monte Carlo Estimation To generate the full conditionals p(φ i...,d)fori =1,...,N: Use Metropolis-Hastings. p(λ 1...,D): Discrete. In addition, one can compute λ j as λ j 1 1(φ j <φ j 1 )forj =2,...,N once we have the required samples. p(θ...,d): Gamma p(β...,d): Normal p(σ 2...,D): Use Metropolis-Hastings. 17 / 26 Tevfik Aktekin and Toros Caglar Imperfect Debugging in Software Reliability

Markov Chain Monte Carlo Estimation To generate samples from p(φ,λ 1,θ,β,σ 2 D N ) 1 Assume the starting points (λ (0) 1,φ(0) 2,θ(0), (σ 2 ) (0),β (0) )andsetl=1. 2 Generate φ (l) 1 using λ (l 1) 1, φ (l) 2, β(l 1) and (σ 2 ) (l 1) from (φ 1...,D). 3 Sequentially generate φ (l) i φ (l) i 1 from (φ i...,d). for i =2,...,N using λ (l 1) 1, β (l 1), (σ 2 ) (l 1) and 4 Generate β (l) using (σ 2 ) (l 1) and φ (l) i for i =1,...,N from (β...,d). 5 Generate (σ 2 ) (l) using β (l) and φ (l) i for i =1,...,N from (σ 2...,D). 6 Generate λ (l) 1 using φ (l) i for i =1,...,N and θ (l 1) from (X 1...,D. 7 Sequentially compute λ (l) i for i =2,...,N using λ (l) i 1 via λ i = λ i 1 1(φ i <φ i 1 ). 8 Generate θ (l) using λ (l) 1 from (θ...,d N ). 9 Set l=l+1 and go back to step 1. and φ(l) i for i =1,...,N 18 / 26 Tevfik Aktekin and Toros Caglar Imperfect Debugging in Software Reliability

Numerical Example Dataset 1: The numerical application of our model is carried out on the well known dataset first reported in JM 1972. The dataset consists of 31 software inter-failure times, 26 of which were obtained during the production stage of debugging and the remaining 5 during the rest of the testing stage. In our example, all 31 inter-failure times were used (most inference is based on this one). Dataset 2: The military systems application data (data 17) of John Musa of Bell Telephone Laboratories 1 with 38 inter-failure times. (only used for comparison purposes). Model Comparison: Use the harmonic mean estimator of the marginal likelihood and the DIC. Models to Compare Against: MS88-M1, MS88-M2, KY96-GOS-W, KY96-RVS-P and a simple perfect debugging (PD) model. 1 http://www.thedacs.com/databases/sled/swrel.php 19 / 26 Tevfik Aktekin and Toros Caglar Imperfect Debugging in Software Reliability

Numerical Example ID PD MS88-M1 MS88-M2 KY96-GOS-W KY96-RVS-P log{p(d)} -108.55-191.06-116.51-113.81-114.01-111.77 DIC 215.49 218.09 227.76 226.24 223.26 222.90 Table: log{p(d)} and DIC for the JM dataset ID PD MS88-M1 MS88-M2 KY96-GOS-W KY96-RVS-P log{p(d)} -50.41-50.49-57.87-53.98.81-53.36-55.03 DIC 101.95 100.58 114.52 107.89 105.45 109.59 Table: log{p(d)} and DIC for the MUSA dataset 20 / 26 Tevfik Aktekin and Toros Caglar Imperfect Debugging in Software Reliability

Summary of Findings 0.00 0.01 0.02 0.03 0.04 0.05 Probability of Perfect Debugging 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 φ i 1 3 5 7 9 11 13 15 17 19 21 23 25 27 29 31 0 5 10 15 20 25 30 Debugging Stages Debugging Stages Figure: Boxplots of φ i for i =1,...,31 (left) and the probability of perfect debugging vs. debugging stages (right) 21 / 26 Tevfik Aktekin and Toros Caglar Imperfect Debugging in Software Reliability

Summary of Findings Density 0 5 10 15 Density 0 20 40 60 80 100 120 0.80 0.85 0.90 0.95 1.00 1.05 β 0.000 0.005 0.010 0.015 0.020 0.025 0.030 φ 1 Density 0.00 0.02 0.04 0.06 0.08 Density 0.00 0.05 0.10 0.15 0.20 10 20 30 40 θ 10 12 14 16 18 20 22 X 1 Figure: Posterior distribution plots of β,φ 1,θ and λ 1 22 / 26 Tevfik Aktekin and Toros Caglar Imperfect Debugging in Software Reliability

Summary of Findings X i 5 10 15 20 1 3 5 7 9 11 13 15 17 19 21 23 25 27 29 31 Debugging Stages Figure: Boxplots of λ i for i =1,...,31 23 / 26 Tevfik Aktekin and Toros Caglar Imperfect Debugging in Software Reliability

Summary of Findings Failure Rate 0.0 0.1 0.2 0.3 0.4 0.5 0.6 1 3 5 7 9 11 13 15 17 19 21 23 25 27 29 31 Debugging Stages Figure: Boxplot of the failure rates, φ i λ i,fori =1,...,31 24 / 26 Tevfik Aktekin and Toros Caglar Imperfect Debugging in Software Reliability

Predictive reliability function estimation The predictive reliability function during the i th testing stage (given that the software has gone through (i 1)th stages of testing) can be computed via R(t i D (i 1) )=1 1 S S j=1 F (t i φ (j) i,λ (j) i, D (i 1) ). (15) Once (15) is estimated it can easily be used as part of a software reliability optimal release scheme. Predictive Reliability Function After 28 Stages of Testing Predictive Reliability Function After 29 Stages of Testing Predictive Reliability Function After 30 Stages of Testing R(t D) 0.4 0.5 0.6 0.7 0.8 0.9 1.0 R(t D) 0.4 0.5 0.6 0.7 0.8 0.9 1.0 R(t D) 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0 0 10 20 30 40 50 0 10 20 30 40 50 0 10 20 30 40 50 t t t Figure: Predictive reliability functions for i =29,...,31 25 / 26 Tevfik Aktekin and Toros Caglar Imperfect Debugging in Software Reliability

Concluding Remarks and Future Work Introduce a Markov chain type of structure on the number of bugs repaired or introduced during the debugging stage instead of the current Bernoulli setup. Investigate the possibility of state space evolution of the β coefficient in the power law relationship between the inter-failure times. Note: Both extensions would be challenging from an MCMC estimation point of view. 26 / 26 Tevfik Aktekin and Toros Caglar Imperfect Debugging in Software Reliability