SlideShare une entreprise Scribd logo
1  sur  33
Télécharger pour lire hors ligne
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
Introduction
                        The Interface
                      The Background




                 Part II: Meta Layout of
                   Graphical Models




Eclipse Summit 2009                      Meta Layout of Graphical Models   23 / 33
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
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
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
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
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
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
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
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
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
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

Contenu connexe

Similaire à Model Execution and Meta Layout

UML with Action Semantics
UML with Action SemanticsUML with Action Semantics
UML with Action Semantics
elliando dias
 
Rapid Performance Modeling by transforming Use Case Maps to Palladio Componen...
Rapid Performance Modeling by transforming Use Case Maps to Palladio Componen...Rapid Performance Modeling by transforming Use Case Maps to Palladio Componen...
Rapid Performance Modeling by transforming Use Case Maps to Palladio Componen...
Heiko Koziolek
 
CIM to Modelica Factory - Automated Equation-Based Cyber-Physical Power Syste...
CIM to Modelica Factory - Automated Equation-Based Cyber-Physical Power Syste...CIM to Modelica Factory - Automated Equation-Based Cyber-Physical Power Syste...
CIM to Modelica Factory - Automated Equation-Based Cyber-Physical Power Syste...
Luigi Vanfretti
 
Virtual EMF - Standard talk at EclipseCon Europe 2011
Virtual EMF - Standard talk at EclipseCon Europe 2011Virtual EMF - Standard talk at EclipseCon Europe 2011
Virtual EMF - Standard talk at EclipseCon Europe 2011
Hugo Bruneliere
 
JCR Mangement - Eclipse Summit 2008
JCR Mangement - Eclipse Summit 2008JCR Mangement - Eclipse Summit 2008
JCR Mangement - Eclipse Summit 2008
inovex GmbH
 
Verilog Ams Used In Top Down Methodology For Wireless Integrated Circuits
Verilog Ams Used In Top Down Methodology For Wireless Integrated CircuitsVerilog Ams Used In Top Down Methodology For Wireless Integrated Circuits
Verilog Ams Used In Top Down Methodology For Wireless Integrated Circuits
Régis SANTONJA
 

Similaire à Model Execution and Meta Layout (20)

RT-lab based real-time simulation of flywheel energy storage system associate...
RT-lab based real-time simulation of flywheel energy storage system associate...RT-lab based real-time simulation of flywheel energy storage system associate...
RT-lab based real-time simulation of flywheel energy storage system associate...
 
UML with Action Semantics
UML with Action SemanticsUML with Action Semantics
UML with Action Semantics
 
SED-ML Presentation
SED-ML PresentationSED-ML Presentation
SED-ML Presentation
 
xUMLFinalPresentation.ppt
xUMLFinalPresentation.pptxUMLFinalPresentation.ppt
xUMLFinalPresentation.ppt
 
60
6060
60
 
Model Driven Development With Emf And Eclipse Link
Model Driven Development With Emf And Eclipse LinkModel Driven Development With Emf And Eclipse Link
Model Driven Development With Emf And Eclipse Link
 
What's New in MDT?
What's New in MDT?What's New in MDT?
What's New in MDT?
 
Rapid Performance Modeling by transforming Use Case Maps to Palladio Componen...
Rapid Performance Modeling by transforming Use Case Maps to Palladio Componen...Rapid Performance Modeling by transforming Use Case Maps to Palladio Componen...
Rapid Performance Modeling by transforming Use Case Maps to Palladio Componen...
 
Graphical Model Transformation Framework
Graphical Model Transformation FrameworkGraphical Model Transformation Framework
Graphical Model Transformation Framework
 
2011 07-27 ecoop innovation network
2011 07-27 ecoop innovation network2011 07-27 ecoop innovation network
2011 07-27 ecoop innovation network
 
Data Models at Eclipse
Data Models at EclipseData Models at Eclipse
Data Models at Eclipse
 
IncQuery gets Sirius: faster and better diagrams
IncQuery gets Sirius: faster and better diagramsIncQuery gets Sirius: faster and better diagrams
IncQuery gets Sirius: faster and better diagrams
 
CIM to Modelica Factory - Automated Equation-Based Cyber-Physical Power Syste...
CIM to Modelica Factory - Automated Equation-Based Cyber-Physical Power Syste...CIM to Modelica Factory - Automated Equation-Based Cyber-Physical Power Syste...
CIM to Modelica Factory - Automated Equation-Based Cyber-Physical Power Syste...
 
Pretzel: optimized Machine Learning framework for low-latency and high throu...
Pretzel: optimized Machine Learning framework for  low-latency and high throu...Pretzel: optimized Machine Learning framework for  low-latency and high throu...
Pretzel: optimized Machine Learning framework for low-latency and high throu...
 
Virtual EMF - Standard talk at EclipseCon Europe 2011
Virtual EMF - Standard talk at EclipseCon Europe 2011Virtual EMF - Standard talk at EclipseCon Europe 2011
Virtual EMF - Standard talk at EclipseCon Europe 2011
 
JCR Mangement - Eclipse Summit 2008
JCR Mangement - Eclipse Summit 2008JCR Mangement - Eclipse Summit 2008
JCR Mangement - Eclipse Summit 2008
 
Eclipse Summit 2008 Jcrm Demo V1.4
Eclipse Summit 2008 Jcrm Demo V1.4Eclipse Summit 2008 Jcrm Demo V1.4
Eclipse Summit 2008 Jcrm Demo V1.4
 
OCL - The Bigger Picture
OCL - The Bigger PictureOCL - The Bigger Picture
OCL - The Bigger Picture
 
QVT & MTL In Eclipse
QVT & MTL In EclipseQVT & MTL In Eclipse
QVT & MTL In Eclipse
 
Verilog Ams Used In Top Down Methodology For Wireless Integrated Circuits
Verilog Ams Used In Top Down Methodology For Wireless Integrated CircuitsVerilog Ams Used In Top Down Methodology For Wireless Integrated Circuits
Verilog Ams Used In Top Down Methodology For Wireless Integrated Circuits
 

Dernier

Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
ZurliaSoop
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
heathfieldcps1
 
Salient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsSalient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functions
KarakKing
 

Dernier (20)

Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
 
Fostering Friendships - Enhancing Social Bonds in the Classroom
Fostering Friendships - Enhancing Social Bonds  in the ClassroomFostering Friendships - Enhancing Social Bonds  in the Classroom
Fostering Friendships - Enhancing Social Bonds in the Classroom
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptx
 
Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptx
 
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 
Graduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - EnglishGraduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - English
 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and Modifications
 
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdfUGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
 
Making communications land - Are they received and understood as intended? we...
Making communications land - Are they received and understood as intended? we...Making communications land - Are they received and understood as intended? we...
Making communications land - Are they received and understood as intended? we...
 
Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024
 
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptxSKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
 
Micro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfMicro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdf
 
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17  How to Extend Models Using Mixin ClassesMixin Classes in Odoo 17  How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
 
SOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning PresentationSOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning Presentation
 
Unit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxUnit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptx
 
FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
 
Salient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsSalient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functions
 
Single or Multiple melodic lines structure
Single or Multiple melodic lines structureSingle or Multiple melodic lines structure
Single or Multiple melodic lines structure
 

Model Execution and Meta Layout

  • 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. 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. 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. 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. 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. 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. 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. 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. 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. 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. 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. 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. 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. 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. 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. 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. 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. 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. 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. 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. 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. 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. Introduction The Interface The Background Part II: Meta Layout of Graphical Models Eclipse Summit 2009 Meta Layout of Graphical Models 23 / 33
  • 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. 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. 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. 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. 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. 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. 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. 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. 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. 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