web2mexadl - csmr presentation

22
WEB2MEXADL: DISCOVERY AND MAINTAINABILITY VERIFICATION OF SOFTWARE SYSTEMS ARCHITECTURE Juan Castrejón, Rafael Lozano, Genoveva Vargas-Solar ITESM-CCM, LIG-LAFMIA

Upload: jccastrejon

Post on 28-Jun-2015

214 views

Category:

Technology


0 download

DESCRIPTION

Presentation of the Web2MexADL project

TRANSCRIPT

Page 1: Web2MexADL - CSMR Presentation

WEB2MEXADL: DISCOVERY AND MAINTAINABILITY VERIFICATION OF SOFTWARE SYSTEMS ARCHITECTURE

Juan Castrejón, Rafael Lozano, Genoveva Vargas-Solar

ITESM-CCM, LIG-LAFMIA

Page 2: Web2MexADL - CSMR Presentation

Outline 2

¨  Context and motivation ¨  Objectives and contribution ¨  Software architecture discovery

¤ Classification functions ¤ Architecture generation ¤  Implementation

¨  Maintainability verification ¨  Conclusions and future work

Page 3: Web2MexADL - CSMR Presentation

Introduction 3

doX() doY()

Software architecture should guide software development and maintenance

The architecture is documented in one ore more architecture views

Architecture patterns are used as reference models for software solutions

Design

Process

Implementation

Deployment

Use Case

Architecture view

Architecture view

Architecture view

Page 4: Web2MexADL - CSMR Presentation

Problem 4

Model View

Controller

Development of a traditional web application

Use an architecture pattern as reference model (Ex: Model-View-Controller (MVC) )

Are we really following the MVC pattern?

Is this a view a model or a controller?

Is anyone maintaining the system documentation?

1

2

3

Page 5: Web2MexADL - CSMR Presentation

Related work 5

¨  In [Corazza 2010] a probabilistic approach is proposed to partition software systems into meaningful sub-systems ¤  Analysis of variables, methods and class signatures ¤  This is a general approach and does not include historical data to

train the probabilistic classifier ¨  In [Maqbool 2007] a Bayesian method is described to

recover software systems architecture ¤  Use of a Naïve Bayes classifier, based on global variables ¤  Our approach considers a wider set of variables for the

discovery of software architecture ¨  Software Architecture verification tools

¤  Klocwork Architect (http://www.klocwork.com) ¤  Structure 101 (http://www.headwaysoftware.com)

A. Corazza, S. D. Martino, and G. Scanniello, “A probabilistic based approach towards software system clustering,” CSMR , 2010 O. Maqbool and H. Babri, “Bayesian learning for software architecture recovery,” ICEE, 2007

Page 6: Web2MexADL - CSMR Presentation

Outline 6

¨  Context and motivation ¨  Objectives and contribution ¨  Software architecture discovery

¤ Classification functions ¤ Architecture views ¤  Implementation

¨  Maintainability verification ¨  Conclusions and future work

Page 7: Web2MexADL - CSMR Presentation

Objectives and contribution 7

¨  Objectives ¤ Recover software architecture for Java web systems

n MVC/Clustered based architecture n Architecture Description Language (ADL) n Scalable Vectors Graphic (SVG)

¤ Help verify their maintainability intent

¨  Contribution ¤ Probabilistic approach for the generation of

architecture documentation based on MexADL

Page 8: Web2MexADL - CSMR Presentation

Software Architecture 8

Architecture definition

Architecture view

MVC Analyzer http://code.google.com/p/mvc-analyzer

1

Web2MexADL http://code.google.com/p/web2mexadl

2

Architecture discovery ADL

Architectural documentation

Architecture verification

Architecture verification

MexADL http://code.google.com/p/mexadl

3

ADL

Verification results

+ Verification results

Verification results

Architectural documentation Source code

classes

Page 9: Web2MexADL - CSMR Presentation

MexADL 9

ADL description

Valid interactions verification

Metrics verification

AOP inter-type declarations

Source code

Source code

AOP compile-time weaving

Source code analysis

Definition

Verification Implementation

Traditional software life cycle

MexADL

Valid interactions

Expected metrics

Valid interactions

Expected metrics

Requirements

Design

Verification

Maintenance

Page 10: Web2MexADL - CSMR Presentation

Outline 10

¨  Context and motivation ¨  Objectives and contribution ¨  Software architecture discovery

¤ Classification functions ¤ Architecture views ¤  Implementation

¨  Maintainability verification ¨  Conclusions and future work

Page 11: Web2MexADL - CSMR Presentation

Classification functions 11

Analyze training data 1 Generate a classification function 2

MVC-based architecture

Type Suffix

ExternalAPI MVC Layer + = Weka

619 manually classified components 17 representative projects (Grails, Spring Roo, Play, Struts 2)

BayesNet classifier Simple estimator

TAN search

External API

MVC Layer

Type Suffix

87% effectivity, using the training set as a test option

Clustered-based architecture

Rely on clustering algorithms 1Java-ML

Expectation-Maximization (EM) algorithm Without training data

Type Suffix

ExternalAPI Cluster ID +

Page 12: Web2MexADL - CSMR Presentation

Outline 12

¨  Context and motivation ¨  Objectives and contribution ¨  Software architecture discovery

¤ Classification functions ¤ Architecture views ¤  Implementation

¨  Maintainability verification ¨  Conclusions and future work

Page 13: Web2MexADL - CSMR Presentation

Architecture views 13

Classify web components 1

Generate architecture views 2

MexADL

SVG file ADL document

Expectation-Maximization

Weka/Java-ML MVC layers/Clusters

Type

Suffix

ExternalAPI

{controller, service, validator, context, servlet, web, aspect, form, dao, manager, none}

{java, jsp, xml, html, none}

{springmvc, aspectj, hibernate, jdbc, none}

Cluster template

Graphviz

MVC layers/Clusters

+ =

MVC layers/Clusters

+ =

Classification results

Classification results Classification results

ASM +

MVC template

Java bytecode

Page 14: Web2MexADL - CSMR Presentation

Outline 14

¨  Context and motivation ¨  Objectives and contribution ¨  Software architecture discovery

¤ Classification functions ¤ Architecture views ¤  Implementation

¨  Maintainability verification ¨  Conclusions and future work

Page 15: Web2MexADL - CSMR Presentation

Implementation 15

¨  Deployed as an open-source Eclipse plugin ¤ Context menu linked to WAR files and Eclipse Projects

SVG

Clustered-based ADL

MVC-based ADL

Quality metrics

1 2

2

3

¨  Sample application: SpringSource Petclinic

Full details in: http://code.google.com/p/web2mexadl

Page 16: Web2MexADL - CSMR Presentation

Outline 16

¨  Context and motivation ¨  Objectives and contribution ¨  Software architecture discovery

¤ Classification functions ¤ Architecture views ¤  Implementation

¨  Maintainability verification ¨  Conclusions and future work

Page 17: Web2MexADL - CSMR Presentation

Maintainability verification 17

Quality metrics report

Valid interactions report

After each compilation

Full details in: http://code.google.com/p/mexadl

Page 18: Web2MexADL - CSMR Presentation

Outline 18

¨  Context and motivation ¨  Objectives and contribution ¨  Software architecture discovery

¤ Classification functions ¤ Architecture views ¤  Implementation

¨  Maintainability verification ¨  Conclusions and future work

Page 19: Web2MexADL - CSMR Presentation

Conclusions 19

¨  The effectivity of the probabilistic model is promising, though further validation is required

¨  The generated architecture can help verify the maintainability intent of software systems

¨  The approach is open to a variety of machine learning algorithms, thanks to the flexibility of the Weka and Java-ML projects

¨  Our implementation can be easily integrated with current development environments

Page 20: Web2MexADL - CSMR Presentation

Future work 20

¨  To improve the classifier effectiveness, the bayesian network should be trained with a wider set of web projects

¨  Support additional languages and platforms ¨  Increased support for systems outside the web

application domain

Page 21: Web2MexADL - CSMR Presentation

References 21

¨  Research paper ¤ J. Castrejón, R. Lozano, and G. Vargas-Solar,

“Web2MexADL: Discovery and Maintainability Verification of Software Systems Architecture,” CSMR 2012 - Tool Demonstration Track

¨  Implementation ¤ http://code.google.com/p/web2mexadl

Page 22: Web2MexADL - CSMR Presentation

Questions 22