Using OMG/SMM and Eclipse/MoDisco
             to Facilitate the
      Eclipse Development Process

                2nd Biannual Symposium
Eclipse Open Source Software & OMG Open Specifications
      Tuesday, June 22, 2010, Minneapolis, MN USA


        Hugo Bruneliere, AtlanMod Team (INRIA & EMN)
        Frédéric Madiot, Mia-Software
        Jordi Cabot, AtlanMod Team (INRIA & EMN)

                     Copyright © 2010 Mia-Software & AtlanMod.
                                 All Rights Reserved
Mia-Software
Mia-Software is a Software Company
   80 customers, in 10 different countries
   Eclipse Foundation member (5 committers)
   Develops Model-Driven solutions since 1998


   Mia-Insight :
       Quality Analysis
       Legacy Understanding
       Application Mining

   Mia-Studio
       Model-to-Model transformation
       Model-to-Text transformation

   Eclipse/MoDisco
       IT Model-Driven Modernization



                              Copyright © 2010 Mia-Software & AtlanMod.
                                          All Rights Reserved
Mia-Software
Mia-Software is a subsidiary of Sodifrance
   French leader in IT Modernization
   900 employees
   11 offices in France, Belgium and Tunisia
   R&D team dedicated to IT Modernization
   > 70 successful IT Modernization projects


      VB6 to JEE/Ajax/JSF

      Oracle Forms to JEE

      VB6 to .Net

      ABAL to .Net




                            Copyright © 2010 Mia-Software & AtlanMod.
                                        All Rights Reserved
AtlanMod Team
AtlanMod is a research team
   Joint team between INRIA & École des Mines de Nantes (France)
   Co-lead by Jean Bézivin and Jordi Cabot
   Around 12 members
   Research focus on:
       MDE core technologies
            metamodeling, model transformations, model weaving, megamodeling,…
       MDE applications
            reverse engineering, interoperability

   Organizers of the 1st full postgraduate program on MDE
       http://www.emn.fr/z-info/atlanmod/index.php/The_MDE_Diploma

   Commitment to Eclipse open-source projects:
       ATL, TCS, AM3, AMW, MoDisco, …

   Strong links with several software development companies
   Participation in national and international projects

                                 Copyright © 2010 Mia-Software & AtlanMod.
                                             All Rights Reserved
MoDisco Overview
An Eclipse platform for software modernization projects
                  http://www.eclipse.org/MoDisco/

   Created by AtlanMod in 2008
      MoDisco stands for Model Discovery

   Eclipse Modeling project (under MDT)
      Open-source (EPL licence)
      Based on EMP technologies :
           EMF (Eclipse Modeling Framework)
           M2M (Model-to-Model transformation)
           M2T (Model-to-Text transformations)

   Supported by the OMG
      Eclipse implementations for
           KDM (Knowledge Discovery Metamodel)
           SMM (Structured Metrics Metamodel)

   Co-funded by the European Community
      Modelplex research project



                              Copyright © 2010 Mia-Software & AtlanMod.
                                          All Rights Reserved
MoDisco Approach

                              Model-Driven platform
                        for Software Modernization projects



    Existing
                          Discover                       Understand          Transform
Software System




Software artifacts :
                                                                                 New
    - source code          Models                            Viewpoints
- configuration files                                                       Software System
        - tests
      - database
          -…



                                Copyright © 2010 Mia-Software & AtlanMod.
                                            All Rights Reserved
MoDisco Architecture
                                Supported Technologies

              Java                                                                 ...
                                               XML
           Metamodel
                                        Metamodel
           Discoverer
                                        Discoverer
           Generator
                                        Generator
         Transfo. to KDM



    Discovery                   Model                         Customization              OMG/ADM
    Manager                    Browser                        & Extensibility            Standards




Plug and orchestrate          Navigation                           Definition of             Pivot
      artifacts                through                               specific             Metamodels
   transformators           complex models                          Viewpoints           (SMM & KDM)

                                          Infrastructure

                                Eclipse Modeling projects


                                  Copyright © 2010 Mia-Software & AtlanMod.
                                              All Rights Reserved
ADM Task Force

Architecture-Driven Modernization task force
  Mission:
     Create specifications and promote industry consensus on modernization of
     existing applications.

  What is ADM?
     Process of understanding and evolving existing software assets for:
          Software improvement
          Modifications
          Interoperability
          Refactoring
          Restructuring
          Reuse
          Porting
          Migration
          Translation into another language
          Enterprise application integration
          Service-oriented architecture
          MDA migration

                            Copyright © 2010 Mia-Software & AtlanMod.
                                        All Rights Reserved
ADM Specifications

Knowledge Discovery Metamodel (KDM)
 Addresses the need to integrate various software tools that
 analyze ''existing software systems''.




                     Copyright © 2010 Mia-Software & AtlanMod.
                                 All Rights Reserved
ADM Specifications

Structured Metrics Metamodel (SMM)
  Representing measurement information related to any model
  structured information with an initial focus on software




                     Copyright © 2010 Mia-Software & AtlanMod.
                                 All Rights Reserved
MoDisco tools for ADM Specifications

MoDisco 0.8 (Helios version)
  KDM
    EMF implementation for KDM
        Ecore file
        Generated Java code
    KDMSource discoverer
        Creates a KDMSource model from the content of a directory
    Java to KDM transformation
        Creates a KDMCore model from a Java model
    KDM to UML2 transformation
        Creates a UML2 model from a KDMCore model

  SMM
    EMF implementation for SMM
        Ecore file
        Generated Java code




                         Copyright © 2010 Mia-Software & AtlanMod.
                                     All Rights Reserved
MoDisco tools for ADM specifications
MoDisco 0.9 (Indigo version)
   Quality Model editor
       To define a quality model
            By importing or defining
            quality characteristics (SMM
            Measure Category)
            By importing or defining
            metrics (SMM Measure)
            By setting metrics to quality
            characteristics

   SMM Measurement to Eclipse
   Markers
       To visualize the result of a QA
       analysis (SMM Measurement)
       in the Eclipse Problems View

   Property file discoverer
       Creates a KDM model



                              Copyright © 2010 Mia-Software & AtlanMod.
                                          All Rights Reserved
Measuring Eclipse Plug-ins Quality

Context
 An Eclipse plug-in is composed of several different kinds of
 artifacts
    Java source code
    Configuration files:
          Plugin.xml
          MANIFEST.MF
          plugin.properties
          build.properties
          .project
    Other files:
          about.html
          messages.properties
          Icons, models, …

 Eclipse tools already provide lots of automated validation rules
 But… there are still important rules to check manually 

                              Copyright © 2010 Mia-Software & AtlanMod.
                                          All Rights Reserved
Measuring Eclipse Plug-ins Quality
Examples of non-automated rules
  Eclipse foundation requirements (yearly simultaneous release)
      Version number ends with « qualifier »
      Source code must use ICU4J classes
      The project must contain an « about.html » file
      Packages name should start with the plug-in Id
      Plug-in must not contain JARs files
      Plug-in should contain only one « message.properties » and « Message.java » files

  Mia-Software internal rules
      “PLUGIN_ID” variable of “Activator.java” should be initialized with the plug-in Id
      Plug-in Id and Project name should be equal
      «Bundle-Vendor» property value of « MANIFEST.MF » should be « %providerName »
      « plugin.properties » should declare a « providerName » property
      «Bundle-Name» property value of « MANIFEST.MF » should be « %pluginName »
      « plugin.properties » should declare a « pluginName » property




                             Copyright © 2010 Mia-Software & AtlanMod.
                                         All Rights Reserved
Measuring Eclipse Plug-ins Quality
      Automation of QA Analysis

     Eclipse                                                            Rule 1
                                                                        Rule 2
                                                                        Rule 3
                                                                        Rule 4



Plugin project




    .project
                                                                          Eclipse
                                                                       Problems View
  MANIFEST.MF


plugin.properties


build.properties



                           Copyright © 2010 Mia-Software & AtlanMod.
                                       All Rights Reserved
Measuring Eclipse Plug-ins Quality

Solutions
  Use Eclipse APIs
     Eclipse provides APIs to manipulate projects and plugins
          org.eclipse.core (Eclipse SDK)
          org.eclipse.pde (Plug-in Development Environment)
          org.eclipse.osgi (OSGI tooling)
     Requires a deep understanding of these APIs 
     Some required APIs are «internal» 
          PDEProject, IManifestHeader, …



  Provide a generic solution based on MoDisco and SMM
     Use EMF models to represent Eclipse plug-ins
          KDM Source model for the structure of the project
          Java model for the source code
          DSLs for other artifacts
     Use SMM to represent QA results
     Requires only EMF APIs to implement the rules 

                           Copyright © 2010 Mia-Software & AtlanMod.
                                       All Rights Reserved
Measuring Eclipse Plug-ins Quality
      Using MoDisco and SMM

     Eclipse          Plugin models                                         Rule 1
                                                                            Rule 2
                                                                            Rule 3
                                                                            Rule 4
                      KDMSource model


Plugin project




    .project
                                                                              Eclipse
                                                                           Problems View
  MANIFEST.MF


plugin.properties


build.properties



                               Copyright © 2010 Mia-Software & AtlanMod.
                                           All Rights Reserved
Measuring Eclipse Plug-ins Quality
KDMSource model of the project
   Automatically created by org.eclipse.gmt.modisco.kdm.source.discoverer plugin




                          Copyright © 2010 Mia-Software & AtlanMod.
                                      All Rights Reserved
Measuring Eclipse Plug-ins Quality
      Using MoDisco and SMM

     Eclipse          Plugin models                                         Rule 1
                                                                            Rule 2
                                                                            Rule 3
                                                                            Rule 4
                      KDMSource model


Plugin project
                        Java model




    .project
                                                                              Eclipse
                                                                           Problems View
  MANIFEST.MF


plugin.properties


build.properties



                               Copyright © 2010 Mia-Software & AtlanMod.
                                           All Rights Reserved
Measuring Eclipse Plug-ins Quality
Java model of the Java source code
   Automatically created by org.eclipse.gmt.modisco.java.discoverer plugin




                          Copyright © 2010 Mia-Software & AtlanMod.
                                      All Rights Reserved
Measuring Eclipse Plug-ins Quality
      Using MoDisco and SMM                                                Declare
                                                                           QA Rules

     Eclipse          Plugin models                                                    Rule 1
                                                                                       Rule 2
                                                                                       Rule 3
                                                                     SMM Measure
                                                                                       Rule 4
                      KDMSource model                                   model


Plugin project
                        Java model



                         XML model
    .project
                                                                                         Eclipse
                                                                                      Problems View
  MANIFEST.MF          Manifest model



plugin.properties      KDMCode model



build.properties       KDMCode model



                               Copyright © 2010 Mia-Software & AtlanMod.
                                           All Rights Reserved
Measuring Eclipse Plug-ins Quality
Quality Model editor
   Assists in defining the SMM measures




                          Copyright © 2010 Mia-Software & AtlanMod.
                                      All Rights Reserved
Measuring Eclipse Plug-ins Quality
      Using MoDisco and SMM                                                Declare
                                                                           QA Rules

     Eclipse          Plugin models                                                     Rule 1
                                                                                        Rule 2
                                                                                        Rule 3
                                                                     SMM Measure
                                                                                        Rule 4
                      KDMSource model                                   model


Plugin project
                        Java model



                         XML model                               SMM Measurement
    .project                                                          model               Eclipse
                                                                                       Problems View
  MANIFEST.MF          Manifest model

                                                                           Implement
plugin.properties      KDMCode model
                                                                            QA Rules

build.properties       KDMCode model



                               Copyright © 2010 Mia-Software & AtlanMod.
                                           All Rights Reserved
Measuring Eclipse Plug-ins Quality
SMM Measurements to Eclipse Markers




                   Copyright © 2010 Mia-Software & AtlanMod.
                               All Rights Reserved
Measuring Eclipse Plug-ins Quality
SMM Measurements can be exported to other tools
  Example: Sonar




                    Copyright © 2010 Mia-Software & AtlanMod.
                                All Rights Reserved
Measuring Eclipse Plug-ins Quality

Benefits of the approach
  Declaring the rules only requires functional skills (SMM Editor)
     Which quality characteristics ?
     Which metrics ?
     On which scope ?

  Implementing the rules only requires:
     SMM metamodel knowledge
     EMF APIs knowledge

  Leverage existing tools
     MoDisco metamodels and discoverers
     SMM-compliant tools

  The result can be exported to other tools
     Excel spreadsheets
     QA portals (ex: Sonar)



                          Copyright © 2010 Mia-Software & AtlanMod.
                                      All Rights Reserved
Conclusion

Mutual benefits in OMG / Eclipse collaboration
  For Eclipse
     Standard-compliance is a key factor for tools
     Good implementation of standards discourage tools heterogeneity
     OMG is a well established standardization organization

     OMG standards implementations facilitate the adoption of Eclipse tools


  For OMG
     Standard-compliant tools help in demonstrating the interest of the standard
     Tools users and implementors give feedback to improve the standard
     Eclipse is the most adopted development platform

     Eclipse tools facilitate the diffusion of OMG standards




                          Copyright © 2010 Mia-Software & AtlanMod.
                                      All Rights Reserved

MoDisco Eclipse-OMG Symp 2010

  • 1.
    Using OMG/SMM andEclipse/MoDisco to Facilitate the Eclipse Development Process 2nd Biannual Symposium Eclipse Open Source Software & OMG Open Specifications Tuesday, June 22, 2010, Minneapolis, MN USA Hugo Bruneliere, AtlanMod Team (INRIA & EMN) Frédéric Madiot, Mia-Software Jordi Cabot, AtlanMod Team (INRIA & EMN) Copyright © 2010 Mia-Software & AtlanMod. All Rights Reserved
  • 2.
    Mia-Software Mia-Software is aSoftware Company 80 customers, in 10 different countries Eclipse Foundation member (5 committers) Develops Model-Driven solutions since 1998 Mia-Insight : Quality Analysis Legacy Understanding Application Mining Mia-Studio Model-to-Model transformation Model-to-Text transformation Eclipse/MoDisco IT Model-Driven Modernization Copyright © 2010 Mia-Software & AtlanMod. All Rights Reserved
  • 3.
    Mia-Software Mia-Software is asubsidiary of Sodifrance French leader in IT Modernization 900 employees 11 offices in France, Belgium and Tunisia R&D team dedicated to IT Modernization > 70 successful IT Modernization projects VB6 to JEE/Ajax/JSF Oracle Forms to JEE VB6 to .Net ABAL to .Net Copyright © 2010 Mia-Software & AtlanMod. All Rights Reserved
  • 4.
    AtlanMod Team AtlanMod isa research team Joint team between INRIA & École des Mines de Nantes (France) Co-lead by Jean Bézivin and Jordi Cabot Around 12 members Research focus on: MDE core technologies metamodeling, model transformations, model weaving, megamodeling,… MDE applications reverse engineering, interoperability Organizers of the 1st full postgraduate program on MDE http://www.emn.fr/z-info/atlanmod/index.php/The_MDE_Diploma Commitment to Eclipse open-source projects: ATL, TCS, AM3, AMW, MoDisco, … Strong links with several software development companies Participation in national and international projects Copyright © 2010 Mia-Software & AtlanMod. All Rights Reserved
  • 5.
    MoDisco Overview An Eclipseplatform for software modernization projects http://www.eclipse.org/MoDisco/ Created by AtlanMod in 2008 MoDisco stands for Model Discovery Eclipse Modeling project (under MDT) Open-source (EPL licence) Based on EMP technologies : EMF (Eclipse Modeling Framework) M2M (Model-to-Model transformation) M2T (Model-to-Text transformations) Supported by the OMG Eclipse implementations for KDM (Knowledge Discovery Metamodel) SMM (Structured Metrics Metamodel) Co-funded by the European Community Modelplex research project Copyright © 2010 Mia-Software & AtlanMod. All Rights Reserved
  • 6.
    MoDisco Approach Model-Driven platform for Software Modernization projects Existing Discover Understand Transform Software System Software artifacts : New - source code Models Viewpoints - configuration files Software System - tests - database -… Copyright © 2010 Mia-Software & AtlanMod. All Rights Reserved
  • 7.
    MoDisco Architecture Supported Technologies Java ... XML Metamodel Metamodel Discoverer Discoverer Generator Generator Transfo. to KDM Discovery Model Customization OMG/ADM Manager Browser & Extensibility Standards Plug and orchestrate Navigation Definition of Pivot artifacts through specific Metamodels transformators complex models Viewpoints (SMM & KDM) Infrastructure Eclipse Modeling projects Copyright © 2010 Mia-Software & AtlanMod. All Rights Reserved
  • 8.
    ADM Task Force Architecture-DrivenModernization task force Mission: Create specifications and promote industry consensus on modernization of existing applications. What is ADM? Process of understanding and evolving existing software assets for: Software improvement Modifications Interoperability Refactoring Restructuring Reuse Porting Migration Translation into another language Enterprise application integration Service-oriented architecture MDA migration Copyright © 2010 Mia-Software & AtlanMod. All Rights Reserved
  • 9.
    ADM Specifications Knowledge DiscoveryMetamodel (KDM) Addresses the need to integrate various software tools that analyze ''existing software systems''. Copyright © 2010 Mia-Software & AtlanMod. All Rights Reserved
  • 10.
    ADM Specifications Structured MetricsMetamodel (SMM) Representing measurement information related to any model structured information with an initial focus on software Copyright © 2010 Mia-Software & AtlanMod. All Rights Reserved
  • 11.
    MoDisco tools forADM Specifications MoDisco 0.8 (Helios version) KDM EMF implementation for KDM Ecore file Generated Java code KDMSource discoverer Creates a KDMSource model from the content of a directory Java to KDM transformation Creates a KDMCore model from a Java model KDM to UML2 transformation Creates a UML2 model from a KDMCore model SMM EMF implementation for SMM Ecore file Generated Java code Copyright © 2010 Mia-Software & AtlanMod. All Rights Reserved
  • 12.
    MoDisco tools forADM specifications MoDisco 0.9 (Indigo version) Quality Model editor To define a quality model By importing or defining quality characteristics (SMM Measure Category) By importing or defining metrics (SMM Measure) By setting metrics to quality characteristics SMM Measurement to Eclipse Markers To visualize the result of a QA analysis (SMM Measurement) in the Eclipse Problems View Property file discoverer Creates a KDM model Copyright © 2010 Mia-Software & AtlanMod. All Rights Reserved
  • 13.
    Measuring Eclipse Plug-insQuality Context An Eclipse plug-in is composed of several different kinds of artifacts Java source code Configuration files: Plugin.xml MANIFEST.MF plugin.properties build.properties .project Other files: about.html messages.properties Icons, models, … Eclipse tools already provide lots of automated validation rules But… there are still important rules to check manually  Copyright © 2010 Mia-Software & AtlanMod. All Rights Reserved
  • 14.
    Measuring Eclipse Plug-insQuality Examples of non-automated rules Eclipse foundation requirements (yearly simultaneous release) Version number ends with « qualifier » Source code must use ICU4J classes The project must contain an « about.html » file Packages name should start with the plug-in Id Plug-in must not contain JARs files Plug-in should contain only one « message.properties » and « Message.java » files Mia-Software internal rules “PLUGIN_ID” variable of “Activator.java” should be initialized with the plug-in Id Plug-in Id and Project name should be equal «Bundle-Vendor» property value of « MANIFEST.MF » should be « %providerName » « plugin.properties » should declare a « providerName » property «Bundle-Name» property value of « MANIFEST.MF » should be « %pluginName » « plugin.properties » should declare a « pluginName » property Copyright © 2010 Mia-Software & AtlanMod. All Rights Reserved
  • 15.
    Measuring Eclipse Plug-insQuality Automation of QA Analysis Eclipse Rule 1 Rule 2 Rule 3 Rule 4 Plugin project .project Eclipse Problems View MANIFEST.MF plugin.properties build.properties Copyright © 2010 Mia-Software & AtlanMod. All Rights Reserved
  • 16.
    Measuring Eclipse Plug-insQuality Solutions Use Eclipse APIs Eclipse provides APIs to manipulate projects and plugins org.eclipse.core (Eclipse SDK) org.eclipse.pde (Plug-in Development Environment) org.eclipse.osgi (OSGI tooling) Requires a deep understanding of these APIs  Some required APIs are «internal»  PDEProject, IManifestHeader, … Provide a generic solution based on MoDisco and SMM Use EMF models to represent Eclipse plug-ins KDM Source model for the structure of the project Java model for the source code DSLs for other artifacts Use SMM to represent QA results Requires only EMF APIs to implement the rules  Copyright © 2010 Mia-Software & AtlanMod. All Rights Reserved
  • 17.
    Measuring Eclipse Plug-insQuality Using MoDisco and SMM Eclipse Plugin models Rule 1 Rule 2 Rule 3 Rule 4 KDMSource model Plugin project .project Eclipse Problems View MANIFEST.MF plugin.properties build.properties Copyright © 2010 Mia-Software & AtlanMod. All Rights Reserved
  • 18.
    Measuring Eclipse Plug-insQuality KDMSource model of the project Automatically created by org.eclipse.gmt.modisco.kdm.source.discoverer plugin Copyright © 2010 Mia-Software & AtlanMod. All Rights Reserved
  • 19.
    Measuring Eclipse Plug-insQuality Using MoDisco and SMM Eclipse Plugin models Rule 1 Rule 2 Rule 3 Rule 4 KDMSource model Plugin project Java model .project Eclipse Problems View MANIFEST.MF plugin.properties build.properties Copyright © 2010 Mia-Software & AtlanMod. All Rights Reserved
  • 20.
    Measuring Eclipse Plug-insQuality Java model of the Java source code Automatically created by org.eclipse.gmt.modisco.java.discoverer plugin Copyright © 2010 Mia-Software & AtlanMod. All Rights Reserved
  • 21.
    Measuring Eclipse Plug-insQuality Using MoDisco and SMM Declare QA Rules Eclipse Plugin models Rule 1 Rule 2 Rule 3 SMM Measure Rule 4 KDMSource model model Plugin project Java model XML model .project Eclipse Problems View MANIFEST.MF Manifest model plugin.properties KDMCode model build.properties KDMCode model Copyright © 2010 Mia-Software & AtlanMod. All Rights Reserved
  • 22.
    Measuring Eclipse Plug-insQuality Quality Model editor Assists in defining the SMM measures Copyright © 2010 Mia-Software & AtlanMod. All Rights Reserved
  • 23.
    Measuring Eclipse Plug-insQuality Using MoDisco and SMM Declare QA Rules Eclipse Plugin models Rule 1 Rule 2 Rule 3 SMM Measure Rule 4 KDMSource model model Plugin project Java model XML model SMM Measurement .project model Eclipse Problems View MANIFEST.MF Manifest model Implement plugin.properties KDMCode model QA Rules build.properties KDMCode model Copyright © 2010 Mia-Software & AtlanMod. All Rights Reserved
  • 24.
    Measuring Eclipse Plug-insQuality SMM Measurements to Eclipse Markers Copyright © 2010 Mia-Software & AtlanMod. All Rights Reserved
  • 25.
    Measuring Eclipse Plug-insQuality SMM Measurements can be exported to other tools Example: Sonar Copyright © 2010 Mia-Software & AtlanMod. All Rights Reserved
  • 26.
    Measuring Eclipse Plug-insQuality Benefits of the approach Declaring the rules only requires functional skills (SMM Editor) Which quality characteristics ? Which metrics ? On which scope ? Implementing the rules only requires: SMM metamodel knowledge EMF APIs knowledge Leverage existing tools MoDisco metamodels and discoverers SMM-compliant tools The result can be exported to other tools Excel spreadsheets QA portals (ex: Sonar) Copyright © 2010 Mia-Software & AtlanMod. All Rights Reserved
  • 27.
    Conclusion Mutual benefits inOMG / Eclipse collaboration For Eclipse Standard-compliance is a key factor for tools Good implementation of standards discourage tools heterogeneity OMG is a well established standardization organization OMG standards implementations facilitate the adoption of Eclipse tools For OMG Standard-compliant tools help in demonstrating the interest of the standard Tools users and implementors give feedback to improve the standard Eclipse is the most adopted development platform Eclipse tools facilitate the diffusion of OMG standards Copyright © 2010 Mia-Software & AtlanMod. All Rights Reserved