Amorphous Program Slicing through Partial Evaluation David Binkley & Kyle Sluder Loyola College in Maryland 4501 N. Charles St. Baltimore, MD 21210.

Slides:



Advertisements
Similar presentations
PHP I.
Advertisements

Program Slicing – Based Techniques
Computer Science School of Computing Clemson University Introduction to Mathematical Reasoning Jason Hallstrom and Murali Sitaraman Clemson University.
School of Computing Clemson University Mathematical Reasoning  Goal: To prove correctness  Method: Use a reasoning table  Prove correctness on all valid.
Analysis of Algorithms
Chair of Software Engineering From Program slicing to Abstract Interpretation Dr. Manuel Oriol.
Recap 1.Programmer enters expression 2.ML checks if expression is “well-typed” Using a precise set of rules, ML tries to find a unique type for the expression.
Fast Algorithms For Hierarchical Range Histogram Constructions
Programming Abstractions for Approximate Computing Michael Carbin with Sasa Misailovic, Hank Hoffmann, Deokhwan Kim, Stelios Sidiroglou, Martin Rinard.
Program Slicing; Andreas Linder eXtreme Programming lab course 2004.
Chapter 7 User-Defined Methods. Chapter Objectives  Understand how methods are used in Java programming  Learn about standard (predefined) methods and.
Principles of programming languages 4: Parameter passing, Scope rules Department of Information Science and Engineering Isao Sasano.
1 Program Slicing Purvi Patel. 2 Contents Introduction What is program slicing? Principle of dependences Variants of program slicing Slicing classifications.
Efficient Systematic Testing for Dynamically Updatable Software Christopher M. Hayden, Eric A. Hardisty, Michael Hicks, Jeffrey S. Foster University of.
Introduction to Application Programming IST 256 Application Programming for Information Systems Xiaozhong Liu
CIS 101: Computer Programming and Problem Solving Lecture 8 Usman Roshan Department of Computer Science NJIT.
1 8. Safe Query Languages Safe program – its semantics can be at least partially computed on any valid database input. Safety is tied to program verification,
Memory Systems Performance Workshop 2004© David Ryan Koes MSP 2004 Programmer Specified Pointer Independence David Koes Mihai Budiu Girish Venkataramani.
1 6/20/2015CS150 Introduction to Computer Science 1 Functions Chapter 6, 8.
Privacy-Preserving Cross-Domain Network Reachability Quantification
Dynamically Discovering Likely Program Invariants to Support Program Evolution Michael Ernst, Jake Cockrell, William Griswold, David Notkin Presented by.
Validating High-Level Synthesis Sudipta Kundu, Sorin Lerner, Rajesh Gupta Department of Computer Science and Engineering, University of California, San.
Memory and C++ Pointers.  C++ objects and memory  C++ primitive types and memory  Note: “primitive types” = int, long, float, double, char, … January.
The Design and Analysis of Algorithms
Moving To Code 3 More on the Problem-Solving Process §The final step in the problem-solving process is to evaluate and modify (if necessary) the program.
Handouts Software Testing and Quality Assurance Theory and Practice Chapter 5 Data Flow Testing
Software Testing and QA Theory and Practice (Chapter 4: Control Flow Testing) © Naik & Tripathy 1 Software Testing and Quality Assurance Theory and Practice.
1/25 Pointer Logic Changki PSWLAB Pointer Logic Daniel Kroening and Ofer Strichman Decision Procedure.
Review of C++ Programming Part II Sheng-Fang Huang.
A Survey of Software Refactoring Tom Mens, Tom Tourwé
 Experiment 07 Function Dr. rer.nat. Jing LU
1/20 Symbolic Execution and Program Testing Charngki PSWLAB Symbolic Execution and Program Testing James C.King IBM Thomas J.Watson Research Center.
Optimizing the SPARK TM Program Slicer Ricky E. Sward and Leemon C. Baird III Dept of Computer Science USAF Academy
Presented By Dr. Shazzad Hosain Asst. Prof., EECS, NSU
Which Language is Better?
1 MT258 Computer Programming and Problem Solving Unit 7.
Overloading Binary Operators Two ways to overload –As a member function of a class –As a friend function As member functions –General syntax Data Structures.
BUILDING JAVA PROGRAMS CHAPTER 7 Arrays. Exam #2: Chapters 1-6 Thursday Dec. 4th.
Pointers OVERVIEW.
Software Engineering Laboratory, Department of Computer Science, Graduate School of Information Technology and Science, Osaka University Dependence-Cache.
Chapter 9 Pointers and Dynamic Arrays (9.1). Pointers A variables which holds the memory address for a variable of a specific type. Call-by-Reference.
Reasoning about programs March CSE 403, Winter 2011, Brun.
Presented By Dr. Mohsen Alardhi College of Technological Studies, Kuwait April 19 th,2009.
Software Engineering Laboratory, Department of Computer Science, Graduate School of Information Science and Technology, Osaka University IWPSE 2003 Program.
Software Engineering Research Group, Graduate School of Engineering Science, Osaka University A Slicing Method for Object-Oriented Programs Using Lightweight.
Structuring Data: Arrays ANSI-C. Representing multiple homogenous data Problem: Input: Desired output:
Operator precedence.  Evaluate a + b * c –multiplication first? a + (b * c) –addition first? ( a + b) * c  Java solves this problem by assigning priorities.
Optimal Superblock Scheduling Using Enumeration Ghassan Shobaki, CS Dept. Kent Wilken, ECE Dept. University of California, Davis
EEL 3801 C++ as an Enhancement of C. EEL 3801 – Lotzi Bölöni Comments  Can be done with // at the start of the commented line.  The end-of-line terminates.
Chapter 6 Arrays 1 Fall 2012 CS2302: Programming Principles.
/ PSWLAB Evidence-Based Analysis and Inferring Preconditions for Bug Detection By D. Brand, M. Buss, V. C. Sreedhar published in ICSM 2007.
Dynamics of Reward and Stimulus Information in Human Decision Making Juan Gao, Rebecca Tortell & James L. McClelland With inspiration from Bill Newsome.
Test Case Purification for Improving Fault Localization presented by Taehoon Kwak SoftWare Testing & Verification Group Jifeng Xuan, Martin Monperrus [FSE’14]
The PLA Model: On the Combination of Product-Line Analyses 강태준.
Week 5 Part 2 Kyle Dewey. Overview Scope Lifetime Testing Exam #1 overview.
Phoenix Based Dynamic Slicing Debugging Tool Eric Cheng Lin Xu Matt Gruskin Ravi Ramaseshan Microsoft Phoenix Intern Team (Summer '06)
Software Testing and QA Theory and Practice (Chapter 5: Data Flow Testing) © Naik & Tripathy 1 Software Testing and Quality Assurance Theory and Practice.
Control Flow Testing Handouts
Operators in c++.
Principles of programming languages 4: Parameter passing, Scope rules
Outline of the Chapter Basic Idea Outline of Control Flow Testing
SwE 455 Program Slicing.
RDE: Replay DEbugging for Diagnosing Production Site Failures
Program Slicing Baishakhi Ray University of Virginia
Scope of Variables.
CISC181 Introduction to Computer Science Dr
CSE 1020:Software Development
Product Training Program
SOFTWARE ENGINEERING INSTITUTE
Software Testing and QA Theory and Practice (Chapter 5: Data Flow Testing) © Naik & Tripathy 1 Software Testing and Quality Assurance Theory and Practice.
Presentation transcript:

Amorphous Program Slicing through Partial Evaluation David Binkley & Kyle Sluder Loyola College in Maryland 4501 N. Charles St. Baltimore, MD 21210

Agenda BackgroundFundamentalsMethodResults Conclusions & Future Work

Background Traditional slicing Projection of program given criterion Projection of program given criterion Criterion: (line #, {variables}) Criterion: (line #, {variables}) Preserves syntax Preserves syntax 1.int foo() 2.{ 3. int x, y, z; 4. x = 20; 5. y = x + 10; 6. z = 30; 7. return x + y + z; 8.} Criterion: (6, {z})

Background Traditional slicing domains Static Static Not concerned with program’s input Dynamic Dynamic Modifies slice based on input

Background Amorphous slicing Not syntax-preserving (biggest advantage) Not syntax-preserving (biggest advantage) No distinction between static and dynamic No distinction between static and dynamic 1.int foo() 2.{ 3. int x, y, z; 4. x = 20; 5. y = x + 10; 6. z = 30; 7. return x + y + z; 8.} 1.int foo() 2.{ 3. int z = 30; 4. return z; 5.}

Background Syntax Preservation Specialized for input Traditional static slicingTraditional dynamic slicing Amorphous slicing(N/A) All1 No Yes

Background Applications of Slicing Debugging: original use Debugging: original use Program proving Program proving Refactoring Refactoring Program/algorithm analysis Program/algorithm analysis

Background What is partial evaluation? Applications Optimization Optimization Program (pre)compilation Program (pre)compilation Refactoring Refactoring Program proving/analysis Program proving/analysis

Fundamentals Based on similarity of partial evaluation and amorphous slicing Foundation (Harman et al.) Foundation (Harman et al.) Application (Silva and Vidal) Application (Silva and Vidal) Applied to C No longer in the realm of functional programming No longer in the realm of functional programming A lot harder to do successfully A lot harder to do successfully

Method 1.Pre-processing Use TXL to extract variables to global scope Use TXL to extract variables to global scope 2.Partially evaluate Prepare configuration file (provide criterion) Prepare configuration file (provide criterion) Run Tempo Run Tempo 3.Slice Use CodeSurfer 4.Post-process Use TXL for cleanup

Results Computation example Program needs to compute statistics on array of integers Program needs to compute statistics on array of integers Program exhibits bug in average Program exhibits bug in average

Results

Results Traditional slice not helpful Syntactic-preservation constraint inhibits efficacy Syntactic-preservation constraint inhibits efficacy Only shows what is already known: biggest is not involved in computation of average Only shows what is already known: biggest is not involved in computation of average Amorphous slice helpful Shows that average is not built correctly: does not rely on sum, despite its presence in original program Shows that average is not built correctly: does not rely on sum, despite its presence in original program Sum must therefore not be receiving the right value Sum must therefore not be receiving the right value

Results Safety slicing Array bounds safety Array bounds safety Artificially insert assignments to variable “safe” before array access Artificially insert assignments to variable “safe” before array access Assert safe = T at end Assert safe = T at end

Results

Conclusions and Future Work Amorphous slicing is possible for C Partial evaluation is very viable method for achieving that goal Need more examples of efficacy Explore relationship between conditioned slicing and “static” variables from P.E. perspective This work is supported by National Science Founda- tion grant CCR Kyle Sluder is supported by the Loyola College in Maryland Hauber Fellowship.