Model Execution and Meta Layout in Eclipse
                        Snapshots of the KIELER Project


                     ...
Introduction
                      KIELER Execution Manager
                             Use Case: Ptolemy
               ...
Introduction
                          KIELER Execution Manager      Motivation
                                 Use Case:...
Introduction
                         KIELER Execution Manager      Motivation
                                Use Case: P...
Introduction
                        KIELER Execution Manager      Motivation
                               Use Case: Pto...
Introduction
                                                      DataComponents
                        KIELER Execution...
Introduction
                                                      DataComponents
                        KIELER Execution...
Introduction
                                                         DataComponents
                           KIELER Exe...
Introduction
                                                         DataComponents
                           KIELER Exe...
Introduction
                        KIELER Execution Manager      M2M Transformation
                               Use C...
Introduction
                         KIELER Execution Manager      M2M Transformation
                                Use...
Introduction
                        KIELER Execution Manager      M2M Transformation
                               Use C...
Introduction
                         KIELER Execution Manager      M2M Transformation
                                Use...
Introduction
                                                      Installation
                        KIELER Execution M...
Introduction
                                                       Installation
                         KIELER Execution...
Introduction
                                                       Installation
                         KIELER Execution...
Introduction
                                                      Installation
                        KIELER Execution M...
Introduction
                                                      Installation
                        KIELER Execution M...
Introduction
                                                      Installation
                        KIELER Execution M...
Introduction
                                                       Installation
                         KIELER Execution...
Introduction
                        KIELER Execution Manager      Summary
                               Use Case: Ptolem...
Introduction
                         KIELER Execution Manager      Summary
                                Use Case: Ptol...
Introduction
                        The Interface
                      The Background




                 Part II: Meta...
Introduction
                                                   Automatic Layout in GMF
                              The ...
Introduction
                                                    Automatic Layout in GMF
                               Th...
Layout Providers
                                  Introduction
                                                     Custo...
Layout Providers
                             Introduction
                                                Custom Layout O...
Layout Providers
                              Introduction
                                                 Custom Layout...
Layout Providers
                             Introduction
                                                Custom Layout O...
Introduction
                                                    Diagram Layout
                               The Interfa...
Introduction
                                                Diagram Layout
                           The Interface
     ...
Introduction
                                                  Diagram Layout
                             The Interface
 ...
Introduction
                              The Interface        Summary
                            The Background



Summ...
Upcoming SlideShare
Loading in …5
×

Model Execution and Meta Layout

1,068 views

Published on

KIELER is the Kiel Integrated Environment for Layout Eclipse Rich Client. This talk reports about recent developments in the project which enhance graphical modeling (Eclipse GEF/GMF) by execution semantics of models (simulation) and automatic graphical layout.

Published in: Education, Technology, Business
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
1,068
On SlideShare
0
From Embeds
0
Number of Embeds
4
Actions
Shares
0
Downloads
21
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Model Execution and Meta Layout

  1. 1. Model Execution and Meta Layout in Eclipse Snapshots of the KIELER Project ¨ Christian Motika and Miro Sponemann Real-Time Systems and Embedded Systems Group Department of Computer Science ¨ Christian-Albrechts-Universitat zu Kiel, Germany Eclipse Summit, 08/27/2009 Eclipse Summit 2009 Model Execution and Meta Layout in Eclipse 1 / 33
  2. 2. Introduction KIELER Execution Manager Use Case: Ptolemy Use Case: Model Railway Part I: Model Execution in Eclipse Eclipse Summit 2009 Model Execution in Eclipse 2 / 33
  3. 3. Introduction KIELER Execution Manager Motivation Use Case: Ptolemy Overview Use Case: Model Railway Motivation EMF and GMF are great frameworks for modeling in Eclipse Model implementations, model and diagram editors, ... Modeling: 1. Structural models E.g., class diagrams, component diagrams, ... 2. Behavioral models E.g., flow charts, state machines, data flow models, ... Eclipse Summit 2009 Model Execution in Eclipse 3 / 33
  4. 4. Introduction KIELER Execution Manager Motivation Use Case: Ptolemy Overview Use Case: Model Railway Motivation (cont’d) System models are virtual as opposed to physical systems System models Generate code or documentation System analysis and verification Simulation runs ... Idea: Flexible definition of semantics and swapping out of simulation computation Solution proposed: KIELER Execution Manager Eclipse Summit 2009 Model Execution in Eclipse 4 / 33
  5. 5. Introduction KIELER Execution Manager Motivation Use Case: Ptolemy Overview Use Case: Model Railway Overview KIELER Execution Manager Use case: Ptolemy M2M transformation Simulation engine Use case: Model Railway Installation Railway Controller DSL SimpleRailCtrl editor (DEMO) Summary Eclipse Summit 2009 Model Execution in Eclipse 5 / 33
  6. 6. Introduction DataComponents KIELER Execution Manager GUI And Threads Use Case: Ptolemy Interface Use Case: Model Railway KIEM Components Eclipse Summit 2009 Model Execution in Eclipse 6 / 33
  7. 7. Introduction DataComponents KIELER Execution Manager GUI And Threads Use Case: Ptolemy Interface Use Case: Model Railway KIEM GUI and Threads DataObserver vs. DataProducer Scheduling & DataPool Properties Execution Buttons Master Eclipse Summit 2009 Model Execution in Eclipse 7 / 33
  8. 8. Introduction DataComponents KIELER Execution Manager GUI And Threads Use Case: Ptolemy Interface Use Case: Model Railway Simple Interface 1 public interface IDataComponent { 2 3 public void initialize() throws KiemInitializationException; 4 5 public void wrapup() throws KiemInitializationException; 6 7 public boolean isProducer(); 8 9 public boolean isObserver(); 10 11 public JSONObject step(JSONObject jSONObject) 12 throws KiemExecutionException; 13 14 } Eclipse Summit 2009 Model Execution in Eclipse 8 / 33
  9. 9. Introduction DataComponents KIELER Execution Manager GUI And Threads Use Case: Ptolemy Interface Use Case: Model Railway Flexible Extensions 1 public abstract class DataComponent implements IDataComponent, 2 IExecutableExtension { 3 4 public boolean isMultiInstantiable() {return false;} 5 6 public String[] provideFilterKeys() {return null;} 7 8 public KiemProperty[] provideProperties() {return null;} 9 10 public void checkProperties(KiemProperty[] properties) 11 throws KiemPropertyException {} 12 13 public String[] provideInterfaceKeys() {return null;} 14 15 public boolean isHistoryObserver() {return false;} 16 17 public boolean isDeltaObserver() {return false;} 18 19 public boolean isMaster() {return false;} 20 21 } Eclipse Summit 2009 Model Execution in Eclipse 9 / 33
  10. 10. Introduction KIELER Execution Manager M2M Transformation Use Case: Ptolemy Simulation Engine Use Case: Model Railway Overview KIELER Execution Manager Use case: Ptolemy M2M transformation Simulation engine Use case: Model Railway Installation Railway Controller DSL SimpleRailCtrl editor (DEMO) Summary Eclipse Summit 2009 Model Execution in Eclipse 10 / 33
  11. 11. Introduction KIELER Execution Manager M2M Transformation Use Case: Ptolemy Simulation Engine Use Case: Model Railway What is Ptolemy? The Ptolemy project studies heterogeneous modeling, ” simulation, and design of concurrent systems.“ Introduction to Ptolemy II, UC Berkeley Executable models to describe behavior of reactive systems Set of components interacting under a model of computation → Actor-Oriented Design Eclipse Summit 2009 Model Execution in Eclipse 11 / 33
  12. 12. Introduction KIELER Execution Manager M2M Transformation Use Case: Ptolemy Simulation Engine Use Case: Model Railway Ptolemy EMF Model Ptolemy models can be executable DTD of the Ptolemy XML representation (MOML) Acquire EMF model M2M transformation Execute Ptolemy models Back mapping of data/states Eclipse Summit 2009 Model Execution in Eclipse 12 / 33
  13. 13. Introduction KIELER Execution Manager M2M Transformation Use Case: Ptolemy Simulation Engine Use Case: Model Railway Simulation with Ptolemy Eclipse Summit 2009 Model Execution in Eclipse 13 / 33
  14. 14. Introduction Installation KIELER Execution Manager Railway Controller DSL Use Case: Ptolemy SimpleRailCtrl Editor Use Case: Model Railway Overview KIELER Execution Manager Use case: Ptolemy M2M transformation Simulation engine Use case: Model Railway Installation Railway Controller DSL SimpleRailCtrl editor (DEMO) Summary Eclipse Summit 2009 Model Execution in Eclipse 14 / 33
  15. 15. Introduction Installation KIELER Execution Manager Railway Controller DSL Use Case: Ptolemy SimpleRailCtrl Editor Use Case: Model Railway Installation Standard model railway equipment combined with Over 200 sensors and actuators Controlled by distributed computer system Eclipse Summit 2009 Model Execution in Eclipse 15 / 33
  16. 16. Introduction Installation KIELER Execution Manager Railway Controller DSL Use Case: Ptolemy SimpleRailCtrl Editor Use Case: Model Railway Track Layout Eclipse Summit 2009 Model Execution in Eclipse 16 / 33
  17. 17. Introduction Installation KIELER Execution Manager Railway Controller DSL Use Case: Ptolemy SimpleRailCtrl Editor Use Case: Model Railway Train Movement Several track segments individually controlled Computers get sensor information (instantaneous train positions) and control voltage ⇒ Actions: SetSpeed, SetPoint ⇒ Trigger: EventContact, EventTimeout Eclipse Summit 2009 Model Execution in Eclipse 17 / 33
  18. 18. Introduction Installation KIELER Execution Manager Railway Controller DSL Use Case: Ptolemy SimpleRailCtrl Editor Use Case: Model Railway EMF Meta Model Eclipse Summit 2009 Model Execution in Eclipse 18 / 33
  19. 19. Introduction Installation KIELER Execution Manager Railway Controller DSL Use Case: Ptolemy SimpleRailCtrl Editor Use Case: Model Railway Generated GMF Editor Eclipse Summit 2009 Model Execution in Eclipse 19 / 33
  20. 20. Introduction Installation KIELER Execution Manager Railway Controller DSL Use Case: Ptolemy SimpleRailCtrl Editor Use Case: Model Railway Eclipse Model Execution Demo LIVE DEMO Eclipse Summit 2009 Model Execution in Eclipse 20 / 33
  21. 21. Introduction KIELER Execution Manager Summary Use Case: Ptolemy To Go Further Use Case: Model Railway Summary DSLs in Eclipse represented by EMF models Often only implicit execution semantics! Ptolemy models can be executable Xtend M2M transformation helps making semantics explicit Other simulator DataComponents imaginable KIELER Execution Manager seamlessly integrates execution into the Eclipse RCP Eclipse Summit 2009 Model Execution in Eclipse 21 / 33
  22. 22. Introduction KIELER Execution Manager Summary Use Case: Ptolemy To Go Further Use Case: Model Railway To Go Further UC B ERKELEY, EECS D EPT. Ptolemy webpage. http://ptolemy.eecs.berkeley.edu/. UNI K IEL , R EAL -T IME AND E MBEDDED S YSTEMS GROUP. KIELER webpage. http://www.informatik.uni-kiel.de/en/rtsys/kieler/. Eclipse Summit 2009 Model Execution in Eclipse 22 / 33
  23. 23. Introduction The Interface The Background Part II: Meta Layout of Graphical Models Eclipse Summit 2009 Meta Layout of Graphical Models 23 / 33
  24. 24. Introduction Automatic Layout in GMF The Interface KIELER Meta Layout The Background Automatic Layout in GMF GMF supports automatic layout... ...but is not very flexible No selection of different layout algorithms No customization of layout options No deep layout of compound structures Eclipse Summit 2009 Meta Layout of Graphical Models 24 / 33
  25. 25. Introduction Automatic Layout in GMF The Interface KIELER Meta Layout The Background KIELER Meta Layout Meta Layout: Allow fully flexible automatic diagram layout Contribute new layout algorithms using extension points Customize layout options in the properties view Layout compound structures recursively Layout different parts of a diagram with different options, or even with different layout algorithms Development of special layout algorithms, e.g. for data flow diagrams Eclipse Summit 2009 Meta Layout of Graphical Models 25 / 33
  26. 26. Layout Providers Introduction Custom Layout Options The Interface Compound Structures The Background Meta Layout Layout Providers Extension points are used to define diagram types state machine, class diagram, etc. assign diagram types and layout options to specific parts of a GMF diagram e.g. assign the “class diagram” type to the diagram edit part of a class diagram editor contribute new layout algorithms call these contributions layout providers define which diagram types are supported by the layout provider define new layout options and specify which options are understood by a layout provider Eclipse Summit 2009 Meta Layout of Graphical Models 26 / 33
  27. 27. Layout Providers Introduction Custom Layout Options The Interface Compound Structures The Background Meta Layout Custom Layout Options To be implemented soon... Eclipse Summit 2009 Meta Layout of Graphical Models 27 / 33
  28. 28. Layout Providers Introduction Custom Layout Options The Interface Compound Structures The Background Meta Layout Compound Structures Apply layout providers recursively Eclipse Summit 2009 Meta Layout of Graphical Models 28 / 33
  29. 29. Layout Providers Introduction Custom Layout Options The Interface Compound Structures The Background Meta Layout Meta Layout Live Demo... Eclipse Summit 2009 Meta Layout of Graphical Models 29 / 33
  30. 30. Introduction Diagram Layout The Interface Data Flow Diagrams The Background Diagram Layout Layout providers work on an internal graph structure generated with EMF Need to map the contents of a diagram to the internal structure and back Done by Layout Managers using the GEF command / request pattern Currently only a layout manager for GMF is implemented Analyzes the edit part structure at runtime Recursively go into the contents of an edit part to explore compound structures Extension to other diagram editor generation frameworks is possible Eclipse Summit 2009 Meta Layout of Graphical Models 30 / 33
  31. 31. Introduction Diagram Layout The Interface Data Flow Diagrams The Background Data Flow Diagrams Operators exchange data through ports Layout algorithms must respect these ports when routing connections Eclipse Summit 2009 Meta Layout of Graphical Models 31 / 33
  32. 32. Introduction Diagram Layout The Interface Data Flow Diagrams The Background Data Flow Diagrams: Special Algorithm Developed a special algorithm to layout data flow diagrams Internal graph structure supports ports Integrated in the KIELER Meta Layout Also available as stand-alone library, successfully applied to Ptolemy Eclipse Summit 2009 Meta Layout of Graphical Models 32 / 33
  33. 33. Introduction The Interface Summary The Background Summary KIELER Meta Layout provides flexible automatic diagram layout Customize layout algorithms and layout options Current implementation is able to layout all GMF diagrams Implemented a special layout algorithm for data flow diagrams Eclipse Summit 2009 Meta Layout of Graphical Models 33 / 33

×