18
1 Programmatic Muddle Management D. Kolovos, N. Matragkas, H. Rodriguez, R. Paige Department of Computer Science University of York

Programmatic Muddle Management

Embed Size (px)

DESCRIPTION

Talk at eXtreme Modelling workshop co-located with MoDELS 2013.

Citation preview

Page 1: Programmatic Muddle Management

1

Programmatic Muddle Management

D. Kolovos, N. Matragkas,

H. Rodriguez, R. Paige Department of Computer Science

University of York

Page 2: Programmatic Muddle Management

2 Challenge

Design a DSL with the help of a

domain expert

Page 3: Programmatic Muddle Management

3 Domain Expert vs. EMF* * or any similar 3-level metamodelling architecture

Page 4: Programmatic Muddle Management

4 Domain Expert vs. EMF

Page 5: Programmatic Muddle Management

5 Domain Expert vs. EMF

Domain Expert EMF

Page 6: Programmatic Muddle Management

6 Domain Expert vs. EMF

Page 7: Programmatic Muddle Management

7 Validation

• The diagram looks OK – but is it?

• Write a program against it!

– e.g. a transformation, simulator, code

generator

• Useful for evaluating the completeness of the underlying DSL

– Concepts, relationships, structure

• ... but all we have is a drawing

Page 8: Programmatic Muddle Management

8 Solution #1

1. Draw the diagram using a GraphML-compliant tool (e.g. yEd)

2. Script the XML representation of the diagram

Page 9: Programmatic Muddle Management

9

Too low level

Page 10: Programmatic Muddle Management

10 Solution #2

1. Draw the diagram using a GraphML-compliant tool (e.g. Dia/yEd)

2. Draw a separate legend diagram

3. Export the diagram as a textual fragment

4. Annotate the fragment 5. Derive an Ecore

metamodel

6. Transform the diagram to a conforming EMF model

7. Use your favourite EMF-compliant model management languages

Page 11: Programmatic Muddle Management

11 In this work

1. Draw a diagram using GraphML

2. Annotate the diagram

3. Write model management programs against your diagram as if it was a real model using

Page 12: Programmatic Muddle Management

12

Demo

Page 13: Programmatic Muddle Management

13 How it works (1/2)

• The annotated diagram is translated to an intermediate EMF muddle behind the scenes

Page 14: Programmatic Muddle Management

14 Finding all Actions

• Ecore-based query – MuddleElement.all.

select(me|me.type.name = “Action”)

Page 15: Programmatic Muddle Management

15 How it works (2/2)

• The muddle is accessed through a specialised Epsilon Model Connectivity driver

Page 16: Programmatic Muddle Management

16 Finding all Actions

• Muddle driver – Action.all

Page 17: Programmatic Muddle Management

17 Summary

• Presented an approach for programmatic management of annotated GraphML diagrams

– No need to extract an Ecore metamodel /

conforming EMF model first

• Enables additional validation at early stages of the language design process