SlideShare une entreprise Scribd logo
1  sur  20
Télécharger pour lire hors ligne
SMartyParser:
       an XMI Parser for
UML-based Software Product Line
      Variability Models

                              Leandro A. Lanceloti
                      State University of Maringá (DIN-UEM) – Brasil


                                 José C. Maldonado
                        University of São Paulo (ICMC-USP) – Brasil


                                Itana M. S. Gimenes
                      State University of Maringá (DIN-UEM) – Brasil



              Edson A. Oliveira Junior
                                     edson@din.uem.br
               State University of Maringá (DIN-UEM) - Brasil
Outlines

l    Introduction

l    XMI for Metadata Interchange

l    The Parser for UML-based SPLs

l    SMartyParser Running Example


l    Conclusions and On Going Works


       SMartyParser: a XMI Parser for UML-based Variability Models – VaMoS 2013 – Edson Jr.   2
Introduction
l    Variability Management (VM) is a key issue for the success of
      SPLs

l    Literature presents several well-known approaches for VM,
      specially object-oriented

l    Several tools have been developed, such as, pure::variants and
      SPLOT
      l      however, a subset of the VM approaches is UML-based and
              requires automated support for UML models

      l      Tools have particular means to handle variabilities




            SMartyParser: a XMI Parser for UML-based Variability Models – VaMoS 2013 – Edson Jr.   3
Introduction
l    Supporting for UML-based SPL models might be
      provided by XMI files

l    Several questions:
      l      How to handle UML-based SPLs models containing variability in a
              particular environment?

      l      Do you have to adapt your environment to comply to existing tools?

      l      How do you interchange SPL metadata between different environments?

      l      …




            SMartyParser: a XMI Parser for UML-based Variability Models – VaMoS 2013 – Edson Jr.   4
The OMG’s XMI Standard
l     XMI is the OMG’s standard for metadata interchanging

l     Plain XML parsers do not accurately support XMI files
       1 <?xml version = '1.0' encoding = 'UTF-8' ?>
       2 <XMI xmi.version = '1.2'
       3     xmlns:UML = 'org.omg.xmi.namespace.UML'
       4     xmlns:UML2 = 'org.omg.xmi.namespace.UML2'
       5     timestamp = 'Tue Mar 06 20:22:06 BRT 2012'>
       6     <XMI.content>
       7        <UML:Diagram xmi.id = 'Iae204f0m135cde62a90mm58a3'
       8           isVisible = 'true'
       9           name = 'AGM - Core Assets'
      10           zoom = '0.91'>
      11           <UML:GraphElement.semanticModel>
      12                <UML:SimpleSemanticModelElement
      13                   xmi.id = 'Iae204f0m135cde62a90mm7e5f'
      14                   typeInfo = 'ClassDiagram'/>
      15           </UML:GraphElement.semanticModel>
      16           <UML:GraphElement.contained>
      17                ...
         SMartyParser: a XMI Parser for UML-based Variability Models – VaMoS 2013 – Edson Jr.   5
      18                ...
Processing XMI Files
 l      Metamodel Definition File (MDF)
               203
               204 <modelelement name="stereotype">
               205    <attribute name="context" type="ref"/>
               206    <attribute name="id" type="data"/>
               207    <attribute name="name" type="data"/>
               208    <attribute name="extendedelements"
               209      type="ref" multiplicity="many"/>
               210 </modelelement>
               211
           Figure 2: Excerpt of the MDF Structure Elements.
 l            212
         XMI Transformation File (XTF)
Figure 2: Excerpt of the MDF Structure Elements.
     461
             462 <xmitransformation modelelement="stereotype"
             463       xmipattern="UML:Stereotype">
             464       <trigger name="id" type="attrval" attr="xmi.id"/>
             465       <trigger name="name" type="attrval" attr="name"/>
             466       <trigger name="context" type="gcattrval"
             467         src="UML:ModelElement.namespace"
             468         attr="xmi.idref"/>
             469       <trigger name="extendedelements" type="gcattrval"
             470         src="UML:Stereotype.extendedElement"
             471         attr="xmi.idref"
             472         linkbackattr="stereotypes" />
             473 </xmitransformation>
             474
       SMartyParser: a XMI Parser for UML-based Variability Models – VaMoS 2013 – Edson Jr.
             475                                                                              6
The SMartyParser
l    SMartyParser stands for Stereotype-based Management
      of Variability Parser
      l      It is aimed at processing XMI files of UML-based SPL models in
              which variabilities are represented by means of stereotypes
              (UML profiles)

l    It was built taking as a basis the Open Core Framework,
      from the SDMetrics project

l    Open Core provides Java classes for:
      l      Parsing XMI files

      l      Define and apply metrics for OO models

            SMartyParser: a XMI Parser for UML-based Variability Models – VaMoS 2013 – Edson Jr.   7
SMartyParser Class Diagram
SMartyParser Class Model

                                       com.sdmetrics.model


                               *   1                        1
    MetaModelElement                       MetaModel



               1                                 1
                                                                                                       br.uem.din.les.parserxmi
               *                                 *                                *
                           *           1                1               1               1    1
      ModelElement                           Model                          XMIReader             ProductLineModelParser



                                                                             *
                                           XMITrigger
                                                                                                              IProductLineVariabilityParser

                                                 *
                                                 1                           1               IProductLineUMLModelParser

                                                                *   1
                                   XMITransformation
                                      Transformati                      XMITransformations




             Figure 4: The SMartyParser Class Model.
               SMartyParser: a XMI Parser for UML-based Variability Models – VaMoS 2013 – Edson Jr.                                8
Figure 4: The SMartyParser Class Model.

SMartyParser Available Operations
Table 1: The SMartyParser Available Operations.
Interface                                              Method                                         Description
                                                  getAllDiagrams              Get all diagrams from the UML model
  IProductLineUM




                                               getStructureDiagrams           Get structural diagram
   LModelParser




                                              getBehaviourDiagrams            Get behavioral diagrams
                                              getInteractionDiagrams          Get interaction diagrams
                                              getElementsByDiagram            Get all elements of a given diagram
                                          getElementsByDiagramByType          Get all elements of a given diagram by type
                                                  getElementByID              Get an element by its ID
                                                getElementsByType             Get all elements of a given type
                                                 getAllVariabilities          Get all variabilities (as UML comments)
   IProductLineVariabilityParser




                                                getAllVariationPoints         Get all variation points
                                                   getAllVariables            Get all variable elements
                                                getOptionalVariants           Get all optional variants
                                               getMandatoryVariants           Get all mandatory variants
                                                getInclusiveVariants          Get all inclusive variants
                                               getExclusiveVariants           Get all exclusive variants
                                               getVariabilityByName           Get a variability by its name
                                             getVariantsOfAVariability        Get all variants of a given variability
                                           getVariationPointOfAVariant        Get the variation point of a given variant
                                              getChildrenVariabilities        Get all child variabilities from a given variability
                                           getVariantRequiredElements         Get all variants required by a given variant
                                            getVariantMutexElements           Get all mutually exclusive variants of a given variant



                                   SMartyParser: a XMI Parser for UML-based Variability Models – VaMoS 2013 – Edson Jr.                9
The SMartyParser
l    SMartyParser was conceived based on the main UML-
      based variability management concepts:
      l      Variation Point

      l      Variant (mandatory, optional, inclusive, exclusive)

      l      Constraints between Variants (requires, mutex)




            SMartyParser: a XMI Parser for UML-based Variability Models – VaMoS 2013 – Edson Jr.   10
SMartyParser Configuration
Table 2: The SMartyParser Configuration                                                        File        Ta
Properties
Available Properties.                                                                                     Ste
                            Property                                 Description
                                uml_version            the UML version
                                xmi_version            the XMI version
    related
     XMI-

                             xmi_xtf_file_location     the XTF file location
                            xmi_mdf_file_location      the MDF file location
                           xmi_model_file_location     the XMI file location
                                                       the stereotype used for representing
                            variability_stereotype
                                                       variabilities
                                                       the stereotype used for representing
                          variation_point_stereotype
                                                       variation points
                                                       the stereotype used for representing
                             mandatory_variant
                                                       mandatory variants
     Stereotype-related




                                                       the stereotype used for representing
                               optional_variant
                                                       optional variants
                                                       the stereotype used for representing
                              inclusive_variant
                                                       inclusive variants
                                                       the stereotype used for representing
                              exclusive_variant
                                                       exclusive variants
                                                       the stereotype used for representing
                             variable_stereotype
                                                       variable elements
                                                       the stereotype used for representing
                              require_constraint
                                                       require constraints
                                                       the stereotype used for representing
                          mutually_exclusive_variant
                                                       mutually exclusive constraints

  SMartyParser: a XMI Parser for UML-based Variability Models – VaMoS 2013 – Edson Jr.               11
SMartyParser Instantiation
l    It is instantiated by running the following code:


                    ProductLineModelParser smartyParser = new
                                  ProductLineModelParser();




l    The constructor is responsible for:
      l    reading the respective files (MDF and XTF) indicated in the
            SMartyParser configuration file; and

      l    processing the XMI file
        SMartyParser: a XMI Parser for UML-based Variability Models – VaMoS 2013 – Edson Jr.   12
SMartyParser Variability Concepts
                   and
           Example Stereotypes
e 3: Correspondence Between the SM
eotypes and Variability Concepts.
       Variability Concept                             SMartyProfile Stereotype
             Variability                                     «variability»
          Variation Point                                  «variationPoint»
        Mandatory Variant                                   «mandatory»
         Optional Variant                                     «optional»
         Inclusive Variant                                «alternative_OR»
        Exclusive Variant                                «alternative_XOR»
        Require Constraint                                    «requires»
   Mutually Exclusive Constraint                               «mutex»
        Variable Elements                                     «variable»



     SMartyParser: a XMI Parser for UML-based Variability Models – VaMoS 2013 – Edson Jr.   13
Annotated Arcade Game Maker Use
                      Case Model
                                                                                                                                   <<variability>>
                                     << optional >>                   << requires >>       << optional >>                          name = "save score"
                                                                                                                                   minSelection = 0
                               Check Previous Best Score                                    Save Score
                                                                                                                                   maxSelection = 1
                                                                                                                                   bindingTime =
                                                                                                                                    DESIGN_TIME
                                            << mandatory >>                                    << mandatory >>                     allowsAddingVar = true
                                                                                                  Install Game                     variants = {Save Score}

               <<variability>>                                        << mandatory >>
               name = "check score"                                                                                                       << mandatory >>
                                                                         Save Game
               minSelection = 0
               maxSelection = 1                                                                                  << mandatory >>
               bindingTime = DESIGN_TIME                                                                           Exit Game
                                              GamePlayer
               allowsAddingVar = true
               variants = {Check Previous
               Best Score}                                                   << mandatory , variationPoint >>
                                                                                     Play Selected Game                                    GameInstaller

                                                                                 Extension Points
                  <<variability>>
                                                                                 initialization_ext_point:
                  name = "play game"                                                                                                   << mandatory >>
                                                                                 animation_ext_point:
                  minSelection = 1
 stance           maxSelection = 3
                                                                                                                                       Uninstall Game

                  bindingTime = DESIGN_TIME
  result          allowsAddingVar = true
                  variants = {Play Brickels,                          << extend >>              << extend >>            << extend >>
  class,             Play Pong, Play Bowling}

  UML                                                                                << alternative_OR >>
                                                                                          Play Pong
                                       << alternative_OR >>                                                               << alternative_OR >>
nts the                                     Play Brickles                                                                      Play Bowling

nd it is                                              << include >>      << include >>                                                 << include >>
                                                                                                        << include >>
 esents                                     << mandatory >>
                                                                          << include >>            << include >>               << mandatory >>
 lasses,                                      Initialization
                                                                                                                               Animation Loop

 ement
  meta-     SMartyParser: a XMI Parser for UML-based Variability Models – VaMoS 2013 – Edson Jr.                                                             14
Executing SMartyParser
l    To obtain all the diagrams, as a collection, one must
      invoke the following operation:

             smartyParser.getAllDiagrams();

l    For the AGM example, such an operation returns the
      following diagram as a ModelElement instance:

      l    [AGM - Use Case Model]




        SMartyParser: a XMI Parser for UML-based Variability Models – VaMoS 2013 – Edson Jr.   15
Executing SMartyParser
l    to obtain all variation points from the SPL models,
      one can invoke the following operation:

             smartyParser.getAllVariationPoints();



l    For the AGM example, such an operation returns the
      following variation points:

      l    [Play Selected Game]



        SMartyParser: a XMI Parser for UML-based Variability Models – VaMoS 2013 – Edson Jr.   16
Conclusions
l    SMartyParser can be easily integrated to specific
      environments for UML-based SPLs

l    The parser provides several operations based on UML
      models and their variabilities represented as stereotypes

l    SMartyParser only requires one to properly configure its
      configuration file avoiding misunderstanding of variability
      concepts from de UML models



       SMartyParser: a XMI Parser for UML-based Variability Models – VaMoS 2013 – Edson Jr.   17
Limitations and On Going Works
l    Limitations of the parser includes:
      l      variability representation based on stereotypes;

      l      lack of an OCL engine for improving variability comprehension
              and automatic product generation; and

      l      the parser only processes use case, class, component and
              activity diagrams.. so far….

l    On going works include:
      l      the parser is being currently extended for sequence diagrams,
              the UML package merging mechanism, SysML block definition
              for ES, and the SPEM elements for process lines
            SMartyParser: a XMI Parser for UML-based Variability Models – VaMoS 2013 – Edson Jr.   18
Questions? Contributions?




l    If you prefer, contact me via e-mail:
      l    edson@din.uem.br

        SMartyParser: a XMI Parser for UML-based Variability Models – VaMoS 2013 – Edson Jr.   19
l  Obrigado                !!!

l  Grazie!!!



l  Thank           you ! ! !


   SMartyParser: a XMI Parser for UML-based Variability Models – VaMoS 2013 – Edson Jr.   20

Contenu connexe

Similaire à SMartyParser: an XMI Parser for UML-based Software Product Line Variability Models

Automatically bridging UML profiles into MOF metamodels
Automatically bridging UML profiles into MOF metamodelsAutomatically bridging UML profiles into MOF metamodels
Automatically bridging UML profiles into MOF metamodels
Ivano Malavolta
 
Model-Driven Development in the context of Software Product Lines
Model-Driven Development in the context of Software Product LinesModel-Driven Development in the context of Software Product Lines
Model-Driven Development in the context of Software Product Lines
Markus Voelter
 
5 - Architetture Software - Metamodelling and the Model Driven Architecture
5 - Architetture Software - Metamodelling and the Model Driven Architecture5 - Architetture Software - Metamodelling and the Model Driven Architecture
5 - Architetture Software - Metamodelling and the Model Driven Architecture
Majong DevJfu
 
MLeap: Deploy Spark ML Pipelines to Production API Servers
MLeap: Deploy Spark ML Pipelines to Production API ServersMLeap: Deploy Spark ML Pipelines to Production API Servers
MLeap: Deploy Spark ML Pipelines to Production API Servers
DataWorks Summit
 

Similaire à SMartyParser: an XMI Parser for UML-based Software Product Line Variability Models (20)

Eclipse meets e4
Eclipse meets e4Eclipse meets e4
Eclipse meets e4
 
UML Modeling and Profiling Lab - Advanced Software Engineering Course 2014/2015
UML Modeling and Profiling Lab - Advanced Software Engineering Course 2014/2015UML Modeling and Profiling Lab - Advanced Software Engineering Course 2014/2015
UML Modeling and Profiling Lab - Advanced Software Engineering Course 2014/2015
 
SAS Macro
SAS MacroSAS Macro
SAS Macro
 
ITU - MDD - EMF
ITU - MDD - EMFITU - MDD - EMF
ITU - MDD - EMF
 
Automatically bridging UML profiles into MOF metamodels
Automatically bridging UML profiles into MOF metamodelsAutomatically bridging UML profiles into MOF metamodels
Automatically bridging UML profiles into MOF metamodels
 
Model-Driven Development in the context of Software Product Lines
Model-Driven Development in the context of Software Product LinesModel-Driven Development in the context of Software Product Lines
Model-Driven Development in the context of Software Product Lines
 
Fdmu pro step_2010_final
Fdmu pro step_2010_finalFdmu pro step_2010_final
Fdmu pro step_2010_final
 
MDE in Practice
MDE in PracticeMDE in Practice
MDE in Practice
 
5 - Architetture Software - Metamodelling and the Model Driven Architecture
5 - Architetture Software - Metamodelling and the Model Driven Architecture5 - Architetture Software - Metamodelling and the Model Driven Architecture
5 - Architetture Software - Metamodelling and the Model Driven Architecture
 
AIXM, WXXM, FIXM a unified approach to Modelling
AIXM, WXXM, FIXM a unified approach to ModellingAIXM, WXXM, FIXM a unified approach to Modelling
AIXM, WXXM, FIXM a unified approach to Modelling
 
MLeap: Deploy Spark ML Pipelines to Production API Servers
MLeap: Deploy Spark ML Pipelines to Production API ServersMLeap: Deploy Spark ML Pipelines to Production API Servers
MLeap: Deploy Spark ML Pipelines to Production API Servers
 
5
55
5
 
Ruby on Rails: Coding Guideline
Ruby on Rails: Coding GuidelineRuby on Rails: Coding Guideline
Ruby on Rails: Coding Guideline
 
EclipseCon 2008: Fundamentals of the Eclipse Modeling Framework
EclipseCon 2008: Fundamentals of the Eclipse Modeling FrameworkEclipseCon 2008: Fundamentals of the Eclipse Modeling Framework
EclipseCon 2008: Fundamentals of the Eclipse Modeling Framework
 
Creation vsm modelos componentes electronicos
Creation vsm   modelos componentes electronicosCreation vsm   modelos componentes electronicos
Creation vsm modelos componentes electronicos
 
ALT
ALTALT
ALT
 
Analysing-MMPLs
Analysing-MMPLsAnalysing-MMPLs
Analysing-MMPLs
 
Executable UML and SysML Workshop
Executable UML and SysML WorkshopExecutable UML and SysML Workshop
Executable UML and SysML Workshop
 
ALMOsT.js: an Agile Model to Model and Model to Text Transformation Framework
ALMOsT.js: an Agile Model to Model and Model to Text Transformation FrameworkALMOsT.js: an Agile Model to Model and Model to Text Transformation Framework
ALMOsT.js: an Agile Model to Model and Model to Text Transformation Framework
 
Eclipse Summit Nov08 Final
Eclipse Summit Nov08 FinalEclipse Summit Nov08 Final
Eclipse Summit Nov08 Final
 

Plus de Edson Oliveira Junior

Um Protótipo Web do Módulo de Planejamento de Avaliações de Linha de Produto ...
Um Protótipo Web do Módulo de Planejamento de Avaliações de Linha de Produto ...Um Protótipo Web do Módulo de Planejamento de Avaliações de Linha de Produto ...
Um Protótipo Web do Módulo de Planejamento de Avaliações de Linha de Produto ...
Edson Oliveira Junior
 

Plus de Edson Oliveira Junior (12)

COMPSAC 2014
COMPSAC 2014COMPSAC 2014
COMPSAC 2014
 
Uma Experiencia na Adocao do Java EE 6 Web Profole
Uma Experiencia na Adocao do Java EE 6 Web ProfoleUma Experiencia na Adocao do Java EE 6 Web Profole
Uma Experiencia na Adocao do Java EE 6 Web Profole
 
UM ESTUDO SOBRE GERENCIAMENTO DE VARIABLIDADES EM LINHAS DE PROCESSO DE SOFTWARE
UM ESTUDO SOBRE GERENCIAMENTO DE VARIABLIDADES EM LINHAS DE PROCESSO DE SOFTWAREUM ESTUDO SOBRE GERENCIAMENTO DE VARIABLIDADES EM LINHAS DE PROCESSO DE SOFTWARE
UM ESTUDO SOBRE GERENCIAMENTO DE VARIABLIDADES EM LINHAS DE PROCESSO DE SOFTWARE
 
Revisão Sistemática e Bases de Pesquisa
Revisão Sistemática e Bases de PesquisaRevisão Sistemática e Bases de Pesquisa
Revisão Sistemática e Bases de Pesquisa
 
Desenvolvimento do Módulo de Planejamento do Ambiente Experimental SystEM-Env...
Desenvolvimento do Módulo de Planejamento do Ambiente Experimental SystEM-Env...Desenvolvimento do Módulo de Planejamento do Ambiente Experimental SystEM-Env...
Desenvolvimento do Módulo de Planejamento do Ambiente Experimental SystEM-Env...
 
Um Protótipo Web do Módulo de Planejamento de Avaliações de Linha de Produto ...
Um Protótipo Web do Módulo de Planejamento de Avaliações de Linha de Produto ...Um Protótipo Web do Módulo de Planejamento de Avaliações de Linha de Produto ...
Um Protótipo Web do Módulo de Planejamento de Avaliações de Linha de Produto ...
 
Proposta de uma Abordagem Formal para o Gerenciamento de Variabilidades em Mo...
Proposta de uma Abordagem Formal para o Gerenciamento de Variabilidades em Mo...Proposta de uma Abordagem Formal para o Gerenciamento de Variabilidades em Mo...
Proposta de uma Abordagem Formal para o Gerenciamento de Variabilidades em Mo...
 
Extensão da Abordagem SMarty de Gerenciamento de Variabilidade para Sistemas ...
Extensão da Abordagem SMarty de Gerenciamento de Variabilidade para Sistemas ...Extensão da Abordagem SMarty de Gerenciamento de Variabilidade para Sistemas ...
Extensão da Abordagem SMarty de Gerenciamento de Variabilidade para Sistemas ...
 
Apresentação FITEM 2012
Apresentação FITEM 2012Apresentação FITEM 2012
Apresentação FITEM 2012
 
Apresentação SMartyParser
Apresentação SMartyParserApresentação SMartyParser
Apresentação SMartyParser
 
Um Estudo sobre Gerenciamento de Variabilidade em Linhas de Processo de Software
Um Estudo sobre Gerenciamento de Variabilidade em Linhas de Processo de SoftwareUm Estudo sobre Gerenciamento de Variabilidade em Linhas de Processo de Software
Um Estudo sobre Gerenciamento de Variabilidade em Linhas de Processo de Software
 
Mini Curso Avaliação de Linha de Produto de Software
Mini Curso Avaliação de Linha de Produto de SoftwareMini Curso Avaliação de Linha de Produto de Software
Mini Curso Avaliação de Linha de Produto de Software
 

Dernier

Salient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsSalient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functions
KarakKing
 
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
ZurliaSoop
 

Dernier (20)

Fostering Friendships - Enhancing Social Bonds in the Classroom
Fostering Friendships - Enhancing Social Bonds  in the ClassroomFostering Friendships - Enhancing Social Bonds  in the Classroom
Fostering Friendships - Enhancing Social Bonds in the Classroom
 
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptxExploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
 
Philosophy of china and it's charactistics
Philosophy of china and it's charactisticsPhilosophy of china and it's charactistics
Philosophy of china and it's charactistics
 
Salient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsSalient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functions
 
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
 
Basic Intentional Injuries Health Education
Basic Intentional Injuries Health EducationBasic Intentional Injuries Health Education
Basic Intentional Injuries Health Education
 
How to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSHow to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POS
 
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
 
Interdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptxInterdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptx
 
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
 
Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.
 
latest AZ-104 Exam Questions and Answers
latest AZ-104 Exam Questions and Answerslatest AZ-104 Exam Questions and Answers
latest AZ-104 Exam Questions and Answers
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptx
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan Fellows
 
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptxOn_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
 
Towards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptxTowards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptx
 
Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)
 
OSCM Unit 2_Operations Processes & Systems
OSCM Unit 2_Operations Processes & SystemsOSCM Unit 2_Operations Processes & Systems
OSCM Unit 2_Operations Processes & Systems
 
How to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptxHow to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptx
 

SMartyParser: an XMI Parser for UML-based Software Product Line Variability Models

  • 1. SMartyParser: an XMI Parser for UML-based Software Product Line Variability Models Leandro A. Lanceloti State University of Maringá (DIN-UEM) – Brasil José C. Maldonado University of São Paulo (ICMC-USP) – Brasil Itana M. S. Gimenes State University of Maringá (DIN-UEM) – Brasil Edson A. Oliveira Junior edson@din.uem.br State University of Maringá (DIN-UEM) - Brasil
  • 2. Outlines l  Introduction l  XMI for Metadata Interchange l  The Parser for UML-based SPLs l  SMartyParser Running Example l  Conclusions and On Going Works SMartyParser: a XMI Parser for UML-based Variability Models – VaMoS 2013 – Edson Jr. 2
  • 3. Introduction l  Variability Management (VM) is a key issue for the success of SPLs l  Literature presents several well-known approaches for VM, specially object-oriented l  Several tools have been developed, such as, pure::variants and SPLOT l  however, a subset of the VM approaches is UML-based and requires automated support for UML models l  Tools have particular means to handle variabilities SMartyParser: a XMI Parser for UML-based Variability Models – VaMoS 2013 – Edson Jr. 3
  • 4. Introduction l  Supporting for UML-based SPL models might be provided by XMI files l  Several questions: l  How to handle UML-based SPLs models containing variability in a particular environment? l  Do you have to adapt your environment to comply to existing tools? l  How do you interchange SPL metadata between different environments? l  … SMartyParser: a XMI Parser for UML-based Variability Models – VaMoS 2013 – Edson Jr. 4
  • 5. The OMG’s XMI Standard l  XMI is the OMG’s standard for metadata interchanging l  Plain XML parsers do not accurately support XMI files 1 <?xml version = '1.0' encoding = 'UTF-8' ?> 2 <XMI xmi.version = '1.2' 3 xmlns:UML = 'org.omg.xmi.namespace.UML' 4 xmlns:UML2 = 'org.omg.xmi.namespace.UML2' 5 timestamp = 'Tue Mar 06 20:22:06 BRT 2012'> 6 <XMI.content> 7 <UML:Diagram xmi.id = 'Iae204f0m135cde62a90mm58a3' 8 isVisible = 'true' 9 name = 'AGM - Core Assets' 10 zoom = '0.91'> 11 <UML:GraphElement.semanticModel> 12 <UML:SimpleSemanticModelElement 13 xmi.id = 'Iae204f0m135cde62a90mm7e5f' 14 typeInfo = 'ClassDiagram'/> 15 </UML:GraphElement.semanticModel> 16 <UML:GraphElement.contained> 17 ... SMartyParser: a XMI Parser for UML-based Variability Models – VaMoS 2013 – Edson Jr. 5 18 ...
  • 6. Processing XMI Files l  Metamodel Definition File (MDF) 203 204 <modelelement name="stereotype"> 205 <attribute name="context" type="ref"/> 206 <attribute name="id" type="data"/> 207 <attribute name="name" type="data"/> 208 <attribute name="extendedelements" 209 type="ref" multiplicity="many"/> 210 </modelelement> 211 Figure 2: Excerpt of the MDF Structure Elements. l  212 XMI Transformation File (XTF) Figure 2: Excerpt of the MDF Structure Elements. 461 462 <xmitransformation modelelement="stereotype" 463 xmipattern="UML:Stereotype"> 464 <trigger name="id" type="attrval" attr="xmi.id"/> 465 <trigger name="name" type="attrval" attr="name"/> 466 <trigger name="context" type="gcattrval" 467 src="UML:ModelElement.namespace" 468 attr="xmi.idref"/> 469 <trigger name="extendedelements" type="gcattrval" 470 src="UML:Stereotype.extendedElement" 471 attr="xmi.idref" 472 linkbackattr="stereotypes" /> 473 </xmitransformation> 474 SMartyParser: a XMI Parser for UML-based Variability Models – VaMoS 2013 – Edson Jr. 475 6
  • 7. The SMartyParser l  SMartyParser stands for Stereotype-based Management of Variability Parser l  It is aimed at processing XMI files of UML-based SPL models in which variabilities are represented by means of stereotypes (UML profiles) l  It was built taking as a basis the Open Core Framework, from the SDMetrics project l  Open Core provides Java classes for: l  Parsing XMI files l  Define and apply metrics for OO models SMartyParser: a XMI Parser for UML-based Variability Models – VaMoS 2013 – Edson Jr. 7
  • 8. SMartyParser Class Diagram SMartyParser Class Model com.sdmetrics.model * 1 1 MetaModelElement MetaModel 1 1 br.uem.din.les.parserxmi * * * * 1 1 1 1 1 ModelElement Model XMIReader ProductLineModelParser * XMITrigger IProductLineVariabilityParser * 1 1 IProductLineUMLModelParser * 1 XMITransformation Transformati XMITransformations Figure 4: The SMartyParser Class Model. SMartyParser: a XMI Parser for UML-based Variability Models – VaMoS 2013 – Edson Jr. 8
  • 9. Figure 4: The SMartyParser Class Model. SMartyParser Available Operations Table 1: The SMartyParser Available Operations. Interface Method Description getAllDiagrams Get all diagrams from the UML model IProductLineUM getStructureDiagrams Get structural diagram LModelParser getBehaviourDiagrams Get behavioral diagrams getInteractionDiagrams Get interaction diagrams getElementsByDiagram Get all elements of a given diagram getElementsByDiagramByType Get all elements of a given diagram by type getElementByID Get an element by its ID getElementsByType Get all elements of a given type getAllVariabilities Get all variabilities (as UML comments) IProductLineVariabilityParser getAllVariationPoints Get all variation points getAllVariables Get all variable elements getOptionalVariants Get all optional variants getMandatoryVariants Get all mandatory variants getInclusiveVariants Get all inclusive variants getExclusiveVariants Get all exclusive variants getVariabilityByName Get a variability by its name getVariantsOfAVariability Get all variants of a given variability getVariationPointOfAVariant Get the variation point of a given variant getChildrenVariabilities Get all child variabilities from a given variability getVariantRequiredElements Get all variants required by a given variant getVariantMutexElements Get all mutually exclusive variants of a given variant SMartyParser: a XMI Parser for UML-based Variability Models – VaMoS 2013 – Edson Jr. 9
  • 10. The SMartyParser l  SMartyParser was conceived based on the main UML- based variability management concepts: l  Variation Point l  Variant (mandatory, optional, inclusive, exclusive) l  Constraints between Variants (requires, mutex) SMartyParser: a XMI Parser for UML-based Variability Models – VaMoS 2013 – Edson Jr. 10
  • 11. SMartyParser Configuration Table 2: The SMartyParser Configuration File Ta Properties Available Properties. Ste Property Description uml_version the UML version xmi_version the XMI version related XMI- xmi_xtf_file_location the XTF file location xmi_mdf_file_location the MDF file location xmi_model_file_location the XMI file location the stereotype used for representing variability_stereotype variabilities the stereotype used for representing variation_point_stereotype variation points the stereotype used for representing mandatory_variant mandatory variants Stereotype-related the stereotype used for representing optional_variant optional variants the stereotype used for representing inclusive_variant inclusive variants the stereotype used for representing exclusive_variant exclusive variants the stereotype used for representing variable_stereotype variable elements the stereotype used for representing require_constraint require constraints the stereotype used for representing mutually_exclusive_variant mutually exclusive constraints SMartyParser: a XMI Parser for UML-based Variability Models – VaMoS 2013 – Edson Jr. 11
  • 12. SMartyParser Instantiation l  It is instantiated by running the following code: ProductLineModelParser smartyParser = new ProductLineModelParser(); l  The constructor is responsible for: l  reading the respective files (MDF and XTF) indicated in the SMartyParser configuration file; and l  processing the XMI file SMartyParser: a XMI Parser for UML-based Variability Models – VaMoS 2013 – Edson Jr. 12
  • 13. SMartyParser Variability Concepts and Example Stereotypes e 3: Correspondence Between the SM eotypes and Variability Concepts. Variability Concept SMartyProfile Stereotype Variability «variability» Variation Point «variationPoint» Mandatory Variant «mandatory» Optional Variant «optional» Inclusive Variant «alternative_OR» Exclusive Variant «alternative_XOR» Require Constraint «requires» Mutually Exclusive Constraint «mutex» Variable Elements «variable» SMartyParser: a XMI Parser for UML-based Variability Models – VaMoS 2013 – Edson Jr. 13
  • 14. Annotated Arcade Game Maker Use Case Model <<variability>> << optional >> << requires >> << optional >> name = "save score" minSelection = 0 Check Previous Best Score Save Score maxSelection = 1 bindingTime = DESIGN_TIME << mandatory >> << mandatory >> allowsAddingVar = true Install Game variants = {Save Score} <<variability>> << mandatory >> name = "check score" << mandatory >> Save Game minSelection = 0 maxSelection = 1 << mandatory >> bindingTime = DESIGN_TIME Exit Game GamePlayer allowsAddingVar = true variants = {Check Previous Best Score} << mandatory , variationPoint >> Play Selected Game GameInstaller Extension Points <<variability>> initialization_ext_point: name = "play game" << mandatory >> animation_ext_point: minSelection = 1 stance maxSelection = 3 Uninstall Game bindingTime = DESIGN_TIME result allowsAddingVar = true variants = {Play Brickels, << extend >> << extend >> << extend >> class, Play Pong, Play Bowling} UML << alternative_OR >> Play Pong << alternative_OR >> << alternative_OR >> nts the Play Brickles Play Bowling nd it is << include >> << include >> << include >> << include >> esents << mandatory >> << include >> << include >> << mandatory >> lasses, Initialization Animation Loop ement meta- SMartyParser: a XMI Parser for UML-based Variability Models – VaMoS 2013 – Edson Jr. 14
  • 15. Executing SMartyParser l  To obtain all the diagrams, as a collection, one must invoke the following operation: smartyParser.getAllDiagrams(); l  For the AGM example, such an operation returns the following diagram as a ModelElement instance: l  [AGM - Use Case Model] SMartyParser: a XMI Parser for UML-based Variability Models – VaMoS 2013 – Edson Jr. 15
  • 16. Executing SMartyParser l  to obtain all variation points from the SPL models, one can invoke the following operation: smartyParser.getAllVariationPoints(); l  For the AGM example, such an operation returns the following variation points: l  [Play Selected Game] SMartyParser: a XMI Parser for UML-based Variability Models – VaMoS 2013 – Edson Jr. 16
  • 17. Conclusions l  SMartyParser can be easily integrated to specific environments for UML-based SPLs l  The parser provides several operations based on UML models and their variabilities represented as stereotypes l  SMartyParser only requires one to properly configure its configuration file avoiding misunderstanding of variability concepts from de UML models SMartyParser: a XMI Parser for UML-based Variability Models – VaMoS 2013 – Edson Jr. 17
  • 18. Limitations and On Going Works l  Limitations of the parser includes: l  variability representation based on stereotypes; l  lack of an OCL engine for improving variability comprehension and automatic product generation; and l  the parser only processes use case, class, component and activity diagrams.. so far…. l  On going works include: l  the parser is being currently extended for sequence diagrams, the UML package merging mechanism, SysML block definition for ES, and the SPEM elements for process lines SMartyParser: a XMI Parser for UML-based Variability Models – VaMoS 2013 – Edson Jr. 18
  • 19. Questions? Contributions? l  If you prefer, contact me via e-mail: l  edson@din.uem.br SMartyParser: a XMI Parser for UML-based Variability Models – VaMoS 2013 – Edson Jr. 19
  • 20. l  Obrigado !!! l  Grazie!!! l  Thank you ! ! ! SMartyParser: a XMI Parser for UML-based Variability Models – VaMoS 2013 – Edson Jr. 20