22
POOSL IDE (http://poosl.esi.nl/) Koen Staal and Arjan Mooij SiriusCon, 15 th November 2016 Integrating Textual and Graphical Editing

SiriusCon2016 - Integrating Textual and Graphical Editing in the POOSL IDE

  • Upload
    obeo

  • View
    226

  • Download
    2

Embed Size (px)

Citation preview

POOSL IDE (http://poosl.esi.nl/)

Koen Staal and Arjan Mooij

SiriusCon, 15th November 2016

Integrating Textual and Graphical Editing

15th November 2016 Integrating Textual and Graphical Editing © 2016 Embedded Systems Innovation by TNO

POOSL IDE (http://poosl.esi.nl/)

2

POOSL background

• Parallel Object Oriented Specification Language (POOSL) - Graphical and textual syntax

- Expressive, industrially-proven modelling language with formal semantics

- Describe structure and concurrent, real-time and stochastic behavior

• Eindhoven University of Technology - Original development of the language

- (Smalltalk based POOSL editor and simulator)

- C++ based POOSL simulator

• Embedded Systems Innovation by TNO - Successful applications in the high-tech industry

- Eclipse based POOSL IDE (using the C++ based simulator)

15th November 2016 Integrating Textual and Graphical Editing © 2016 Embedded Systems Innovation by TNO

POOSL IDE (http://poosl.esi.nl/)

3

POOSL: Architecture

• Program-like text

• UML-like graphical diagrams - Class diagram

- Composite structure diagram

15th November 2016 Integrating Textual and Graphical Editing © 2016 Embedded Systems Innovation by TNO

POOSL IDE (http://poosl.esi.nl/)

4

POOSL: Behavior

• Program-like text

• UML-like graphical diagrams - Class diagram

- Composite structure diagram

Validation for early fault detection: • Errors:

• Cyclic relations (inheritance, containment) • …

• Warnings: • Static type-checking (partial) • Message mismatch per channel • …

15th November 2016 Integrating Textual and Graphical Editing © 2016 Embedded Systems Innovation by TNO

POOSL IDE (http://poosl.esi.nl/)

5

Application: Architecture/requirements validation

(physical views) (functional views)

15th November 2016 Integrating Textual and Graphical Editing © 2016 Embedded Systems Innovation by TNO

POOSL IDE (http://poosl.esi.nl/)

6

Application: Performance analysis of systems

TRACE (for Gantt charts)

(http://trace.esi.nl/)

15th November 2016 Integrating Textual and Graphical Editing © 2016 Embedded Systems Innovation by TNO

POOSL IDE (http://poosl.esi.nl/)

7

Implementation of POOSL IDE

15th November 2016 Integrating Textual and Graphical Editing © 2016 Embedded Systems Innovation by TNO

POOSL IDE (http://poosl.esi.nl/)

8

Implementation of POOSL IDE

• Used Eclipse technologies: - EMF internal model and indexer

- Xtext textual editors and validators

- Sirius graphical editors and viewers

- Launch Framework interactive debugger

• Integration combines the strengths of the different syntaxes: - Textual syntax: leading artifacts, editing of all model details

- Graphical syntax: optional views, overview and model creation

• Next topics: - Tension between textual, graphical and EMF

- Integration of editing and dynamic overlays

15th November 2016 Integrating Textual and Graphical Editing © 2016 Embedded Systems Innovation by TNO

POOSL IDE (http://poosl.esi.nl/)

9

Drawing implicit elements

15th November 2016 Integrating Textual and Graphical Editing © 2016 Embedded Systems Innovation by TNO

POOSL IDE (http://poosl.esi.nl/)

10

Drawing implicit elements

Note: more than one Instance of the same InstantiableClass

15th November 2016 Integrating Textual and Graphical Editing © 2016 Embedded Systems Innovation by TNO

POOSL IDE (http://poosl.esi.nl/)

11

Drawing implicit elements

Note: more than one Instance of the same InstantiableClass

15th November 2016 Integrating Textual and Graphical Editing © 2016 Embedded Systems Innovation by TNO

POOSL IDE (http://poosl.esi.nl/)

12

Manage representations

15th November 2016 Integrating Textual and Graphical Editing © 2016 Embedded Systems Innovation by TNO

POOSL IDE (http://poosl.esi.nl/)

13

Sirius Content Management

• Inside Project Explorer

Hide validation icons from Xtext validation

Currently we disable “Sirius Content Management” - But we would like the possibility to manage representations…

Manage representations Expose EMF internals to textual users

15th November 2016 Integrating Textual and Graphical Editing © 2016 Embedded Systems Innovation by TNO

POOSL IDE (http://poosl.esi.nl/)

14

Navigation

• Opening a model: - Double-click on the textual file custom window to choose editor

• Navigate between different representation of elements (custom)

• Navigate via references (<F3>, <CTRL>-<click>, <double-click>)

15th November 2016 Integrating Textual and Graphical Editing © 2016 Embedded Systems Innovation by TNO

POOSL IDE (http://poosl.esi.nl/)

15

Problems with references

15th November 2016 Integrating Textual and Graphical Editing © 2016 Embedded Systems Innovation by TNO

POOSL IDE (http://poosl.esi.nl/)

16

Problems with references

• Deleting a referred element: - Textual: validation will indicate broken references

- Graphical: all references must explicitly be removed

• Get name of referred element without accessing the element: E.g., for displaying types of variables and parameters in a class diagram

Aim for scalability based on modular files, indexer, and on-demand loading

- Textual: use parse tree (NodeModel)

- Graphical: missing information (textual parse tree is not reliable)

15th November 2016 Integrating Textual and Graphical Editing © 2016 Embedded Systems Innovation by TNO

POOSL IDE (http://poosl.esi.nl/)

17

Problems with references

• Encoding of a reference to a target element: - Name of the target element

• Textual view on the model [stored on disk] [visible by user]

• Parse tree (Xtext node model)

- URI of the target element

• Model (Ecore)

• Sirius representations.aird [stored on disk]

- Arrow to a graphical view of the element

• Graphical view on the model [visible by user]

We have eliminated all references - Name approach feels natural, but is incompatible with URI / Arrow

- Custom implementation of navigate, rename, etc.

15th November 2016 Integrating Textual and Graphical Editing © 2016 Embedded Systems Innovation by TNO

POOSL IDE (http://poosl.esi.nl/)

18

More problems with references

• Rename/reorder elements

• Rename/move/copy files/directories

- Textual: mostly works out of the box

- Graphical: diagrams loose track of the related model elements

• Target element URI in EMF based on: - #Index (default): insensitive to rename, sensitive to reorder

- #Name (custom): sensitive to rename, insensitive to reorder

• Suggestions are very welcome!

15th November 2016 Integrating Textual and Graphical Editing © 2016 Embedded Systems Innovation by TNO

POOSL IDE (http://poosl.esi.nl/)

19

Graphical diagrams and the Launch Framework

15th November 2016 Integrating Textual and Graphical Editing © 2016 Embedded Systems Innovation by TNO

POOSL IDE (http://poosl.esi.nl/)

20

Graphical diagrams and the Launch Framework

Not based on Sirius Based on Sirius

Diagrams are modified during (high-speed) execution

15th November 2016 Integrating Textual and Graphical Editing © 2016 Embedded Systems Innovation by TNO

POOSL IDE (http://poosl.esi.nl/)

21

Graphical diagrams and the Launch Framework

• Communication Diagram = Static structure + Dynamic overlay

• Static structure: Copied from a Composite Structure Diagram - Linked to the same text file

- Locked (not modifiable) during execution

- Closed in case of modifications in the underlying model

• Dynamic overlay: Updated during execution - Slows down the simulation

- GUI refresh rate is low

• But still useful for the user

- Add textual elements

• Message content and counters

- Connections:

• Highlighting and arrowheads

15th November 2016 Integrating Textual and Graphical Editing © 2016 Embedded Systems Innovation by TNO

POOSL IDE (http://poosl.esi.nl/)

22

Summary

• Integrating textual and graphical editing - Basic integration works out-of-the-box

- Tension between textual, graphical and EMF

• Drawing implicit elements

• Manage representations

• Problems with references

- Integration of editing and dynamic overlays