We think you have liked this presentation. If you wish to download it, please recommend it to your friends in any social system. Share buttons are a little bit lower. Thank you!
Presentation is loading. Please wait.
Published byLillian Carpenter
Modified over 2 years ago
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
IBM Haifa Research Lab © 2007 IBM Corporation 4 int sum=computeSum(a); int prod=1; for (int i=0; i
IBM Haifa Research Lab © 2007 IBM Corporation 5 int prod=1; for (int i=0; i
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
IBM Haifa Research Lab © 2007 IBM Corporation Refactoring via Program Slicing and Sliding June 2007 Ran Ettinger Software Asset Management Group In HRL.
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 © 2008 IBM Corporation Co-Slicing for Program Comprehension and Reuse March 2008 Ran Ettinger Software Asset Management Group In.
European Commission eLearning Initiative WP4 Teaching training actions l Learning by doing l Innovations l Need to learn l Learning in collaboration l.
Ontologies: Dynamic Networks of Formally Represented Meaning Dieter Fensel: Ontologies: Dynamic Networks of Formally Represented Meaning, 2001 SW Portal.
Making public expenditure pro-poor CAPE Workshop 14 May 2004.
A Review of Published Community-Based Participatory Research (CBPR) & Recommendations for Future Scholarly Work Darius Tandon, PhD Assistant Professor,
© Bay Area Consulting Group LLC IT Performance: ottenere risultati con i dati e non con l'intuizione Harry Chapman Principal Bay Area Consulting Group.
The Robert Gordon University School of Engineering Dr. Mohamed Amish INTRODUCTION TO RESEARCH & RESEARCH METHODS.
Canadas Experience in Technical Assistance and Capacity Building in Trade Facilitation WTO Workshop on Technical Assistance and Capacity Building in Trade.
The White Paper – a policy paper to contribute to the integration process of the WBC in the ERA Dr. Erika Rost, Dr. Andreas Kahle Federal Ministry of Education.
For(int i = 1; i <= 3; i++) System.out.println(i); iSaída na tela.
Language Technologies Reality and Promise in AKT Yorick Wilks and Fabio Ciravegna Department of Computer Science, University of Sheffield.
Environmental taxes and subsidies in the environmental accounts - some results and learnings Previous projects in the area Definitions and data Some results.
Flood Awareness and Prevention Policy in border areas Results of a European network June 2007.
Supporting further and higher education Learning design for a flexible learning environment Sarah Knight and Ros Smith Pedagogy Strand of the JISC e-Learning.
Promoting Regulatory Excellence Self Assessment & Physiotherapy: the Ontario Model Jan Robinson, Registrar & CEO, College of Physiotherapists of Ontario.
Communicating in time and space - How to overcome incompatible frames of reference of producers and users of archival data Keynote Speech at EDDI 2011,
I 3 conference, June 2013 A typology of e-book interactions and the e-book literacy and tools required for achieving students study goals Dr Laura.
1 Welcome to Seminar Unit 9: Analysis of an Optimum Model of Health and Wellness Robyn Hoban.
Workshop on Peer Tutoring in Mathematics, Bath 2009 Good Practice in Undergraduate Peer Support (MSOR funded Project) Dr Stephen Kane School of Physics,
Exploiting Semantic Web and Knowledge Management Technologies for E-learning Sylvain Dehors Director Rose Dieng-Kuntz INRIA Sophia Antipolis University.
/13SNAP data model Introduction to the workshop.
Objectives of the Workshop MICS3 Regional Workshop on Data Archiving and Dissemination Alexandria, Egypt 3-7 March, 2007.
Method to Experience ELESIG Small Grants Project Shalni Gulati & Irmgard Huppe City University & Oxford Brookes University
Cloned Product Variants: From Ad-Hoc to Well-Managed Software Reuse Julia Rubin IBM Research - Haifa, Israel University of Toronto, Canada December 9,
Exercise and technology for safety and health in old age: A Societally Motivated Research Platform (SMRP) Magnus Lindwall, PhD., Centre of Sport and Health.
Values-Based Evaluation What, How, Why presented by Barbara Kahan & Debbie Bang at Best Practice for Better Health 6th IUPHE European Conference on the.
Visualization and analysis of large data collections: a case study applied to confocal microscopy data Wim de Leeuw, Swammerdam Institute for Life Sciences,
Fermat Re-Engineering Workbench Presentation. Agenda Assembler business issues Fermat Solutions –Workbench –Migration Service –Documentation engine About.
© 2016 SlidePlayer.com Inc. All rights reserved.