Presentation is loading. Please wait.

Presentation is loading. Please wait.

A Template-Based Model Transformation Approach Using A Simplified Hierarchical Metamodel Ph.D Dissertation Hongming Liu DePaul University.

Similar presentations


Presentation on theme: "A Template-Based Model Transformation Approach Using A Simplified Hierarchical Metamodel Ph.D Dissertation Hongming Liu DePaul University."— Presentation transcript:

1 A Template-Based Model Transformation Approach Using A Simplified Hierarchical Metamodel Ph.D Dissertation Hongming Liu DePaul University

2 Agenda Introduction Motivation HRMT Approach Case Study: HIMS Related Work and Evaluation Contributions

3 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

4 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

5 Model Transformation Overview Relational Template EJB Template.NET Template

6 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)

7 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

8 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

9 HRMT Approach

10 Source Model Representation Hierarchical Relational Metamodel Transformation Template Transformation Control Algorithm Post Processing

11 Hierarchical Relational Metamodel A Hierarchical Relational Metamodel HRM = (N, C, R) N a set of nodes: N = {n 1, n 2,... n i } 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

12 HRM Example

13 Model Transformation Rules A transformation rule set R = {r 1, r 2, r 3... r n } a set of model transformation rules A transformation rule r = (P --> T pre, T post ) P: pattern to select the elements of source model T pre : mapping before traversing children of selected element T post : mapping after traversing children of selected element

14 Transformation Control Algorithm

15 Transformation Process

16

17

18 Development of Transformation CSL Roster Example Basic Classes Classes with associations Generation of EJB Entities Generation of comprehensive EJB applications

19 CSL Roster Example

20 Case Study: HIMS Hospital Information Management System Electronic Healthcare Record Functional Requirement Non-Functional Requirement

21

22 HISM @table struct MedicalDataTemplate { int id; String desc; String SecurityLevel; String format; String attachment; } <![CDATA[... Healthcare Information Management System <asp:GridView id="ctrlDataGrid" runat="server"... <asp:SqlDataSource ID="ctrlDataSource" runat="server" ProviderName="System.Data.OleDb" ConnectionString=..."/>

23 HISM Show all the available medical data <asp:GridView id="ctrlDataGrid" runat="server" DataSourceID="ctrlDataSource" HeaderStyle-BackColor="#CCCCCC" CellSpacing="0" CellPadding="5" Width="400" AutoGenerateColumns="false" > …. <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]" />

24 HISM

25 Features Illustrated by Case Study Multi-platform support Security requirement support Scalability requirement support Performance requirement support

26 Evaluation Choice of Test case  CSL Roster example Choice of Metrics Choice of transformation tools

27 CSL Roster Example

28 Evaluation Metrics Total Line/Token Nesting Depth Cross Reference - Inner cross reference/outer cross reference Reference to Metamodel - reference/unique reference

29 Evaluation Metrics

30 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)

31 Evaluation Evaluation Result Reflecting Metamodel Complicity

32 Evaluation Evaluation Result Reflecting Transformation Complicity

33 Evaluation Evaluation Result of Transformation Tools

34 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

35 Thank You! Questions/Comments?

36 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.

37 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

38 ZOOM Architecture

39 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

40 A Simple ZOOM Structural Model Example namespace roster; @Entity struct Player { String playerId; String name; String position; double salary; } Lexical elements --Very similar to Java/C#. 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.

41 MOF

42 HRM

43 Benefits of MDE Reduced development time and cost Increased portability, platform independence, cross-platform interoperability, and reusability Improved application quality

44 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

45 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)

46 Transformation Approaches Direct-Manipulation Approach Transformation using XSLT Template-Based Approaches QVT(Queries/Views/Transformations)

47 Example struct Player { String playerId; String name; String position; double salary; }

48 Example <![CDATA[ … public class ${name} implements Serializable { } … 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; } …


Download ppt "A Template-Based Model Transformation Approach Using A Simplified Hierarchical Metamodel Ph.D Dissertation Hongming Liu DePaul University."

Similar presentations


Ads by Google