Software Engineering Natallia Kokash 1.

Slides:



Advertisements
Similar presentations
Software Maintenance Main issues: why maintenance is such an issue
Advertisements

Chapter 11 Software Evolution
SOFTWARE MAINTENANCE 24 March 2013 William W. McMillan.
CMMI – Continuous as well as staged model CMMI capability levels – Incomplete, performed, managed, defined, quantitatively managed, optimized Example.
1 The Laws of Software Evolution Tori Bowman CSSE 375, Rose-Hulman September 25, 2007 *based on Don Bagert’s lesson.
Unified theory of software evolution Reengineering – Business process reengineering and software reengineering BPR model – Business definition, process.
Introduction to Software Evolution and Maintenance
Software Evolution Managing the processes of software system change
Dr Kettani, Spring 2002 Software Engineering IIFrom Sommerville, 6th edition Software change l Managing the processes of software system change.
SWE Introduction to Software Engineering
Modified from Sommerville’s originalsSoftware Engineering, 7th edition. Chapter 21 Slide 1 Software evolution.
Introduction to Refactoring Excerpted from ‘What is Refactoring?’ by William C. Wake and Refactoring: Improving the Design of Existing Code by Martin Fowler.
1 Chapter 1 Software and Software Engineering Software Engineering: A Practitioner’s Approach, 6th edition by Roger S. Pressman.
Software evolution.
Software evolution.
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided with permission by.
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided with permission by.
Software Maintenance Maurice ter Beek
©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 27Slide 1 Chapter 27 Software Change.
Chapter 9 – Software Evolution and Maintenance
1 Software Engineering: A Practitioner’s Approach, 6/e Chapter 1 Software and Software Engineering Software Engineering: A Practitioner’s Approach, 6/e.
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided with permission by.
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided with permission by.
CPSC 871 John D. McGregor MMS1 Maintenance & a new trend.
Software evolution. Objectives l To explain why change is inevitable if software systems are to remain useful l To discuss software maintenance and maintenance.
Software change  Managing the processes of software system change.
TOPIC R Software Maintenance, Evolution, Program Comprehension, and Reverse Engineering SEG4110 Advanced Software Design and Reengineering.
Chapter 1 Software and Software Engineering. A Quick Quiz 1. What percentage of large projects have excess schedule pressure? 25% 50% 75% 100% 2. What.
©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.
© S. Demeyer, S. Ducasse, O. Nierstrasz Intro.1 1. Introduction Goals Why Reengineering ?  Lehman's Laws  Object-Oriented Legacy Typical Problems  common.
©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.
Module 8: Software Evolution CSEB233 Fundamentals of Software Engineering Badariah Solemon 2010.
Manag ing Software Change CIS 376 Bruce R. Maxim UM-Dearborn.
SWE311_Ch01 (071) Software & Software Engineering Slide 1 Chapter 1 Software and Software Engineering Chapter 1 Software and Software Engineering.
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided with permission by.
Software Engineering CS3003 Lecture 4 Code bad smells and refactoring.
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 21 Slide 1 Software evolution 1.
Software Evolution Program evolution dynamics Software maintenance Complexity and Process metrics Evolution processes 1.
Chapter 5: Software Re-Engineering Omar Meqdadi SE 3860 Lecture 5 Department of Computer Science and Software Engineering University of Wisconsin-Platteville.
Software Maintenance Speaker: Jerry Gao Ph.D. San Jose State University URL: Sept., 2001.
1 Software Maintenance and Evolution CSSE 575: Session 2, Part 1 Refactoring Principles Steve Chenoweth Office Phone: (812) Cell: (937)
Chapter 9 – Software Evolution 1Chapter 9 Software evolution.
Module 8: Software Evolution CSEB233 Fundamentals of Software Engineering Badariah Solemon 2010.
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 21 Slide 1 Software evolution.
Chapter 9 – Software Evolution 1Chapter 9 Software evolution.
Pertemuan 12 Refactoring Mata kuliah: T0144 – Advanced Topics in Software Engineering Tahun: 2010.
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 21 Slide 1 Software evolution.
© SERG Reverse Engineering (Software Maintenance & Reengineering) Software Maintenance Managing the processes of system change.
Part 1 Introduction to Software Engineering 1 copyright © 1996, 2001, 2005 R.S. Pressman & Associates, Inc. For University Use Only May be reproduced ONLY.
Principles and examples
Overview Software Maintenance and Evolution Definitions
Chapter 9 – Software Evolution
Steve Chenoweth Office Phone: (812) Cell: (937)
Chapter 18 Maintaining Information Systems
Introduction to Software Evolution and Maintenance
Chapter 9 – Software Evolution
For University Use Only
1.1.1 Software Evolution.
Software Maintenance Main issues: why maintenance is such an issue
Software Maintenance Main issues: why maintenance is such an issue
Chapter 9 – Software Evolution
Refactoring.
Chapter 8 Software Evolution.
Software Maintenance Main issues: why maintenance is such an issue
Chapter 9 – Software Evolution
Chapter 9 – Software Evolution
Introduction Software maintenance:
Refactoring.
Presentation transcript:

Software Engineering Natallia Kokash 1

Software Engineering Definition Software maintenance issues Maintenance and evolution Reverse engineering (refactoring, bad smells) Program comprehension Maintenance tools Organization and control of maintenance Software maintenance 2

Software Engineering Need for software maintenance 100 billion lines of code 80% of it is unstructured, patched and badly documented A multinational bank: 100+ offices 10+ mainframes at a central site workstations 24 * 7 availability 100+ application systems 500K+ LOC Obsolete languages (Fortran, COBOL) Huge databases 3

Software Engineering The process of modifying a software system or component after delivery to: Correct faults, Improve performance or other attributes, or Adapt to a changed environment Definition 4

Software Engineering Distribution of maintenance activities Corrective maintenance: correcting discovered errors Preventive maintenance: correcting latent errors Adaptive maintenance: adapting to changes in the environment Perfective maintenance: adapting to changing user requirements corrective 21% adaptive 25% preventive 4% perfective 50% 5

Software Engineering Growth of maintenance problem 1975: ~75,000 people in maintenance (17%) 1990: 800,000 (47%) 2005: 2,500,000 (76%) 2015: ?? (Numbers from Jones (2006)) 6

Software Engineering Maintenance or Evolution Some observations:  Systems are not built from scratch  There is time pressure on maintenance  Software is embedded in the real world and become part of it, thereby changing it.  This leads to a feedback system where the program and its environment evolve in concert. 7

Software Engineering Laws of software evolution (Lehman 1974) Continuing Change  Programs must be continually adapted or they become progressively less satisfactory. Increasing Complexity  As a program evolves its complexity increases unless work is done to maintain or reduce it. Self Regulation  Evolution process is self regulating with distribution of product and process measures close to normal. 8

Software Engineering Illustration of the third law Time System attributes Self Regulation Evolution process is self regulating with distribution of product and process measures close to normal. 9

Software Engineering Conservation of Organizational Stability (invariant work rate)  The average effective global activity rate in an evolving system is invariant over product lifetime Conservation of Familiarity (incremental growth)  As a system evolves all associated with it (e.g., developers) must maintain mastery of its content and behavior to achieve satisfactory evolution. Excessive growth diminishes that mastery. Laws of software evolution (Lehman 1974) 10

Software Engineering Continuing Growth  The functional content of systems must be continually increased to maintain user satisfaction over their lifetime. Declining Quality  The quality of systems will appear to be declining unless they are rigorously maintained and adapted to operational environment changes. Feedback System  Evolution processes constitute multi-level, multi-loop, multi-agent feedback systems and must be treated as such. Laws of software evolution (… and later) 11

Software Engineering Fighter plane control system IF not-read1 (V1) GOTO DEF1; display (V1); GOTO C; DEF1: IF not-read2 (V2) GOTO DEF2; display (V2); GOTO C; DEF2: display(3000) C: 12

Software Engineering Major causes of maintenance problems Unstructured code Insufficient domain knowledge Insufficient documentation 13

Software Engineering Key to maintenance is in development Higher quality  less (corrective) maintenance Anticipating changes  less (adaptive and perfective) maintenance Better tuning to user needs  less (perfective) maintenance Less code  less maintenance 14

Software Engineering Shift in type of maintenance over time Introductory stage: emphasis on user support Growth stage: emphasis on correcting faults Maturity: emphasis on enhancements Decline: emphasis on technology changes 15

Software Engineering Reverse engineering Does not involve any adaptation of the system Akin to reconstruction of a blueprint Design recovery: result is at higher level of abstraction Redocumentation: result is at same level of abstraction 16

Software Engineering Restructuring Functionality does not change From one representation to another, at the same level of abstraction, such as:  From spaghetti code to structured code  Refactoring after a design step in agile approaches  Black box restructuring: add a wrapper  With platform change: migration 17

Software Engineering Reengineering (renovation) Functionality does change Then reverse engineering step is followed by a forward engineering step in which the changes are made 18

Software Engineering Refactoring in case of bad smells (1) Long method Large class Primitive obsession Long parameter list Data clumps Switch statements Temporary field Refused bequest Alternative classes with different interfaces Parallel inheritance hierarchies 19

Software Engineering Refactoring in case of bad smells (2) Lazy class Data class Duplicate code Speculative generality Message chains Middle man Feature envy Inappropriate intimacy Divergent change Shotgun surgery Incomplete library class 20

Software Engineering Categories of bad smells Bloaters: something has grown too large Object-oriented abusers: OO not fully exploited Change preventers: hinder further evolution Dispensables: can be removed Encapsulators: deal with data communication Couplers: coupling too high 21

Software Engineering Categories of bad smells CategoryBad smell Bloaters Long method, Large class, Primitive obsession, Long parameter list, Data clumps OO abusers Switch statements, Temporary field, Refused bequest, Alternative classes with different interfaces, Parallel inheritance hierarchies Change preventers Divergent change, Shortgun surgery DispensablesLazy class, Data class, Duplicate code, Speculative generality EncapsulatorsMessage chains, Middle man CouplersFeature envy, Inappropriate intimacy OthersIncomplete library class, comments 22

Software Engineering What does this code do? for (i=1; i<n; i++){ for (j=1; j<n; j++){ if (A[i,j]){ for (k=1; k<n; k++) { if (A[i,k]) A[j,k]=true; } Warshall’s algorithm to compute a transitive closure of a relation (graph) What is “transitive closure”? “Relation”? 23

Software Engineering Program comprehension 50% of time Programming plans  fragments that correspond to stereotypical actions Beacons  key features that represents the presence of a particular structure or operation  e.g., swap operation indicates sort As-needed strategy vs. systematic strategy Use of outside knowledge (domain knowledge, naming conventions, etc.) 24

Software Engineering Software maintenance tools Tools to ease perceptual processes (reformatters) Tools to gain insight in static structure Tools to gain insight in dynamic behavior Tools that inspect version history  See lecture 2 (Configuration management) 25

Software Engineering Bug/defect tracking systems Bugzilla by Mozilla foundation Test Director by Mercury Interactive Silk Radar by Segue Software SQA Manager by Rational software QA director by Compuware HP Quality Center IBM Rational Quality Manager  Information presented through custom- designed dashboards Micro Focus SilkPerformer  Performs load tests 26

Software Engineering Clone finding tools Black Duck Suite - software analyzing suite CCFinder (C/C++, Java, COBOL, Fortran, etc.) Checkstyle (Java) CloneAnalyzer (C/C++ and Java / Eclipse plug-in) Clone Digger (Python and Java) CloneDR - (Ada, C, C++, C#, Java, COBOL, Fortran, Python, VB.net, VB6, PHP4/5, PLSQL, SQL2011, XML, many others) Copy/Paste Detector (CPD) from PMD (Java, JSP, C, C++, Fortran, PHP) ConQAT (ABAP, ADA, Cobol, C/C++, C#, Java, PL/I, PL/SQL, Python, Text, Transact SQL, Visual Basic, XML) JPlag (Java, C#, C, C++, Scheme, natural language text) Pattern Miner (CP Miner) Simian (Similarity Analyzer) software Google CodePro Analytix - (Java / Eclipse plug-in) 27

Software Engineering Maintenance management tools ProTeus III Expert CMMS  mid-size maintenance management program for one to four users  schedule preventative maintenance  generate automatic work orders  document equipment maintenance history  track assets and inventory  track personnel  create purchase orders  generate reports 28

Software Engineering Resharper  Code inspection, refactoring, navigation, analysis NDepend  Tool to manage.NET code  Software quality can be measured using code metrics, visualized using graphs and treemaps, and enforced using standard and custom rules  Also JDepend for Java  See lecture 5 (Software quality) 29

Software Engineering Analyzing software evolution data Version-centered analysis: study differences between successive versions History-centered analysis: study evolution from a certain viewpoint (e.g. how often components are changed together) 30

Software Engineering Organization of maintenance W-type: by work type (analysis vs. programming) A-type: by application domain L-type: by life-cycle type (development vs. maintenance) L-type found most often 31

Software Engineering Clear accountability Development progress not hindered by unexpected maintenance requests Better acceptance test by maintenance department Higher QoS by maintenance department Higher productivity Advantages of L-type departmentalization 32

Software Engineering Disadvantages of L-type departmentalization Demotivation of maintenance personnel because of status differences Loss of system knowledge during system transfer Coordination costs Increased acceptance costs Duplication of communication channels with users 33

Software Engineering Product-service continuum and maintenance 34

Software Engineering Service gaps 1. Expected service as perceived by provider differs from service expected by customer 2. Service specification differs from expected service as perceived by provider 3. Service delivery differs from specified services 4. Communication does not match service delivery 35

Software Engineering Gap model of service quality 36

Software Engineering Maintenance control Configuration control:  Identify, classify change requests  Analyze change requests  Implement changes Fits in with iterative enhancement model of maintenance (first analyze, then change) As opposed to quick-fix model (first patch, then update design and documentation, if time permits) 37

Software Engineering Indicators of system decay Frequent failures Overly complex structure Running in emulation mode Very large components Excessive resource requirements Deficient documentation High personnel turnover Different technologies in one system 38

Software Engineering SUMMARY Most of maintenance is (inevitable) evolution Maintenance problems:  Unstructured code  Insufficient knowledge about system and domain  Insufficient documentation  Bad image of maintenance department Lehman’s 3 rd law: a system that is used, will change 39

Software Engineering Read chapter Software Architecture 12. Software Design 13. Software Testing 14. Software Maintenance 17. Software Reusability 18. Component-Based Software Engineering 19. Service Orientation 20. Global Software Development 40