Mining Metamodels From Instance Models: The MARS System Faizan Javed Department of Computer &...

15
Mining Metamodels From Instance Models: The MARS System Faizan Javed Department of Computer & Information Sciences, University of Alabama at Birmingham The Fourth Annual Southeastern Software Engineering Conference (SE) 2 30 th March 2005
  • date post

    22-Dec-2015
  • Category

    Documents

  • view

    213
  • download

    0

Transcript of Mining Metamodels From Instance Models: The MARS System Faizan Javed Department of Computer &...

Page 1: Mining Metamodels From Instance Models: The MARS System Faizan Javed Department of Computer & Information Sciences, University of Alabama at Birmingham.

Mining Metamodels From Instance Models: The MARS System

Faizan JavedDepartment of Computer & Information Sciences, University of Alabama at Birmingham

The Fourth Annual Southeastern Software Engineering Conference (SE)2

30th March 2005

Page 2: Mining Metamodels From Instance Models: The MARS System Faizan Javed Department of Computer & Information Sciences, University of Alabama at Birmingham.

Motivation

Software artifacts like models and source code conform to a schema, and are stored in a repository.

Evolution of schema might be required to address new feature requests.

Repository artifacts might become obsolete if not transformed to conform to new schema.

Example: Java SDK – new versions restructure or rename API’s.

Page 3: Mining Metamodels From Instance Models: The MARS System Faizan Javed Department of Computer & Information Sciences, University of Alabama at Birmingham.

Domain-Specific Modeling (DSM)

Raises level of abstraction, while narrowing design space to single domain of discourse.

Allows construction of models which follow domain abstractions and semantics allowing developers to work with domain concepts.

Metamodel: Defines key elements of domain.

Models: Defines specific configurations of the domain.

Page 4: Mining Metamodels From Instance Models: The MARS System Faizan Javed Department of Computer & Information Sciences, University of Alabama at Birmingham.

DSM modeling with GME

GME: Generic Modeling Environment Metamodel: Networking

Page 5: Mining Metamodels From Instance Models: The MARS System Faizan Javed Department of Computer & Information Sciences, University of Alabama at Birmingham.

DSM Modeling with GME

Model: CompanyA

Page 6: Mining Metamodels From Instance Models: The MARS System Faizan Javed Department of Computer & Information Sciences, University of Alabama at Birmingham.

Challenges of Mining Domain Instance Models

Metamodel drift: inability to load models due to changes to metamodel.

Solution: Infer metamodel from instance models !

Grammar Inference community has done extensive work on similar problem, albeit for programming language domain.

Page 7: Mining Metamodels From Instance Models: The MARS System Faizan Javed Department of Computer & Information Sciences, University of Alabama at Birmingham.

Challenges of Mining Domain Instance Models

Idea: Apply grammar inference techniques to the metamodel inference problem.

Problem: Modeling tools export XML files; mismatch in representation expected by grammar inference techniques.

Solution: Translate XML to textual DSL (Domain-Specific Language) !

Page 8: Mining Metamodels From Instance Models: The MARS System Faizan Javed Department of Computer & Information Sciences, University of Alabama at Birmingham.

Tools Used in the Project

GME: Metamodel described with UML class diagrams, and constraints with OCL.

LISA: An interactive environment where users can specify, generate, compile, and execute programs in a newly specified language.

DMS: A program transformation system and re-engineering toolkit.

Page 9: Mining Metamodels From Instance Models: The MARS System Faizan Javed Department of Computer & Information Sciences, University of Alabama at Birmingham.

Overview of the MARS system

Page 10: Mining Metamodels From Instance Models: The MARS System Faizan Javed Department of Computer & Information Sciences, University of Alabama at Birmingham.

From GME models to MRL (Model Representation Language)

…….model NetDiagram {

WSGroup ; Perimeter ;

Host ; Network ;

WSGroup ; Host ;

Router ; fields;

connections Connection : Port -> Network ; Connection : Host -> Network ; Connection : Port -> Perimeter ;

Connection : WSGroup -> Network ; Connection : WSGroup -> Network ;

Connection : Host -> Network ; }

………..

XSLT

Page 11: Mining Metamodels From Instance Models: The MARS System Faizan Javed Department of Computer & Information Sciences, University of Alabama at Birmingham.

From MRL to Inferred Metamodel

…….model NetDiagram {

WSGroup ; Perimeter ;

Host ; Network ;

WSGroup ; Host ;

Router ; fields;

connections Connection : Port -> Network ; Connection : Host -> Network ; Connection : Port -> Perimeter ;

Connection : WSGroup -> Network ;

Connection : WSGroup -> Network ;

Connection : Host -> Network ; }

………..

LISA+DMS

Page 12: Mining Metamodels From Instance Models: The MARS System Faizan Javed Department of Computer & Information Sciences, University of Alabama at Birmingham.

Inferred vs. Original Metamodel

Page 13: Mining Metamodels From Instance Models: The MARS System Faizan Javed Department of Computer & Information Sciences, University of Alabama at Birmingham.

Limitations and Observations

Generalization hierarchy can’t be inferred resulting in more elements in inferred metamodel.

Domain-Specific Visualization: graphic assigned to metamodel entities cant be inferred.

OCL Constraints: capture domain semantics that cant be captured with static diagrams. They are not explicitly indicated in domain models.

Page 14: Mining Metamodels From Instance Models: The MARS System Faizan Javed Department of Computer & Information Sciences, University of Alabama at Birmingham.

Related Work

The XTRACT System:1) Infers DTD from XML documents2) Derives a regular expression for each element in the XML document.3) Uses the Minimum Description Length (MDL) principle to choose the best DTD from a set of candidate DTDs

o ECFG Based System (Chidlovskii):1) Represents XML documents as structured examples of an unknown ECFG.2) Uses existing grammar inference techniques to infer the ECFG.

Page 15: Mining Metamodels From Instance Models: The MARS System Faizan Javed Department of Computer & Information Sciences, University of Alabama at Birmingham.

For more information:

Project Website:

http://www.cis.uab.edu/softcom/GenParse/mars.htm