Upload
others
View
6
Download
0
Embed Size (px)
Citation preview
Reuse
Basic concepts
Rationale for reuse
Save calendar time Save person hours Reduce process risk Increased quality Standards compliance
What is re-used?
Software: Application reuse Component reuse Object and function reuse Test cases Test data Document content
Experience: Design patterns Architectural styles Processes Documents Conventions and standards
Classification of reuse
Product Scope Vertical – within domain Horizontal – across domains
Mode Planned Opportunistic
Intention Black-box Clear-box
Technique Compositional Generative
Techniques
Program libraries COTS Design patterns Middle-ware integration frameworks Legacy system wrapping Service-oriented systems Software product lines Commonalities Variation points
Program generators Software/Experience Factory
CORBA
Source: http://www.cs.wustl.edu/~schmidt/
Object-oriented frameworks
Object Oriented Framework Developmentby Marcus Eduardo Markiewicz and Carlos J.P. Lucena
Simple framework - JUnit
Object Oriented Framework Developmentby Marcus Eduardo Markiewicz and Carlos J.P. Lucena
Web-services
Source: H. Voormann ,Wikipedia
Service-oriented architecture
Design: Florian Lindner
Meta-data describes functionaland non-functional properties.
planetary1=110/50
C4=0.12 C5=0.12
planetary2=110/50
C6=0
.12
bearing2
C8=0.12
demultiplex
shaftS=2e-3S
planetary3=120/44
C11=0.12
shaftS1=2e-3S
C12=
0.12
bearing1bearing4
Modelica Visual Programming:Decomposition and Abstraction of an Automatic Gearbox
inertialx
y
axis1
axis2
axis3
axis4
axis5
axis6r3Drive1
1r3Motor
r3ControlqdRef1
S
qRef1
S
k2
i
k1
i
qddRef cut joint
l
qd
tn
Jmotor=J
gear=i
spring=c
fric
=Rv0
Srel
joint=0
S
Vs
-
+diff
-
+pow er
emf
La=(250/(2*D*wm
))Ra=250
Rd2=100
C=0.004*D/w m
-
+OpI
Rd1=100
Ri=10
Rp1=200
Rp2=
50
Rd4=100
hall2
Rd3=
100
g1
g2
g3
hall1
g4
g5
rw
qd q
rate2
b(s)
a(s)
rate3
340.8
S
rate1
b(s)
a(s)
tacho1
PT1
Kd
0.03
w Sum
-
sum
+1
+1
pSum
-
Kv
0.3
tacho2
b(s)
a(s)
q qd
iRefqRef
qdRef
Srel = n*n' + (identity(3) - n*n')*cos(q) - skew(n)*sin(q);wrela = n*qd;zrela = n*qdd;Sb = Sa*Srel';r0b = r0a;vb = Srel*va;wb = Srel*(wa + wrela);ab = Srel*aa;zb = Srel*(za + zrela + cross(wa, wrela));fa = Srel'*fb;ta = Srel'*tb;
Hierarchical Composition of a Modelica Model of anIndustrial Robot
Experience factory
Cost of reuse
Development for reuse Long-term increased maintenance costs Lack of tool support Non-invented-here (NIH)-syndrome Creating and maintaining a repository Finding, understanding and adapting reusable components Conflict project and line management
Experience 14
Characteristic HP project 1 HP project 2
size(ncss)
1100 700
quality 51% fault reduction 24% fault reduction
productivity 57% increase 40% increase
time-to-market - 42% reduction
Experience 24
HP products Air traffic control system
Menu- and forms management system
Graphics firmware
Relative cost to create reusable code (%)
200 120-480 111
Relative cost to reuse (%)
10-20 10-63 19
Experience 34
NEC: Reuse templates and algorithms 3 times better quality metrics
Hitatchi Reuse templates generated – total code ratio: 60-98%
Fujitsu Experience factory + job rotation Projects completed at time: Before: 20% After: 70%
Experience 44
Display HTML-tables 500 LOC two versions highly reused
Discussion forum 3000 LOC iteratively developed hard to understand
Contact-based network 10000 LOC 3 earlier versions needs technical skills instantiation easy
Experience: Start with small components Frequent releases Rewrite complicated code Well-known areas Document with examples Careful maintenance of repository Requires a re-use company
culture
Source: Ericsson: LiTG-IDA-Ex-01/19
Bottom-line is reuse worth the investment?
time
money
investment
income rest value
NPV = Σ CFi/(1+k)i - I0
k reflects: Compensation for waiting Compensation for inflation Compensation for risk
cash flow per time unit