Software Modernization

128
Software Modernization Javier Luis Cánovas Izquierdo [email protected] Universidad Autónoma de Madrid Noviembre de 2012

description

Slides from my talk in Madrid, November 11th 2012

Transcript of Software Modernization

Page 1: Software Modernization

Software Modernization

Javier Luis Cánovas [email protected]

Universidad Autónoma de MadridNoviembre de 2012

Page 2: Software Modernization

René Magritte

Who am I?

Page 3: Software Modernization

Where am I from?

Page 4: Software Modernization

The team

Page 5: Software Modernization

AtlanMod people

Page 6: Software Modernization

Our place

Page 7: Software Modernization

Our place in MDD

Page 8: Software Modernization

My place

Page 9: Software Modernization

Outline

fotopedia/DVIDSHUB

Page 10: Software Modernization

Jean Christophe Prunet

Software modernization

Page 11: Software Modernization

Mauro Cateb

Callingthings

properly

Page 12: Software Modernization

Calling things properly

Reengineering"The examination and alteration of a software system to reconstitute it in a new form and the subsequent implementation of a new form. Generally includes some form of reverse engineering, followed by some form of forward engineering or restructuring."

E. Chikofsky and J. Cross, “Reverse engineering and design recovery: A taxonomy,” Software, IEEE, vol. 7, no. 1, pp. 13–17, 1990.

Page 13: Software Modernization

Calling things properly

Reverse Engineering"Process of analyzing a subject system to identify its components and their relationships and to create representations of the systems in another form or at a higher level of abstraction. Generally involves extracting design artifacts and building or synthesizing abstractions that are less implementation- dependent..."

E. Chikofsky and J. Cross, “Reverse engineering and design recovery: A taxonomy,” Software, IEEE, vol. 7, no. 1, pp. 13–17, 1990.

Page 14: Software Modernization

Calling things properly

Restructuring"Transformation for one representation form to another, at the same abstraction level, while preserving the subject system external behavior (functionality and semantics)"

E. Chikofsky and J. Cross, “Reverse engineering and design recovery: A taxonomy,” Software, IEEE, vol. 7, no. 1, pp. 13–17, 1990.

Page 15: Software Modernization

Calling things properly

Forward Engineering"The traditional process of moving from high level abstractions & logical or implementation independent designs (e.g. models) to the physical implementation of a system (e.g. source code)."

E. Chikofsky and J. Cross, “Reverse engineering and design recovery: A taxonomy,” Software, IEEE, vol. 7, no. 1, pp. 13–17, 1990.

Page 16: Software Modernization

Everything together

R. Kazman, S. G. Woods, and S. J. Carrière, “Requirements for Integrating Software Architecture and Reengineering Models : CORUM II,” in WCRE conf., 1998, pp. 154–163.

Page 17: Software Modernization

Everything together (reloaded)

R. Kazman, S. G. Woods, and S. J. Carrière, “Requirements for Integrating Software Architecture and Reengineering Models : CORUM II,” in WCRE conf., 1998, pp. 154–163.

Page 18: Software Modernization

flickr/a_ninjamonkey

Page 19: Software Modernization

Modernization

"It is a form of software evolution which relies on an existing system as input."

R. C. Seacord, D. Plakosh and G. A. Lewis, “Modernizing Legacy Systems”. Addison-Wesley, 2003

Page 20: Software Modernization

flickr/mark.hogan

ModernizationExamples

Page 21: Software Modernization

Reverse engineering goal models

Y. Yu, Y. Wang, J. Mylopoulos, S. Liaskos, A. Lapouchnian, and J. C. Sampaio do Prado Leite, “Reverse engineering goal models from legacy code,” in RE conf., 2005.

Page 22: Software Modernization

Reverse engineering goal models

Y. Yu, Y. Wang, J. Mylopoulos, S. Liaskos, A. Lapouchnian, and J. C. Sampaio do Prado Leite, “Reverse engineering goal models from legacy code,” in RE conf., 2005.

Page 23: Software Modernization

SOA migration

M. Razavian and P. Lago, “Towards a conceptual framework for legacy to soa migration,” in ICSOC workshop, 2010, vol. 6275, pp. 445–455.

Page 24: Software Modernization

flickr/roger4336

MDD in Software modernization

Page 25: Software Modernization

The classical Horse-shoe model

Page 26: Software Modernization

The MDD-based Horse-shoe model

Page 27: Software Modernization

The MDD-based Horse-shoe model

Page 28: Software Modernization

Alan Pennington

MDD-based ModernizationExamples

Page 29: Software Modernization

Struts to JSF migration

J. L. Cánovas Izquierdo, O. Sánchez Ramón, J. Sánchez Cuadrado, and J. García Molina, “DSLs para la extracción de modelos en modernización,” in DSDM workshop, 2008.

Page 30: Software Modernization

Maintainer script modernization

D. D. Ruscio and P. Pelliccione, “Towards maintainer script modernization in FOSS distributions,” OCE workshop, 2009.

Page 31: Software Modernization

Maintainer script modernization

D. D. Ruscio and P. Pelliccione, “Towards maintainer script modernization in FOSS distributions,” OCE workshop, 2009.

Page 32: Software Modernization

Modernization business

T. Clark and P.-A. Muller, “Exploiting model driven technology: a tale of two startups,” Software & Systems Modeling, vol. 11, no. 4, pp. 481–493, Aug. 2012.

Page 33: Software Modernization

fotopedia/Mirco Wilheim

Architecture-Driven Modernization

Page 34: Software Modernization

What is it?

Page 35: Software Modernization

What is it?

Page 36: Software Modernization

What is it?

Page 37: Software Modernization

What is it?

Page 38: Software Modernization

What is it?

From OMG's specification"ADM refers to the process of understanding and evolving existing software assets in order to maintain their business value"

Page 39: Software Modernization

ADM metamodels

Page 40: Software Modernization

ADM metamodels

Page 41: Software Modernization

Alex Proimos

Going into the metamodels

Page 42: Software Modernization

ADM metamodels

Page 43: Software Modernization

What is it?

From OMG's specification"...the ASTM supports a direct 1-to-1 mapping of all code-level software language statements into low-level software models."

Page 44: Software Modernization

What for?

From OMG's specification"This mapping is intended to provide a framework for:

1. A high-fidelity invertible representation of code written in any software language...

2. Attachment of low-level software semantics produced by a constraint analysis, specifically scope analysis..."

Page 45: Software Modernization

Abstract syntax tree

Page 46: Software Modernization

Levels of conformance

Page 47: Software Modernization

GASTM

Page 48: Software Modernization

SASTM

Page 49: Software Modernization

Levels of conformance

Page 50: Software Modernization

Levels of conformance

Page 51: Software Modernization

Example

Page 52: Software Modernization

Example

Page 53: Software Modernization

Example

Page 54: Software Modernization

Example

Page 55: Software Modernization

Summary

Page 56: Software Modernization

ADM metamodels

Page 57: Software Modernization

What is it?

From OMG's specification"...a meta-model for representing existing software, its elements, associations, and operational environments... KDM facilitates projects that involve existing software systems by ensuring interoperability and exchange of data between tools provided by different vendors..."

Page 58: Software Modernization

KDM packages

Page 59: Software Modernization

Compliant levels

Page 60: Software Modernization

Core Package

Page 61: Software Modernization

Kdm Package

Page 62: Software Modernization

Kdm Package

● KDM metamodel structure

Page 63: Software Modernization

Kdm Package

● KDM metamodel structure● Audit mechanism

Page 64: Software Modernization

Kdm Package

● KDM metamodel structure● Audit mechanism● Extension mechanism

Page 65: Software Modernization

Kdm Package

● KDM metamodel structure● Audit mechanism● Extension mechanism● Tag mechanism

Page 66: Software Modernization

Source Package

Page 67: Software Modernization

Code Package

Page 68: Software Modernization

Action Package

Page 69: Software Modernization

Micro-KDM package

● Action semantic

● Action types

● Comparison(equals, notequals, lessthan,…)

● Numerical (add, multiply, divide,…)

● Binary operations (bitAnd, bitNot, leftShift,…)

● Control (if, assign, condition,…)

● Data type access (fieldSelect, …)

● Data type conversion (sizeof,…)

● String operations (tail, append,…)

● ...

Page 70: Software Modernization

Example

Page 71: Software Modernization

Example

Page 72: Software Modernization

Example

Page 73: Software Modernization

Example

Page 74: Software Modernization

Example

Page 75: Software Modernization

And the other packages?

Page 76: Software Modernization

Summary

Page 77: Software Modernization

ASTM vs. KDM

ASTM

KDM

Page 78: Software Modernization

ASTM vs. KDM

ASTM

KDM

Page 79: Software Modernization

ADM metamodels

Page 80: Software Modernization

What is it?

From OMG's specification"...meta-model for representing measurement information related to any model structured information with an initial focus on software, its operation, and its design.... ...this specification is an extensible meta-model for exchanging both measures and measurement information concerning artifacts contained or expressed by structured models, such as MOF..."

Page 81: Software Modernization

Core elements

Page 82: Software Modernization

Measures hierarchy

Page 83: Software Modernization

Measurements hierarchy

Page 84: Software Modernization

Hierarchy mirrored

Page 85: Software Modernization

Example

Page 86: Software Modernization

Example

Page 87: Software Modernization

The classical Horse-shoe model

Page 88: Software Modernization

ADM-based horse shoe model

Page 89: Software Modernization

Modernization scenarios

OMG, “Architecture-driven modernization scenarios,” 2006.

Page 90: Software Modernization

ADM Modernization business

Page 91: Software Modernization

flickr/jonrus

ADM-based modernizationexamples

Page 92: Software Modernization

Calculating metrics from PL/SQL

J. L. Cánovas Izquierdo and J. García Molina, “An Architecture-Driven Modernization Tool for Calculating Metrics,” IEEE Software, vol. 27, no. 4, pp. 37–43, 2010.

Page 93: Software Modernization

Calculating metrics from PL/SQL

J. L. Cánovas Izquierdo and J. García Molina, “An Architecture-Driven Modernization Tool for Calculating Metrics,” IEEE Software, vol. 27, no. 4, pp. 37–43, 2010.

Page 94: Software Modernization

Recovering Web Services

R. Pérez-Castillo, I. G. D. Guzmán, and I. Caballero, “Software modernization by recovering Web services from legacy databases,” Journal of Software: Evolution and Process, 2012.

Page 95: Software Modernization

Recovering Web Services

R. Pérez-Castillo, I. G. D. Guzmán, and I. Caballero, “Software modernization by recovering Web services from legacy databases,” Journal of Software: Evolution and Process, 2012.

Page 96: Software Modernization

photopedia/marfis75

MoDisco

Page 97: Software Modernization

MoDisco = Model Discovery

"An Eclipse framework to support the elaboration of Model-Driven Reverse Engineering solutions."

Page 98: Software Modernization

MoDisco in the Horse-shoe model

Page 99: Software Modernization

MoDisco in the Horse-shoe model

Page 100: Software Modernization

Reverse Engineering in MoDisco

Page 101: Software Modernization

Discover

Page 102: Software Modernization

Technical Spaces

Definition:"A technological space is a working context with a set of associated concepts, body of knowledge, tools, required skills, and possibilities. It is often associated to a given user community with shared know-how, educational support, common literature and even workshop and conference meetings."

I. Kurtev, J. Bézivin, and M. Aksit, “Technological Spaces : an Initial Appraisal,” in DOA, 2002

Page 103: Software Modernization

Technical Spaces

Page 104: Software Modernization

Bridging Technical Spaces

"...no TS is an island. There are bridges between various spaces and these bridges also have particular properties. Some may be bi-directional and some may be one-way bridges. Some operations may be performed easier in one space and the result may then be imported into other space."

I. Kurtev, J. Bézivin, and M. Aksit, “Technological Spaces : an Initial Appraisal,” in DOA, 2002

Page 105: Software Modernization

Why bridging?

Jean Bézivin. Model Engineering for Software Modernization. In WCRE - Guest Talk, 2004

Page 106: Software Modernization

Bridging Technical Spaces

I. Kurtev, J. Bézivin, and M. Aksit, “Technological Spaces : an Initial Appraisal,” in DOA, 2002

Page 107: Software Modernization

Technical Spaces

Page 108: Software Modernization

Technical Spaces

Page 109: Software Modernization

Reverse Engineering in MoDisco

Page 110: Software Modernization

MoDisco support for Java

Page 111: Software Modernization

MoDisco support for XML

Page 112: Software Modernization

MoDisco support for JSP

Page 113: Software Modernization

Discovery manager

Page 114: Software Modernization

New discoverers

Page 115: Software Modernization

Understand

Page 116: Software Modernization

Reverse Engineering in MoDisco

Page 117: Software Modernization

Model Browser

Page 118: Software Modernization

Transform

Page 119: Software Modernization

Transform

Page 120: Software Modernization

Reverse Engineering in MoDisco

Page 121: Software Modernization

MoDisco Architecture

Page 122: Software Modernization

flickr/-staci-

MoDiscoexamples

Page 123: Software Modernization

JUnit migration

Java source codeJUnit3 code

Java modelJUnit3

Java metamodel

conforms to

MoDiscoJava

Discoverer

MoDiscoModel

Browser

Page 124: Software Modernization

JUnit migration

MoDiscoModelBrowser

Java modelJUnit3

JavaCustomization

JUnit3Queries

JUnit3Facets

uses

Page 125: Software Modernization

JUnit migration

Java source codeJUnit4 code

JUnit3 to JUnit4M2M Transformation

Java modelJUnit4

Java modelJUnit3

MoDisco Java

Generator

JUnit3Facets

Page 126: Software Modernization

Calculating metrics from code

Page 127: Software Modernization

Viewpoints from source code

Page 128: Software Modernization

flickr/peterzen