a template based model transformation approach using a simplified hierarchical metamodel n.
Download
Skip this Video
Loading SlideShow in 5 Seconds..
A Template-Based Model Transformation Approach Using A Simplified Hierarchical Metamodel  PowerPoint Presentation
Download Presentation
A Template-Based Model Transformation Approach Using A Simplified Hierarchical Metamodel 

Loading in 2 Seconds...

play fullscreen
1 / 48

A Template-Based Model Transformation Approach Using A Simplified Hierarchical Metamodel  - PowerPoint PPT Presentation


  • 77 Views
  • Uploaded on

A Template-Based Model Transformation Approach Using A Simplified Hierarchical Metamodel . Ph.D Dissertation Hongming Liu DePaul University. Agenda. Introduction Motivation HRMT Approach Case Study: HIMS Related Work and Evaluation Contributions. MDE .

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about 'A Template-Based Model Transformation Approach Using A Simplified Hierarchical Metamodel ' - taliesin


An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
a template based model transformation approach using a simplified hierarchical metamodel

A Template-Based Model Transformation Approach Using A Simplified Hierarchical Metamodel 

Ph.D DissertationHongming LiuDePaul University

agenda
Agenda
  • Introduction
  • Motivation
  • HRMT Approach
  • Case Study: HIMS
  • Related Work and Evaluation
  • Contributions
slide3
MDE
  • Using models to direct the course of understanding, design, construction, deployment, operation, maintenance and modification.
  • Transform abstract model into system implementation
  • Benefits of MDE
model transformation
Model Transformation
  • A core concept to support MDE
  • Transform a Platform Independent Model(PIM) to Platform Specific Model(PSM)
  • A model transformer is similar to a compiler
  • Transformation requires a clear understanding of the abstract syntax and semantics of both the source models and target models
model transformation overview
Model Transformation Overview

Relational Template

.NET Template

EJB Template

state of the art
State of the Art
  • UML as the de facto modeling language
    • UML 2.2
    • Object Constrain Language(OCL)
    • UML 3.0?
  • MDA initiative of OMG
    • Model Object Facility(MOF)
    • Query/View/Transformation(QVT)
mde obstacles
MDE Obstacles
  • Problems of UML and OCL
    • Large and complex
    • Inconsistent
    • Loose semantics
    • Difficult syntax of OCL
  • Inadequate tools support
  • Lack of effective transformation mechanism
proposed approach
Proposed Approach

A model transformations framework

  • Based on ZOOM notation
  • Use Hierarchical Relational Metamodel(HRM)
  • Template based transformation
  • Aims to provide a simple, effective, and practical way to define model transformations
hrmt approach1
HRMT Approach
  • Source Model Representation
  • Hierarchical Relational Metamodel
  • Transformation Template
  • Transformation Control Algorithm
  • Post Processing
hierarchical relational metamodel
Hierarchical Relational Metamodel

A Hierarchical Relational Metamodel

HRM = (N, C, R)

N a set of nodes: N = {n1, n2, ... ni }

C a relation on N X N, which forms a tree structure that has one root and no unconnected nodes.

R a set of relation on N X N

model transformation rules
Model Transformation Rules
  • A transformation rule set

R = {r1, r2, r3... rn}

a set of model transformation rules

  • A transformation rule

r = (P --> Tpre, Tpost)

P: pattern to select the elements of source model

Tpre: mapping before traversing children of selected element

Tpost: mapping after traversing children of selected element

development of transformation
Development of Transformation
  • CSL Roster Example
  • Basic Classes
  • Classes with associations
  • Generation of EJB Entities
  • Generation of comprehensive EJB applications
case study hims
Case Study: HIMS
  • Hospital Information Management System
  • Electronic Healthcare Record
  • Functional Requirement
  • Non-Functional Requirement
slide22
HISM

<Rule match="Struct">

<Pre>

<![CDATA[

<File name="view${name}.aspx">

<%@ Page Language="C#" %>

...

Healthcare Information Management System

<asp:GridView id="ctrlDataGrid" runat="server"

...

</asp:GridView>

<asp:SqlDataSource ID="ctrlDataSource" runat="server"

ProviderName="System.Data.OleDb"

ConnectionString=..."/>

@table

struct MedicalDataTemplate {

int id;

String desc;

String SecurityLevel;

String format;

String attachment;

}

slide23
HISM

<%@ Page Language="C#" %>

<html xmlns="http://www.w3.org/1999/xhtml">

<font size=4><strong>Show all the available medical data</strong></font>

</p>

<form id="WebForm" runat="server" >

<asp:GridView id="ctrlDataGrid" runat="server"

DataSourceID="ctrlDataSource"

HeaderStyle-BackColor="#CCCCCC"

CellSpacing="0"

CellPadding="5"

Width="400"

AutoGenerateColumns="false" >

<Columns>

<asp:BoundField HeaderText="Patient ID" DataField="patientid"/>

….

</Columns>

</asp:GridView>

</p>

<asp:SqlDataSource ID="ctrlDataSource" runat="server"

ProviderName="System.Data.OleDb"

ConnectionString="Provider=Microsoft.Jet.OLEDB.4.0; Data Source=e:\ectserver\jliu\Database\hospital.mdb"

SelectCommand="SELECT * FROM [medicaldata]" />

features illustrated by case study
Features Illustrated by Case Study
  • Multi-platform support
  • Security requirement support
  • Scalability requirement support
  • Performance requirement support
evaluation
Evaluation
  • Choice of Test case
    • CSL Roster example
  • Choice of Metrics
  • Choice of transformation tools
evaluation metrics
Evaluation Metrics
  • Total Line/Token
  • Nesting Depth
  • Cross Reference

- Inner cross reference/outer cross reference

  • Reference to Metamodel

- reference/unique reference

model transformation tools
Model Transformation Tools
  • Jamda

Direct model manipulation using visitor mechanism

  • Stylus Studio

Using XSLT stylesheet to describe mapping rules

  • AndroMDA

An extensible template-based code generator

  • ATL

Comply to the QVT standard(UML,MOF,XMI)

evaluation1
Evaluation
  • Evaluation Result Reflecting Metamodel Complicity
evaluation2
Evaluation
  • Evaluation Result Reflecting Transformation Complicity
evaluation3
Evaluation
  • Evaluation Result of Transformation Tools
contribution
Contribution
  • A Template Based Model Transformation Approach Using Simplified Metamodel
  • Benefits of our approach:
    • Simplicity of source modeling language
    • Readability of transformation definition
    • Support of non-functional requirement
thank you
Thank You!

Questions/Comments?

our vision for mde
Our Vision for MDE

Our vision for MDE centers on

  • Notations for capturing formal and complete models of all aspects
  • Knowledge-based approaches and tools that transform models into complete applications through a process known as model compilation.
slide37
MOF
  • MOF stands for Meta Object Facility
    • enables meta-metamodeling of UML level metamodels
  • It defines a small set of concepts (such as package, class, method, attribute…) That
    • allow one to define and manipulate models of metadata (data about data)
    • are described using a subset UML notation
why zoom
Why ZOOM
  • Problems of UML and OCL
    • Large and complex
    • Inconsistent
    • Loose semantics
    • Difficult syntax of OCL
  • Key features of ZOOM
    • Simple and consistent
    • Familiar and easy syntax
    • Dual visual and textual representations
    • Extensive libraries
a simple zoom structural model example
A Simple ZOOM Structural Model Example

Lexical elements

--Very similar to Java/C#.

namespace roster;

@Entity

struct Player {

String playerId;

String name;

String position;

double salary;

}

Types and variables

-- Similar to Java, but more extensive.

-- All basic Java data types are supported

Expressions

-- All Java expressions are valid in ZOOM

Libraries

-- Include common data types, collections (sets, lists, maps), and a lot more.

benefits of mde
Benefits of MDE
  • Reduced development time and cost
  • Increased portability, platform independence, cross-platform interoperability, and reusability
  • Improved application quality
model and metamodel
Model and Metamodel
  • Model

A consistent and complete set of formal elements

describing a system that is amenable to analysis

  • Metamodel

A specification model for a system under study

where such system under study is itself a valid

model expressed in a certain modeling language

transformation control algorithm1
Transformation Control Algorithm

1 Transform(node , RuleSet , Output_Model )

2 rule <- findMatchingRule(node , RuleSet )

3 targettext <- instantiate( rule .pre , node )

4 OutPut_Model . append( targettext )

5 foreach c is a child of node

6 transform(c , RuleSet , Output_Model )

7 endforeach

8 targettext <- instantiate( rule .post , node )

9 OutPut_Model . append( targettext )

Starting point: transform(root, RuleSet, Output_Model)

transformation approaches
Transformation Approaches
  • Direct-Manipulation Approach
  • Transformation using XSLT
  • Template-Based Approaches
  • QVT(Queries/Views/Transformations)
example
Example

struct Player {

String playerId;

String name;

String position;

double salary;

}

example1
Example

public class Player implements Serializable {

@Entity

Player (String id, String name, String position, double salary) {

this.id = id;

this.name = name;

this.position = position;

this.salary = salary;

}

@Id

@Column(name = "id")

public String getId() {

return id;

}

<Rule match="Struct">

<Mark>

<Stereotype name="Entity"/>

</Mark>

<Pre>

<![CDATA[

<File name="${name}.java">

public class ${name} implements Serializable {

<MacroRef name="${name}.constrDef"/>

<MacroRef name="${name}.operDef"/>

<MacroRef name="${name}.attrDef"/>

}