Lecture 7. Advanced Topics in Tes3ng

Size: px
Start display at page:

Download "Lecture 7. Advanced Topics in Tes3ng"

Transcription

1 Lecture 7 Advanced Topics in Tes3ng

2 Muta3on Tes3ng Muta3on tes3ng concerns evalua3ng test suites for their inherent quality, i.e. ability to reveal errors. Need an objec3ve method to determine quality Differs from structural coverage since it tries to define what is an error Basic idea is to inject defined errors into the SUT and evaluate whether a given test suite finds them. Killing a muta+on

3 Basic Idea We can sta3s3cally es3mate (say) fish in a lake by releasing a number of marked fish, and then coun3ng the number of marked fish in a subsequent small catch. Example: release 20 fish Catch 40 fish, 4 marked. Then 1 in 10 is marked, so es3mate 200 fish Pursue the same idea with marked SW bugs?

4 Muta3ons and Mutants The marked fish are injected errors, termed muta3ons The mutated code is termed a mutant Example: replace < by > in a one Boolean expression if ( x < 0 ) then becomes if ( x > 0 ) then If test suite finds muta3on we say this par3cular mutant is killed Make large set of mutants typically using a checklist of known muta3ons - muta3on tool

5 Muta3on score Idea is that if we can kill a mutant we can iden3fy a real bug too Mutants which are seman3cally equivalent to the original code are called equivalents Write Q P if Q and P are equivalents Clearly cannot kill equivalents Muta3on score % = Number of killed mutants total number of non- equivalent mutants *100

6 Why should it work? Two assump3ons are used in this field Competent programmer hypothesis i.e. The program is mostly correct and the Coupling Effect

7 Seman3c Neighbourhoods Let Φ be the set of all programs seman3cally close to P (defined in various ways) Φ is neighbourhood of P Let T be a test suite, f:d D be a func3onal spec of P Tradi3onally assume t T P.x = f(x) x D P.x = f(x) i.e. T is a reliable test suite Requires exhaus3ve tes3ng

8 Competent Programmer Hypothesis P is pathological iff P Φ Assume programmers have some competence Muta3on tes3ng assump3on Either P is pathological or else t T P.x = f(x) x D P.x = f(x) Can now focus on building a test suite T that would dis3nguish P from all other programs in Φ

9 Coupling Effect The competent programmer hypothesis limits the problem from infinite to finite. But remaining problem is s3ll too large Coupling effect says that there is a small subset μ Φ such that: We only need to dis3nguish P from all programs in μ by tests in T

10 Problems Can we be sure the coupling effect holds? Do simple syntac3c changes define a set? Can we detect and count equivalents? If we can t kill a mutant Q is Q P or is Q just hard to kill? How large is μ? May s3ll be too large to be prac3cal?

11 Equivalent Mutants Offut and Pan [1997] es3mated 9% of all mutants equivalent Bybro [2003] concurs with 8% Automa3c detec3on algorithms (basically sta3c analysers) detect about 50% of these Use theorem proving (verifica3on) techniques

12 Coupling Effect For Q an incorrect version of P Seman3c error size = Pr{Q.x P.x} If for every seman3cally large fault there is an overlap with at least one small syntac3c fault then the coupling effect holds. Selec3ve muta3on based on a small set of seman3cally small errors - Hard to kill

13 Early Research: 22 Standard (Fortran) muta3on operators AAR Array reference for array reference replacement ABS Absolute value inser3on ACR Array reference for constant replacement AOR Arithme3c operator replacement ASR Array reference for scalar replacement CAR Constant for array reference replacement CNR Comparable array name replacement CRP Constants replacement CSR Constant for Scalar variable replacement DER Do statement End replacement DSA Data statement altera3ons GLR Goto label replacement LCR Logical connector replacement ROR Rela3onal operator replacement RSR Return statement replacement SAN Statement analysis SAR Scalar for array replacement SCR Scalar for constant replacement SDL Statement dele3on SRC Source constant replacement SVR Scalar variable replacement UOI Unary operator inser3on

14 Recent Research: Java Muta3on Operators First leser is category A = access control E = common programming mistakes I = inheritance J = Java- specific features O = method overloading P = polymorphism

15 AMC Access modifier change EAM Accessor method change EMM Modifier method change EOA Reference assignment and content assignment replacement EOC Reference comparison and content comparison replacement IHD Hiding variable dele3on IHI Hiding variable inser3on IOD Overriding method dele3on IOP Overriding method calling posi3on change IOR Overridden method rename IPC Explicit call of parent s constructor dele3on ISK super keyword dele3on JDC Java supported default constructor create

16 JID Member variable ini3alisa3on dele3on JSC sta3c modifier change JTD this keyword dele3on OAO Argument order change OAN Argument number change OMD Overloaded method dele3on OMR Overloaded method contents change PMD Instance variable dele3on with parent class type PNC new method call with child class type PPD Parameter variable declara3on with child class type PRV Reference asssignment with other compa3ble type

17 Prac3cal Example Triangle program Myers complete test suite (13 test cases) Bybro [2003] Java muta3on tool and code 88% muta3on score, 96% statement coverage

18 Status of Muta3on Tes3ng Various strategies: weak muta3on, interface muta3on, specifica3on- based muta3on Our version is called strong muta3on Many muta3on tools available on the internet Cost of genera3ng mutants and detec3ng equivalents has come down Not yet widely used in industry S3ll considered academic, not understood?

19 Learning- based Tes3ng 1. Specifica3on- based Black- box Tes3ng 2. Learning- based Tes3ng paradigm (LBT) connec3ons between learning and tes3ng tes3ng as a search problem tes3ng as an iden3fica3on problem - tes3ng as a parameter inference problem 3. Example frameworks: 1. Procedural systems 2. Boolean reac+ve systems

20 Specifica3on- based Black- box Tes3ng 1. System requirement (Sys- Req) 2. System under Test (SUT ) 3. Test verdict pass/fail (Oracle step) Sys-Req pass/fail Test case Output TCG SUT Oracle Constraint solver Language runtime Constraint checker

21 Procedural System Example: Newton s Square root algorithm precondi3on x 0.0 Postcondi3on Ι y*y x Ι ε x=4.0 y=2.0 TCG Input SUT Output Oracle Constraint solver Newton Code Constraint checker x=4.0 sa3sfies x 0.0 Verdict x=4.0, y=2.0 sa3sfies Ι y*y x Ι ε

22 Reac3ve System Example: Coffee Machine Sys- Req: always( in=$1 implies ayer(10, out=coffee) ) pass/fail In 0 := $1 out 11 := coffee TCG Input SUT Output Oracle Constraint solver Coffee machine Constraint checker in 0 := $1, out 11 := coffee Sa3sfies always( in=1$ implies ayer(10, out=coffee))

23 Key Problem: Feedback Problem: How to modify this architecture to.. 1. Improve next test case using previous test outcomes 2. Execute a large number of good quality tests? 3. Obtain good coverage? 4. Find bugs quickly?

24 Learning-Based Testing Sys- Req pass/fail TCG Input SUT Output Oracle Sys-Model Learner Verdict Model based testing without a model

25 Basic Idea LBT is a search heuris3c that: 1. Incrementally learns an SUT model 2. Uses generalisa3on to predict bugs 3. Uses best predic3on as next test case 4. Refines model according to test outcome

26 Abstract LBT Algorithm 1. Use (i 1, o 1 ),, (i k, o k ) to learn model M k 2. Model check M k against Sys- Req 3. Choose best counterexample i k+1 from step 2 4. Execute i k+1 on SUT to produce o k+1 5. Check if (i k+1, o k+1 ) sa3sfies Sys- Req a) Yes: terminate with i k+1 as a bug b) No: goto step 1 Difficul3es lie in the technical details

27 General Problems Difficulty is to find combina3ons of models, requirements languages and checking algorithms (M, L, A) so that 1. models M are: - expressive, - compact, - par3al and/or local (an abstrac3on method) - easy to manipulate and learn 2. M and L are feasible to model check with A

28 Incremental Learning Real systems are too large to be completely learned Complete learning is not necessary to test many requirements (e.g. use cases) We use incremental (on- the- fly) learning Generate a sequence of refined models M 0 M 1 M i Convergence in the limit

29 Example: Boolean reac+ve systems 1. SUT: reac3ve systems 2. Model: determinis3c Kripke structure 3. Requirements: proposi3onal linear temporal logic (PLTL) 4. Learning: IKL incremental learning algorithm 5. Model Checker: NuSMV

30 LBT Architecture =&)<57+ 0)>#6+?()(/&65/ 4'1/0$!" B( $$$$$$$$$$$$$$$$$$$$$$$ ()*+,-+.$(/01/0$!!" # #$% C+* D#D,+E/4,+A+'0 " 8#9:;+ :5<(',-(*.(/ CD>56-(E$E 3#657&6& & ' + 1,+.4<0+.$ (/01/0$!& +B/&*'(!&$! ,'4'8 9*0(1 ' 13**9:$$$6$$$;!"!!"#$%&'()*(+ ' 012+!"#$%$& 3'45/$6-7 '!! 0,/+9*0(1

31 A Case Study: Elevator Model '(#4#'-## '-# '(# )*(,#*-# *(,#*-# '+# '+# )*+,!",#)./01,#)2(,#)2+,#)2-# *+,#!",)./01,#)2(,#)2+,#)2-# '(#4#'+# '-# *(,#)*-# *(,#*-# '(#4#'+#4#'-# '(#4#'-## *-,#!",)./01,#)2(,#)2+,#)2-# '(#4#'+#4#'-# '+# *(,#)*+# *(,#*+# '(# '+# '-# '(# '+#4#'-# '-# '(# '+# '(# '+#4#'-# )*(,#)*-# )*(,#*-# )*(,#)*+# )*(,#*+# '-# $%!&#!"# '+# 4#'-# '+# 4#'+# '-# $%!&#4#'-#4#'+# '-## $%!&#!"# '(## '-#4# '-#4# '-## '(#4#'-#4# $%!&#!"# )*-,#./01,#)2(,#)2+,#2-# '-# '-# '-# $%!&# '(# '(# )!"# '+# $%!&# '+# )!"# $%!&# '-# '-# )!"# )*+,)*-# )!",)*+,#*-# )!",*+,)*-# *+,#*-# '(# '(# '(# )*(,)*-# )!",)*(,#*-# )!",)*(,#*-# )!",*(,)*-# )!",*(,)*-# )!",*(,#*-# )!",*(,#*-# )*(,)*+# )!",)*(,#*+# )!",*(,)*+# )!",*(,#*+# '(# '+# '+# '+#'-# '+# '+# '+# '(# '+# '(# '+#4# '(# '+# '(#4# '(#4#'+#4# '(#4# '(#4# '(#4#'-#4# )*(,#./01,#2(,#)2+,#)2-# )*+,#./01,#)2(,#2+,#)2-# '-# *+,#*-# *+,#)*-# '(#4#'+#4#'-# '(#4#'+# '+# '+# '-# )*+,#*-# )*+,#)*-# '(# '(#4#'-# *(,!",#)./01,#)2(,#)2+,#)2-# '-# )*(,#*-# )*(,#)*-# '(# '+# '(# '+#4#'-### '-# *(,#*-# *(,#)*-# '(#4#'+#4#'-## '(#4#'+### *+,!",#)./01,#)2(,#)2+,#)2-# '+# '+# '-# *(,#*-# *(,#)*-# '(#4#'-## '(# )*+,#!",#)./01,#)2(,#)2+,#)2-#

32 Elevator Results Req t first (sec) t total (sec) MCQ first MCQ tot PQ first PQ tot RQ first RQ tot Req Req Req Req Req Req

33 Conclusions A promising approach Flexible general heuris3c, many models and requirement languages seem possible Many SUT types might be testable procedural, reac3ve, real- 3me etc. Open Ques3ons Benchmarking? Scalability? (abstrac3on, infinite state?) Efficiency? (model checking and learning?)

Learning- Based So/ware Tes2ng: a Tutorial. K. Meinke, F. Niu, M. Sindhu KTH Royal Ins2tute of Technology Stockholm, Sweden

Learning- Based So/ware Tes2ng: a Tutorial. K. Meinke, F. Niu, M. Sindhu KTH Royal Ins2tute of Technology Stockholm, Sweden Learning- Based So/ware Tes2ng: a Tutorial K. Meinke, F. Niu, M. Sindhu KTH Royal Ins2tute of Technology Stockholm, Sweden 0. Overview of Talk 1. Specifica2on- based Black- box Tes2ng 2. Learning- based

More information

Towards Automated Mutation Testing

Towards Automated Mutation Testing Towards Automated Mutation Testing S. Madiraju S. Ramakrishnan A.J.Hurst 5th March, 2004 Abstract Mutation testing is a fault based testing technique used to find the effectiveness of test cases. It is

More information

AN EVALUATION OF MUTATION OPERATORS FOR EQUIVALENT MUTANTS. Maryam Umar

AN EVALUATION OF MUTATION OPERATORS FOR EQUIVALENT MUTANTS. Maryam Umar AN EVALUATION OF MUTATION OPERATORS FOR EQUIVALENT MUTANTS By Maryam Umar Supervised By Mark Harman A project submitted to the Department of Computer Science. King s College, London. In partial fulfilment

More information

Automa'c Test Genera'on

Automa'c Test Genera'on Automa'c Test Genera'on First, about Purify Paper about Purify (and PurifyPlus) posted How do you monitor reads and writes: insert statements before and a?er reads, writes in code can s'll be done with

More information

Fault-based testing. Automated testing and verification. J.P. Galeotti - Alessandra Gorla. slides by Gordon Fraser. Thursday, January 17, 13

Fault-based testing. Automated testing and verification. J.P. Galeotti - Alessandra Gorla. slides by Gordon Fraser. Thursday, January 17, 13 Fault-based testing Automated testing and verification J.P. Galeotti - Alessandra Gorla slides by Gordon Fraser How good are my tests? How good are my tests? Path testing Boundary interior testing LCSAJ

More information

Proofs about Programs

Proofs about Programs Proofs about Programs Program Verification (Rosen, Sections 5.5) TOPICS Program Correctness Preconditions & Postconditions Program Verification Assignment Statements Conditional Statements Loops Composition

More information

Investigating Faults Missed by Test Suites Achieving High Code Coverage

Investigating Faults Missed by Test Suites Achieving High Code Coverage Investigating Faults Missed by Test Suites Achieving High Code Coverage Amanda Schwartz, Daniel Puckett University of South Carolina Upstate aschwar2@uscupstate.edu,dpuckett@email.uscupstate.edu Ying Meng,

More information

Inter-Class Mutation Operators for Java

Inter-Class Mutation Operators for Java Inter-Class Mutation Operators for Java Yu-Seung Ma Division of Computer Science Dept of EE and CS Korea Adv Inst of Sci & Tech ysma@salmosa.kaist.ac.kr Yong-Rae Kwon Division of Computer Science Dept

More information

Advanced mutation operators applicable in C# programs

Advanced mutation operators applicable in C# programs Advanced mutation operators applicable in C# programs Anna Derezinska Institute of Computer Science, Warsaw University of Technology, Nowowiejska 15/19 00665 Warsaw, Poland A.Derezinskadii.pw.edu.pl Abstract.

More information

Program Verification (Rosen, Sections 5.5)

Program Verification (Rosen, Sections 5.5) Program Verification (Rosen, Sections 5.5) TOPICS Program Correctness Preconditions & Postconditions Program Verification Assignments Composition Conditionals Loops Proofs about Programs Why study logic?

More information

An Analysis of OO Mutation Operators

An Analysis of OO Mutation Operators An Analysis of OO Mutation Operators Jingyu Hu, Nan Li and Jeff Offutt Software Engineering George Mason University, Fairfax VA, USA janetjyhu@gmail.com, nli1@gmu.edu, offutt@gmu.edu Abstract This paper

More information

An Empirical Evaluation of the MuJava Mutation Operators

An Empirical Evaluation of the MuJava Mutation Operators An Empirical Evaluation of the MuJava Mutation Operators Ben H. Smith Department of Computer Science North Carolina State University Raleigh, NC 27695-8206 bhsmith3@ncsu.edu Laurie Williams Department

More information

What is Mutation Testing? Mutation Testing. Test Case Adequacy. Mutation Testing. Mutant Programs. Example Mutation

What is Mutation Testing? Mutation Testing. Test Case Adequacy. Mutation Testing. Mutant Programs. Example Mutation What is Mutation Testing? Mutation Testing Breaking the application to test it n Mutation Testing is a testing technique that focuses on measuring the adequacy of test cases n Mutation Testing is NOT a

More information

So#ware Tes+ng. See also Sommerville, Chapter 8 Amman and Offut, Introduc)on to So,ware Tes)ng, Cambridge University Press, 2008.

So#ware Tes+ng. See also Sommerville, Chapter 8 Amman and Offut, Introduc)on to So,ware Tes)ng, Cambridge University Press, 2008. So#ware Tes+ng See also Sommerville, Chapter 8 Amman and Offut, Introduc)on to So,ware Tes)ng, Cambridge University Press, 2008. Tes+ng Most basic form of post- hoc SQA Helps define program func+onality

More information

What is Search For? CS 188: Ar)ficial Intelligence. Constraint Sa)sfac)on Problems Sep 14, 2015

What is Search For? CS 188: Ar)ficial Intelligence. Constraint Sa)sfac)on Problems Sep 14, 2015 CS 188: Ar)ficial Intelligence Constraint Sa)sfac)on Problems Sep 14, 2015 What is Search For? Assump)ons about the world: a single agent, determinis)c ac)ons, fully observed state, discrete state space

More information

Vulnerability Analysis (III): Sta8c Analysis

Vulnerability Analysis (III): Sta8c Analysis Computer Security Course. Vulnerability Analysis (III): Sta8c Analysis Slide credit: Vijay D Silva 1 Efficiency of Symbolic Execu8on 2 A Sta8c Analysis Analogy 3 Syntac8c Analysis 4 Seman8cs- Based Analysis

More information

Mutation Testing. Tacoma Narrows Bridge also known as Galloping Gertie. Learning from Mistakes

Mutation Testing. Tacoma Narrows Bridge also known as Galloping Gertie. Learning from Mistakes Mutation Testing Andreas Zeller 1 Tacoma Narrows Bridge also known as Galloping Gertie 2 The Tacoma Narrows Bridge is a pair of mile-long (1600 meter) suspension bridges with main spans of 2800 feet (850

More information

Lecture 2. White- box Tes2ng and Structural Coverage (see Amman and Offut, Chapter 2)

Lecture 2. White- box Tes2ng and Structural Coverage (see Amman and Offut, Chapter 2) Lecture 2 White- box Tes2ng and Structural Coverage (see Amman and Offut, Chapter 2) White- box Tes2ng (aka. Glass- box or structural tes2ng) An error may exist at one (or more) loca2on(s) Line numbers

More information

Lecture 2. White- box Tes2ng and Structural Coverage (see Amman and Offut, Chapter 2)

Lecture 2. White- box Tes2ng and Structural Coverage (see Amman and Offut, Chapter 2) Lecture 2 White- box Tes2ng and Structural Coverage (see Amman and Offut, Chapter 2) White- box Tes2ng (aka. Glass- box or structural tes2ng) An error may exist at one (or more) loca2on(s) Line numbers

More information

Automa'c, Efficient, and General Repair of So8ware Defects using Lightweight Program Analyses

Automa'c, Efficient, and General Repair of So8ware Defects using Lightweight Program Analyses Automa'c, Efficient, and General Repair of So8ware Defects using Lightweight Program Analyses Disserta'on Proposal Claire Le Goues September 22, 2010 So8ware Errors Are Expensive Everyday, almost 300 bugs

More information

Object Oriented Mutation Applied in Java Application programming Interface and C++ Classes

Object Oriented Mutation Applied in Java Application programming Interface and C++ Classes Object Oriented Mutation Applied in Java Application programming Interface and C++ Classes Titu Singh Arora 1, Ravindra Gupta 2 M.Tech Scholar, Department of Computer Science, SSSIST Sehore, India 1 Professor

More information

RV: A Run'me Verifica'on Framework for Monitoring, Predic'on and Mining

RV: A Run'me Verifica'on Framework for Monitoring, Predic'on and Mining RV: A Run'me Verifica'on Framework for Monitoring, Predic'on and Mining Patrick Meredith Grigore Rosu University of Illinois at Urbana Champaign (UIUC) Run'me Verifica'on, Inc. (joint work with Dongyun

More information

CISC327 - So*ware Quality Assurance

CISC327 - So*ware Quality Assurance CISC327 - So*ware Quality Assurance Lecture 8 Introduc

More information

Inheritance and Encapsulation. Amit Gupta

Inheritance and Encapsulation. Amit Gupta Inheritance and Encapsulation Amit Gupta Project 1 How did it go? What did you like about it? What did you not like? What can we do to help? Suggestions Ask questions if you don t understand a concept

More information

Correlating automatic static analysis and mutation testing: towards incremental strategies

Correlating automatic static analysis and mutation testing: towards incremental strategies Araújo et al. Journal of Software Engineering Research and Development (2016) 4:5 DOI 10.1186/s40411-016-0031-8 RESEARCH Open Access Correlating automatic static analysis and mutation testing: towards

More information

What is software testing? Software testing is designing, executing and evaluating test cases in order to detect faults.

What is software testing? Software testing is designing, executing and evaluating test cases in order to detect faults. ϖοιδ τεσταδδανδχουντ() { ασσερ τεθυαλσ(1, ο.αδδανδχουντ(νεω ΑρραψΛιστ()); ϖοιδ τεσταδδανδχουντ() { ασσερ τεθυαλσ(1, ο.αδδανδχουντ(νεω ΑρραψΛιστ()); ιντ αδδανδχουντ(λιστ λιστ) { ρετυρν λιστ.σιζε(); ιντ

More information

Comparing the Effectiveness of Automatically Generated Tests by Randoop, JWalk and µjava with junit Tests

Comparing the Effectiveness of Automatically Generated Tests by Randoop, JWalk and µjava with junit Tests Comparing the Effectiveness of Automatically Generated Tests by Randoop, JWalk and µjava with junit Tests Nastassia Smeets July 19, 2009 Abstract This paper will explore and compare three automated testing

More information

Object-oriented mutation applied in Common Intermediate Language programs originated from C#

Object-oriented mutation applied in Common Intermediate Language programs originated from C# Object-oriented mutation applied in Common Intermediate Language programs originated from C# Anna Derezińska, Karol Kowalski Institute of Computer Science Warsaw University of Technology www.ii.pw.edu.pl/~adr/

More information

A Survey on Different Approaches for Efficient Mutation Testing

A Survey on Different Approaches for Efficient Mutation Testing International Journal of Scientific and Research Publications, Volume 3, Issue 4, April 2013 1 A Survey on Different Approaches for Efficient Mutation Testing MeghaJhamb *, AbhishekSinghal *, AbhayBansal

More information

Automated Program Debugging Research vs. Prac7ce?

Automated Program Debugging Research vs. Prac7ce? Automated Program Debugging Research vs. Prac7ce? Franz Wotawa Technische Universität Graz Ins2tute for So7ware Technology Inffeldgasse 16b/2, 8010 Graz, Austria wotawa@ist.tugraz.at Some ques7ons asked

More information

Differen'al Privacy. CS 297 Pragya Rana

Differen'al Privacy. CS 297 Pragya Rana Differen'al Privacy CS 297 Pragya Rana Outline Introduc'on Privacy Data Analysis: The SeAng Impossibility of Absolute Disclosure Preven'on Achieving Differen'al Privacy Introduc'on Sta's'c: quan'ty computed

More information

Garbage collec,on Parameter passing in Java. Sept 21, 2016 Sprenkle - CSCI Assignment 2 Review. public Assign2(int par) { onevar = par; }

Garbage collec,on Parameter passing in Java. Sept 21, 2016 Sprenkle - CSCI Assignment 2 Review. public Assign2(int par) { onevar = par; } Objec,ves Inheritance Ø Overriding methods Garbage collec,on Parameter passing in Java Sept 21, 2016 Sprenkle - CSCI209 1 Assignment 2 Review private int onevar; public Assign2(int par) { onevar = par;

More information

Sept 26, 2016 Sprenkle - CSCI Documentation is a love letter that you write to your future self. Damian Conway

Sept 26, 2016 Sprenkle - CSCI Documentation is a love letter that you write to your future self. Damian Conway Objec,ves Javadocs Inheritance Ø Final methods, fields Abstract Classes Interfaces Sept 26, 2016 Sprenkle - CSCI209 1 JAVADOCS Documentation is a love letter that you write to your future self. Damian

More information

INHERITANCE & POLYMORPHISM. INTRODUCTION IB DP Computer science Standard Level ICS3U. INTRODUCTION IB DP Computer science Standard Level ICS3U

INHERITANCE & POLYMORPHISM. INTRODUCTION IB DP Computer science Standard Level ICS3U. INTRODUCTION IB DP Computer science Standard Level ICS3U C A N A D I A N I N T E R N A T I O N A L S C H O O L O F H O N G K O N G INHERITANCE & POLYMORPHISM P2 LESSON 12 P2 LESSON 12.1 INTRODUCTION inheritance: OOP allows a programmer to define new classes

More information

Class Mutation Operators for C++ Object-Oriented Systems

Class Mutation Operators for C++ Object-Oriented Systems Noname manuscript No. (will be inserted by the editor) Class Mutation Operators for C++ Object-Oriented Systems Pedro Delgado-Pérez Inmaculada Medina-Bulo Juan José Domínguez-Jiménez Antonio García-Domínguez

More information

L7: Tes(ng. Smoke tes(ng. The test- vee Black- box vs. white- box tes(ng Tes(ng methods. Four levels of tes(ng. Case study

L7: Tes(ng. Smoke tes(ng. The test- vee Black- box vs. white- box tes(ng Tes(ng methods. Four levels of tes(ng. Case study Smoke tes(ng L7: Tes(ng The test- vee Black- box vs. white- box tes(ng Tes(ng methods Matrix test Step- by- step test Automated test scripts Four levels of tes(ng Debugging Unit tes?ng Integra?on tes?ng

More information

Search Engines. Informa1on Retrieval in Prac1ce. Annota1ons by Michael L. Nelson

Search Engines. Informa1on Retrieval in Prac1ce. Annota1ons by Michael L. Nelson Search Engines Informa1on Retrieval in Prac1ce Annota1ons by Michael L. Nelson All slides Addison Wesley, 2008 Evalua1on Evalua1on is key to building effec$ve and efficient search engines measurement usually

More information

COMP 3705 Advanced Software Engineering: Software Testing

COMP 3705 Advanced Software Engineering: Software Testing COMP 3705 Advanced Software Engineering: Software Testing Prof. Matt Rutherford Class 09-2009-03-02 (c) 2009 Matthew J. Rutherford For Next Week Readings Chapters 7 and 9 Homework #8 See website Class

More information

Encapsula)on, cont d. Polymorphism, Inheritance part 1. COMP 401, Spring 2015 Lecture 7 1/29/2015

Encapsula)on, cont d. Polymorphism, Inheritance part 1. COMP 401, Spring 2015 Lecture 7 1/29/2015 Encapsula)on, cont d. Polymorphism, Inheritance part 1 COMP 401, Spring 2015 Lecture 7 1/29/2015 Encapsula)on In Prac)ce Part 2: Separate Exposed Behavior Define an interface for all exposed behavior In

More information

Lecture 3. Black- box Tes3ng

Lecture 3. Black- box Tes3ng Lecture 3 Black- box Tes3ng Black- box Tes3ng Test cases are constructed without reference to the code structure + Can test the requirements not the code + Can overcome combinatorial explosions + Complementary

More information

Part I: Preliminaries 24

Part I: Preliminaries 24 Contents Preface......................................... 15 Acknowledgements................................... 22 Part I: Preliminaries 24 1. Basics of Software Testing 25 1.1. Humans, errors, and testing.............................

More information

About the Course. Reading List. Assignments and Examina5on

About the Course. Reading List. Assignments and Examina5on Uppsala University Department of Linguis5cs and Philology About the Course Introduc5on to machine learning Focus on methods used in NLP Decision trees and nearest neighbor methods Linear models for classifica5on

More information

Combining Complementary Formal Verification Strategies to Improve Performance and Accuracy

Combining Complementary Formal Verification Strategies to Improve Performance and Accuracy Combining Complementary Formal Verification Strategies to Improve Performance and Accuracy David Owen June 15, 2007 2 Overview Four Key Ideas A Typical Formal Verification Strategy Complementary Verification

More information

More Course Overview: Models, Tests, Bugs, and Symbols

More Course Overview: Models, Tests, Bugs, and Symbols Some logis@cs More Course Overview: Models, Tests, Bugs, and Symbols Everyone who wants to be registered is, right? Homework 1 will be posted tonight or tomorrow Due September 29, by 9 AM on moodle Requires

More information

Automatically Detecting Equivalent Mutants and Infeasible Paths. Mail Stop C204. phone: October 6, Abstract

Automatically Detecting Equivalent Mutants and Infeasible Paths. Mail Stop C204. phone: October 6, Abstract Automatically Detecting Equivalent Mutants and Infeasible Paths A. Jeerson Outt ISSE Department George Mason University Fairfax, VA 22030 phone: 703-993-1654 fax: 703-993-1638 email: ofut@isse.gmu.edu

More information

Predicting Mutation Score Using Source Code and Test Suite Metrics

Predicting Mutation Score Using Source Code and Test Suite Metrics Predicting Mutation Score Using Source Code and Test Suite Metrics by Kevin Jalbert A thesis submitted in partial fulllment of the requirements for the degree of Masters of Science in Computer Science

More information

Testing! Prof. Leon Osterweil! CS 520/620! Spring 2013!

Testing! Prof. Leon Osterweil! CS 520/620! Spring 2013! Testing Prof. Leon Osterweil CS 520/620 Spring 2013 Relations and Analysis A software product consists of A collection of (types of) artifacts Related to each other by myriad Relations The relations are

More information

Computer Programming-I. Developed by: Strawberry

Computer Programming-I. Developed by: Strawberry Computer Programming-I Objec=ve of CP-I The course will enable the students to understand the basic concepts of structured programming. What is programming? Wri=ng a set of instruc=ons that computer use

More information

Algorithms Lecture 11. UC Davis, ECS20, Winter Discrete Mathematics for Computer Science

Algorithms Lecture 11. UC Davis, ECS20, Winter Discrete Mathematics for Computer Science UC Davis, ECS20, Winter 2017 Discrete Mathematics for Computer Science Prof. Raissa D Souza (slides adopted from Michael Frank and Haluk Bingöl) Lecture 11 Algorithms 3.1-3.2 Algorithms Member of the House

More information

Redundancy and Dependability Evalua2on. EECE 513: Design of Fault- tolerant Systems

Redundancy and Dependability Evalua2on. EECE 513: Design of Fault- tolerant Systems Redundancy and Dependability Evalua2on EECE 513: Design of Fault- tolerant Systems Learning Objec2ves At the end of this lecture, you will be able to Define combinatorial models of reliability Evaluate

More information

AFortran Language System for Mutation-Based Software Testing y z K. N. KING

AFortran Language System for Mutation-Based Software Testing y z K. N. KING AFortran Language System for Mutation-Based Software Testing y z K. N. KING Department of Mathematics and Computer Science, Georgia State University, Atlanta, GA 30303, U.S.A. AND A. JEFFERSON OFFUTT Department

More information

Why OO programming? want but aren t. Ø What are its components?

Why OO programming? want but aren t. Ø What are its components? 9/21/15 Objec,ves Assign 1 Discussion Object- oriented programming in Java Java Conven,ons: Ø Constructors Ø Default constructors Ø Sta,c methods, variables Ø Inherited methods Ø Class names: begin with

More information

An Oversight on Mutation Testing

An Oversight on Mutation Testing An Oversight on Mutation Testing A.Ramya Research Scholar, Department of Computer Science, Sri Ramakrishna College of Arts and Science for Women, Coimbatore. S. Preetha, Assistant Professor, Department

More information

Research Article A Slice-Based Change Impact Analysis for Regression Test Case Prioritization of Object-Oriented Programs

Research Article A Slice-Based Change Impact Analysis for Regression Test Case Prioritization of Object-Oriented Programs Advances in So ware Engineering Volume 2016, Article ID 71404, 20 pages http://dx.doi.org/10.1155/2016/71404 Research Article A Slice-Based Change Impact Analysis for Regression Test Case Prioritization

More information

CS-202 Introduction to Object Oriented Programming

CS-202 Introduction to Object Oriented Programming CS-202 Introduction to Object Oriented Programming California State University, Los Angeles Computer Science Department Lecture III Inheritance and Polymorphism Introduction to Inheritance Introduction

More information

Program-based Mutation Testing

Program-based Mutation Testing Program-based Mutation Testing CS 4501 / 6501 Software Testing [Ammann and Offutt, Introduction to Software Testing, Ch. 9.2] 1 Applying Syntax-Based Testing to Programs Test requirements are derived from

More information

CISC327 - So*ware Quality Assurance. Lecture 13 Black Box Unit

CISC327 - So*ware Quality Assurance. Lecture 13 Black Box Unit CISC327 - So*ware Quality Assurance Lecture 13 Black Box Unit Tes@ng Black Box Unit Tes@ng Black box method tes@ng Test harnesses Role of code- level specifica@ons (asser@ons) Automa@ng black box unit

More information

Structural Testing & Mutation

Structural Testing & Mutation Structural Testing & Mutation Filippo Ricca DISI, Università di Genova, Italy ricca@disi.unige.it 1 White vs. Black box testing A white box testing is based upon explicit knowledge of the SUT and its structure

More information

Verifica(on of Concurrent Programs

Verifica(on of Concurrent Programs Verifica(on of Concurrent Programs Parker Aldric Mar With special thanks to: Azadeh Farzan and Zachary Kincaid Research Field: Program Verifica(on Goal is to program code that is safe, i.e. code that produces

More information

Introduction to Software Testing Chapter 5.1 Syntax-based Testing

Introduction to Software Testing Chapter 5.1 Syntax-based Testing Introduction to Software Testing Chapter 5.1 Syntax-based Testing Paul Ammann & Jeff Offutt http://www.cs.gmu.edu/~offutt/ softwaretest/ Ch. 5 : Syntax Coverage Four Structures for Modeling Software Graphs

More information

CISC327 - So*ware Quality Assurance

CISC327 - So*ware Quality Assurance CISC327 - So*ware Quality Assurance Lecture 12 Black Box Tes?ng CISC327-2003 2017 J.R. Cordy, S. Grant, J.S. Bradbury, J. Dunfield Black Box Tes?ng Outline Last?me we con?nued with black box tes?ng and

More information

Polymorphism 2/12/2018. Which statement is correct about overriding private methods in the super class?

Polymorphism 2/12/2018. Which statement is correct about overriding private methods in the super class? Which statement is correct about overriding private methods in the super class? Peer Instruction Polymorphism Please select the single correct answer. A. Any derived class can override private methods

More information

Effectual Mutation Analysis of Relational Database using Minimal Schemata with Parallelization

Effectual Mutation Analysis of Relational Database using Minimal Schemata with Parallelization Effectual Mutation Analysis of Relational Database using Minimal Schemata with Parallelization Thesis submitted in partial fulfillment of the requirements for the award of degree of Master of Technology

More information

Logis&c Regression. Aar$ Singh & Barnabas Poczos. Machine Learning / Jan 28, 2014

Logis&c Regression. Aar$ Singh & Barnabas Poczos. Machine Learning / Jan 28, 2014 Logis&c Regression Aar$ Singh & Barnabas Poczos Machine Learning 10-701/15-781 Jan 28, 2014 Linear Regression & Linear Classifica&on Weight Height Linear fit Linear decision boundary 2 Naïve Bayes Recap

More information

Model-Based Testing. (DIT848 / DAT261) Spring Lecture 3 White Box Testing - Coverage

Model-Based Testing. (DIT848 / DAT261) Spring Lecture 3 White Box Testing - Coverage Model-Based Testing (DIT848 / DAT261) Spring 2017 Lecture 3 White Box Testing - Coverage Gerardo Schneider Dept. of Computer Science and Engineering Chalmers University of Gothenburg Some slides based

More information

Related Course Objec6ves

Related Course Objec6ves Syntax 9/18/17 1 Related Course Objec6ves Develop grammars and parsers of programming languages 9/18/17 2 Syntax And Seman6cs Programming language syntax: how programs look, their form and structure Syntax

More information

Constraint-Based Automatic Test Data Generation. Department of Computer Science Clemson University. February 21, Abstract

Constraint-Based Automatic Test Data Generation. Department of Computer Science Clemson University. February 21, Abstract Constraint-Based Automatic Test Data Generation Richard A. DeMillo Software Engineering Research Center Department of Computer Sciences Purdue University West Lafayette, IN 47907 A. Jeerson Outt Department

More information

Implemen'ng OCaml in OCaml

Implemen'ng OCaml in OCaml 1 An OCaml defini'on of OCaml evalua'on, or, Implemen'ng OCaml in OCaml COS 326 David Walker Princeton University slides copyright 2013-2015 David Walker and Andrew W. Appel permission granted to reuse

More information

Regression Tes+ng. Midterm Wednesday Oct. 26, 7:00-8:30pm Room 142

Regression Tes+ng. Midterm Wednesday Oct. 26, 7:00-8:30pm Room 142 Regression Tes+ng Computer Science 521-621 Fall 2011 Prof. L. J. Osterweil Material adapted from slides originally prepared by Prof. L. A. Clarke Midterm Wednesday Oct. 26, 7:00-8:30pm Room 142 Closed

More information

What is Mutation Testing?

What is Mutation Testing? What is Mutation Testing? The premise in mutation testing is that small changes are made in a module and then the original and mutant modules are compared. Similar idea to error seeding: introduce defects

More information

Founda'ons of So,ware Engineering. Lecture 11 Intro to QA, Tes2ng Claire Le Goues

Founda'ons of So,ware Engineering. Lecture 11 Intro to QA, Tes2ng Claire Le Goues Founda'ons of So,ware Engineering Lecture 11 Intro to QA, Tes2ng Claire Le Goues 1 Learning goals Define so;ware analysis. Reason about QA ac2vi2es with respect to coverage and coverage/adequacy criteria,

More information

CS101: Fundamentals of Computer Programming. Dr. Tejada www-bcf.usc.edu/~stejada Week 1 Basic Elements of C++

CS101: Fundamentals of Computer Programming. Dr. Tejada www-bcf.usc.edu/~stejada Week 1 Basic Elements of C++ CS101: Fundamentals of Computer Programming Dr. Tejada stejada@usc.edu www-bcf.usc.edu/~stejada Week 1 Basic Elements of C++ 10 Stacks of Coins You have 10 stacks with 10 coins each that look and feel

More information

OUTCOMES BASED LEARNING MATRIX

OUTCOMES BASED LEARNING MATRIX OUTCOMES BASED LEARNING MATRIX Course: CTIM 372 Advanced Programming in C++ Department: Computer Technology and Information Management 3 credits/4 contact hours Description: This course is a continuation

More information

CISC327 - So*ware Quality Assurance

CISC327 - So*ware Quality Assurance CISC327 - So*ware Quality Assurance Lecture 12 Black Box Tes?ng CISC327-2003 2017 J.R. Cordy, S. Grant, J.S. Bradbury, J. Dunfield Black Box Tes?ng Outline Last?me we con?nued with black box tes?ng and

More information

Josh Bloch Charlie Garrod Darya Melicher

Josh Bloch Charlie Garrod Darya Melicher Principles of So3ware Construc9on: Objects, Design, and Concurrency Part 1: Introduc9on Course overview and introduc9on to so3ware design Josh Bloch Charlie Garrod Darya Melicher 1 So3ware is everywhere

More information

Analysis of the Development Process of a Mutation Testing Tool for the C++ Language

Analysis of the Development Process of a Mutation Testing Tool for the C++ Language Analysis of the Development Process of a Mutation Testing Tool for the C++ Language Pedro Delgado-Pérez, Inmaculada Medina-Bulo, Juan José Domínguez-Jiménez UCASE Software Engineering Group, Department

More information

Module: Sequence Alignment Theory and Applica8ons Session: BLAST

Module: Sequence Alignment Theory and Applica8ons Session: BLAST Module: Sequence Alignment Theory and Applica8ons Session: BLAST Learning Objec8ves and Outcomes v Understand the principles of the BLAST algorithm v Understand the different BLAST algorithms, parameters

More information

Topics in Software Testing

Topics in Software Testing Dependable Software Systems Topics in Software Testing Material drawn from [Beizer, Sommerville] Software Testing Software testing is a critical element of software quality assurance and represents the

More information

Introduction to Programming Using Java (98-388)

Introduction to Programming Using Java (98-388) Introduction to Programming Using Java (98-388) Understand Java fundamentals Describe the use of main in a Java application Signature of main, why it is static; how to consume an instance of your own class;

More information

Founda'ons of So,ware Engineering. Sta$c analysis (1/2) Claire Le Goues

Founda'ons of So,ware Engineering. Sta$c analysis (1/2) Claire Le Goues Founda'ons of So,ware Engineering Sta$c analysis (1/2) Claire Le Goues 1 Two fundamental concepts Abstrac'on. Elide details of a specific implementa$on. Capture seman$cally relevant details; ignore the

More information

CS395T Visual Recogni5on and Search. Gautam S. Muralidhar

CS395T Visual Recogni5on and Search. Gautam S. Muralidhar CS395T Visual Recogni5on and Search Gautam S. Muralidhar Today s Theme Unsupervised discovery of images Main mo5va5on behind unsupervised discovery is that supervision is expensive Common tasks include

More information

Having a BLAST with SLAM

Having a BLAST with SLAM Announcements Having a BLAST with SLAM Meetings -, CSCI 7, Fall 00 Moodle problems? Blog problems? Looked at the syllabus on the website? in program analysis Microsoft uses and distributes the Static Driver

More information

Testing. CMSC 433 Programming Language Technologies and Paradigms Spring A Real Testing Example. Example (Black Box)?

Testing. CMSC 433 Programming Language Technologies and Paradigms Spring A Real Testing Example. Example (Black Box)? Testing CMSC 433 Programming Language Technologies and Paradigms Spring 2007 Testing Feb. 15, 2007 Some slides adapted from FSE 98 Tutorial by Michal Young and Mauro Pezze Execute program on sample input

More information

CREATED BY: Muhammad Bilal Arslan Ahmad Shaad. JAVA Chapter No 5. Instructor: Muhammad Naveed

CREATED BY: Muhammad Bilal Arslan Ahmad Shaad. JAVA Chapter No 5. Instructor: Muhammad Naveed CREATED BY: Muhammad Bilal Arslan Ahmad Shaad JAVA Chapter No 5 Instructor: Muhammad Naveed Muhammad Bilal Arslan Ahmad Shaad Chapter No 5 Object Oriented Programming Q: Explain subclass and inheritance?

More information

A Model-Driven Approach to Situations: Situation Modeling and Rule-Based Situation Detection

A Model-Driven Approach to Situations: Situation Modeling and Rule-Based Situation Detection A Model-Driven Approach to Situations: Situation Modeling and Rule-Based Situation Detection Patrícia Dockhorn Costa Izon Thomas Mielke Isaac Pereira João Paulo A. Almeida jpalmeida@ieee.org http://nemo.inf.ufes.br

More information

Programming Embedded Systems

Programming Embedded Systems Programming Embedded Systems Lecture 8 Overview of software testing Wednesday Feb 8, 2012 Philipp Rümmer Uppsala University Philipp.Ruemmer@it.uu.se 1/53 Lecture outline Testing in general Unit testing

More information

Objec,ves. Review: Object-Oriented Programming. Object-oriented programming in Java. What is OO programming? Benefits?

Objec,ves. Review: Object-Oriented Programming. Object-oriented programming in Java. What is OO programming? Benefits? Objec,ves Object-oriented programming in Java Ø Encapsula,on Ø Access modifiers Ø Using others classes Ø Defining own classes Sept 16, 2016 Sprenkle - CSCI209 1 Review: Object-Oriented Programming What

More information

Agenda. Address vs. Value Consider memory to be a single huge array. Review. Pointer Syntax. Pointers 9/9/12

Agenda. Address vs. Value Consider memory to be a single huge array. Review. Pointer Syntax. Pointers 9/9/12 Agenda CS 61C: Great Ideas in Computer Architecture Introduc;on to C, Part II Instructors: Krste Asanovic Randy H. Katz hep://inst.eecs.berkeley.edu/~cs61c/f12 Review Pointers Administrivia Arrays Technology

More information

Argument Passing All primitive data types (int etc.) are passed by value and all reference types (arrays, strings, objects) are used through refs.

Argument Passing All primitive data types (int etc.) are passed by value and all reference types (arrays, strings, objects) are used through refs. Local Variable Initialization Unlike instance vars, local vars must be initialized before they can be used. Eg. void mymethod() { int foo = 42; int bar; bar = bar + 1; //compile error bar = 99; bar = bar

More information

Component diagrams. Components Components are model elements that represent independent, interchangeable parts of a system.

Component diagrams. Components Components are model elements that represent independent, interchangeable parts of a system. Component diagrams Components Components are model elements that represent independent, interchangeable parts of a system. Components are more abstract than classes and can be considered to be stand- alone

More information

The Vampire Theorem Prover. Krystof Hoder Andrei Voronkov

The Vampire Theorem Prover. Krystof Hoder Andrei Voronkov The Vampire Theorem Prover Krystof Hoder Andrei Voronkov Automated First- Order Automated we do not rely on user interac@on can be used a black- box by other tools Theorem Proving Automated First- Order

More information

Object Oriented Design (OOD): The Concept

Object Oriented Design (OOD): The Concept Object Oriented Design (OOD): The Concept Objec,ves To explain how a so8ware design may be represented as a set of interac;ng objects that manage their own state and opera;ons 1 Topics covered Object Oriented

More information

Review. Asser%ons. Some Per%nent Ques%ons. Asser%ons. Page 1. Automated Tes%ng. Path- Based Tes%ng. But s%ll need to look at execu%on results

Review. Asser%ons. Some Per%nent Ques%ons. Asser%ons. Page 1. Automated Tes%ng. Path- Based Tes%ng. But s%ll need to look at execu%on results Review Asser%ons Computer Science 521-621 Fall 2011 Prof. L. J. Osterweil Material adapted from slides originally prepared by Prof. L. A. Clarke Dynamic Tes%ng Execute program on real data and compare

More information

CMPSCI 521/621 Homework 2 Solutions

CMPSCI 521/621 Homework 2 Solutions CMPSCI 521/621 Homework 2 Solutions Problem 1 Direct data dependencies: 3 is directly data dependent on 1 and 5 5 is directly data dependent on 1,3, and 5 7 is directly data dependent on 1,3, and 5 Note,

More information

Programming Languages and Techniques (CIS120)

Programming Languages and Techniques (CIS120) Programming Languages and Techniques (CIS120) Lecture 7 January 30 th, 2015 Binary Search Trees (Lecture notes Chapter 7) ! Homework #1 feedback dope assignment, got a 96.4 the first time, careless mistake,

More information

Deformable Part Models

Deformable Part Models Deformable Part Models References: Felzenszwalb, Girshick, McAllester and Ramanan, Object Detec@on with Discrimina@vely Trained Part Based Models, PAMI 2010 Code available at hkp://www.cs.berkeley.edu/~rbg/latent/

More information

CS 6456 OBJCET ORIENTED PROGRAMMING IV SEMESTER/EEE

CS 6456 OBJCET ORIENTED PROGRAMMING IV SEMESTER/EEE CS 6456 OBJCET ORIENTED PROGRAMMING IV SEMESTER/EEE PART A UNIT I 1. Differentiate object oriented programming from procedure oriented programming. 2. Define abstraction and encapsulation. 3. Differentiate

More information

Chunking: An Empirical Evalua3on of So7ware Architecture (?)

Chunking: An Empirical Evalua3on of So7ware Architecture (?) Chunking: An Empirical Evalua3on of So7ware Architecture (?) Rachana Koneru David M. Weiss Iowa State University weiss@iastate.edu rachana.koneru@gmail.com With participation by Audris Mockus, Jeff St.

More information

What are the characteristics of Object Oriented programming language?

What are the characteristics of Object Oriented programming language? What are the various elements of OOP? Following are the various elements of OOP:- Class:- A class is a collection of data and the various operations that can be performed on that data. Object- This is

More information

Feature- Oriented Programming with Family Polymorphism

Feature- Oriented Programming with Family Polymorphism Feature- Oriented Programming with Family Polymorphism Fuminobu Takeyama Shigeru Chiba Tokyo Ins@tute of Technology 2012/03/25 Feature- Oriented Programming with Family Polymorphism 1 /24 Feature- oriented

More information