Xusheng Xiao North Carolina State University CSC 720 Project Presentation 1.

Slides:



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

1 Automating the Generation of Mutation Tests Mike Papadakis and Nicos Malevris Department of Informatics Athens University of Economics and Business.
Automating Software Module Testing for FAA Certification Usha Santhanam The Boeing Company.
Automated Test Data Generation Maili Markvardt. Outline Introduction Test data generation problem Black-box approach White-box approach.
Applications of Synchronization Coverage A.Bron,E.Farchi, Y.Magid,Y.Nir,S.Ur Tehila Mayzels 1.
Masahiro Fujita Yoshihisa Kojima University of Tokyo May 2, 2008
Automatic Verification Book: Chapter 6. What is verification? Traditionally, verification means proof of correctness automatic: model checking deductive:
A survey of techniques for precise program slicing Komondoor V. Raghavan Indian Institute of Science, Bangalore.
SMU SRG reading by Tey Chee Meng: Automatic Patch-Based Exploit Generation is Possible: Techniques and Implications by David Brumley, Pongsin Poosankam,
Kai Pan, Xintao Wu University of North Carolina at Charlotte Generating Program Inputs for Database Application Testing Tao Xie North Carolina State University.
Ongoing projects in the Program Analysis Group Marcelo d’Amorim Informatics Center, Federal University of Pernambuco (UFPE) Belo Horizonte, MG-Brazil,
Testing Without Executing the Code Pavlina Koleva Junior QA Engineer WinCore Telerik QA Academy Telerik QA Academy.
CSE503: SOFTWARE ENGINEERING SYMBOLIC TESTING, AUTOMATED TEST GENERATION … AND MORE! David Notkin Spring 2011.
1 Static Testing: defect prevention SIM objectives Able to list various type of structured group examinations (manual checking) Able to statically.
Pexxxx White Box Test Generation for
Intelligent Agents What is the basic framework we use to construct intelligent programs?
DART Directed Automated Random Testing Patrice Godefroid, Nils Klarlund, and Koushik Sen Syed Nabeel.
Review Best-first search uses an evaluation function f(n) to select the next node for expansion. Greedy best-first search uses f(n) = h(n). Greedy best.
Software Testing and QA Theory and Practice (Chapter 4: Control Flow Testing) © Naik & Tripathy 1 Software Testing and Quality Assurance Theory and Practice.
272: Software Engineering Fall 2012 Instructor: Tevfik Bultan Lecture 4: SMT-based Bounded Model Checking of Concurrent Software.
State coverage: an empirical analysis based on a user study Dries Vanoverberghe, Emma Eyckmans, and Frank Piessens.
Tao Xie North Carolina State University Supported by CACC/NSA Related projects supported in part by ARO, NSF, SOSI.
University of Palestine software engineering department Testing of Software Systems Fundamentals of testing instructor: Tasneem Darwish.
Tao Xie (North Carolina State University) Nikolai Tillmann, Jonathan de Halleux, Wolfram Schulte (Microsoft Research, Redmond WA, USA)
CUTE: A Concolic Unit Testing Engine for C Technical Report Koushik SenDarko MarinovGul Agha University of Illinois Urbana-Champaign.
Software (Program) Analysis. Automated Static Analysis Static analyzers are software tools for source text processing They parse the program text and.
Tao Xie Automated Software Engineering Group Department of Computer Science North Carolina State University
1 Software testing. 2 Testing Objectives Testing is a process of executing a program with the intent of finding an error. A good test case is in that.
Teaching and Learning Programming and Software Engineering via Interactive Gaming Tao Xie University of Illinois at Urbana-Champaign In collaboration with.
Bug Localization with Machine Learning Techniques Wujie Zheng
272: Software Engineering Fall 2012 Instructor: Tevfik Bultan Lecture 15: Automated Patch Generation.
Tao Xie North Carolina State University Nikolai Tillmann, Peli de Halleux, Wolfram Schulte Microsoft Research.
Test Coverage CS-300 Fall 2005 Supreeth Venkataraman.
Today’s Agenda  HW #1  Finish Introduction  Input Space Partitioning Software Testing and Maintenance 1.
Ongoing projects in the Program Analysis Group Marcelo d’Amorim Informatics Center, Federal University of Pernambuco (UFPE) Belo Horizonte, MG-Brazil,
Introduction to Problem Solving. Steps in Programming A Very Simplified Picture –Problem Definition & Analysis – High Level Strategy for a solution –Arriving.
1 Test Selection for Result Inspection via Mining Predicate Rules Wujie Zheng
1 Introduction to Software Testing. Reading Assignment P. Ammann and J. Offutt “Introduction to Software Testing” ◦ Chapter 1 2.
Automated Patch Generation Adapted from Tevfik Bultan’s Lecture.
jFuzz – Java based Whitebox Fuzzing
An Undergraduate Course on Software Bug Detection Tools and Techniques Eric Larson Seattle University March 3, 2006.
Cooperative Developer Testing: Tao Xie North Carolina State University In collaboration with Xusheng ASE and Nikolai Tillmann, Peli de
Scientific Debugging. Errors in Software Errors are unexpected behaviors or outputs in programs As long as software is developed by humans, it will contain.
CPSC 871 John D. McGregor Module 8 Session 1 Testing.
Static Techniques for V&V. Hierarchy of V&V techniques Static Analysis V&V Dynamic Techniques Model Checking Simulation Symbolic Execution Testing Informal.
Automating Configuration Troubleshooting with Dynamic Information Flow Analysis Mona Attariyan Jason Flinn University of Michigan.
CUTE: A Concolic Unit Testing Engine for C Koushik SenDarko MarinovGul Agha University of Illinois Urbana-Champaign.
Dynamic Testing.
Solving problems by searching A I C h a p t e r 3.
Random Test Generation of Unit Tests: Randoop Experience
Week 6 MondayTuesdayWednesdayThursdayFriday Testing III Reading due Group meetings Testing IVSection ZFR due ZFR demos Progress report due Readings out.
Testing Overview Software Reliability Techniques Testing Concepts CEN 4010 Class 24 – 11/17.
Symbolic Execution in Software Engineering By Xusheng Xiao Xi Ge Dayoung Lee Towards Partial fulfillment for Course 707.
CSE 331 SOFTWARE DESIGN & IMPLEMENTATION SYMBOLIC TESTING Autumn 2011.
Verification vs. Validation Verification: "Are we building the product right?" The software should conform to its specification.The software should conform.
Testing Integral part of the software development process.
On the Relation Between Simulation-based and SAT-based Diagnosis CMPE 58Q Giray Kömürcü Boğaziçi University.
CPSC 372 John D. McGregor Module 8 Session 1 Testing.
Wolfgang Runte Slide University of Osnabrueck, Software Engineering Research Group Wolfgang Runte Software Engineering Research Group Institute.
Control Flow Testing Handouts
Handouts Software Testing and Quality Assurance Theory and Practice Chapter 4 Control Flow Testing
Dynamic Symbolic Execution
Automated Pattern Based Mobile Testing
Faults, Errors, Failures CS 4501 / 6501 Software Testing
Outline of the Chapter Basic Idea Outline of Control Flow Testing
CSCI1600: Embedded and Real Time Software
Automated Patch Generation
Welcome to Corporate Training -1
CUTE: A Concolic Unit Testing Engine for C
CSCI1600: Embedded and Real Time Software
Presentation transcript:

Xusheng Xiao North Carolina State University CSC 720 Project Presentation 1

 Software Engineering (SE) is a knowledge- intensive activity, presumably requiring intelligence  Software Testing  Program Analysis  Debugging  Artificial Intelligence (AI) techniques are used to reduce human efforts in SE activities  assist or automate various activities of software engineering

 AI in software testing  prune search space for automatic test generation  AI in fault detection  apply machine learning on data-flow analysis for fault detection  AI in software repair  apply generic programming to automatically find patches for programs

 Structural testing is a widely used software testing technique  test internal structures of a program (i.e., white-box testing)  measure achieved structural coverage, e.g., ▪ Statement/Block Coverage ▪ Branch Coverage  Achieving at least high structural coverage is an important goal of structural testing  developers/testers manually produce test inputs  tools automatically generate test inputs 4

 Symbolic execution track programs symbolically rather than executing them with actual input value  track program input symbolically  collect constraints in the program  Dynamic Symbolic Execution (Concolic testing) systematically explore program paths to generate inputs  combine both concrete and symbolic execution  use constraint solver to obtain new inputs

Code to generate inputs for: Constraints to solve a!=null a!=null && a.Length>0 a!=null && a.Length>0 && a[0]== void CoverMe(int[] a) { if (a == null) return; if (a.Length > 0) if (a[0] == ) throw new Exception("bug"); } void CoverMe(int[] a) { if (a == null) return; if (a.Length > 0) if (a[0] == ) throw new Exception("bug"); } Observed constraints a==null a!=null && !(a.Length>0) a!=null && a.Length>0 && a[0]!= a!=null && a.Length>0 && a[0]== Data null {} {0} {123…} a==null a.Length>0 a[0]==123… T T F T F F Execute&Monitor Solve Choose next path Done: There is no path left. Negated condition 6 [Tillmann et al. TAP 08]

 In theory, DSE can explore all paths of a program eventually  The number of paths in a program increases exponentially on number of branches  In practice, it is impossible to explore all paths of a program

 Often the case, it is enough to achieve certain structural coverage of the program  statements  branches  atomic predicates  There is an mismatch between path-based coverage and such structural coverage goals  achieve new path coverage, but no new structural coverage  propose three heuristics to address this issue

 Perform a reachability analysis in terms of reachable items in the CFG  Decide whether the current path must be expanded based on the reachability analysis  If no new items can be reached, then exploration along the current path is stopped.

 The principle of the Max- Call Depth heuristic (MCD) is to prevent backtracking in deep nested calls  MCD may discard relevant paths and prevent the full coverage of the function under test.  On some programs MCD can discard many paths and still achieve full coverage.

 all alternative successors of a path are immediately resolved.  Along a path, shorter and potentially simpler prefixes are resolved before longer ones.  Some paths of the programs very distant from the first path are resolved quickly, allowing for potential faster initial coverage.

 A software fault (also called bug) refers to a static defect in the software.  A software fault may result in an incorrect internal state, which is referred to as software error.  If the software error is propagated to the output of the software, and results in incorrect behaviors with respect to the requirements or other description of the expected behavior, a software failure occurs

 Detect faults in program is a difficult task  software complexity and size grows quickly  concurrent faults depends on thread interleaving  semantic faults is program specific ▪ missing the reassignment of some variables ▪ incorrectly reuse some variables  There is a strong need in automate such task

 Regardless of the causes of all these faults, they all share a common characteristics incorrect data flow  a read instruction uses the value from an unexpected definition  Automatically detect faults by detecting such incorrect definition-use data flow

 Local/Remote (LR) Invariants  Follower Invariants

 Definition Set (DSet) Invariants

 Manual fault fixing is a difficult, time- consuming, labor-intensive process.  Automated approach is needed to reduce human efforts  Apply generic programming to automatically find patches for fixing programs

 GP operates on and maintains a population comprised of different programs  The fitness, or desirability, of each chromosome, is evaluated via an external fitness function.  Variations are introduced through mutation and crossover.  These operations create a new generation and the cycle repeats.

 An abstract syntax tree(AST) including all of the statements in the program  A weighted path through the program under test.  The weighted path is a list of pairs, each pair containing a statement in the program and a weight based on that statements occurrences in various test cases.

 Restrict the algorithm to only produce changes that are based on structures in other parts of the program.  hypothesize that a program that is missing important functionality (e.g., a null check) will be able to copy and adapt it from another location in the program.  Constrain the genetic operations of mutation and crossover to operate only on the region of the program that is relevant to the error  the portions of the program that were on the execution path that produced the error

 Use GP to maintain a population of variants of a program  Modifies variants using two genetic algorithm operations, crossover and mutation  Evaluates the fitness of each variant  a weighted sum of the positive and negative test cases it passes.  Their approach stops when a program variant that passes all of the test cases is found.

 AI in software testing  prune search space for automatic test generation  AI in fault detection  apply machine learning on data-flow analysis for fault detection  AI in software repair  apply generic programming to automatically find patches for programs

 DSet invariant extraction  LR invariant extraction  Follower invariant extraction

 DSet invariant violation  LR invariant violation  Follower invariant violation

 Pruning  barely exercised uses  barely exercised definitions  popular uses  Ranking