A GUIDED FRAMEWORK for STRUCTURAL MODELING By

A GUIDED FRAMEWORK for STRUCTURAL MODELING By

ABSTRACT INTUITIVE MODEL TRANSFORMATIONS: A GUIDED FRAMEWORK FOR STRUCTURAL MODELING by Nicholas John DiGennaro As research in Model­Driven Software Engineering (MDSE) continues to innovate the software engineering process, a gap has been created between its potential benefit and actual use. This gap exists due to MDSE education being held back by tools that are not well­suited for learning and use by beginners. To teach new developers MDSE concepts before moving into industrial tools, MDSE educators need a lightweight, model­first, end­to­end teaching tool. The Instructional Modeling Language (IML) is proposed as a solution to fit these needs. This thesis implements for the IML Framework one of the foundational aspects of MDSE: Model Transformations. The ability to apply model transformations to large collections of models contributes to software reuse, allowing developers to dedicate efforts elsewhere. Furthermore, the early work of conceptually modeling systems has a larger payoff as a result of model transformations being used in the code generation process. These benefits are some of the most influential factors for adopting MDSE and must be properly emphasized in education. Model transformations in IML provide students with a guided experience and clear explanations of the model transformation processes. In turn, students are provided with a solid foundation in MDSE and its benefits. INTUITIVE MODEL TRANSFORMATIONS: A GUIDED FRAMEWORK FOR STRUCTURAL MODELING A Thesis Submitted to the Faculty of Miami University in partial fulfillment of the requirements for the degree of Master of Science by Nicholas John DiGennaro Miami University Oxford, Ohio 2021 Advisor: Eric J. Rapos, PhD Reader: Matthew Stephan, PhD Reader: Hakam W. Alomari, PhD ©2021 Nicholas John DiGennaro This Thesis titled INTUITIVE MODEL TRANSFORMATIONS: A GUIDED FRAMEWORK FOR STRUCTURAL MODELING by Nicholas John DiGennaro has been approved for publication by The College of Engineering and Computing and The Department of Computer Science & Software Engineering Eric J. Rapos, PhD Matthew Stephan, PhD Hakam W. Alomari, PhD Table of Contents List of Tables v List of Figures vi Acknowledgements ix 1 Introduction 1 1.1 Motivation . 1 1.2 Contributions . 2 1.2.1 Overview . 2 2 Background & Related Work 3 2.1 Background . 3 2.1.1 Model­Driven Software Engineering . 3 2.1.2 Educational Language Design . 10 2.1.3 Software to Support Teaching Goals . 10 2.2 Related Work . 11 2.2.1 Tools to Support MDSE . 11 2.2.2 Motivating Work . 15 3 Web­Based Model Editor 16 3.1 JointJS . 16 3.2 Technology Stack . 18 3.3 Web Page Structure . 19 3.4 Editor, Palette and Backend . 21 3.5 Properties Table . 27 3.6 Export and Import . 30 4 Code Generation 33 4.1 Metamodel Code Generation . 33 4.2 Instance Model Code Generation . 39 5 Model­to­Model Transformations 42 5.1 Model Transformations Page . 42 iii 5.2 Mapping Rules . 47 5.3 Transforming Instance Models . 56 6 Evaluation 63 6.1 Experimental Design . 63 6.1.1 Web­Based Model Editor . 63 6.1.2 Code Generation . 63 6.1.3 Model­to­Model Transformations . 66 6.2 Results . 67 6.2.1 Code Generation . 67 6.2.2 Model­to­Model Transformations . 70 6.3 Discussion . 71 7 Conclusion 77 7.1 Threats to Validity . 77 7.2 Future Work . 78 7.3 Summary . 78 A Code Generation Complex Example Actual Output 80 References 91 iv List of Tables 2.1 Terminology Comparison. 4 6.1 Code generation evaluation . 68 6.2 ASCII comment evaluation. The Empty Abstract test was unable to be used be­ cause the test was evaluated with the set of files generated for the Inheritance Primitives test, therefore, it has no generated code. The Type and Default Value test was not used because the same metamodel was use for the Type and Value test, therefore, it would be redundant to perform this test. 70 6.3 M2M evaluation, part 1. Class, Attribute and Relation tests. 72 6.4 M2M evaluation, part 2. Complex Mapping and Assisting in Conformance tests. 73 v List of Figures 2.1 Example Model of Simple University System . 5 2.2 Model transformation from M to M’. Adapted from Model­Driven Software Engi­ neering in Practice, figure 8.1 (a) [1].......................... 7 2.3 Code Generation. Adapted from Model­Driven Software Engineering in Practice, figure 8.1 (a) [1]. ................................... 8 3.1 JointJS UML model demos. Obtained from [2].................... 17 3.2 IML Class Pseudocode . 17 3.3 IML Class Example . 17 3.4 JointJS Link Pseudocode . 18 3.5 IML Relations . 18 3.6 Model editor mock­up . 20 3.7 Palette code snippet . 20 3.8 Final version of the model editor UI. 20 3.9 Example of Meta­Model Conformance panel when an instance model is out of con­ formance with its metamodel while instance modeling. 21 3.10 IML class (left) vs UML class (right). This image displays an example UML class from the OMG Unified Modeling Language specification [3]. 22 3.11 Key of visual bounds used in IML model editor. 22 3.12 IML model displaying the ability to represent object attributes. 23 3.13 Palette icon snippet . 23 3.14 Class inheritance example . 24 3.15 Example of a relation cycle. This figure was cropped because it is impossible to create a model of this type in IML. 25 3.16 Find relation cycle pseudocode . 26 3.17 Iml Structural Model, structural model . 26 3.18 Example properties table. The name attribute of the person class from figure 3.3 is selected. 28 3.19 Example properties table in edit mode. The name attribute of the person class from figure 3.3 is selected. 29 3.20 Attribute popup . 29 3.21 Upper bound edit mode . 29 3.22 Type edit mode . 30 vi 3.23 IML model representing a Person class with two attributes name and age. This model also includes an empty class Phone and a relation from Person to Phone. 31 3.24 The XML file that corresponds to the model found in figure 3.23 .......... 31 4.1 Empty abstract class . 33 4.2 Abstract class code snippet . 34 4.3 Primitive attribute generation examples . 36 4.4 Object attribute generation examples . 37 4.5 Constructor generation example . 37 4.6 Pretty print for an object with primitive and object attributes. 38 4.7 ASCII art for class code in figure 4.4......................... 39 4.8 Generated instance code . 40 5.1 Model transformation UI before user interaction . 43 5.2 Model transformation UI after completed transformation . 43 5.3 Model transformation UI after successful source metamodel upload. 44 5.4 Model transformation UI after successful source and target metamodel upload. 45 5.5 Model transformation UI after one defined rule. 46 5.6 Model transformation UI after successful input instance model upload. 47 5.7 Map classes modal. 48 5.8 Map classes modal with drop down. 49 5.9 Map attributes modal. 49 5.10 Map attributes modal with drop down. 50 5.11 Map last attributes of a class mapping. 50 5.12 Mapping success modal. 51 5.13 Mapping to none success modal. 52 5.14 Complex class mapping modal. 52 5.15 Complex class mapping modal with multiple conditions. 53 5.16 Complex Attribute mapping modal. 53 5.17 String operators. 54 5.18 Integer and double operators. 55 5.19 Boolean attribute condition. 55 5.20 Complex rule displayed in transformation rules panel. 56 5.21 Class attribute assignment modal. 57 5.22 Class mapping with saved attribute assignment. 57 5.23 Attribute assignment modal with existing attribute assignment. 58 5.24 Attribute assignment modal. ..

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    103 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us