helping you reengineering your legacy

36
Stéphane Ducasse L S E Stéphane Ducasse [email protected] http://stephane.ducasse.free.fr/ Helping you evolving your systems

Upload: ducasse

Post on 31-May-2015

827 views

Category:

Technology


0 download

TRANSCRIPT

Page 1: Helping you reengineering your legacy

Stéphane Ducasse

LSE

Stéphane [email protected]://stephane.ducasse.free.fr/

Helping you evolving yoursystems

1

Page 2: Helping you reengineering your legacy

S.Ducasse LSE

Roadmap• Some facts• Our approach

• Supporting maintenance• Moose an open-platform

• Some visual examples• Conclusion

2

Page 3: Helping you reengineering your legacy

1946

Page 4: Helping you reengineering your legacy

?1956 2006

Page 5: Helping you reengineering your legacy

Software is complex.

The Standish Group, 2004

53% Challenged

18% Failed

29% Succeeded

Page 6: Helping you reengineering your legacy

How large is your project?

1’000’000 lines of code

* 2 = 2’000’000 seconds

/ 3600 = 560 hours

/ 8 = 70 days

/ 20 = 3 months

Page 7: Helping you reengineering your legacy

Software developmentis more than forward engineering.

Forward engineering

Actual development}

{

}

{

}

{

}

{}

{

}

{

}

{}

{

}

{

Page 8: Helping you reengineering your legacy

Maintenance is is needed to evolve the code.

Rever

se en

ginee

ring

Forward engineering

Actual development}

{

}

{

}

{

}

{}

{

}

{

}

{}

{

}

{

Page 9: Helping you reengineering your legacy

S.Ducasse LSE

Roadmap• Some facts• Our approach

• Supporting maintenance• Moose an open-platform

• Some visual examples• Conclusion

9

Page 10: Helping you reengineering your legacy

S.Ducasse

Supporting the evolution of applications

Our research goal and agenda grounded in reality

How to help companies maintaining their large software?What is the xray for software?

code, people, practicesWhich analyses?How can you monitor your system (dashboards....)How to present extracted information?

10

Page 11: Helping you reengineering your legacy

S.Ducasse

Covered topics

TopicsMetamodeling, Software metrics,Program understanding,Visualization, Evolution analysis,Duplicated code detection,Code Analysis, Refactorings,TestsContributions

Moose: an open-source extensible reengineering environment: (Lugano, Bern, Annecy, Anvers, Louvain la neuve, ULB, UTSL)

ContactsHarman-Becker (3 Millions C++), Bedag (Cobol), Nokia, ABB, IMEC

11

Representation Transformations

Reverse

Engineering

Analyses

Evolution

Page 12: Helping you reengineering your legacy

S.Ducasse LSE12

Representation Transformations

Reverse

Engineering

Analyses

EvolutionLanguage Independent Meta Model (FAMIX)

[UML99]An Extensible Reengineering Environment (Moose)

[Models 06]

Reengineering PatternsVersion Analyses

[ICSM 05]HISMO metamodel

[JSME 05]

Understanding Large Systems [WCRE99, TSI00, TSE03]Static/Dynamic Information

[ICSM99]Feature Analysis

[JSME 06]Class Understanding

[OOPSLA01,TSE04]Package Blueprints

[ICSM 07]Distribution Maps

[ICSM 06]

Software Metrics [LMO99, OOPSLA00]

Duplicated Code Identification[ICSM99, ICSM02]

Group Identification [ASE03]

Test Generation [CSMR 06]Concept Identification

[WCRE 06]

Language Independent Refactorings

[IWPSE 00]

Page 13: Helping you reengineering your legacy

S.Ducasse

One Example: who is responsible of what?

13

(1) Extraction

(2) Modèle

(4) Visualisation

(3) Analyses

Distribution Map of authors on JBoss

Page 14: Helping you reengineering your legacy

}

{

}

{

}

{}

{

}

{

McCabe = 21

LOC =

753,0

00NOM = 102

Metrics Queries Visualizations ...

Moose is a powerful environment

Page 15: Helping you reengineering your legacy

Metrics compress the system into numbers

Cyclomatic complexity = 21

LOC = 753,000NOM = 102

}

{

}

{

}

{}

{

}

{

Page 16: Helping you reengineering your legacy

Queries reduce the analysis space

}

{

}

{

}

{}

{

}

{

Page 17: Helping you reengineering your legacy

Visualization compresses the system into pictures

}

{

}

{

}

{}

{

}

{

Page 18: Helping you reengineering your legacy

S.Ducasse LSE

Roadmap• Some facts• Our approach

• Supporting maintenance• Moose an open-platform

• Some visual examples• Conclusion

18

Page 19: Helping you reengineering your legacy

70% of our sensors are dedicated to vision

Page 20: Helping you reengineering your legacy

Polymetric views show up to 5 metrics.

Color metric

Width metric

Height metric

Position metrics

Lanza etal, 03

Page 21: Helping you reengineering your legacy

System Complexity shows class hierarchies.

lines

attributes

methods

Page 22: Helping you reengineering your legacy

Class Blueprint shows class internals.

Initialize Interface Internal Accessor Attribute

invocation and access direction

Ducasse, Lanza, 05

Page 23: Helping you reengineering your legacy

Class Blueprint shows class internals.

Page 24: Helping you reengineering your legacy

S.Ducasse LSE

Developers• More efficient to put people working together in the

same office? • How can we optimize software development?

24

Page 25: Helping you reengineering your legacy

S.Ducasse LSE

Who did that?

25

Files

Time

Page 26: Helping you reengineering your legacy

S.Ducasse LSE

Which author “possesses” which files?

26

Page 27: Helping you reengineering your legacy

S.Ducasse LSE

Alphabetical order is no order!

27

Page 28: Helping you reengineering your legacy

S.Ducasse LSE

Based on similar commit signature

28

DialogueMonologue

Edit Takeover

Familiarization

Page 29: Helping you reengineering your legacy

S.Ducasse LSE

How can we predict changes?Common wisdom stresses that what changes yesterday will change today, but it is true?

In the Sahara the weather is constant, tomorrow: 90% chance that it is the same as today

In Belgium, the weather is changing really fast (sea influence), 30% chance that it is the same as today

29

Page 30: Helping you reengineering your legacy

S.Ducasse LSE

With history analysis we can get the climate of a software system

30

Past LateChangers

Future EarlyChangers

Presentversion

Pastversions

Futureversions

1, TopLENOM1..i (S, t1) ∩ TopEENOMi..n (S, t2) ≠ ∅

YWi(S) = 0, TopLENOM1..i (S, t1) ∩ TopEENOMi..n (S, t2) = ∅

hitYW(S, t1, t2) =

∑ YWi(S, t1, t2)

n - 2

Page 31: Helping you reengineering your legacy

S.Ducasse LSE

Roadmap• Some facts• Our approach

• Supporting maintenance• Moose an open-platform

• Some visual examples• Conclusion

31

Page 32: Helping you reengineering your legacy

}

{

}

{

}

{}

{

}

{

McCabe = 21

LOC =

753,0

00NOM = 102

Metrics Queries Visualizations ...

Duplicationdetection

Evolution analysis

Dynamic analysis

Semantic analysis

Page 33: Helping you reengineering your legacy

S.Ducasse LSE

Moose has been validated on real life systems written in different languages

• Several large, industrial case studies (NDA)• Harman-Becker• Nokia• Daimler• Siemens

• Different implementation languages (C++, Java, Smalltalk, Cobol)

• Different sizes

33

Page 34: Helping you reengineering your legacy

Current TeamStéphane DucasseTudor GîrbaAdrian Kuhn

Previous TeamSerge DemeyerMichele LanzaSander Tichelaar

Current ContributorsHani Abdeen Ilham AllouiGabriela Arevalo Mihai BalintPhilipp Bunge Marco D’AmbrosOrla Greevy Markus Hofstetter Matthias Junker Adrian LienhardMartin von Löwis Mircea LunguMichael Meyer Damien PolletSara Sellos Lucas StreitToon Verwaest Roel WuytsRichard Wettel

Previous ContributorsTobias Aebi Frank BuchliThomas Bühler Calogero ButeraDaniel Frey Georges GolomingiDavid Gurtner Reinout HeeckMarkus Kobel Michael LocherPietro Malorgio Michael MeerLaura Ponisio Daniel RatiuMatthias Rieger Azadeh Razavizadeh Andreas Schlapbach Daniel SchweizerMauricio Seeberger Lukas SteigerDaniele Talerico Herve VerjusVioleta Voinescu.

~ 100 men years

Page 35: Helping you reengineering your legacy

S.Ducasse LSE

Possible New Research Directions

• Remodularization• Clustering analysis• Open and Modular modules

• SOA - Service Identification• Architecture Extraction/Validation• Software Quality• Cost prediction• EJB Analysis• Business rules extraction• Model transformation

35

Page 36: Helping you reengineering your legacy

S.Ducasse LSE

Evolution is difficult

• We are expert in reengineering • We are interested in your problems!

• Moose is open-source, you can use it, extend it, change it

• We can collaborate!

36

}

{

}

{

}

{}

{

}

{

NOM > 10 & LOC > 100