1 PASTE’07 Discovering Accurate Interclass Test Dependence Weilei Zhang, Barbara Ryder Department of Computer Science Rutgers University.

Slides:



Advertisements
Similar presentations
Context-Sensitive Interprocedural Points-to Analysis in the Presence of Function Pointers Presentation by Patrick Kaleem Justin.
Advertisements

Graph Coverage for Design Elements 1.  Use of data abstraction and object oriented software has increased importance on modularity and reuse.  Therefore.
A Regression Test Selection Technique for Aspect- Oriented Programs Guoqing Xu The Ohio State University
Thin Slicing Manu Sridharan, Stephen J. Fink, Rastislav Bodík.
An On-the-Fly Mark and Sweep Garbage Collector Based on Sliding Views Hezi Azatchi - IBM Yossi Levanoni - Microsoft Harel Paz – Technion Erez Petrank –
1 Practical Object-sensitive Points-to Analysis for Java Ana Milanova Atanas Rountev Barbara Ryder Rutgers University.
Heap Shape Scalability Scalable Garbage Collection on Highly Parallel Platforms Kathy Barabash, Erez Petrank Computer Science Department Technion, Israel.
Free-Me: A Static Analysis for Individual Object Reclamation Samuel Z. Guyer Tufts University Kathryn S. McKinley University of Texas at Austin Daniel.
Faculty of Computer Science LCPC 2007 Using ZBDDs in Points-to Analysis Stephen Curial Jose Nelson Amaral Department of Computing Science University of.
Parameterized Object Sensitivity for Points-to Analysis for Java Presented By: - Anand Bahety Dan Bucatanschi.
The Ant and The Grasshopper Fast and Accurate Pointer Analysis for Millions of Lines of Code Ben Hardekopf and Calvin Lin PLDI 2007 (Best Paper & Best.
Interprocedural analysis © Marcelo d’Amorim 2010.
An On-the-Fly Reference Counting Garbage Collector for Java Erez Petrank Technion – Israel Institute of Technology Joint work with Yossi Levanoni – Microsoft.
Software engineering for real-time systems
Pointer and Shape Analysis Seminar Context-sensitive points-to analysis: is it worth it? Article by Ondřej Lhoták & Laurie Hendren from McGill University.
Purity Analysis : Abstract Interpretation Formulation Ravichandhran Madhavan, G. Ramalingam, Kapil Vaswani Microsoft Research, India.
Scaling CFL-Reachability-Based Points- To Analysis Using Context-Sensitive Must-Not-Alias Analysis Guoqing Xu, Atanas Rountev, Manu Sridharan Ohio State.
1 Refinement-Based Context-Sensitive Points-To Analysis for Java Manu Sridharan, Rastislav Bodík UC Berkeley PLDI 2006.
Semantic analysis Enforce context-dependent language rules that are not reflected in the BNF, e.g.a function must have a return statement. Decorate AST.
Memory-Efficient Regular Expression Search Using State Merging Department of Computer Science and Information Engineering National Cheng Kung University,
Automated Diagnosis of Software Configuration Errors
Impact Analysis of Database Schema Changes Andy Maule, Wolfgang Emmerich and David S. Rosenblum London Software Systems Dept. of Computer Science, University.
G RID R ESOURCE BROKER FOR SCHEDULING COMPONENT - BASED APPLICATIONS ON DISTRIBUTED RESOURCES Reporter : Yi-Wei Wu.
PRESTO: Program Analyses and Software Tools Research Group, Ohio State University STATIC ANALYSES FOR JAVA IN THE PRESENCE OF DISTRIBUTED COMPONENTS AND.
Introduction to Software Testing Chapter 2.4 Graph Coverage for Design Elements Paul Ammann & Jeff Offutt
An Adaptive, Region-based Allocator for Java Feng Qian, Laurie Hendren {fqian, Sable Research Group School of Computer Science McGill.
Putting Pointer Analysis to Work Rakesh Ghiya and Laurie J. Hendren Presented by Shey Liggett & Jason Bartkowiak.
Understanding Parallelism-Inhibiting Dependences in Sequential Java Programs Atanas (Nasko) Rountev Kevin Van Valkenburgh Dacong Yan P. Sadayappan Ohio.
Change Impact Analysis for AspectJ Programs Sai Zhang, Zhongxian Gu, Yu Lin and Jianjun Zhao Shanghai Jiao Tong University.
Software Testing and Maintenance Lecture 4 Graph Coverage for Design Element Paul Ammann & Jeff Offutt Instructor: Hossein Momeni Mazandaran.
Flow-Augmented Call Graph: A New Foundation for Taming API Complexity Qirun Zhang
Object-Oriented Programming (OOP). Implementing an OOD in Java Each class is stored in a separate file. All files must be stored in the same package.
Chapter 6: User-Defined Functions
CMCD: Count Matrix based Code Clone Detection Yang Yuan and Yao Guo Key Laboratory of High-Confidence Software Technologies (Ministry of Education) Peking.
PRESTO: Program Analyses and Software Tools Research Group, Ohio State University Merging Equivalent Contexts for Scalable Heap-cloning-based Points-to.
Fast Points-to Analysis for Languages with Structured Types Michael Jung and Sorin A. Huss Integrated Circuits and Systems Lab. Department of Computer.
Free-Me: A Static Analysis for Automatic Individual Object Reclamation Samuel Z. Guyer, Kathryn McKinley, Daniel Frampton Presented by: Dimitris Prountzos.
1 Graph Coverage (4). Reading Assignment P. Ammann and J. Offutt “Introduction to Software Testing” ◦ Section
Mark Marron 1, Deepak Kapur 2, Manuel Hermenegildo 1 1 Imdea-Software (Spain) 2 University of New Mexico 1.
Hassen Grati, Houari Sahraoui, Pierre Poulin DIRO, Université de Montréal Extracting Sequence Diagrams from Execution Traces using Interactive Visualization.
IDENTIFYING SEMANTIC DIFFERENCES IN ASPECTJ PROGRAMS Martin Görg and Jianjun Zhao Computer Science Department, Shanghai Jiao Tong University.
Fence Scoping Changhui Lin †, Vijay Nagarajan*, Rajiv Gupta † † University of California, Riverside * University of Edinburgh.
Introduction to Software Testing (2nd edition) Chapter 7.4 Graph Coverage for Design Elements Paul Ammann & Jeff Offutt
PRESTO: Program Analyses and Software Tools Research Group, Ohio State University Efficient Checkpointing of Java Software using Context-Sensitive Capture.
CSE 425: Control Abstraction I Functions vs. Procedures It is useful to differentiate functions vs. procedures –Procedures have side effects but usually.
Estimating the Run-Time Progress of a Call Graph Construction Algorithm Jason Sawin, Atanas Rountev Ohio State University.
PRESTO: Program Analyses and Software Tools Research Group, Ohio State University Merging Equivalent Contexts for Scalable Heap-cloning-based Points-to.
Graph Coverage for Design Elements 1.  Use of data abstraction and object oriented software has increased importance on modularity and reuse.  Therefore.
API Hyperlinking via Structural Overlap Fan Long, Tsinghua University Xi Wang, MIT CSAIL Yang Cai, MIT CSAIL.
CS 343 presentation Concrete Type Inference Department of Computer Science Stanford University.
Survey of Tools to Support Safe Adaptation with Validation Alain Esteva-Ramirez School of Computing and Information Sciences Florida International University.
Pointer Analysis – Part I CS Pointer Analysis Answers which pointers can point to which memory locations at run-time Central to many program optimization.
Constructing Accurate Application Call Graphs For Java To Model Library Callbacks Weilei Zhang, Barbara Ryder Department of Computer Science Rutgers University.
5/7/03ICSE Fragment Class Analysis for Testing of Polymorphism in Java Software Atanas (Nasko) Rountev Ohio State University Ana Milanova Barbara.
D A C U C P Speculative Alias Analysis for Executable Code Manel Fernández and Roger Espasa Computer Architecture Department Universitat Politècnica de.
Sept 12ICSM'041 Precise Identification of Side-Effect-Free Methods in Java Atanas (Nasko) Rountev Ohio State University.
ReIm & ReImInfer: Checking and Inference of Reference Immutability and Method Purity Wei Huang 1, Ana Milanova 1, Werner Dietl 2, Michael D. Ernst 2 1.
Pick Your Contexts Well: Understanding Object-Sensitivity The Making of a Precise and Scalable Pointer Analysis Yannis Smaragdakis University of Massachusetts,
INFORMATION-FLOW ANALYSIS OF ANDROID APPLICATIONS IN DROIDSAFE JARED YOUNG.
Precisely Selecting Regression Test for Aspect-Oriented Programs Guoqing Xu The Ohio State University
Making k-Object-Sensitive Pointer Analysis More Precise with Still k-Limiting Tian Tan, Yue Li and Jingling Xue SAS 2016 September,
Compositional Pointer and Escape Analysis for Java programs
Static Analysis of Object References in RMI-based Java Software
Paul Ammann & Jeff Offutt
Graph Coverage for Design Elements CS 4501 / 6501 Software Testing
Paul Ammann & Jeff Offutt
Paul Ammann & Jeff Offutt
Graph Coverage for Design Elements CS 4501 / 6501 Software Testing
SOEN 343 Software Design Computer Science and Software Engineering Department Concordia University Fall 2004 Instructor: Patrice Chalin.
자바 언어를 위한 정적 분석 (Static Analyses for Java) ‘99 한국정보과학회 가을학술발표회 튜토리얼
Presentation transcript:

1 PASTE’07 Discovering Accurate Interclass Test Dependence Weilei Zhang, Barbara Ryder Department of Computer Science Rutgers University

2 PASTE’07 Motivation ● Class testing is very important for OO testing  It corresponds with the classic definition of unit testing by exercising a relatively small software component via a driver ● Most classes in the system are interdependent, and there is test dependence between classes ● An accurate knowledge of ICTD (InterClass Test Dependence) is desired  Important in deciding class integration test order ● Dependence cycles/SCCs causes complication  Helpful to parallelize integration test activities  Can be useful for program understanding and software visualization

3 PASTE’07 Existing works on ICTD ● Briand, et al (TSE 2003) ● Milanova, et al (ICSM 2002) ● Hanh, et al (ECOOP 2001) ● Labiche, et al (ICSE 2000) ● Tai and Daniels (JOOP 1999) ● Kung, et al (JOOP 1995) ORD-based

4 PASTE’07 ORD-Based Definition For ICTD ● Causes for ICTD:  Inheritance  Aggregation  Association  Polymorphism A B CD As I Ag ● B is test dependent on A, C and D ● Transitive closure of the above

5 PASTE’07 Contributions ● To propose and formalize a new definition for ICTD in order to prune out the spurious dependences  Semantics-based definition ● To give a practical algorithm to approximate the definition  Method-level dependence analysis ● To implement the algorithm and evaluate the results

6 PASTE’07 Motivating Examples ● specjbb benchmark class DeliveryHandler{ public void handleDelivery(DeliveryTransaction deliveryTransaction){ deliveryTransaction.process(); deliveryTransaction.display(outFile); } } DeliveryHandler DeliveryTransaction As ● Cases when ICTD does not exist though there is association  No reference during run-time (Milanova et al ICSM 2002)  No method calls (Stack & its containees)  Only calls to inherited methods (HashMap & its containees)  Methods called but no impact on the caller (the above in specjbb)  The spurious ICTD causes a fake dependence cycle.

7 PASTE’07 Semantics-based Definition of ICTD ● There is test dependence from class A to class B, if there is a statement s in a method callable on an A object and a statement t in a method declared in B, such that:  s may have visible side effects (i.e., s may either write to the external memory or return a value), and  s is semantically dependent on t while testing class A

8 PASTE’07 Approximation Algorithm ● Turing-incomputable -> dependence analysis ● Statement-level granularity dependence analysis is too costly  Approximate at method-level granularity dependence ● Three causes for method dependence:  Caller uses return value of callee  Callee is control-dependent on caller  Side effect: one method writes to the same memory region that another method reads ● Propagate dependences on the call graph w=x.foo()

9 PASTE’07 Side Effect write read class Method Other calls Call and return “useful” value Heap Data CUT Algorithm Illustration

10 PASTE’07 Side Effect write read Methods Callable on CUT class Method Heap Data CUT Other calls Call and return “useful” value Algorithm Illustration

11 PASTE’07 Side Effect write read Methods Callable on CUT class Method Heap Data CUT Other calls Call and return “useful” value Algorithm Illustration

12 PASTE’07 Side Effect write read Methods Callable on CUT class Method Heap Data CUT Other calls Call and return “useful” value Algorithm Illustration

13 PASTE’07 Side Effect write read Methods Callable on CUT class Method Heap Data CUT Other calls Call and return “useful” value Algorithm Illustration

14 PASTE’07 Side Effect write read Methods Callable on CUT class Method Heap Data CUT Other calls Call and return “useful” value Algorithm Illustration

15 PASTE’07 Side Effect write read Methods Callable on CUT class Method Heap Data CUT Other calls Call and return “useful” value Algorithm Illustration

16 PASTE’07 Analysis Configurations ● The proposed algorithm is parameterized by the choice of program analyses to calculate the call graph and side effect information ● For analysis configuration applied:  VTA: variable type analysis (call graph not constructed on the fly)  0CFA: 0-CFA (call graph constructed on the fly)  OB: 1-object-sensitive points-to analysis  OBR: OB+R (a data reachability algorithm to resolve library call-backs and construct accurate application call graphs)

17 PASTE’07 ICTD Reduction Rate wrt. ORD-based Definition

18 PASTE’07 Size of Dependence Cycles ORDVTA0CFAOBOBR compress(128)6,4,45,3333 jess(163)147, raytrace(41)18,4,2168,477 db(20) Javac(184) mpegaudio(60)44376,3,200 mtrt(41)18,4,2168,477 jack(69)447,6,2,27,4,2,277 jbb(104)79493,3,22,22

19 PASTE’07 Objective-Sensitive Analysis Metrics: output_properly(){…this.wrap()…} AsciiMetrics overrides Method wrap(). Metrics AsciiMetrics I Metrics: output_properly() Metrics: wrap() AsciiMetrics: wrap() Methods reachable from Metrics Methods reachable from AsciiMetrics Context-insensitive CG

20 PASTE’07 Objective-Sensitive Analysis Metrics: output_properly(){…this.wrap()…} AsciiMetrics overrides Method wrap(). Metrics AsciiMetrics I [m, Metrics: output_properly()] [m,Metrics: wrap()][am,AsciiMetrics: wrap()] Methods reachable from Metrics Methods reachable from AsciiMetrics Object-sensitive CG [am, Metrics: output_properly()] PLDI’07 Sridharan, Fink, Bodik: context-sensitive dependence analysis is too costly and “did not provide much realistic usage” for thin slicing. Method-level dependence calculation makes context-sensitive dependence analysis more practical and it is very useful in our study in ICTD.

21 PASTE’07 Conclusions ● A new semantics-based accurate definition for interclass test dependence ● An approximate algorithm and implementation  A great number of spurious dependences are removed  Dependence cycles are determined accurately in 6 out of 7 benchmarks amenable to code inspection.  Method-level dependence propagation makes object-sensitive dependence analysis more practical  Object-sensitive analysis is key to achieve accurate results for dependence cycles

22 PASTE’07 Thanks ! Questions?