IBM Haifa Research Lab © 2007 IBM Corporation Program Sliding A Novel Approach for the Automation of Slicing-Based Refactoring June 2007 Ran Ettinger In.

Slides:



Advertisements
Similar presentations
IBM Haifa Research Lab © 2008 IBM Corporation Co-Slicing for Program Comprehension and Reuse March 2008 Ran Ettinger Software Asset Management Group In.
Advertisements

Refactoring via Program Slicing and Sliding Ran Ettinger Programming Tools Group University of Oxford In Panayas Reading Group 2 November, 2006.
IBM Haifa Research Lab © 2007 IBM Corporation Refactoring via Program Slicing and Sliding June 2007 Ran Ettinger Software Asset Management Group In HRL.
ETHNIC DIVERSITY SURVEY. Survey Objectives to provide information on ethnic diversity in Canada; to provide information to better understand how Canadians.
Office of the Auditor General of Canada Progress Report for the Task Force on IT Governance 17th Meeting of the INTOSAI Working Group On IT Audit Richard.
How did we get here? Student Learning Standards School Accountability Teaching Standards Educator Evaluation Support for Struggling Schools.
© 2006 by Jonas Jacobi & Raghu Srinivasan; made available under the EPL v1.0 | Presenter Raghu Srinivasan Project Lead Oracle Inc. The JSF Tools.
May 3, 2006WV Department of Education Annual Measurable Objectives for Improving the Achievement of LEP Students Title III AMAOs.
Signing Plan Design - At Grade Intersections Course Overview.
CAVIAR – Continuum Absorption by Visible and Infrared Radiation and its Atmospheric Relevance How on schedule are we? Keith Shine Department of Meteorology,
CAVIAR – Continuum Absorption by Visible and Infrared Radiation and its Atmospheric Relevance Status Keith Shine Department of Meteorology, University.
HASCAS: Dignity through Action Introduction to the Dignity through Action Workshop.
UKOLN is supported by: Digital Repositories Roadmap: looking forward The JISC/CNI Meeting, July 2006 Rachel Heery Assistant Director R&D, UKOLN
Assessing and Reviewing. Our Challenge; (aim of this module) When we run a workshop or presentation how do we go about assessing whether learning has.
WITHIN REACH – BEYOND IMAGINATION Selkirk College Management Information Systems.
Department of Information Systems Vienna University of Economics and Business Administration Towards a Conceptual Framework for Digital Contract Composition.
Advancing Library Information Services in China LiLi Li Assistant Professor / E-Information Services Librarian Georgia Southern University Library February.
Managing Data for Cardiac Outcomes Reporting
Management Control Systems
For(int i = 1; i
Source: Financial Times of London Global Banks 1999 – 2009 “Changing of the Guard”
Ontologies: Dynamic Networks of Formally Represented Meaning Dieter Fensel: Ontologies: Dynamic Networks of Formally Represented Meaning, 2001 SW Portal.
Name ____________________ Date ___________ Period ____.
Rewards OS352 HRM Fisher Nov. 6, Agenda Purpose and types of rewards Effectiveness Case study.
Deeper Security Analysis of Web-based Identity Federation Apurva Kumar IBM Research – India.
Humboldt University Berlin, University of Novi Sad, University of Plovdiv, University of Skopje, University of Belgrade, University of Niš, University.
IBM Haifa Labs June 23, 2015 © IBM Corporation 2004 Economics of information goods in practice – the Electronic Design Automation market Yossi Lichtenstein.
Program Slicing for Refactoring Advanced SW Tools Seminar Jan 2005Yossi Peery.
Business Process Performance Prediction on a Tracked Simulation Model Andrei Solomon, Marin Litoiu– York University.
ACL: Introduction & Tutorial
University of Palestine College of Business Administration Presented by : Hanaa Omar Alqaroot. Presented To : Elmassriy. Mr.Eyad. 26, November 2009.
Program Refactoring Mitch Soden Union College. Agenda Definition –Unit Testing –Examples Why Refactor? Limitations Just Another SW Eng Practice? Automation.
IBM Haifa Research Lab © 2008 IBM Corporation Automating Big Refactorings for Componentization and the Move to SOA IBM Programming Languages and Development.
Slide 1 Student Presentation Software Engineering Seminar Your Name Supervisors Name SS 2015 Insert your topic name here.
Information Systems & Enhancing Decision Making for the Digital Firm
Departments in Business Business Name 1 Business Name 2.
Today’s Agenda 1.Research Paper – Due Wednesday –Oral presentations March 11 & 18 (Last Class &Final) 2.Attendance & lab pair groupings 3.Robots 1.Hands-on.
Business Unit or Product Name © 2005 IBM Corporation IBM Haifa Labs RAP (Resource Agenda Presenter) Nov, 2013.
Tool Support for proof Engineering Anne Mulhern Computer Sciences Department University of Wisconsin-Madison Madison, WI USA
Industrial Project (236504) Advanced programming tools for refactoring Java code in Eclipse Student: Alexander Libov Supervisor: Dr. Ran Ettinger, IBM.
The GLP is funded by The Department for International Development GLOBAL LEARNING T Task – -Please go through the slides and follow the instructions -Please.
Introduction 6 th of April Method 13 th of April Theory & Midterm Deadline 20 th of April Empirics Running Analysis Running Conclusions & Hand-in 24 th.
The Alloy Analyzer June 14 th Alloy small modelling notation that can express a useful range of structural properties is easy to read and write.
© The Association for Dementia Studies Evaluation - Preliminary findings Teresa Atkinson Jennifer Bray.
Research topics International Human Resource Management Advisor: Marina O. Latuha Organizational and HRM department GSOM.
Error Explanation with Distance Metrics Authors: Alex Groce, Sagar Chaki, Daniel Kroening, and Ofer Strichman International Journal on Software Tools for.
哈工大信息检索研究室 HITIR ’ s Update Summary at TAC2008 Extractive Content Selection Using Evolutionary Manifold-ranking and Spectral Clustering Reporter: Ph.d.
IBM Global Technology Services © 2007 IBM Corporation State of Georgia Mainframe Services Transition.
Presented by Alex Mitchell Joy Mkhasibe
Finance Program – Phase 2
Abraj Automation Process Tool
Ran Ettinger, IBM Research – Haifa Beijing, China 16 June 2012
Handout 1: Identify personal and professional development requirements
Silvaco Europe Ltd Technology Design Software Ahmed Nejim
continued on next slide
CTU – Health HSS103 Final Presentation
                                                                                                                                                                                                                                                
Teaching Functional Verification
continued on next slide
continued on next slide
דיני חברות ד"ר ויקטור ח. בוגנים
"שינוק", אלוף העולם בדמקה לאדם ולמכונה זיו בן-אליהו
Round ONE: 1. Round ONE: 1 Round One: 1 Teams: 2-5 members Time: 2 minutes Build Item: A TOOL 1.
Management Information System
AGENDA Introductions Review Goal, 3 strategies, Case for Change
财务管理案例教学法 研究及示例 ——王遐昌 2006/11/10.
Examples of First Order Theories
continued on next slide
continued on next slide
Presentation transcript:

IBM Haifa Research Lab © 2007 IBM Corporation Program Sliding A Novel Approach for the Automation of Slicing-Based Refactoring June 2007 Ran Ettinger In Haifa Universitys MIS Department Seminar

IBM Haifa Research Lab © 2007 IBM Corporation 2 Agenda When Refactoring Met Slicing… Motivating example and some definitions Original Research Question (2001) –How can program slicing and related analyses assist in building automatic tools for refactoring? Initial Results (2003) Untangling: a slice extraction refactoring [AOSD04] The need for more… Final Results (2006) Sliding on top of a formal theory for slicing-based refactoring... Some Further Challenges

IBM Haifa Research Lab © 2007 IBM Corporation 3 int prod=1; for (int i=0; i<a.length; i++) { prod *= a[i]; } System.out.println("The sum is " + sum); System.out.println("The product is " + prod); int sum=0; for (int i=0; i<a.length; i++) { sum += a[i]; } On Sliding and Code-Motion Transformations

IBM Haifa Research Lab © 2007 IBM Corporation 4 int sum=computeSum(a); int prod=1; for (int i=0; i<a.length; i++) { prod *= a[i]; } System.out.println("The sum is " + sum); System.out.println("The product is " + prod); On Sliding and Code-Motion Transformations int computeSum(int[] a) { int sum=0; for (int i=0; i<a.length; i++) { sum += a[i]; } return sum; }

IBM Haifa Research Lab © 2007 IBM Corporation 5 int prod=1; for (int i=0; i<a.length; i++) { prod *= a[i]; } System.out.println("The sum is " + computeSum(a)); System.out.println("The product is " + prod); int computeSum(int[] a) { int sum=0; for (int i=0; i<a.length; i++) { sum += a[i]; } return sum; } On Sliding and Code-Motion Transformations

IBM Haifa Research Lab © 2007 IBM Corporation 6 When Refactoring Met Slicing… Refactoring is a discipline of change –Of the internal structure of a software system –Through small and well-defined source-code transformations –That preserve the (observable) behavior of the original system (program) Slicing is the study of meaningful subprograms –Given a program and a variable (at a point) of interest, a slice of the program on that variable is a subprogram that preserves the original behavior, with respect to that variable Sliding is a mini refactoring of slice extraction –A kind of code-motion transformation, like in compilers –Trading code reusability and readability with runtime efficiency –Given a program and a variable of interest, sliding extracts the variables slice from its complement; but whats in the complement? The union of all remaining slices? or something smaller: reusing the extracted variables final value

IBM Haifa Research Lab © 2007 IBM Corporation 7 Original Research Question (2001) Initial observation: –Programmers use slices when refactoring Paraphrasing Weiser [CACM82] Context –Intercomps Cobol-to-Java –OOPSLA00 –Fowlers refactoring book [Fow] The video-store example: from procedural design to objects The research question: –How can program slicing and related analyses assist in building automatic tools for refactoring?

IBM Haifa Research Lab © 2007 IBM Corporation 8 Initial Results (2003) A definition of an Extract Slice refactoring –Generalizing Extract Method and Replace Temp with Query Nate: an Eclipse plugin –Supporting slice extraction on a small subset of Java –Supported by an Eclipse Innovation Award from IBM –With Mathieu Verbaere: the slicer and MSc thesis An investigation of untangling refactorings to introduce aspects Untangling: a slice extraction refactoring [AOSD04, with Mathieu]

IBM Haifa Research Lab © 2007 IBM Corporation 9 Initial Results (2003) - cont.: The Need for More State-of-the-art slice-extraction solutions –Tucking by Lakhotia and Deprez [IST98] –Procedure extraction by Komondoor and Horwitz [POPL00,IWPC03] –Block-based slicing by Maruyama [SSR01] Identified limitations (Nate and the related work) –Strong preconditions E.g. no duplication of assignments Leading to low applicability –Informal (unconvincing) correctness proof Observation/Realization: –Weakening of preconditions (i.e. improving applicability) will require a careful (preferably formal) investigation

IBM Haifa Research Lab © 2007 IBM Corporation 10 Final Results (2006) A formal theory of slicing-based refactoring –Based on predicate calculus and program semantics [Dijkstra and Scholten] and the refinement calculus [Back,Morgan] –Supporting a simple imperative programming language A designated slice-refinement proof method A novel program decomposition into small entities called slides A highly applicable solution to the slice-extraction refactoring problem, called sliding A concept of smaller slices called co-slicing A provably correct slicing algorithm (why is it important?)

IBM Haifa Research Lab © 2007 IBM Corporation 11 Some Further Challenges Implementing the theoretical framework and algorithms Collecting empirical results Extending to real languages Apply sliding to more refactorings (e.g. Separate Query from Modifier [Fow], arbitrary method extraction) Apply the sliding-related refactorings in bigger reengineering challenges (e.g. Convert Procedural Design to Objects [Fow], componentization, conversion to SOA) Sliding beyond refactoring (e.g. in optimizing compilers, code obfuscation)

IBM Haifa Research Lab © 2007 IBM Corporation 12 Thanks! Acknowledgements –My DPhil [Ett] supervisor Oege de Moor And Mike Spivey, supervising during Oeges sabbatical (2003) –Past and present members of the Programming Tools Group at Oxford, in particular Iván Sanabria, Yorck Hünke, Stephen Drape, Mathieu Verbaere, Damien Sereni –My thesis examiners Mark Harman and Jeremy Gibbons

IBM Haifa Research Lab © 2007 IBM Corporation 13 References [CACM82] Programmers use slices when debugging, M. Weiser, 1982 [Back] A calculus of refinements for program derivations, 1988 [Dijkstra and Scholten] Predicate calculus and program semantics, 1990 [Morgan] Programming from specifications (2nd ed.), 1994 [IST98] Restructuring programs by tucking statements into functions, A. Lakhotia and J.-C. Deprez, 1998 [FOW] Refactoring: Improving the Design of Existing Code, M. Fowler, 2000 [POPL00] Semantics-preserving procedure extraction, R. Komondoor and S. Horwitz, 2000 [SSR01] Automated method-extraction refactoring by using block-based slicing, K. Maruyama, 2001 [IWPC03] Effective automatic procedure extraction, R. Komondoor and S. Horwitz, 2003 [AOSD04] Untangling: a slice extraction refactoring, R. Ettinger and M. Verbaere, 2004 [Ett] Refactoring via Program Slicing and Sliding, DPhil thesis, 2006 –Submitted version thesis esub pdf

IBM Haifa Research Lab © 2007 IBM Corporation 14 Backup

IBM Haifa Research Lab © 2007 IBM Corporation 15 Example: Fowlers video-store

IBM Haifa Research Lab © 2007 IBM Corporation 16

IBM Haifa Research Lab © 2007 IBM Corporation 17

IBM Haifa Research Lab © 2007 IBM Corporation 18

IBM Haifa Research Lab © 2007 IBM Corporation 19