1 ECE 750 Topic 8 Meta-programming languages, systems, and applications Evolving Object-Oriented Designs with Refactorings – Lance Tokuda and Don Batory.

Slides:



Advertisements
Similar presentations
Ch:8 Design Concepts S.W Design should have following quality attribute: Functionality Usability Reliability Performance Supportability (extensibility,
Advertisements

Introducing Formal Methods, Module 1, Version 1.1, Oct., Formal Specification and Analytical Verification L 5.
Aspect Oriented Programming. AOP Contents 1 Overview 2 Terminology 3 The Problem 4 The Solution 4 Join point models 5 Implementation 6 Terminology Review.
ECE 750 Topic 8 Meta-programming languages, systems, and applications Load-time structural reflection in Java – Shigeru Chiba, 2000 May 27, 2004 Shimin.
Min Zhang School of Computer Science University of Hertfordshire
SERL - Software Engineering Research Labslide1 Frameworks and Hooks by Garry Froehlich Paul Sorenson SERL (Software Engineering Research Lab)
Refactoring By: Brian Smith. What is Refactoring? Definition: a change to the internal structure of software to make it easier to understand and cheaper.
Introduction To System Analysis and Design
1 Introduction to Software Engineering Lecture 42 – Communication Skills.
Software Factory Assembling Applications with Models, Patterns, Frameworks and Tools Anna Liu Senior Architect Advisor Microsoft Australia.
© 2006 Pearson Addison-Wesley. All rights reserved2-1 Chapter 2 Principles of Programming & Software Engineering.
Database Management Systems (DBMS)
Eclipse as a Teaching Platform for Kenya Student: Thomas Timbul (MEng 4) Supervised by: Robert Chatley.
UML and Object Oriented Concepts
Introduction SWE 619. Why Is Building Good Software Hard? Large software systems enormously complex  Millions of “moving parts” People expect software.
CASE Tools And Their Effect On Software Quality Peter Geddis – pxg07u.
This chapter is extracted from Sommerville’s slides. Text book chapter
PROGRAMMING LANGUAGES The Study of Programming Languages.
Refactoring Lecture 5 CIS 6101 Software Processes and Metrics.
Chapter 1: Introduction to Visual Basic.NET: Background and Perspective Visual Basic.NET Programming: From Problem Analysis to Program Design.
A Survey of Software Refactoring Tom Mens, Tom Tourwé
GENERAL CONCEPTS OF OOPS INTRODUCTION With rapidly changing world and highly competitive and versatile nature of industry, the operations are becoming.
Advanced Programing practices
Introduction to MDA (Model Driven Architecture) CYT.
Software Refactoring Part I: Introduction Bartosz Walter Advanced Object-Oriented Design Lecture 5.
Object-Oriented Programming and the Progress ABL Tomáš Kučera Principal Solution Engineer / EMEA Power Team.
Sadegh Aliakbary Sharif University of Technology Spring 2012.
Introduction To System Analysis and Design
Composing Adaptive Software Authors Philip K. McKinley, Seyed Masoud Sadjadi, Eric P. Kasten, Betty H.C. Cheng Presented by Ana Rodriguez June 21, 2006.
Question of the Day  On a game show you’re given the choice of three doors: Behind one door is a car; behind the others, goats. After you pick a door,
Refactoring1 Refactoring DEPARTMENT OF COMPUTER SCIENCE AND SOFTWARE ENGINEERING CONCORDIA UNIVERSITY February 6, 2009.
Composition of UML Described Refactoring Rules Presented by Chin-Yi Tsai.
L8 - March 28, 2006copyright Thomas Pole , all rights reserved 1 Lecture 8: Software Asset Management and Text Ch. 5: Software Factories, (Review)
Methodology: The AOP Refactoring Process Aspect-Oriented Refactoring of the Apache Cocoon Shared-Object Resource Allocation System Jeff Dalton Advisor:
Alcatel-Lucent CDC Workshop, Coaching & Knowledge Transfer Coding.
1 Program Slicing Amir Saeidi PhD Student UTRECHT UNIVERSITY.
Roles in Software Development using Domain Specific Modelling Languages Holger Krahn, Bernhard Rumpe, Steven Völkel Software Systems Engineering Technische.
Chapter 5: Software Re-Engineering Omar Meqdadi SE 3860 Lecture 5 Department of Computer Science and Software Engineering University of Wisconsin-Platteville.
Sadegh Aliakbary Sharif University of Technology Spring 2011.
Design - programming Cmpe 450 Fall Dynamic Analysis Software quality Design carefully from the start Simple and clean Fewer errors Finding errors.
MODULAR ORGANIZATION Prepared by MMD, Edited by MSY1.
Software Design Patterns Curtsy: Fahad Hassan (TxLabs)
Refactoring - 1 CS494: Intro. to Refactoring Readings: –Refactoring for everyone: How and why to use Eclipse's automated refactoring features. By David.
© 2006 Pearson Addison-Wesley. All rights reserved 2-1 Chapter 2 Principles of Programming & Software Engineering.
Doing a CIM Project. 22 CIM Design Center  A rule I learned about applying technology:  Understand the design center of the technology.  Use extreme.
Refactoring Mehdi Einali Advanced Programming in Java 1.
SEG 4110 – Advanced Software Design and Reengineering Topic T Introduction to Refactoring.
Formal Specification: a Roadmap Axel van Lamsweerde published on ICSE (International Conference on Software Engineering) Jing Ai 10/28/2003.
Refactoring. Mathematics: Factor ● fac·tor – One of two or more quantities that divides a given quantity without a remainder, e.g., 2 and 3 are factors.
Refactoring. 2 Process of changing a software system in such a way that it does not alter the external behavior of the code, yet improves its internal.
Aspect Security - RaviShekhar Gopalan - Prof. Lieberherr Software Security (CSG379)
The Object-Oriented Database System Manifesto Malcolm Atkinson, François Bancilhon, David deWitt, Klaus Dittrich, David Maier, Stanley Zdonik DOOD'89,
Testing OO Software Encapsulation means modeling and storing with an object the parts and the operations. Interactions become implicit in code. Makes difficult.
Refactoring. DCS – SWC 2 Refactoring ”A change made to the internal structure of software to make it easier to understand and cheaper to modify without.
From Use Cases to Implementation 1. Structural and Behavioral Aspects of Collaborations  Two aspects of Collaborations Structural – specifies the static.
CS 614: Theory and Construction of Compilers Lecture 10 Fall 2003 Department of Computer Science University of Alabama Joel Jones.
ECE 750 Topic 8 Meta-programming languages, systems, and applications Automatic Program Specialization for J ava – U. P. Schultz, J. L. Lawall, C. Consel.
From Use Cases to Implementation 1. Mapping Requirements Directly to Design and Code  For many, if not most, of our requirements it is relatively easy.
Refactoring (1). Software Evolution Cope with change Feature bloat Design decay Code duplications “Pattern time is refactoring time” Make future changes.
1 © Agitar Software, 2007 Automated Unit Testing with AgitarOne Presented by Eamon McCormick Senior Solutions Consultant, Agitar Software Inc. Presented.
Implementation Topics Describe –Characteristics of good implementations –Best practices to achieve them Understand role of comments Learn debugging techniques.
Steve Chenoweth Office Phone: (812) Cell: (937)
Evaluating Compuware OptimalJ as an MDA tool
Advanced Programming Behnam Hatami Fall 2017.
Software Design Lecture : 9.
SOEN 343 Software Design Computer Science and Software Engineering Department Concordia University Fall 2004 Instructor: Patrice Chalin.
Advanced Programing practices
Chapter 9: Implementation
Object Oriented Design
Presentation transcript:

1 ECE 750 Topic 8 Meta-programming languages, systems, and applications Evolving Object-Oriented Designs with Refactorings – Lance Tokuda and Don Batory July 29, 2004 Presented by Shimin Li ECE750 University of waterloo

2 Paper Overview

3 Contents: Overview Roughly five parts: Introduction Overview of Refactorings Examples of Evolving Applications Lessons Learned from experiments Related work and Conclusion

4 Contents: Detail Introductio –Automate design level changes of source code –Preserve behavior

5 Contents: Detail Overview of Refactorings –Definition of refactoring –Enabling conditions for refactorings Ensure refactorings preserve behavior –Classification of object-oriented refactorings Schema refactorings Pattern refectorings Language-specific refactorings

6 Contents: Detail Examples of Evolving Applications –Why these examples have been chosen –Evolving CIM Works Version 2 to version 4 Nine steps, 81 refactorings, 486 lines of code modified –Evolving CMU’s AUIS Version 6.3 to version 8 Five steps, approximately 800 refactorings, 14K lines of code modified

7 Contents: Detail Lessons Learned from experiments –Refactoring benefits –Refactoring limitations –Future research –Implication for Java

8 Related Work Bergstein: Object-preserving class transformations Lieberherr: Object-extending class transformations –In the Demeter OO software environment Opdyke: Refactoring definition Refactorings were inspired by –Banerjee and Kim: Schema evolutions –Johnson and Foote: Design principles –UIUC Choices operating system L. Tokuda: Refactorings implementation for C++ D. Roberts: Refactorings implementation for Smalltalk and design criteria for transformation tools Pree: Hot spot meta patterns

9 Future Work Granularity of transformation –Larger grain refactorings? Program families –How to transform a file used by multiple programs –How to cope with different pre-processed versions of a single C++ file Integration with other tools –e.g. RationalRose, IDE

10 Contributions and Novelties Implemented a set of refactorings Experimental studies –Showed refactorings can scale and useful on large, real-world applications –Revealed the benefits, limitations and research problems

11 What I like Refactoring –Manipulate code in a safe environment –Recreate s situation where evolution is possible –Help to understand existing code The paper –Clear and concise –Helpful diagrams –Two meaningful examples

12 What I don’t like Refactoring –It’s hard to detect if a program needs to be refactored –Refactorings depends on a specific language and compiler –May slow down the execution The Paper –Lack of explanation of refactorings and their enabling conditions

13 Discuss

14 Question 1 What is refactoring?

15 Answer 1 Refactoring is the process of changing a software system in such a way that it does not alter the external behavior of the code yet improves its internal structure. – Martin Fowler

16 Question 2 How does refactorings preserve behavior?

17 Answer 2 Identify and satisfy a list of enabling conditions for each refactorings(i.e. pre-conditions).

18 Question 3 Explain the benefits of refactoring.

19 Answer 3 Automating design change Reduce testing Simpler design Validation assistance Ease of exploration Re-use existing software

20 Question 4 Explain the problems that the current refactoring technique is facing.

21 Answer 4 Refactoring is risky(source code changing may introduce subtle bugs) Refactorings are dependent on a specific language and compiler(preprocessor directives) Program families Source codes have to be accessible Conservative enabling conditions(if it is too conservative, the transformation might be useless) Automated checking of enabling conditions

22 Question 5 What are the prerequisites for a programmer to refactor a program properly?

23 Answer 5 The programmer has to know what the program does and how it is structureed Know what he wants to change and how it can be completed Know what a particular refactoring does and what are the enabling conditions

24 Question 6 What problems do program families cause in refactoring?

25 Answer 6 When transforming a file used by more than one program, it is desirable for the transformation system to check enabling conditions for all programs in which use that file. Otherwise, a file might be transformed safely for one program while causing another program which uses the same file to break.

26 Question 7 What features of Java make its refactorings have easier implementations than C++?

27 Answer 7 NO preprocessor Not use makefile Code placement is simplified since methods are stores in a file belongs to the class No free-floating procedures

28 Question 8 Discuss the possible practical improvement of refactorings.

29 Answer 8 Specify refactorings in a language-independent manner Apply refactorings at higher levels of abstraction Integrate refactoring with other tools Automatically determine where and what refactorings should be applied Solve program families problem

30 Question 9 Discuss the connections between AOP and Refactoring.

31 Answer 9 AOP is a tool for expressing code in a structured form Refactoring is a tool changing the structure of existing code, hopefully to improve it In some case may achieve a better refactoring using AOP AOP can be used on either existing or new code Refactoring only can be used on existing code AOP might reduce the chance of refactoring?

32 Question 10 How can we determine where and why refactorings should be applied?

33 Answer 10 Identify bad smells –Using Logic Meta Programming –Other method? Future automatic tool