Improving Structural Testing of Object-Oriented Programs via Integrating Evolutionary Testing and Symbolic Execution Kobi Inkumsah Tao Xie Dept. of Computer.

Slides:



Advertisements
Similar presentations
Masahiro Fujita Yoshihisa Kojima University of Tokyo May 2, 2008
Advertisements

Symbolic Execution with Mixed Concrete-Symbolic Solving
CS6800 Advanced Theory of Computation
1 An Adaptive GA for Multi Objective Flexible Manufacturing Systems A. Younes, H. Ghenniwa, S. Areibi uoguelph.ca.
November 5, 2007 ACM WEASEL Tech Efficient Time-Aware Prioritization with Knapsack Solvers Sara Alspaugh Kristen R. Walcott Mary Lou Soffa University of.
Computer Science Automated Test Data Generation for Aspect-Oriented Programs Mark Harman (King’s College London, UK) Fayezin Islam (T-Zero Processing Services,
On the Genetic Evolution of a Perfect Tic-Tac-Toe Strategy
Kai Pan, Xintao Wu University of North Carolina at Charlotte Generating Program Inputs for Database Application Testing Tao Xie North Carolina State University.
Hybrid Concolic Testing Rupak Majumdar Koushik Sen UC Los Angeles UC Berkeley.
Applying Genetic Algorithms to Decision Making in Autonomic Computing Systems Authors: Andres J. Ramirez, David B. Knoester, Betty H.C. Cheng, Philip K.
Non-Linear Problems General approach. Non-linear Optimization Many objective functions, tend to be non-linear. Design problems for which the objective.
Case Injected Genetic Algorithms Sushil J. Louis Genetic Algorithm Systems Lab (gaslab) University of Nevada, Reno
A Heuristic Bidding Strategy for Multiple Heterogeneous Auctions Patricia Anthony & Nicholas R. Jennings Dept. of Electronics and Computer Science University.
Case Injected Genetic Algorithms Sushil J. Louis Genetic Algorithm Systems Lab (gaslab) University of Nevada, Reno
A Hybrid Approach of Failed Disk Recovery Using RAID-6 Codes: Algorithms and Performance Evaluation Yinlong Xu University of Science and Technology of.
Artificial Intelligence Genetic Algorithms and Applications of Genetic Algorithms in Compilers Prasad A. Kulkarni.
Intro to AI Genetic Algorithm Ruth Bergman Fall 2002.
Chapter 14 Genetic Algorithms.
Genetic Algorithms Nehaya Tayseer 1.Introduction What is a Genetic algorithm? A search technique used in computer science to find approximate solutions.
D Nagesh Kumar, IIScOptimization Methods: M1L4 1 Introduction and Basic Concepts Classical and Advanced Techniques for Optimization.
Intro to AI Genetic Algorithm Ruth Bergman Fall 2004.
Chapter 6: Transform and Conquer Genetic Algorithms The Design and Analysis of Algorithms.
Copyright c 2006 Oxford University Press 1 Chapter 7 Solving Problems and Making Decisions Problem solving is the communication that analyzes the problem.
Coordinative Behavior in Evolutionary Multi-agent System by Genetic Algorithm Chuan-Kang Ting – Page: 1 International Graduate School of Dynamic Intelligent.
Genetic Programming.
Genetic Algorithm.
Tao Xie (North Carolina State University) Nikolai Tillmann, Jonathan de Halleux, Wolfram Schulte (Microsoft Research, Redmond WA, USA)
1 Outline:  Outline of the algorithm  MILP formulation  Experimental Results  Conclusions and Remarks Advances in solving scheduling problems with.
Introduction to Genetic Algorithms and Evolutionary Computation
Improved Gene Expression Programming to Solve the Inverse Problem for Ordinary Differential Equations Kangshun Li Professor, Ph.D Professor, Ph.D College.
UOS 1 Ontology Based Personalized Search Zhang Tao The University of Seoul.
Lecture 8: 24/5/1435 Genetic Algorithms Lecturer/ Kawther Abas 363CS – Artificial Intelligence.
Incorporating Evolutionary Fitness into Design Science By T. Grandon Gill.
Zorica Stanimirović Faculty of Mathematics, University of Belgrade
What is Genetic Programming? Genetic programming is a model of programming which uses the ideas (and some of the terminology) of biological evolution to.
Applying Genetic Algorithm to the Knapsack Problem Qi Su ECE 539 Spring 2001 Course Project.
Fuzzy Genetic Algorithm
Tao Xie North Carolina State University Nikolai Tillmann, Peli de Halleux, Wolfram Schulte Microsoft Research.
Computational Complexity Jang, HaYoung BioIntelligence Lab.
AUSTIN: A TOOL FOR SEARCH BASED SOFTWARE TESTING And its Evaluation on Deployed Automotive Systems Kiran Lakhotia, Mark Harman and Hamilton Gross in.
Bi-directional incremental evolution Dr Tatiana Kalganova Electronic and Computer Engineering Dept. Bio-Inspired Intelligent Systems Group Brunel University.
Exact and heuristics algorithms
Xusheng Xiao North Carolina State University CSC 720 Project Presentation 1.
Using GIS, Genetic Algorithms, and Visualization in Highway Development Authors: Jha, McCall, & Scholfeld Instructor: Prof Crouch Presenter: Mike Jones.
Genetic Algorithms What is a GA Terms and definitions Basic algorithm.
Chapter 12 FUSION OF FUZZY SYSTEM AND GENETIC ALGORITHMS Chi-Yuan Yeh.
A Test Case + Mock Class Generator for Coding Against Interfaces Mainul Islam, Christoph Csallner Software Engineering Research Center (SERC) Computer.
Benchmarking Effectiveness for Object-Oriented Unit Testing Anthony J H Simons and Christopher D Thomson.
Introduction Genetic programming falls into the category of evolutionary algorithms. Genetic algorithms vs. genetic programming. Concept developed by John.
Innovative and Unconventional Approach Toward Analytical Cadastre – based on Genetic Algorithms Anna Shnaidman Mapping and Geo-Information Engineering.
1Computer Sciences Department. 2 Advanced Design and Analysis Techniques TUTORIAL 7.
Lazy Annotation for Program Testing and Verification (Supplementary Materials) Speaker: Chen-Hsuan Adonis Lin Advisor: Jie-Hong Roland Jiang December 3,
Whole Test Suite Generation. Abstract Not all bugs lead to program crashes, and not always is there a formal specification to check the correctness of.
Agenda  INTRODUCTION  GENETIC ALGORITHMS  GENETIC ALGORITHMS FOR EXPLORING QUERY SPACE  SYSTEM ARCHITECTURE  THE EFFECT OF DIFFERENT MUTATION RATES.
Random Test Generation of Unit Tests: Randoop Experience
Symstra: A Framework for Generating Object-Oriented Unit Tests using Symbolic Execution Tao Xie, Darko Marinov, Wolfram Schulte, and David Notkin University.
哈工大信息检索研究室 HITIR ’ s Update Summary at TAC2008 Extractive Content Selection Using Evolutionary Manifold-ranking and Spectral Clustering Reporter: Ph.d.
Alignment, Part II Vasileios Hatzivassiloglou University of Texas at Dallas.
Genetic Algorithms and Evolutionary Programming A Brief Overview.
Genetic (Evolutionary) Algorithms CEE 6410 David Rosenberg “Natural Selection or the Survival of the Fittest.” -- Charles Darwin.
Intelligent Database Systems Lab 國立雲林科技大學 National Yunlin University of Science and Technology 1 Intelligent Exploration for Genetic Algorithms Using Self-Organizing.
Chapter 14 Genetic Algorithms.
Evolutionary Technique for Combinatorial Reverse Auctions
Bulgarian Academy of Sciences
A Test Case + Mock Class Generator for Coding Against Interfaces
Comparing Genetic Algorithm and Guided Local Search Methods
Software Testing: A Research Travelogue
Aiman H. El-Maleh Sadiq M. Sait Syed Z. Shazli
Methods and Materials (cont.)
Case Injected Genetic Algorithms
Presentation transcript:

Improving Structural Testing of Object-Oriented Programs via Integrating Evolutionary Testing and Symbolic Execution Kobi Inkumsah Tao Xie Dept. of Computer Science North Carolina State University, Raleigh, NC

2 Motivation Generating OO unit tests involves two tasks: Task 1: generating relevant method sequences Task 2: generating relevant method arguments Symbolic execution good at Task 2 but not Task 1 bounded exhaustive sequence but low bound Evolutionary testing good at Task 1 but not Task 2 concrete values can be evolved but largely random Contribution: Integrating the two techniques to address their respective weaknesses

3 Evolutionary Testing – Chromosome Encode a method sequence with argument values as a chromosome : E.g., eToc [Tonella 04] Method sequenceMethod arguments

Evolutionary Testing - Algorithm 1. Start with random population of chromosomes 2. Evolve population towards optimal solution by recombination and mutation P ← generateRandomPopulation() while P is not optimal CS ← evaluateFitness(chromosomes[ P ]) P´ ← performCrossOverOnPairsOf(CS) P ← mutate( P´ ) end while E.g., eToc [Tonella 04]

5 Fitness Calculation public void withdraw(double amount) { L1 if (amount > balance) { L2 printError(); L3 return; } L4 if (numberOfWithdrawals >= 10) L5 if (amount > ) { L6 printError(); L7 return;} L8 dispence(amount); L9 balance -= amount; L10 numberOfWithdrawals++; } Target eToc [Tonella 04]

6 Re-combination eToc [Tonella 04]

7 Re-combination eToc [Tonella 04]

8 Re-combination

9 Mutation randomly mutated to

Evolutionary Testing - Summary + Method sequences are evolved guided by fitness - Method arguments are largely randomly picked

11 Dynamic Symbolic Execution amount: 20.0 Also called concolic testing Ex. DART, jCUTE, Pex

12 Dynamic Symbolic Execution amount > 1.0 Also called concolic testing Ex. DART, jCUTE, Pex amount: 20.0

13 Dynamic Symbolic Execution Also called concolic testing Ex. DART, jCUTE, Pex amount: 20.0

14 Dynamic Symbolic Execution Also called concolic testing Ex. DART, jCUTE, Pex amount: 20.0

15 Dynamic Symbolic Execution Negates amount > 1.0 new constraint: amount <= 1.0 new value: amount: 1.0 Also called concolic testing Ex. DART, jCUTE, Pex amount: 20.0 (1.00);

Evolutionary Testing - Summary + Method sequences are evolved guided by fitness - Method arguments are largely randomly picked + Method arguments are solved - Method sequences are fixed (or bounded)

17 Evacon Not that good at argument generation Not that good at sequence generation

18 Argument Transformation Transform primitive arguments of method sequences (produced by evolutionary testing) into symbolic arguments. Benefits: Allow a symbolic execution tester (e.g., jCUTE) to do concrete and symbolic execution Transform any JUnit method sequence into a symbolic test driver.

19 Argument Transformation - Example Sym exe test generation

20 Evacon Not that good at argument generation Not that good at sequence generation

21 Chromosome Construction Construct chromosomes out of method sequences generated using symbolic execution Evolutionary test generation

22 Evacon - Summary Not that good at argument generation Not that good at sequence generation

23 Evaluation We compare Evacon’s achieved branch coverage with four publicly available test generation tools:  eToc [Tonella 04] alone  jCUTE [Sen&Agha 06] alone  JUnit Factory[Agitar Labs 07]  Randoop [Pacheco&Ernst 07]

24 Experimental Subjects

25 Branch Coverage Evacon-A achieves the highest branch coverage for 10 out of 13 subjects The best branch coverage can be achieved by tool combination for 8 out of 13 subjects

26 Required Length of Method Sequences The length of the longest method sequence generated by Evacon-A or Randoop that achieves new branch coverage - The required length reaches up to 23 - Bounded exhaustive testing may not be feasible

Branch Ranking What does branch coverage of two tools: 85% > 75% tell? Tool with 75% may be better at covering those difficult- to-cover branches when used in tool combination Need take into account difficulties of branches being covered (esp. using tools in combination) Proposed metric: #branches categorized into: Branch-1: covered by only 1 tool under comparison … Branch-n: covered by only n tools under comparison Covering more branches in Branch-1 means uniquely covering more branches not being covered by the other tools under comparison

Branch Ranking Evacon-A is best in terms of uniquely covering branches in Branch-1 Using Evacon-A + JUnit Factory is the best choice if only two tools are to be used (not necessarily Evacon-A + Randoop!) #Covered Branches/#Branches in category Branch-n

29 Conclusion A new integration of evolutionary testing and symbolic execution to achieve two tasks of OO test generation An empirical comparison of our integration with state-of- the-art representative testing tools A detailed comparison of the strengths and weaknesses of tools w.r.t achieving high structural coverage (e.g., branch ranking)

THANK YOU! Questions?

31 Experiments We applied two types of Evacon integrations:  Evacon-A and Evacon-B We measure branch coverage achieved by the tests generated by all six tools within the same period of runtime, except for JUnit Factory For remaining tools we use Evacon-A’s runtime as the common runtime

32 Coverage Subsumption Branch coverage of Evacon-A subsumed:  Evacon-B (in 12 of 13 PsUT)  eToc (in 7 of 13 PsUT)  jCUTE (in 3 of 13 PsUT)  JUnit Factory (in 1 of 13 PsUT)  Randoop (in 4 of the 13 PsUT) Branch coverage of Randoop subsumed :  Evacon-A (in 1 of 13 PsUT) Overall, branch coverage of Evacon-A + branch coverage of JUnit Factory subsumed branch coverage achieved by all tools in 5 of 13 PsUT