software automationmarch 1997 1 managing the evolution of reusable assets theo d’hondt patrick...

35
Software Automation March 1997 Managing the Evolution of Reusable Assets Theo D’Hondt Patrick Steyaert Programming Technology Lab Vrije Universiteit Brussel

Post on 21-Dec-2015

215 views

Category:

Documents


0 download

TRANSCRIPT

Software Automation March 1997 1

Managing the Evolution of Reusable Assets

Theo D’Hondt

Patrick SteyaertProgramming Technology Lab

Vrije Universiteit Brussel

Software Engineering =

application of engineering techniques for the construction of

software

using formal techniques

reuse of componentsconstruction of

artefacts applying decomposition, ...

Software Automation March 1997 3

Activities

“prefab”: construction of software through the composition of standard components“reuse”: construction of complex software by reusing design procedures

“custom”: specific conception of unique software

Software Automation March 1997 4

Conventional Software Engineering

conv

entio

nal

proc

edur

e

specification

analysis

design

implementation

acceptance

Software Automation March 1997 5

Software Engineering 1975 A.D.

analyst

programmer

coder

analysis

specification

coding

Software Automation March 1997 6

Software Engineering 1985 A.D.

specification

analysisdesign

implementationacceptance

Software Automation March 1997 7

Recent Insight

implementing a complex software entity contributes

significantly to the understanding of the

associated problem domain

prototyping! e.g. windtunnel simulation in the

automobile industry

Software Automation March 1997 8

Engineering Techniques in Software…

Modularity

Software Automation March 1997 9

Modularity

menu • open • select • add • remove

interface

implementation

client

Software Automation March 1997 10

Engineering Techniques in Software…

Reuse

Software Automation March 1997 11

Reuse

popup-menu • open • select • ... • place colour-menu

• open • select • ... • colour

interface menu • open • select • ...

interface

interface

Modularity +

Reuse

Objects

Software Automation March 1997 13

Software Engineering 1995 A.D.

pro

toty

pin

g

analysis

specification

design

implementation

acceptance

Software Automation March 1997 14

Development Method

decompose

constructincrement

Reuse assets are the gold coinsgold coins of software engineering.

Legacy is the dirty worddirty word of software engineering.

Software Automation March 1997 16

What can Go Wrong…

Arian 4» well tested software» proven correctly

Arian 5» reuse of pieces of Ariane 4 software» result: trivial error (floating point error), large

consequences

What happened ?» changed flight specifications

Software Automation March 1997 17

Our Example: Tape Management

TapeManipulation

accept(Tape)

transfer(Tape)

manipulate(Tape)

TapeManager

register(Tape)

Tape

identificationkvuassociate(script)

manipulates manages

Tapes are manipulated- adding scripts, visioning

Tapes are managed- tracking, kvu checking

Software Automation March 1997 18

Tape Components

TapeManipulation

accept(Tape)

transfer(Tape)

manipulate(Tape)

TapeManager

register(Tape)

Tape

identificationkvuassociate(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 manipulationinternal to visioning

Software Automation March 1997 19

Composition Problem !

Tra

ffic

Te

chn

ical

Vis

ion

ing

Tape

Software Automation March 1997 20

Challenges: Impact Analysis

Changing a method

Software Automation March 1997 21

Example

TapeManager

add(Tape)

addAll(TapeSet)

OOTVTapeManager

add(Tape)

TapeManager

addAll(TapeSet)

add(Tape)

addAll(TapeSet)

OOTVTapeManager

add(Tape)

addAll(TapeSet)

no notification

notify notify

parent classchange

Software Automation March 1997 22

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 Automation March 1997 23

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 Automation March 1997 24

Reuse Contracts

Asset reuserAsset provider declares what

assump-tions can be made about the asset

declares how an asset can be reused

formally, non-coercively

declares what assumptions are made about the asset

declares how an asset is reused

formally,disciplined rules for change

propagation

Software Automation March 1997 25

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:TapeManagernotify(...)

m:TapeManip…accept(Tape)transfer(Tape)

next:TapeManip…accept(Tape)

3.transfer [notify]

1.accept4.transfer[accept]

2.accept [manipulate, transfer]

manipulate(Tape)

tape transfer contract

Software Automation March 1997 26

Evolution and Composition

Changing a method

Software Automation March 1997 27

Remember

TapeManipulation

accept(Tape)

transfer(Tape)

manipulate(Tape)

TapeManager

register(Tape)

Tape

identificationkvuassociate(script)

manipulates manages

Visioning

manipulate(Tape)

Technical Visioning

manipulate(Tape)

Shipping-Receiving

receive(Tape)ship(Tape)

Traffic

location?(Tape)

Composition Problem !

Software Automation March 1997 28

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 Automation March 1997 29

BUT…

Traffic

notify(...)

TapeManager

…concrete parent class …

Assumes

Too verbose

Does not document how TapeManager is actually reused

TapeManip.transfer [notify]

Software Automation March 1997 30

Declaring How a Class is Actually Reused

documenting differentkinds of reuse

TapeManager

Traffic

Refinement notify [+track]

TapeManager

notify (...)

Traffic

tracknotify [track]

notify (...)

tracknotify [track]

Software Automation March 1997 31

Different Kinds of Reuse

Assumption “preserving”» Concretisation: filling in the “hotspots”» Refinement: refining the overall design» Extension: adding new behaviour

Assumption “breaching”» Abstraction: generalisation» Coarsening: performance optimisation» Cancellation: fixes

Software Automation March 1997 32

Estimating Impact of ChangesCoarsening

addAll [-add]

Refinement add [+notify]

Refinement 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 notify

# addAll needs to beoverridden too

Software Automation March 1997 33

Estimating Composability

TapeManager

Traffic

notify (...)

tracknotify [track]

Refinement notify [+track]

TapeManipulation

Technical Visioning

transfer (Tape) [notify]

transfer (Tape) []

Coarsening transfer [-notify]

tape transfer contract

# composition problem

Software Automation March 1997 34

Reuse Contracts for Inheritance

Asset reuserAsset provider

rules for detecting conflicts

TapeManager

add()

addAll() [add]

Refinement add […]

formally non-

coercively

formally disciplined

Software Automation March 1997 35

Conclusion

New style of software engineering» modularity reuse objects» learn about the problem domain as you go along with

projects

Challenges» supporting reuse» supporting evolution

Reuse Contracts» incrementally turn software artifacts in assets