© S. Demeyer, S. Ducasse, O. Nierstrasz Intro.1 1. Introduction Goals Why Reengineering ?  Lehman's Laws  Object-Oriented Legacy Typical Problems  common.

Slides:



Advertisements
Similar presentations
Chapter 11 Software Evolution
Advertisements

SOFTWARE MAINTENANCE 24 March 2013 William W. McMillan.
Stéphane Ducasse2.1 OOP? What is OOP? Why? OOP in a nutshell.
Unified theory of software evolution Reengineering – Business process reengineering and software reengineering BPR model – Business definition, process.
© S. Demeyer, S. Ducasse, O. Nierstrasz Reverse Engineering.1 2. Reverse Engineering What and Why Setting Direction  Most Valuable First First Contact.
Introduction to Software Engineering 13. Software Evolution.
Object-Oriented Reengineering Patterns and Techniques Prof. O. Nierstrasz Prof. S. Ducasse T.
Object-Oriented Reengineering Oscar Nierstrasz Software Composition Group University of Bern.
© S. Demeyer, S. Ducasse, O. Nierstrasz Intro.1 1. Introduction Goals Why Reengineering ?  Lehman's Laws  Object-Oriented Legacy Typical Problems  common.
OORPT Object-Oriented Reengineering Patterns and Techniques 1. Introduction Prof. O. Nierstrasz.
Introduction to Software Evolution and Maintenance
Software Evolution Managing the processes of software system change
March 30, Exploratory Testing Testing Approaches Analytical Information-driven Intuitive Exploratory Design the tests and test concurrently Learn.
Dr Kettani, Spring 2002 Software Engineering IIFrom Sommerville, 6th edition Software change l Managing the processes of software system change.
Modified from Sommerville’s originalsSoftware Engineering, 7th edition. Chapter 21 Slide 1 Software evolution.
© S. Demeyer, S. Ducasse, O. Nierstrasz Migration.1 5. Testing and Migration What and Why  Reengineering Life-Cycle Tests: Your Life Insurance !  Grow.
Modified from Sommerville’s originalsSoftware Engineering, 7th edition. Chapter 21 Slide 1 Software evolution.
Object-Oriented Analysis and Design Lecture 11 Maintenance (from Schach, “O-O and Classical Software Engineering”)
Object-Oriented Reengineering Patterns and Techniques Prof. O. Nierstrasz Prof. S. Ducasse T.
Software evolution.
Software evolution.
Introduction to Systems Analysis and Design
 2004 by SEC Chapter 9 Software Maintenance. 2  2004 by SEC 9.1 Software Evolution.
©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 27Slide 1 Chapter 27 Software Change.
Chapter 9 – Software Evolution and Maintenance
Software evolution. Objectives l To explain why change is inevitable if software systems are to remain useful l To discuss software maintenance and maintenance.
Legacy systems overview DT Legacy System definition “Legacy system is deficiency in a system in terms of its suitability to the business, its Platform.
©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 27Slide 1 Software change l Managing the processes of software system change.
Software Engineering Lecture 20 Software Maintenance.
Beyond Green Field Software Development Dennis Mancl,
1 Object-Oriented Reengineering © S. Demeyer, S.Ducasse, O. Nierstrasz Lecture 1 Radu Marinescu Introduction to Object-Oriented Reengineering.
©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 27Slide 1 Software change l Managing the processes of software system change.
 CS 5380 Software Engineering Chapter 9 Software Evolution.
Chapter 11 Maintaining the System System evolution Legacy systems Software rejuvenation.
Object-Oriented Reengineering Patterns 1. Introduction.
Manag ing Software Change CIS 376 Bruce R. Maxim UM-Dearborn.
Lecture 14 Maintaining the System and Managing Software Change SFDV Principles of Information Systems.
S.Ducasse Stéphane Ducasse 1 Object-Oriented Programming.
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 21 Slide 1 Software evolution 1.
Chapter 5: Software Re-Engineering Omar Meqdadi SE 3860 Lecture 5 Department of Computer Science and Software Engineering University of Wisconsin-Platteville.
Chapter 9 – Software Evolution Chapter 9 Software Evolution1.
HNDIT23082 Lecture 06:Software Maintenance. Reasons for changes Errors in the existing system Changes in requirements Technological advances Legislation.
Software Engineering Prof. Dr. Bertrand Meyer Dr. Manuel Oriol Dr. Bernd Schoeller Chair of Software Engineering Lectures 22: Legacy Software.
Chapter 9 – Software Evolution 1Chapter 9 Software evolution.
Chapter 2: Software Maintenance Omar Meqdadi SE 3860 Lecture 2 Department of Computer Science and Software Engineering University of Wisconsin-Platteville.
1 Software Maintenance The process of changing the system after it has been delivered and in operation Software change is inevitable –New requirements.
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 21 Slide 1 Software evolution.
Chapter 9 – Software Evolution 1Chapter 9 Software evolution.
Software change Software change is inevitable –New requirements emerge when the software is used –The business environment changes –Errors must be repaired.
CS223: Software Engineering Lecture 32: Software Maintenance.
Chapter 8: Maintenance and Software Evolution Ronald J. Leach Copyright Ronald J. Leach, 1997, 2009, 2014,
Software Development Module Code: CST 240 Chapter 6: Software Maintenance Al Khawarizmi International College, AL AIN, U.A.E Lecturer: Karamath Ateeq.
Laurea Triennale in Informatica – Corso di Ingegneria del Software I – A.A. 2006/2007 Andrea Polini XVI. Software Evolution.
Overview Software Maintenance and Evolution Definitions
Chapter 18 Maintaining Information Systems
Introduction to Software Evolution and Maintenance
Managing the System PPT SOURCE : Shari L. Pfleeger Joann M. Atlee.
Software Maintenance PPT By :Dr. R. Mall.
CS 425/625 Software Engineering Software Evolution
Software Re-engineering - Theoretical and Practical Approaches
Why Object-oriented Programming?
Chapter 9 Software Maintenance
IS301 – Software Engineering V:
Software Maintenance Main issues: why maintenance is such an issue
Software Maintenance Main issues: why maintenance is such an issue
Chapter 8 Software Evolution.
Lecture 06:Software Maintenance
Chapter 9 – Software Evolution
Chapter 9 – Software Evolution
Introduction Software maintenance:
Presentation transcript:

© S. Demeyer, S. Ducasse, O. Nierstrasz Intro.1 1. Introduction Goals Why Reengineering ?  Lehman's Laws  Object-Oriented Legacy Typical Problems  common symptoms  architectural problems & refactoring opportunities Reverse and Reengineering  Definitions  Techniques  Patterns

© S. Demeyer, S. Ducasse, O. Nierstrasz Intro.2 Goals We will try to convince you: Yes, Virginia, there are object-oriented legacy systems too! Reverse engineering and reengineering are essential activities in the lifecycle of any successful software system. (And especially OO ones!) There is a large set of lightweight tools and techniques to help you with reengineering. Despite these tools and techniques, people must do job and they represent the most valuable resource.

© S. Demeyer, S. Ducasse, O. Nierstrasz Intro.3 What is a Legacy System ? “legacy” A sum of money, or a specified article, given to another by will; anything handed down by an ancestor or predecessor.— Oxford English Dictionary  so, further evolution and development may be prohibitively expensive A legacy system is a piece of software that: you have inherited, and is valuable to you. Typical problems with legacy systems: original developers not available outdated development methods used extensive patches and modifications have been made missing or outdated documentation

© S. Demeyer, S. Ducasse, O. Nierstrasz Intro.4 Software Maintenance - Cost requirement design coding testing delivery x 1 x 5 x 10 x 20 x 200 Relative Maintenance Effort Between 50% and 75% of global effort is spent on “maintenance” ! Relative Cost of Fixing Mistakes Solution ? Better requirements engineering? Better software methods & tools (database schemas, CASE-tools, objects, components, …)?

© S. Demeyer, S. Ducasse, O. Nierstrasz Intro.5 Continuous Development 17.4% Corrective (fixing reported errors) 18.2% Adaptive (new platforms or OS) 60.3% Perfective (new functionality) The bulk of the maintenance cost is due to new functionality  even with better requirements, it is hard to predict new functions data from [Lien78a] 4.1% Other

© S. Demeyer, S. Ducasse, O. Nierstrasz Intro.6 (*) process-oriented structured methods, information engineering, data-oriented methods, prototyping, CASE-tools – not OO ! Contradiction ?No! modern methods make it easier to change... this capacity is used to enhance functionality! Modern Methods & Tools ? [Glas98a] quoting empirical study from Sasa Dekleva (1992) Modern methods (*) lead to more reliable software Modern methods lead to less frequent software repair and... Modern methods lead to more total maintenance time

© S. Demeyer, S. Ducasse, O. Nierstrasz Intro.7 Lehman's Laws A classic study by Lehman and Belady [Lehm85a] identified several “laws” of system change. Continuing change A program that is used in a real-world environment must change, or become progressively less useful in that environment. Increasing complexity As a program evolves, it becomes more complex, and extra resources are needed to preserve and simplify its structure. Those laws are still applicable…

© S. Demeyer, S. Ducasse, O. Nierstrasz Intro.8 What about Objects ? Object-oriented legacy systems = successful OO systems whose architecture and design no longer responds to changing requirements Compared to traditional legacy systems The symptoms and the source of the problems are the same The technical details and solutions may differ OO techniques promise better flexibility, reusability, maintainability …  they do not come for free

© S. Demeyer, S. Ducasse, O. Nierstrasz Intro.9 What about Components ? Components are very brittle … After a while one inevitably resorts to glue :)

© S. Demeyer, S. Ducasse, O. Nierstrasz Intro.10 How to deal with Legacy ? New or changing requirements will gradually degrade original design … unless extra development effort is spent to adapt the structure New Functionality Hack it in ? duplicated code complex conditionals abusive inheritance large classes/methods First … refactor restructure reengineer Take a loan on your software  pay back via reengineering Investment for the future  paid back during maintenance

© S. Demeyer, S. Ducasse, O. Nierstrasz Intro.11 Common Symptoms Lack of Knowledge obsolete or no documentation departure of the original developers or users disappearance of inside knowledge about the system limited understanding of entire system  missing tests Process symptoms too long to turn things over to production need for constant bug fixes maintenance dependencies difficulties separating products  simple changes take too long Code symptoms duplicated code code smells  big build times

© S. Demeyer, S. Ducasse, O. Nierstrasz Intro.12 Common Problems Architectural Problems insufficient documentation = non-existent or out-of-date improper layering = too few are too many layers lack of modularity = strong coupling duplicated code = copy, paste & edit code duplicated functionality = similar functionality by separate teams Refactoring opportunities misuse of inheritance = code reuse vs polymorphism missing inheritance = duplication, case- statements misplaced operations = operations outside classes violation of encapsulation = type-casting; C++ "friends" class abuse = classes as namespaces

© S. Demeyer, S. Ducasse, O. Nierstrasz Intro.13 The Reengineering Life-Cycle Requirements Designs Code (0) requirement analysis (1) model capture (2) problem detection (3) problem resolution (4) program transformation people centric lightweight

© S. Demeyer, S. Ducasse, O. Nierstrasz Intro.14 A Map of Reengineering Patterns Tests: Your Life Insurance Detailed Model Capture Initial Understanding First Contact Setting Direction Migration Strategies Detecting Duplicated Code Redistribute Responsibilities Transform Conditionals to Polymorphism

© S. Demeyer, S. Ducasse, O. Nierstrasz Intro.15 Summary Software “maintenance” is really continuous development Object-oriented software also suffers from legacy symptoms Reengineering goals differ; symptoms don’t Common, lightweight techniques can be applied to keep software healthy