ebook img

Interactive Transformations for Visual Models - Christian-Albrechts PDF

189 Pages·2011·3.74 MB·English
by  
Save to my drive
Quick download
Download
Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.

Preview Interactive Transformations for Visual Models - Christian-Albrechts

Christian-Albrechts-Universität zu Kiel Bachelor Thesis Interactive Transformations for Visual Models Ulf Rüegg March 11, 2011 Department of Computer Science Real-Time and Embedded Systems Group Prof. Dr. Reinhard von Hanxleden Advised by: Dipl.-Inf. Christian Motika ii Eidesstattliche Erklärung Hiermit erkläre ich an Eides statt, dass ich die vorliegende Arbeit selbstständig verfasst und keine anderen als die angegebenen Hilfsmittel verwendet habe. Kiel, iv Abstract Model transformations are an integral part of Model Driven Engineering (MDE). But these transformations are mostly executed silently and at once in the background. The user does not gain any insight into the process of the transformation, and the concrete coherences between the input model and its transformed version do not become clear. In this thesis, an approach to visualize a transformation is presented. The overall transformation is broken down into steps of a certain granularity. As a result the transformation can be executed step-wise by successively performing single steps. Each intermediate step is illustrated visually in order to improve the overall comprehensibility. Erroneous transformations can be examined easier as it is possible to locate the part of the transformation where the error is introduced more precisely. SyncCharts and Esterel are graphical and textual programming languages, re- spectively, used for the design of reactive systems. A transformation between the two languages is desirable in order to utilize each representation’s advantages. A graphical representation improves comprehension while it is faster to edit a textual representation. An implementation of a transformation that transforms an Esterel program into a SyncChart and which is executable in steps is presented in the con- text of the Kiel Integrated Environment for Layout Eclipse Rich Client (KIELER) project. vi Contents 1 Introduction 1 1.1 KIELER . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 1.2 Problem Statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 1.3 Structure of this Document . . . . . . . . . . . . . . . . . . . . . . . 4 1.4 Esterel v5 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 1.5 SyncCharts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 2 Related Work 9 2.1 Esterel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 2.1.1 Statecharts to Esterel . . . . . . . . . . . . . . . . . . . . . . 9 2.1.2 Synthesizing SyncCharts from Esterel . . . . . . . . . . . . . 10 2.2 Model Transformations . . . . . . . . . . . . . . . . . . . . . . . . . . 11 2.2.1 Transformation Languages . . . . . . . . . . . . . . . . . . . . 11 2.2.2 KIELER Transformations . . . . . . . . . . . . . . . . . . . . . 11 2.2.3 Triple Graph Grammars . . . . . . . . . . . . . . . . . . . . . 12 2.2.4 Visual Debugging . . . . . . . . . . . . . . . . . . . . . . . . . 12 2.2.5 Integrating Textual and Graphical Modeling . . . . . . . . . 13 3 Used Technologies 15 3.1 Eclipse . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 3.1.1 Plug-in Mechanism . . . . . . . . . . . . . . . . . . . . . . . . 15 3.1.2 Eclipse Modeling Framework . . . . . . . . . . . . . . . . . . 16 3.1.3 Xtext . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 3.1.4 Xtend . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 3.2 JUnit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 3.3 KIELER . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24 3.3.1 KIELER Execution Manager . . . . . . . . . . . . . . . . . . . 24 3.3.2 KIELER Viewmanagement . . . . . . . . . . . . . . . . . . . . 26 3.3.3 Thin KIELER SyncCharts Editor . . . . . . . . . . . . . . . . 27 4 Adaption of the Esterel Grammar in KIELER 31 4.1 Concept . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 4.1.1 KExpressions . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 4.2 Implementation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 4.2.1 Obstacles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 4.2.2 Result . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36 vii Contents 5 Visual Transformation 39 5.1 A Generic Approach . . . . . . . . . . . . . . . . . . . . . . . . . . . 39 5.1.1 Graphical User Interface . . . . . . . . . . . . . . . . . . . . . 40 5.2 Esterel to SyncCharts Transformation . . . . . . . . . . . . . . . . . 41 5.2.1 nothing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45 5.2.2 pause . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46 5.2.3 halt . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47 5.2.4 abort . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48 5.2.5 assign . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52 5.2.6 await . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54 5.2.7 do-upto . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56 5.2.8 do-watching . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58 5.2.9 emit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60 5.2.10 every . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62 5.2.11 if . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64 5.2.12 local-signal . . . . . . . . . . . . . . . . . . . . . . . . . . . 66 5.2.13 local-variable . . . . . . . . . . . . . . . . . . . . . . . . . . 68 5.2.14 loop . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70 5.2.15 loop-each . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72 5.2.16 parallel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74 5.2.17 present . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76 5.2.18 call . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78 5.2.19 sequence . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80 5.2.20 suspend . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82 5.2.21 sustain . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84 5.2.22 trap . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86 5.2.23 exit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90 5.3 Optimization of SyncCharts . . . . . . . . . . . . . . . . . . . . . . . 93 5.3.1 Concept . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93 5.3.2 Removal of Unessential Conditional Pseudostates . . . . . . . 94 5.3.3 Removal of Unessential Simple States (1) . . . . . . . . . . . 96 5.3.4 Removal of Unessential Simple States (2) . . . . . . . . . . . 98 5.3.5 Merging of Simple Final States . . . . . . . . . . . . . . . . . 100 5.3.6 Removal of Unessential Normal Terminations . . . . . . . . . 102 5.3.7 Removal of Unessential Macro States . . . . . . . . . . . . . . 104 5.3.8 Removal of Macro States with Only One Sub-State . . . . . . 106 5.3.9 Checking of a State’s Final Character . . . . . . . . . . . . . 108 6 Implementation 111 6.0.10 Creation of a TransformationContext . . . . . . . . . . . . . . 111 6.0.11 Generic Execution . . . . . . . . . . . . . . . . . . . . . . . . 113 6.1 Implementation of the Esterel to SyncCharts Transformation . . . . 116 6.1.1 Initial Transformation . . . . . . . . . . . . . . . . . . . . . . 116 6.1.2 Xtend Implementation . . . . . . . . . . . . . . . . . . . . . . 116 viii Contents 6.1.3 Java Implementation . . . . . . . . . . . . . . . . . . . . . . . 118 6.2 Implementation of the SyncCharts Optimization . . . . . . . . . . . 122 6.2.1 Xtend Implementation . . . . . . . . . . . . . . . . . . . . . . 122 6.2.2 Java Implementation . . . . . . . . . . . . . . . . . . . . . . . 124 6.3 Implementation of the Controlling Combination . . . . . . . . . . . . 125 7 Validation and Experimental Results 129 7.1 Testing the Esterel Grammar . . . . . . . . . . . . . . . . . . . . . . 129 7.2 Testing the Transformation Implementation . . . . . . . . . . . . . . 129 7.3 Experimental Results . . . . . . . . . . . . . . . . . . . . . . . . . . . 131 7.3.1 Transformation Durations . . . . . . . . . . . . . . . . . . . . 131 7.3.2 Optimization Quality . . . . . . . . . . . . . . . . . . . . . . 134 8 Concluding Results 137 8.1 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 137 8.2 Conclusions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 138 8.3 Future Work . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 139 A Sources 143 Bibliography 165 ix Contents x

See more

The list of books you might like

Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.