incremental change of software taxonomy of evolution
play

Incremental Change of Software Taxonomy of Evolution Changes - PowerPoint PPT Presentation

Incremental Change of Software Taxonomy of Evolution Changes Incremental change (IC) adds substantial new functionality Refactoring (restructuring) preserves the functionality Replacement substitute one functionality


  1. Incremental Change of Software

  2. Taxonomy of Evolution Changes • Incremental change (IC) – adds substantial new functionality • Refactoring (restructuring) – preserves the functionality • Replacement – substitute one functionality by another – example: replacing buggy code • Retracting – deletes a functionality

  3. Strategies for IC • Anticipated change – information hiding, parametrization – localize change within one class • Many changes cannot be anticipated – process of learning during development • Microsoft: 70% of requirements predicted • Ford project: 30% predicted – examples of unexpected changes • company mergers, introduction of Euro

  4. Unanticipated IC • The Software was not prepared/designed for it • Very common situation in practice • A substantial part of software engineering

  5. The Mini-process of IC • Initiation • IC design • IC implementation & Tests • Release

  6. IC Initiation • Problem Report – May require logs, traces • Preventive Maintenance – enhance reliability, comprehensibility, extensibility, etc. • New Feature Request – additional functionality of the product – usually initiated by the customers, marketing, management • All change requests – assigned a priority and placed on the queue – hot problems cause instant reprioritization

  7. IC Design • Concept Location – Find where in the code the change will be done • Study Code and Documentation • Identify/Weigh Alternative Solutions • Implementation strategy – Divide large changes into several smaller ones – Each has its own implementation and testing activity • Impact analysis – Find all components that will be affected by the change

  8. IC Implementation • Refactoring 1 (pre-factoring) – Restructure the software to localize change • Actualization – Implements the new code • Incorporation – Replaces the new code by the old • Change propagation – Changes all other components that must be changed • Refactoring 2 (post-factoring) – Improves clarity, readability

  9. Testing • Unit tests of the components – Guarantee that units (classes) work • Regression test – Guarantee that things that did not change still work • Integration test – Guarantee that the whole system works again • Tests are done both during and after implementation

  10. IC Release • Release build • Write Release Notes • Make release available to customer

  11. Concept location • plays key role in IC • concepts are present in the code • primitive concepts have to be enriched – Point-of-Sale: introduce credit card payment – old code: payment represented as just one number • latent concepts have to be implemented – Student Registration: introduce prerequisite check – old code assumption: prerequisites are satisfied

  12. Concept location • finds code that implements concept • part of program comprehension • concept location methodologies – human knowledge – "grep" (pattern matching) – dynamic search (execution traces) – static search through dependency graph – traceability tools

  13. Top-down search • Depth first search done by programmer: Start with the top class (main in C++) while (concept is not implemented here) if (the concept is a part of the composite functionality) move to subclass which leads to the concept else backtrack concept located

  14. Change propagation • Refactoring 1 (pre-factoring) – Restructure the software to localize change • Actualization – Implements the new code • Incorporation – Replaces the new code by the old • Change propagation – Changes all other components that must be changed • Refactoring 2 (post-factoring) – Improves clarity, readability

  15. Change propagation – if the visited class is modified, it may no longer fit • secondary changes must be made in interacting (“neighboring”) classes • secondary changes may trigger additional changes – “ripple effect” – Process • Mark neighboring classes of a class that changed • visit the marked classes one-by-one

  16. Three possibilities for marked class visit • Change class – Mark all neighbors • Do not change class but propagate – Mark all neighbors • Do not change class and do not propagate – Erase the mark

  17. Three options (class diagram) Change class mark Do not change class but propagate

  18. Three options (class diagram) Do not change class and do not propagate

  19. Example change propagation • Point-Of-Sale application • Old program • keeps an inventory, receives delivery, sells products, and supports a cash register. • Classes designed and implemented at a minimal level of functionality

  20. UML class diagram

  21. Incremental change • complexities of sale taxes • different products may have different sales tax, depending on state law • location – “tax” in class “item” • actualization – new class taxCategory

  22. Incorporation register store item sale saleLineItem taxCategory

  23. Change propagation register store item sale saleLineItem taxCategory

  24. Change propagation register store item sale saleLineItem taxCategory

  25. Change propagation register store item sale saleLineItem taxCategory

  26. Change propagation register store item sale saleLineItem taxCategory

  27. Change propagation register store item sale saleLineItem taxCategory

  28. Summary adding tax • 1 new class was implemented • All 5 old classes had to be visited (!) • 3 old classes had to be changed

  29. Example Drawlets • Application framework Drawlets – adds graphical display to a host application • Drawing canvas – lines, free-hand lines, rectangles, rounded rectangles, triangles, pentagons, polygons, ellipses, text boxes, images

  30. Drawlets • more than 100 classes, 35 interfaces and 40,000 lines of code – originally implemented by Kent Beck, Ward Cunningham • later ported into Java • “perfect API” – http://www.rolemodelsoft.com/aboutUs/ drawlets.htm

  31. The host application • responsible for providing an instance of the drawing canvas, toolbars, and tool buttons • Class SimpleApplet is a host application – is a part of the Drawlet library – SimpleApplet runs in any browser

  32. SimpleApplet window

  33. Top classes LocatorConnectionHandle AbstractFigure Locator Figure StylePalette SequenceOfFigures SimpleApplet DrawingCanvas CanvasTool SimpleDrawingCanvas ToolBar SelectionTool ConstructionTool ToolPalette LabelTool PrototypeConstructionTool ShapeTool RectangleTool EllipseTool RectangularCreationTool PG_RectImageTool

  34. Concept Location :: Example • Locating figure properties in Drawlets

  35. Example Drawlets: Top class LocatorConnectionHandle AbstractFigure Locator Figure StylePalette SequenceOfFigures SimpleApplet DrawingCanvas CanvasTool SimpleDrawingCanvas ToolBar SelectionTool ConstructionTool ToolPalette LabelTool PrototypeConstructionTool ShapeTool RectangleTool EllipseTool RectangularCreationTool PG_RectImageTool

  36. Wrong way LocatorConnectionHandle AbstractFigure Locator Figure StylePalette SequenceOfFigures SimpleApplet DrawingCanvas CanvasTool SimpleDrawingCanvas ToolBar SelectionTool ConstructionTool ToolPalette LabelTool PrototypeConstructionTool ShapeTool RectangleTool EllipseTool RectangularCreationTool PG_RectImageTool

  37. Backtrack LocatorConnectionHandle AbstractFigure Locator Figure StylePalette SequenceOfFigures SimpleApplet DrawingCanvas CanvasTool SimpleDrawingCanvas ToolBar SelectionTool ConstructionTool ToolPalette LabelTool PrototypeConstructionTool ShapeTool RectangleTool EllipseTool RectangularCreationTool PG_RectImageTool

  38. Right way LocatorConnectionHandle AbstractFigure Locator Figure StylePalette SequenceOfFigures SimpleApplet DrawingCanvas CanvasTool SimpleDrawingCanvas ToolBar SelectionTool ConstructionTool ToolPalette LabelTool PrototypeConstructionTool ShapeTool RectangleTool EllipseTool RectangularCreationTool PG_RectImageTool

  39. Wrong way LocatorConnectionHandle AbstractFigure Locator Figure StylePalette SequenceOfFigures SimpleApplet DrawingCanvas CanvasTool SimpleDrawingCanvas ToolBar SelectionTool ConstructionTool ToolPalette LabelTool PrototypeConstructionTool ShapeTool RectangleTool EllipseTool RectangularCreationTool PG_RectImageTool

  40. Backtrack LocatorConnectionHandle AbstractFigure Locator Figure StylePalette SequenceOfFigures SimpleApplet DrawingCanvas CanvasTool SimpleDrawingCanvas ToolBar SelectionTool ConstructionTool ToolPalette LabelTool PrototypeConstructionTool ShapeTool RectangleTool EllipseTool RectangularCreationTool PG_RectImageTool

  41. Concept Location :: Summary LocatorConnectionHandle AbstractFigure Locator Figure StylePalette SequenceOfFigures SimpleApplet DrawingCanvas CanvasTool SimpleDrawingCanvas ToolBar SelectionTool ConstructionTool ToolPalette LabelTool PrototypeConstructionTool ShapeTool RectangleTool EllipseTool RectangularCreationTool PG_RectImageTool

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend