Software AutomationMarch Managing the Evolution of Reusable Assets Theo D’Hondt Patrick Steyaert Programming Technology Lab Vrije Universiteit Brussel
Software AutomationMarch Activities
Software AutomationMarch Conventional Software Engineering
Software AutomationMarch Software Engineering 1975 A.D.
Software AutomationMarch Software Engineering 1985 A.D.
Software AutomationMarch Recent Insight
Software AutomationMarch Engineering Techniques in Software… Modularity
Software AutomationMarch Modularity
Software AutomationMarch Engineering Techniques in Software… Reuse
Software AutomationMarch Reuse
Software AutomationMarch Software Engineering 1995 A.D.
Software AutomationMarch Development Method
gold coins Reuse assets are the gold coins of software engineering. dirty word Legacy is the dirty word of software engineering.
Software AutomationMarch What can Go Wrong… 4Arian 4 »well tested software »proven correctly 4Arian 5 »reuse of pieces of Ariane 4 software »result: trivial error (floating point error), large consequences 4What happened ? »changed flight specifications
Software AutomationMarch Our Example: Tape Management TapeManipulation accept(Tape) transfer(Tape) manipulate(Tape) TapeManager register(Tape) Tape identification kvu associate(script) manipulates manages 4Tapes are manipulated - adding scripts, visioning 4Tapes are managed - tracking, kvu checking
Software AutomationMarch Tape Components TapeManipulation accept(Tape) transfer(Tape) manipulate(Tape) TapeManager register(Tape) Tape identification kvu associate(script) manipulates manages Visioning manipulate(Tape) Technical Visioning manipulate(Tape) Shipping-Receiving receive(Tape) ship(Tape) Traffic location?(Tape) depends on kvu, script present,... tape manipulation internal to visioning
Software AutomationMarch Composition Problem ! Traffic Technical Visioning Tape
Software AutomationMarch Challenges: Impact Analysis Changing a method
Software AutomationMarch Example TapeManager add(Tape) addAll(TapeSet) OOTVTapeManager add(Tape) TapeManager addAll(TapeSet) add(Tape) addAll(TapeSet) OOTVTapeManager add(Tape) addAll(TapeSet) no notification notify parent class change
Software AutomationMarch Challenges: Proliferation of Versions Repository - Tapemanager - Tapes Application A - MyTapeManager - Tape Application B - MyTape Application C - XTapeManager Maintenance problem: version management Development problem: design for reuse
Software AutomationMarch Challenges: Design for Reuse... ? How to improve reusability? TapeManipulation accept(Tape) transfer(Tape) manipulate(Tape) TapeManager register(Tape) Visioning manipulate(Tape) Traffic location?(Tape)
Software AutomationMarch Reuse Contracts Asset reuser Asset provider 4 declares what assump- tions can be made about the asset 4 declares how an asset can be reused 4 formally, non- coercively 4 declares what assumptions are made about the asset 4 declares how an asset is reused 4 formally,disciplined 4 rules for change propagation
Software AutomationMarch Contracts & Specialisation Clauses implementation will invoke transfer, manip… Contracts declare the assumptions that can be made about a class and how a it can be reused. tm:TapeManager notify(...) m:TapeManip… accept(Tape) transfer(Tape) next:TapeManip… accept(Tape) 3.transfer [notify] 1.accept 4.transfer [accept] 2.accept [manipulate, transfer] manipulate(Tape) tape transfer contract
Software AutomationMarch Evolution and Composition Changing a method
Software AutomationMarch Remember TapeManipulation accept(Tape) transfer(Tape) manipulate(Tape) TapeManager register(Tape) Tape identification kvu associate(script) manipulates manages Visioning manipulate(Tape) Technical Visioning manipulate(Tape) Shipping-Receiving receive(Tape) ship(Tape) Traffic location?(Tape) Composition Problem !
Software AutomationMarch Changing Assumptions TapeManip.transfer [notify] Assumption made by reuser (before change) Traffic Assumes TapeManip.transfer [] What can be assumed (after composition or change) Traffic Actually gets
Software AutomationMarch BUT… Traffic notify(...) TapeManager …concrete parent class … Assumes Too verbose Does not document how TapeManager is actually reused TapeManip.transfer [notify]
Software AutomationMarch Declaring How a Class is Actually Reused documenting different kinds of reuse TapeManager Traffic Refinement 3 notify [+track] TapeManager notify (...) Traffic track notify [track] notify (...) track notify [track]
Software AutomationMarch Different Kinds of Reuse 3Assumption “preserving” »Concretisation: filling in the “hotspots” »Refinement: refining the overall design »Extension: adding new behaviour 3Assumption “breaching” »Abstraction: generalisation »Coarsening: performance optimisation »Cancellation: fixes
Software AutomationMarch Estimating Impact of Changes Coarsening 3 addAll [-add] Refinement 3 add [+notify] Refinement 3 add [+notify] TapeManager add(Tape) addAll(TapeSet) [add] OOTVTapeManager add(Tape) [notify] TapeManager addAll(TapeSet) [add] add(Tape) addAll(TapeSet) [] OOTVTapeManager add(Tape) [notify] addAll(TapeSet) [add] notify # addAll needs to be overridden too
Software AutomationMarch Estimating Composability TapeManager Traffic notify (...) track notify [track] Refinement 3 notify [+track] TapeManipulation Technical Visioning transfer (Tape) [notify] transfer (Tape) [] Coarsening 3 transfer [-notify] tape transfer contract # composition problem
Software AutomationMarch Reuse Contracts for Inheritance Asset reuser Asset provider 3 rules for detecting conflicts TapeManager add() addAll() [add] Refinement add […] 3 formally 3 non-coercively 3 formally 3 disciplined
Software AutomationMarch Conclusion 4New style of software engineering »modularity reuse objects »learn about the problem domain as you go along with projects 4Challenges »supporting reuse »supporting evolution 4Reuse Contracts »incrementally turn software artifacts in assets