web2mexadl - csmr presentation

Post on 28-Jun-2015

214 Views

Category:

Technology

0 Downloads

Preview:

Click to see full reader

DESCRIPTION

Presentation of the Web2MexADL project

TRANSCRIPT

WEB2MEXADL: DISCOVERY AND MAINTAINABILITY VERIFICATION OF SOFTWARE SYSTEMS ARCHITECTURE

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

ITESM-CCM, LIG-LAFMIA

Outline 2

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

¤ Classification functions ¤ Architecture generation ¤  Implementation

¨  Maintainability verification ¨  Conclusions and future work

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

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

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

Outline 6

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

¤ Classification functions ¤ Architecture views ¤  Implementation

¨  Maintainability verification ¨  Conclusions and future work

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

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

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

Outline 10

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

¤ Classification functions ¤ Architecture views ¤  Implementation

¨  Maintainability verification ¨  Conclusions and future work

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 +

Outline 12

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

¤ Classification functions ¤ Architecture views ¤  Implementation

¨  Maintainability verification ¨  Conclusions and future work

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

Outline 14

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

¤ Classification functions ¤ Architecture views ¤  Implementation

¨  Maintainability verification ¨  Conclusions and future work

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

Outline 16

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

¤ Classification functions ¤ Architecture views ¤  Implementation

¨  Maintainability verification ¨  Conclusions and future work

Maintainability verification 17

Quality metrics report

Valid interactions report

After each compilation

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

Outline 18

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

¤ Classification functions ¤ Architecture views ¤  Implementation

¨  Maintainability verification ¨  Conclusions and future work

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

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

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

Questions 22

top related