Composition and Interoperability for External Domain-Specific - - PowerPoint PPT Presentation

composition and interoperability for external domain
SMART_READER_LITE
LIVE PREVIEW

Composition and Interoperability for External Domain-Specific - - PowerPoint PPT Presentation

Composition and Interoperability for External Domain-Specific Language Engineering Thomas Degueule PhD Defense December 12, 2016 Pr. Mark van den Brand, Eindhoven University of Technology Reviewer Reviewer Pr. Richard Paige, University of


slide-1
SLIDE 1

Composition and Interoperability for External Domain-Specific Language Engineering

Thomas Degueule PhD Defense December 12, 2016

  • Pr. Mark van den Brand, Eindhoven University of Technology
  • Pr. Richard Paige, University of York
  • Pr. Sandrine Blazy, University of Rennes
  • Pr. Ralf Lämmel, University of Koblenz-Landau
  • Pr. Bernhard Rumpe, RWTH Aachen University
  • Pr. Olivier Barais, University of Rennes
  • Dr. Arnaud Blouin, INSA Rennes
  • Dr. Benoit Combemale, University of Rennes

Reviewer Reviewer Examiner Examiner Examiner Advisor Advisor Advisor

slide-2
SLIDE 2

Composition and Interoperability for External DSL Engineering 1 / 40

Complex Software-Intensive Systems

Software intensive systems

▪ Multiple concerns & stakeholders ▪ Multi-engineering approach ▪ Software as an integration layer

slide-3
SLIDE 3

Composition and Interoperability for External DSL Engineering 2 / 40

Multiple Modeling Languages

« Perhaps surprisingly, the majority of MDE examples in our study followed domain-specific modeling paradigms »

The State of Practice in Model-Driven Engineering

  • J. Whittle, J. Hutchinson, and M. Rouncefield

In IEEE Software, 2014

slide-4
SLIDE 4

Composition and Interoperability for External DSL Engineering 3 / 40

▪ Abstractions, notations, and tools specifically tailored to the domain ▪ Easier to understand, reason about, and maintain ▪ External DSLs

  • Carry their own syntax, representation, semantics, environment

Domain-Specific Languages

vs

slide-5
SLIDE 5

Composition and Interoperability for External DSL Engineering 4 / 40

slide-6
SLIDE 6

Composition and Interoperability for External DSL Engineering 5 / 40 UML vs. Classical vs. Rhapsody Statecharts: Not All Models are Created Equal Michelle L. Crane, Jürgen Dingel In Software & Systems Modeling (SoSyM), 2007

slide-7
SLIDE 7

Composition and Interoperability for External DSL Engineering 6 / 40

slide-8
SLIDE 8

Composition and Interoperability for External DSL Engineering 7 / 40

▪ Reduce development costs ▪ Avoid engineering DSLs from scratch ▪ Reuse & customize existing DSLs

SLE Challenges

▪ Foster model sharing and collaboration ▪ Manipulate models in different environments ▪ Reuse tools and services

Language Composition Language Interoperability

slide-9
SLIDE 9

Composition and Interoperability for External DSL Engineering 8 / 40

State of the Art

a non-intrusive and tool-supported approach to composition and interoperability for SLE applicable to legacy DSLs DeLara’s concepts LISA MetaMod Spoofax MontiCore

slide-10
SLIDE 10

Composition and Interoperability for External DSL Engineering 9 / 40

Outline of the Contributions

slide-11
SLIDE 11

On Language Interfaces

Composition and Interoperability for External DSL Engineering

On Language Interfaces Thomas Degueule, Benoit Combemale and Jean-Marc Jézéquel In PAUSE: Present And Ulterior Software Engineering, 2017

  • Ed. Bertrand Meyer and Manuel Mazzara
slide-12
SLIDE 12

Composition and Interoperability for External DSL Engineering 10 / 40

On Language Interfaces – Flexible Modeling – Modular Development of DSLs – Melange

slide-13
SLIDE 13

Composition and Interoperability for External DSL Engineering 10 / 40

On Language Interfaces – Flexible Modeling – Modular Development of DSLs – Melange

slide-14
SLIDE 14

Composition and Interoperability for External DSL Engineering 10 / 40

On Language Interfaces – Flexible Modeling – Modular Development of DSLs – Melange

slide-15
SLIDE 15

Composition and Interoperability for External DSL Engineering 10 / 40

On Language Interfaces – Flexible Modeling – Modular Development of DSLs – Melange

slide-16
SLIDE 16

Variants or subsequent versions cannot leverage previous engineering efforts

Composition and Interoperability for External DSL Engineering 10 / 40

On Language Interfaces – Flexible Modeling – Modular Development of DSLs – Melange

slide-17
SLIDE 17

How to ensure interoperability between subsequent versions?

v2.4 v2.1

Composition and Interoperability for External DSL Engineering 10 / 40

On Language Interfaces – Flexible Modeling – Modular Development of DSLs – Melange

slide-18
SLIDE 18

How to foster model sharing between similar environments?

Composition and Interoperability for External DSL Engineering 10 / 40

On Language Interfaces – Flexible Modeling – Modular Development of DSLs – Melange

slide-19
SLIDE 19

Composition and Interoperability for External DSL Engineering 11 / 40

▪ Abstract over the intrinsic complexity of language implementations ▪ Expose meaningful information

  • Concerning an aspect of a language (e.g. abstract syntax)
  • For a given purpose (e.g. composition, coordination, analysis)
  • In an appropriate formalism (e.g. a metamodel, a control-flow graph)

▪ Provide a reasoning layer atop language implementations

Software Language Interfaces

Language interfaces in the wild: micro-grammars (Brown et al.), concepts (De Lara et al.), Microsoft LSP, etc.

«implements» Language Interfaces Language Implementations Tools & Transfos

On Language Interfaces – Flexible Modeling – Modular Development of DSLs – Melange

slide-20
SLIDE 20

Composition and Interoperability for External DSL Engineering 12 / 40

1. Ease the definition and reuse of services 2. Enable language coordination 3. Enable language composition ▪ A concrete application: language families

Software Language Interfaces

Leveraging Software Product Lines Engineering in the Development of External DSLs: A Systematic Literature Review David Méndez-Acuña, José A. Galindo, Thomas Degueule, Benoit Combemale and Benoit Baudry In Computer Languages, Systems and Structures (COMLAN), 2016

On Language Interfaces – Flexible Modeling – Modular Development of DSLs – Melange

slide-21
SLIDE 21

Safe Model Polymorphism for Flexible Modeling

Composition and Interoperability for External DSL Engineering

Safe Model Polymorphism for Flexible Modeling Thomas Degueule, Benoit Combemale, Arnaud Blouin, Olivier Barais and Jean-Marc Jézéquel In Computer Languages, Systems and Structures (COMLAN), 2016

slide-22
SLIDE 22

Composition and Interoperability for External DSL Engineering 13 / 40

▪ In MDE, a metamodel is the cornerstone artifact defining a DSL ▪ The conformance relation states

  • Which models are valid instances of a given DSL
  • How these models must be manipulated wrt. this DSL

Limits of the Conformance Relation

▪ Theoretical limitations (literature review)

1. Conformance is based on instantiation 2. Conformance is nominal 3. A model conforms to one and only one metamodel

On Language Interfaces – Flexible Modeling – Modular Development of DSLs – Melange

slide-23
SLIDE 23

Composition and Interoperability for External DSL Engineering 13 / 40

▪ In MDE, a metamodel is the cornerstone artifact defining a DSL ▪ The conformance relation states

  • Which models are valid instances of a given DSL
  • How these models must be manipulated wrt. this DSL

Limits of the Conformance Relation

▪ Analyze UML models publicly available on Github ▪ Conforming to the UML implementation of Eclipse ▪ 1651 models – UML2.2 to UML2.5 ▪ Force to bypass the conformance check ▪ Key findings

  • 7% of the models are valid wrt. only one version of UML
  • 83% of the models are valid wrt. every version of UML

On Language Interfaces – Flexible Modeling – Modular Development of DSLs – Melange

slide-24
SLIDE 24

Composition and Interoperability for External DSL Engineering 14 / 40

▪ Conformance relation ensures safe manipulation regardless of context ▪ But it hinders flexibility

Flexible Modeling beyond the Conformance Relation

On Language Interfaces – Flexible Modeling – Modular Development of DSLs – Melange

slide-25
SLIDE 25

Composition and Interoperability for External DSL Engineering 14 / 40

▪ Conformance relation ensures safe manipulation regardless of context ▪ But it hinders flexibility

Flexible Modeling beyond the Conformance Relation

On Language Interfaces – Flexible Modeling – Modular Development of DSLs – Melange

Model Polymorphism

slide-26
SLIDE 26

Composition and Interoperability for External DSL Engineering 15 / 40

▪ Model types as structural interfaces atop language implementations

Flexible Modeling beyond the Conformance Relation

@ Aspect ( cl assN am e = FSM ) cl ass Execut abl eFSM { St at e cur r ent def voi d execut e( ) { _sel f . st at es. f or Each } }

implements

▪ Manually written ▪ Inferred from a language ▪ Inferred from a footprint

On Language Interfaces – Flexible Modeling – Modular Development of DSLs – Melange

slide-27
SLIDE 27

Composition and Interoperability for External DSL Engineering 16 / 40

Model Subtyping

▪ States whether models typed by a given MT can be substituted to models typed by another MT ▪ Different subtyping relations [1]

  • Total isomorphic
  • Partial isomorphic
  • Total non-isomorphic
  • Partial non-isomorphic

▪ Up to behavioral substitutability [2] ▪ The choice of a subtyping relation vary with particular needs

[1] On model subyping, Guy et al., ECMFA, 2012 [2] Using model types to support contract-aware model substitutability, Sun et al., ECMFA, 2012

On Language Interfaces – Flexible Modeling – Modular Development of DSLs – Melange

slide-28
SLIDE 28

Composition and Interoperability for External DSL Engineering 17 / 40

▪ Model types defined explicitly or inferred from implementations ▪ Implementations relations defined explicitly or automatically inferred

  • Based on structural typing
  • Using the total isomorphic subtyping relation

▪ Simple renaming operator to align structurally dissimilar languages

Languages and Model Types in Melange

/ / Expl i ci t m

  • del t ype def i ni t i on

/ / e. g. a f oot pr i nt t hat capt ur es / / t he cont r act of a t r ansf or m at i on m

  • del t ype Fsm

M T { synt ax Fsm M

  • T. ecor e

} / / Language def i ni t i on l anguage G uar dFsm { synt ax G uar dFsm . ecor e w i t h Execut abl eFsm w i t h Execut abl eSt at e w i t h Execut abl eTr ansi t i on exact Type G uar dFsm M T } / / Expl i ci t i m pl em ent at i on l anguage O t her Fsm i m pl em ent s Fsm M T { r enam i ng

  • t her f sm

t o f sm } t r ansf or m at i on p- pr i nt ( Fsm M T m ) { val r oot = m . cont ent s. head m . st at es. f or Each[ s | pr i nt ( s) ] }

On Language Interfaces – Flexible Modeling – Modular Development of DSLs – Melange

slide-29
SLIDE 29

Composition and Interoperability for External DSL Engineering 18 / 40

Seamless Model Polymorphism

“How to fit type groups semantics, structural typing, and family polymorphism in a language (Java) and framework (EMF) that do not support any of them”

On Language Interfaces – Flexible Modeling – Modular Development of DSLs – Melange

slide-30
SLIDE 30

/ / Fl at st at e m achi ne com pl yi ng t o t he / / r un- t o- com pl et i on pol i cy, e. g. U M L/ R hapsody l anguage Fl at Fsm R t c { synt ax m et am

  • del s/ Fl at Fsm

. ecor e w i t h r t c. Execut abl eSt at eM achi ne w i t h r t c. Execut abl eSt at e exact Type Fl at Fsm R t cM T } / / H i er ar chi cal st at e m achi ne com pl yi ng / / t o t he si m ul t aneous event s pr ocessi ng / / pol i cy, e. g. C l assi cal st at echar t s l anguage H i er ar chi cal Fsm Si m ul t aneous { synt ax m et am

  • del s/ H

i er ar chi cal Fsm . ecor e w i t h si m ul t aneous. Execut abl eSt at eM achi ne w i t h si m ul t aneous. Execut abl eSt at e w i t h si m ul t aneous. Execut abl eTr ansi t i on exact Type H i er ar chi cal Fsm Si m ul t aneousM T } [ 6 m

  • r e om

i t t ed] 19 / 40

▪ 4 syntactic variations

  • Simple
  • Hierarchical
  • Timed
  • Timed-Hierarchical

▪ 2 semantic variations

  • Run-to-completion
  • Simultaneous processing

▪ 8 FSM language variants

Experiment: a Family of FSM Languages

UML vs Classical vs Rhapsody Statecharts: Not all Models are Created Equal Michelle L. Crane and Jürgen Dingel In Software & Systems Modeling (SoSyM), 2007

On Language Interfaces – Flexible Modeling – Modular Development of DSLs – Melange

slide-31
SLIDE 31

19 / 40

▪ 4 syntactic variations

  • Simple
  • Hierarchical
  • Timed
  • Timed-Hierarchical

▪ 2 semantic variations

  • Run-to-completion
  • Simultaneous processing

▪ 8 FSM language variants

Experiment: a Family of FSM Languages

UML vs Classical vs Rhapsody Statecharts: Not all Models are Created Equal Michelle L. Crane and Jürgen Dingel In Software & Systems Modeling (SoSyM), 2007

Subtyping relations amongst variants

On Language Interfaces – Flexible Modeling – Modular Development of DSLs – Melange

slide-32
SLIDE 32

Composition and Interoperability for External DSL Engineering 20 / 40

Experiment: a Family of FSM Languages

c

m

  • dul e Fl at t enFsm

; cr eat e O U T : Fl at Fsm f r om I N : C

  • m

posi t eFsm M T;

  • - C

r eat es a new Fl at Fsm r ul e SM 2SM { f r om sm 1 : C

  • m

posi t eFsm M T! St at eM achi ne t o sm 2 : Fl at Fsm ! St at eM achi ne }

  • - I ni t i al st at es of com

posi t e

  • - st at es becom

e r egul ar st at es r ul e I ni t i al 2St at e { f r om i s1 : C

  • m

posi t eFsm M T! I ni t i al St at e ( not i s1. par ent St at e. ocl I sU ndef i ned( ) ) t o i s2 : Fl at Fsm ! St at e( st at eM achi ne <- i s1. st at eM achi ne, nam e <- i s1. nam e) }

  • - R

esol ves a t r ansi t i on or i gi nat i ng f r om

  • - a com

posi t e st at e r ul e T2TB { f r om t 1: C

  • m

posi t eFsm M T! Tr ansi t i on, sr c : C

  • m

posi t eFsm M T! C

  • m

posi t eSt at e, t r g : C

  • m

posi t eFsm M T! St at e, c : C

  • m

posi t eFsm M T! St at e ( t 1. sour ce = sr c and t 1. t ar get = t r g and

  • c. par ent St at e = sr c and

not t r g. ocl I sTypeO f ( C

  • m

posi t eFsm M T! C

  • m

posi t eSt at e) ) t o t 2 : Fl at Fsm ! Tr ansi t i on ( nam e <- t 1. nam e, st at eM achi ne <- t 1. st at eM achi ne, sour ce <- c, t ar get <- t r g ) }

c

m

  • del t ype Fsm

M T uses : / / f sm m t ; m

  • del t ype Fsm

uses : / / f sm ; t r ansf or m at i on dum m yI nver t ( i n i nFsm : Fsm M T, out out Fsm : Fsm ) ; m ai n( ) { i nFsm . r oot O bj ect s( ) [ Fsm M T: : FSM ] - > m ap m apFSM ( ) ; } m appi ng Fsm M T: : FSM : : m apFSM ( ) : Fsm : : FSM {

  • w

nedSt at e : = sel f . ow nedSt at e - > m ap m apSt at e( ) ; i ni t i al St at e : = sel f . f i nal St at e - > f i r st ( ) . m ap m apSt at e( ) ; f i nal St at e : = sel f . i ni t i al St at e. m ap m apSt at e( ) ; } m appi ng Fsm M T: : St at e: : m apSt at e( ) : Fsm : : St at e { nam e : = sel f . nam e;

  • ut goi ngTr ansi t i on : =

sel f . i ncom i ngTr ansi t i on - > m ap m apTr ansi t i on( ) ; } m appi ng Fsm M T: : Tr ansi t i on: : m apTr ansi t i on( ) : Fsm : : Tr ansi t i on { i nput : = sel f . i nput ;

  • ut put : = sel f . out put ;

t ar get : = sel f . sour ce. m ap m apSt at e( ) ; }

TransfoFsm.qvto c

/ / D el egat e t he execut i on of t he st at e / / m achi ne " f sm " t o t he " execut e" m et hod / / of i t s oper at i onal sem ant i cs. publ i c voi d execut e( St at eM achi ne f sm , St r i ng i nput ) { / / D ynam i cal l y di spat ched on t he act ual / / l anguage i m pl em ent at i on of execut e( ) r oot . execut e( i nput ) ; } Li st <St r i ng> m

  • del s = new Ar r ayLi st <>( ) ;

m

  • del s. add(

" m el ange: / m

  • 1. f l at ?m

t =Fl at Fsm R t cM T" ) ; m

  • del s. add(

" m el ange: / m

  • 2. t i m

ed?m t =Fl at Fsm R t cM T" ) ; m

  • del s. add(

" m el ange: / m

  • 3. hi er ?m

t =Fl at Fsm R t cM T" ) ; m

  • del s. add(

" m el ange: / m

  • 4. t i m

edhi er ?m t =Fl at Fsm R t cM T" ) ; R esour ceSet r s = new R esour ceSet I m pl ( ) ; / / Load t he m

  • del poi nt ed by t he gi ven

/ / U R I , r et r i eve i t s r oot St at eM achi ne, / / and execut e i t f or ( St r i ng ur i : m

  • del s) {

R esour ce r es = r s. get R esour ce( ur i , t r ue) ; St at eM achi ne r oot = ( St at eM achi ne) r es. get C

  • nt ent s( ) . get ( 0) ;

execut e( r es, " { x; y; z; o; p; q} " ) ; }

ExecuteFsm.java

On Language Interfaces – Flexible Modeling – Modular Development of DSLs – Melange

slide-33
SLIDE 33

Modular & Reusable Development of DSLs

Composition and Interoperability for External DSL Engineering

Melange: A Meta-language for Modular and Reusable Development of DSLs Thomas Degueule, Benoit Combemale, Arnaud Blouin, Olivier Barais and Jean-Marc Jézéquel In Proceedings of the 8th International Conference on Software Language Engineering (SLE’15), 2015

slide-34
SLIDE 34

Composition and Interoperability for External DSL Engineering 21 / 40

▪ Existing DSLs can be reused when developing new ones

  • Reuse syntax, semantics, tools & services
  • Reuse is not enough, context matters!

▪ Finely tune the resulting DSLs

  • To comply with new requirements
  • Or the specificities of a new domain of application
  • e.g. restricting or extending expressiveness, specializing semantics...

Overview

An algebra of operators for assembling legacy DSLs and customizing them at a fine-grained level, while ensuring type groups consistency and tool reuse

On Language Interfaces – Flexible Modeling – Modular Development of DSLs – Melange

slide-35
SLIDE 35

Composition and Interoperability for External DSL Engineering 22 / 40

▪ A metamodel defines the AS

Hypothesis on Language Definition

On Language Interfaces – Flexible Modeling – Modular Development of DSLs – Melange

slide-36
SLIDE 36

Composition and Interoperability for External DSL Engineering 22 / 40

Hypothesis on Language Definition

▪ A metamodel defines the AS ▪ Sem consists of computation steps and runtime data

On Language Interfaces – Flexible Modeling – Modular Development of DSLs – Melange

slide-37
SLIDE 37

Composition and Interoperability for External DSL Engineering 22 / 40

Hypothesis on Language Definition

▪ Aspect-oriented modeling: Sem is woven directly in the AS ▪ Interpreter/visitor pattern

Mashup of Meta-languages and its Implementation in the Kermeta Language Workbench Jean-Marc Jézéquel, Benoit Combemale, Olivier Barais, Martin Monperrus and François Fouquet In Software & Systems Modeling (SoSyM), 2015

@ Aspect ( cl assN am e = B) cl ass Aspect B { i nt cur r ent def i nt exec( ) { _sel f . m yC

  • s. f or Each

} }

On Language Interfaces – Flexible Modeling – Modular Development of DSLs – Melange

slide-38
SLIDE 38

Composition and Interoperability for External DSL Engineering 23 / 40

Approach Overview

On Language Interfaces – Flexible Modeling – Modular Development of DSLs – Melange

slide-39
SLIDE 39

Composition and Interoperability for External DSL Engineering 23 / 40

Approach Overview

On Language Interfaces – Flexible Modeling – Modular Development of DSLs – Melange

slide-40
SLIDE 40

Composition and Interoperability for External DSL Engineering 23 / 40

Approach Overview

merge, slice, and inherits inspired from language composition taxonomies, e.g. Language Composition Untangled Sebastian Erdweg, Paolo G. Giarrusso, Tillmann Rendel In LDTA, 2012

On Language Interfaces – Flexible Modeling – Modular Development of DSLs – Melange

slide-41
SLIDE 41

Composition and Interoperability for External DSL Engineering 23 / 40

Approach Overview

On Language Interfaces – Flexible Modeling – Modular Development of DSLs – Melange

slide-42
SLIDE 42

Composition and Interoperability for External DSL Engineering 24 / 40

Language Definition

On Language Interfaces – Flexible Modeling – Modular Development of DSLs – Melange

slide-43
SLIDE 43

Composition and Interoperability for External DSL Engineering 25 / 40

Language Definition

l anguage Fsm { synt ax FSM . ecor e }

On Language Interfaces – Flexible Modeling – Modular Development of DSLs – Melange

slide-44
SLIDE 44

Composition and Interoperability for External DSL Engineering 25 / 40

Language Definition

l anguage Fsm { synt ax FSM . ecor e w i t h Execut abl eFsm w i t h Execut abl eSt at e w i t h Execut abl eTr ansi t i on }

  

On Language Interfaces – Flexible Modeling – Modular Development of DSLs – Melange

slide-45
SLIDE 45

Composition and Interoperability for External DSL Engineering 25 / 40

Model Types

l anguage Fsm { synt ax FSM . ecor e w i t h Execut abl eFsm w i t h Execut abl eSt at e w i t h Execut abl eTr ansi t i on exact Type Fsm M T }  On Language Interfaces – Flexible Modeling – Modular Development of DSLs – Melange

slide-46
SLIDE 46

Composition and Interoperability for External DSL Engineering 26 / 40

Syntax Merging

l anguage G uar dedFsm { synt ax FSM . ecor e w i t h Execut abl eFsm w i t h Execut abl eSt at e w i t h Execut abl eTr ansi t i on exact Type G uar dedFsm M T } On Language Interfaces – Flexible Modeling – Modular Development of DSLs – Melange

slide-47
SLIDE 47

Composition and Interoperability for External DSL Engineering 26 / 40

Syntax Merging

l anguage G uar dedFsm { synt ax FSM . ecor e synt ax G uar d. ecor e w i t h Execut abl eFsm w i t h Execut abl eSt at e w i t h Execut abl eTr ansi t i on exact Type G uar dedFsm M T }

On Language Interfaces – Flexible Modeling – Modular Development of DSLs – Melange

slide-48
SLIDE 48

Composition and Interoperability for External DSL Engineering 27 / 40

Semantics Weaving

l anguage G uar dedFsm { synt ax FSM . ecor e synt ax G uar d. ecor e w i t h Execut abl eFsm w i t h Execut abl eSt at e w i t h Execut abl eTr ansi t i on w i t h Eval uat eG uar d exact Type G uar dedFsm M T }

On Language Interfaces – Flexible Modeling – Modular Development of DSLs – Melange

slide-49
SLIDE 49

Composition and Interoperability for External DSL Engineering 27 / 40

Semantics Weaving

l anguage G uar dedFsm { synt ax FSM . ecor e synt ax G uar d. ecor e w i t h Execut abl eFsm w i t h Execut abl eSt at e w i t h Execut abl eTr ansi t i on w i t h Eval uat eG uar d w i t h O ver r i deTr ansi t i on exact Type G uar dedFsm M T }

On Language Interfaces – Flexible Modeling – Modular Development of DSLs – Melange

slide-50
SLIDE 50

Composition and Interoperability for External DSL Engineering 28 / 40

Language Merging

l anguage Bui l di ng { synt ax Bui l di ng. ecor e w i t h Si m ul at or Aspect . . . exact Type Bui l di ngM T } On Language Interfaces – Flexible Modeling – Modular Development of DSLs – Melange

slide-51
SLIDE 51

Composition and Interoperability for External DSL Engineering 28 / 40

Language Merging

l anguage Bui l di ng { synt ax Bui l di ng. ecor e w i t h Si m ul at or Aspect . . . m er ge Fsm exact Type Bui l di ngM T }

On Language Interfaces – Flexible Modeling – Modular Development of DSLs – Melange

slide-52
SLIDE 52

Composition and Interoperability for External DSL Engineering 28 / 40

Language Merging

l anguage Bui l di ng { synt ax Bui l di ng. ecor e w i t h Si m ul at or Aspect . . . m er ge Fsm w i t h G l ueD evi ceToFsm exact Type Bui l di ngM T }

On Language Interfaces – Flexible Modeling – Modular Development of DSLs – Melange

slide-53
SLIDE 53

Composition and Interoperability for External DSL Engineering 29 / 40

Language Inheritance

l anguage Ti m edFsm i nher i t s Fsm { exact Type Ti m edFsm M T } On Language Interfaces – Flexible Modeling – Modular Development of DSLs – Melange

slide-54
SLIDE 54

Composition and Interoperability for External DSL Engineering 29 / 40

Language Inheritance

l anguage Ti m edFsm i nher i t s Fsm { synt ax C l ocks. ecor e exact Type Ti m edFsm M T }

On Language Interfaces – Flexible Modeling – Modular Development of DSLs – Melange

slide-55
SLIDE 55

Composition and Interoperability for External DSL Engineering 29 / 40

Language Inheritance

l anguage Ti m edFsm i nher i t s Fsm { synt ax C l ocks. ecor e w i t h C l ockTi ck w i t h O ver r i deFsm w i t h O ver r i deTr ansi t i on exact Type Ti m edFsm M T }

  

On Language Interfaces – Flexible Modeling – Modular Development of DSLs – Melange

slide-56
SLIDE 56

Composition and Interoperability for External DSL Engineering 30 / 40

Language Slicing

l anguage Expr essi ons { synt ax Expr essi ons. ecor e w i t h Eval uat eBool ean w i t h Eval uat eI nt eger exact Type Expr essi onsM T }

Kompren: Modeling and Generating Model Slicers Arnaud Blouin, Benoit Combemale, Benoit Baudry and Olivier Beaudoux In Software & Systems Modeling (SoSyM), 2015

On Language Interfaces – Flexible Modeling – Modular Development of DSLs – Melange

slide-57
SLIDE 57

Composition and Interoperability for External DSL Engineering 30 / 40

Language Slicing

l anguage Expr essi ons { synt ax Expr essi ons. ecor e w i t h Eval uat eBool ean w i t h Eval uat eI nt eger exact Type Expr essi onsM T } l anguage Bool eanExpr essi ons { sl i ce Expr essi ons on [ Bool Expr ] exact Type Bool eanExpr essi onsM T }

Kompren: Modeling and Generating Model Slicers Arnaud Blouin, Benoit Combemale, Benoit Baudry and Olivier Beaudoux In Software & Systems Modeling (SoSyM), 2015

On Language Interfaces – Flexible Modeling – Modular Development of DSLs – Melange

slide-58
SLIDE 58

Composition and Interoperability for External DSL Engineering 31 / 40

Wrap-up

Language Composition Untangled Sebastian Erdweg, Paolo G. Giarrusso, Tillmann Rendel In LDTA, 2012

▪ Language extension with language inheritance ▪ Language unification with language merging ▪ Language restriction with language slicing ▪ Syntax merging and aspect weaving as fine-grained customization mechanisms

On Language Interfaces – Flexible Modeling – Modular Development of DSLs – Melange

slide-59
SLIDE 59

Composition and Interoperability for External DSL Engineering 32 / 40

Experiment: A Modeling Language for IoT

▪ Enable modeling the behavior of communicating sensors built on top of resource-constrained devices (e.g. Arduino, Raspberry Pi) ▪ Provide appropriate simulators to experiment different scenarios ▪ Objective: reuse existing DSLs whenever possible

On Language Interfaces – Flexible Modeling – Modular Development of DSLs – Melange

slide-60
SLIDE 60

Composition and Interoperability for External DSL Engineering 33 / 40

1. Model sensors’ interface

  • OMG Interface Description Language

2. Model sensors’ control flow (sketch)

  • UML’s Activity Diagram

3. Express sensors’ actions

  • Lua programming language

Requirements for the IoT Language

From Github From TTC’15 From Github

Companion webpage: http://melange-lang.org/sle15/

On Language Interfaces – Flexible Modeling – Modular Development of DSLs – Melange

slide-61
SLIDE 61

Composition and Interoperability for External DSL Engineering 34 / 40 l anguage I oT { synt ax I oT. ecor e sl i ce I dl

  • n [

O per at i onD ef , Pr i m i t i veD ef ] r enam i ng { i dl m m t o i ot } m er ge Lua r enam i ng { l ua t o i ot } m er ge Act i vi t yD i agr am r enam i ng { act i vi t ydi agr am t o i ot } w i t h i ot . gl ue. O paqueAct i onG l ue w i t h i ot . gl ue. O per at i onD ef G l ue } l anguage Act i vi t yD i agr am { synt ax Act i vi t yD i agr am . ecor e synt ax R unt i m eM

  • del . ecor e

w i t h ad. sem ant i cs. * } l anguage I D L { synt ax I D

  • L. ecor e

} l anguage Lua { synt ax

  • Lua. ecor e

w i t h l ua. sem ant i cs. * }

On Language Interfaces – Flexible Modeling – Modular Development of DSLs – Melange

slide-62
SLIDE 62

Composition and Interoperability for External DSL Engineering 35 / 40

▪ Full EMF compliance (e.g. integrated for free within the GEMOC studio) ▪ Reuse of tools & services between the base languages and the IoT lang ▪ Glue: ~30 LoC (mainly Lua – ActivityDiagram context translation)

The IoT Language in Melange

Reusing Legacy DSLs with Melange Thomas Degueule, Benoit Combemale, Arnaud Blouin, Olivier Barais In Proceedings of the 15th workshop on Domain-Specific Modeling (DSM’15), 2015

On Language Interfaces – Flexible Modeling – Modular Development of DSLs – Melange

slide-63
SLIDE 63

The Melange Language Workbench

Composition and Interoperability for External DSL Engineering

slide-64
SLIDE 64

Composition and Interoperability for External DSL Engineering 36 / 40

Syntax & Semantics Overview Inheritance, implementation, and subtyping relations Interfaces description Currently registered languages & interfaces

▪ Built atop Eclipse, EPL-1.0 license

▪ Seamlessly integrated with the EMF ecosystem ▪ ~30k Xtend LoC / 500k Java LoC ▪ 10 contributors, ~2000 commits

http://melange-lang.org

slide-65
SLIDE 65

Composition and Interoperability for External DSL Engineering 37 / 40

▪ ANR INS GEMOC [GEMOC Studio]

  • Assemble xDSMLs syntaxes and semantics
  • Provide a unified structural interface for tools
  • Examples: TFSM, RobotML, ArduinoML, SigPML, etc.

▪ LEOC Clarity [Capella Studio]

  • Viewpoints engineering on Capella
  • Current solution: KitAlpha
  • Melange as a lightweight metamodel extension

mechanism ensuring type groups consistency and tool reuse

Melange in Collaborative Projects

On Language Interfaces – Flexible Modeling – Modular Development of DSLs – Melange

slide-66
SLIDE 66

Conclusion & Perspectives

Composition and Interoperability for External DSL Engineering

slide-67
SLIDE 67

Composition and Interoperability for External DSL Engineering 38 / 40

Wrap-up

slide-68
SLIDE 68

Composition and Interoperability for External DSL Engineering 39 / 40

▪ Component-based software language engineering

Future Work

Towards Software Language Engineering for the masses

choose produce

DSL1 DSL2 DSL3 Language Components

slide-69
SLIDE 69

Composition and Interoperability for External DSL Engineering 40 / 40 On Language Interfaces Thomas Degueule, Benoit Combemale and Jean-Marc Jézéquel In PAUSE: Present And Ulterior Software Engineering, 2017 Leveraging Software Product Lines Engineering in the Development of External DSLs: A Systematic Literature Review David Méndez-Acuña, José A. Galindo, Thomas Degueule, Benoit Combemale and Benoit Baudry In Computer Languages, Systems and Structures (COMLAN), 2016 Safe Model Polymorphism for Flexible Modeling Thomas Degueule, Benoit Combemale, Arnaud Blouin, Olivier Barais and Jean-Marc Jézéquel In Computer Languages, Systems and Structures (COMLAN), 2016 Execution Framework of the GEMOC Studio (Tool Demo) Erwan Bousse, Thomas Degueule, Didier Vojtisek, Tanja Mayerhofer, Julien Deantoni and Benoit Combemale In Proceedings of SLE, 2016 Interoperability and Composition of DSLs with Melange Thomas Degueule ACM Student Research Competition Grand Finals, 2016 Towards an Automation of the Mutation Analysis Dedicated to Model Transformation Vincent Aranega, Jean-Marie Mottu, Anne Etien, Thomas Degueule, Benoit Baudry and Jean-Luc Dekeyser In Software Testing, Verification and Reliability (STVR), 2015 Reusing Legacy DSLs with Melange Thomas Degueule, Benoit Combemale, Arnaud Blouin and Olivier Barais In Proceedings of DSM, 2015 A Solution to the TTC'15 Model Execution Case Using the GEMOC Studio Benoit Combemale, Julien DeAntoni, Olivier Barais, Cédric Brun, Arnaud Blouin, Thomas Degueule, Erwan Bousse and Didier Vojtisek In Proceedings of TTC@STAF, 2015 Melange: A Meta-language for Modular and Reusable Development of DSLs Thomas Degueule, Benoit Combemale, Arnaud Blouin, Olivier Barais and Jean-Marc Jézéquel In Proceedings of SLE, 2015 Tooling Support for Variability and Architectural Patterns in Systems Engineering (Tool demo) Thomas Degueule, João Bosco Ferreira Filho, Olivier Barais et al. In Proceedings of SPLC, 2015 Motivating Use Cases for the Globalization of DSLs Betty H. C. Cheng, Thomas Degueule, Colin Atkinson, Siobhán Clarke, Ulrich Frank, Pieter J. Mosterman and Janos Sztipanovits In Globalizing Domain-Specific Languages, 2014 When Systems Engineering Meets Software Language Engineering Jean-Marc Jézéquel, David Mendez-Acuna, Thomas Degueule, Benoit Combemale and Olivier Barais In Proceedings of CSDM, 2014 Variability and Patterns in Safety/Security Systems Engineering: An Overview Thomas Degueule, João Bosco Ferreira Filho, Jérôme Le Noir, Olivier Barais, Mathieu Acher, Grégory Gailliard, Godefroy Burlot, Olivier Constant et al. In Journées Lignes de Produits (JLDP), 2014 Using Meta-model Coverage to Qualify Test Oracles Olivier Finot, Jean-Marie Mottu, Gerson Sunyé and Thomas Degueule In Proceedings of AMT, 2013

https://melange-lang.org

slide-70
SLIDE 70

EOF

Composition and Interoperability for External DSL Engineering