SlideShare una empresa de Scribd logo
1 de 156
Domain-specific
  Languages
 Javier Luis Cánovas Izquierdo
    javier.canovas@inria.fr


         February 2013
Outline


Languages

 Domain-Specific Languages

 Xtext

GMF
Outline


Languages

 Domain-Specific Languages

 Xtext

GMF
What is
a language
What is a language?
From Wikipedia:
  Language is the human capacity for
  acquiring and using complex systems of
  communication, and a language is any
  specific example of such a system.
What is a language?
From Wikipedia:
  Language is the human capacity for
  acquiring and using complex systems of
  communication, and a language is any
  specific example of such a system.


             Why?          How?
What is a language?
From Wikipedia:
  Language is the human capacity for
  acquiring and using complex systems of
  communication, and a language is any
  specific example of such a system.


             Why?          How?
What is a language?
From Wikipedia:
  Language is the human capacity for
  acquiring and using complex systems of
  communication, and a language is any
  specific example of such a system.


             Why?          How?
What is a language?

           Table
What is a language?
From the formal language theory:
  A language is a set of linguistic utterances,
  (i.e., words), also called strings or
  sentences, which are composed by a set of
  symbols of an alphabet.
  A grammar is the set of structural rules that
  governs the composition of linguistic
  utterances
What is a language?
From the formal language theory:
  A language is a set of linguistic utterances,
  (i.e., words), also called strings or
  sentences, which are composed by a set of
  symbols of an alphabet.
  A grammar is the set of structural rules that
  governs the composition of linguistic
  utterances

               Why?            How?
What is a language?
From the formal language theory:
  A language is a set of linguistic utterances,
  (i.e., words), also called strings or
  sentences, which are composed by a set of
  symbols of an alphabet.
  A grammar is the set of structural rules that
  governs the composition of linguistic
  utterances

               Why?            How?
What is a language?
From the formal language theory:
  A language is a set of linguistic utterances,
  (i.e., words), also called strings or
  sentences, which are composed by a set of
  symbols of an alphabet.
  A grammar is the set of structural rules that
  governs the composition of linguistic
  utterances

               Why?            How?
A grammar?
machineDefinition:
  MACHINE OPEN_SEP stateList
  transitionList CLOSE_SEP;
                                    machine {
stateList:                            SOne STwo
  state (COMMA state)*;               T1 { SOne STwo }
                                    }
state:
  ID_STATE;
                                    machine {
transitionList:                       S_first S_second
  transition (COMMA transition)*;     T1 { S_first S_second}
                                      T1 { S_second S_first }
transition:
  ID_TRANSITION OPEN_SEP            }
  state state CLOSE_SEP;

MACHINE: ‘machine’;                     machine {
OPEN_SEP: ‘{’;                            SA SB SC SD
CLOSE_SEP: ‘{’;                           T1 { SA SD }
COMMA: ‘,’;                               T2 { SA SB }
ID_STATE: ‘S’ ID;                         T3 { SB SC }
ID_TRANSITION: ‘T’ (0..9)+;               T4 { SB SA }
ID: (a..zA..Z_) (a..zA..Z0..9)*;        }
Languages in
engineering
Architecture
Cartography
Biology
Electronics
Languages in Computer Science
GPLs
• Java                                          • Delphi
class HelloWorldApp {                             program ObjectPascalExample;
    public static void main(String[] args) {        type
        System.out.println("Hello World!"); }         THelloWorld = object
}                                                        procedure Put;
                                                      end;
                                                    var

• C
                                                      HelloWorld: THelloWorld;
                                                    procedure THelloWorld.Put;
                                                    begin
#include <stdio.h>                                    WriteLn('Hello, World!');
int main(void)                                      end;
{                                                 begin
    printf("hello, worldn");                        New(HelloWorld);
}                                                    HelloWorld.Put;
                                                     Dispose(HelloWorld);
                                                  end.

• Python
 print("Hello world")
GPLs
• UML
DSLs
• SQL                                            • CSS
CREATE TABLE Employee (                         body {
  id INT NOT NULL IDENTITY (1,1) PRIMARY KEY,     text-align: left;
  name VARCHAR(50),                               font-family: helvetica, sans-serif;
  surname VARCHAR(50),                          }
  address VARCHAR(255),                         h1 {
  city VARCHAR(60),                               border: 1px solid #b4b9bf;
  telephone VARCHAR(15),                          font-size: 35px;}
)



• HTML                                           • LaTeX
                                                ifthenelse{boolean{showcomments}}
                                                  {newcommand{nb}[2]{
<html>                                              fcolorbox{gray}{yellow}{
  <head>                                              bfseriessffamilyscriptsize#1
    <title>Example</title>                          }
  </head>                                           {sfsmalltextit{#2}}
  <body>                                            }
    <p>Example</p>                                  newcommand{version}{scriptsize$-$working$-$}
  </body>                                         }
</html>                                           {newcommand{nb}[2]{}
                                                    newcommand{version}{}
                                                }
DSLs
• OCL
employees->includes(#dent)
self.questions->size
self.employer->size
self.employee->select (v | v.wages>10000 )->size
Student.allInstances
                                                         • MiniUML
  ->forAll( p1, p2 |                                     package Courses {
            p1 <> p2 implies p1.name <> p2.name )          class Student {
                                                             attribute studentid : number key
                                                             attribute firstName : string
                                                             attribute lastName : string

• ATL                                                      }

                                                             class Course {
unique lazy rule customFuncCall {                              attribute name : string key
  from                                                         attribute description : string optional
     src : TupleType(class1 : MM!EClass,                       attribute ects: number
                     class2 : MM!EClass)                     }
  to                                                     }
     t : FOL!CustomFuncCall(
       name <- src.class1.name,
       declaration <- src.class1,
       arguments <- Sequence{thisModule.variable(src)}
     )
}
GPLs   vs   DSLs
GPLs vs DSLs
A GPL provides notations that are used to describe a computation in a
human-readable form that can be translated into a machine-readable
representation.

A GPL is a formal notation that can be used to describe problem
solutions in a precise manner.

A GPL is a notation that can be used to write programs.

A GPL is a notation for expressing computation.

A GPL is a standardized communication technique for expressing
instructions to a computer. It is a set of syntactic and semantic rules
used to define computer programs.
GPLs vs DSLs
The boundary isn‟t as clear as it could be. Domain-specificity is not black-and-
white, but instead gradual: a language is more or less domain specific
GPLs vs DSLs
The boundary isn‟t as clear as it could be. Domain-specificity is not black-and-
white, but instead gradual: a language is more or less domain specific
Outline


Languages

 Domain-Specific Languages

 Xtext

GMF
DSL

The big picture

  What is a DSL? Why?

    Anatomy

     Development

    Actors

  Best practices

Worst practices
DSL

The big picture

  What is a DSL? Why?

    Anatomy

     Development

    Actors

  Best practices

Worst practices
The big picture




Domain-Specific Languages?
Concepts
Concepts
Concepts
Concepts
DSL

The big picture

  What is a DSL? Why?

    Anatomy

     Development

    Actors

  Best practices

Worst practices
What is a DSL
• In general:
  Language specially designed to perform a
  task in a certain domain
What is a DSL
• In general:
  Language specially designed to perform a
  task in a certain domain

• In the context of computer science:
  A formal processable language targeting at
  a specific viewpoint or aspect of a software
  system.
  It's semantics flexibility and notation is
  designed in order to support working with
  that viewpoint as good as possible
And the rest of languages?

            DSLs


          SQL, HTML


           C, Cobol


          Assembler




           Machine
Why DSLs?
           Abstraction Gap




              Assembler




               C, Java




                DSLs


Problem                      Solution
Domain                       Domain
What is offered?


  Higher          Avoid
abstractions   redundancy


Separation     Use domain
of concerns     concepts
What are the advantages?

                        Productivity



       Platform
     Independent                                   Quality




                        Benefits
     No
  Overhead                                              V&V




               Domain                  Communication
               Expert
What for?

                 Architecture
              • Generation of interfaces
  Utility     • Generation of WSDL        Full Technical
              • Set up of skeleton projects

               Requirements

Application                                   Analysis

                Product Line
What for?

                     Architecture

  Utility                                     Full Technical
              • Architecture-Definition Languages
              • AUTOSAR

                    Requirements

Application                                         Analysis

                     Product Line
What for?

                          Architecture
• Model transformation languages: ATL, Acceleo
     Utility
• Constraints language: OCL                      Full Technical

                        Requirements

 Application                                       Analysis

                         Product Line
What for?

                Architecture

  Utility                                 Full Technical

              Requirements
              • Describe a cooling algorithm in refrigerators
Application   • Configure hearing aids         Analysis
              • Insurance mathematics

               Product Line
What for?

                     Architecture

  Utility                                    Full Technical

                   Requirements

Application                                         Analysis
            • Pseudo-structured natural languages


                    Product Line
What for?

                   Architecture

  Utility                                 Full Technical

                  Requirements

Application   • Mathematical formalisms     Analysis

                   Product Line
What for?

                 Architecture

  Utility                               Full Technical

               Requirements
              • Composition languages
              • Workflow languages
Application                               Analysis

                Product Line
What is a domain?
Inductive / Bottom-up

• The domain is defined in terms of existing software used to
  address a particular class of problems or products
• A domain D is identified as a set of programs with common
  characteristics or similar purpose
• Often such domains do not exists outside the realm of software
• Special case when we define a domain as a subset of programs
  written in a specific language (idiom)


Deductive / top-down

• The domain is defined as a body of knowledge about the real
  world, i.e., outside the realm of software
• A domain D is a body of knowledge for which we want to provide
  some form of software support
• Much harder to address using DSLs because of the need to
  understand precisely the nature of the domain and identify
  interesting programs in such domain
but… how?
DSL

The big picture

  What is a DSL? Why?

    Anatomy

     Development

    Actors

  Best practices

Worst practices
Anatomy


 Concepts &     Well-formed
                              Textual   Graphical   Denotational   Pragmatic   Translational   Operational
relationships      rules




  Abstract                    Concrete
                                                                   Semantics
  Syntax                       Syntax


                                         DSL
A first look
Abstract Syntax

• Describes the structure of the
  language and the way the different
  primitives can be combined together,
  independently of any particular
  representation or encoding.



Concrete Syntax

• Describes specific representations of
  the modeling language, covering
  encoding and/or visual appearance



Semantics

• Describing the meaning of the
  elements defined in the language
  and the meaning of the different
  ways of combining them.
A first look
Abstract Syntax

• Describes the structure of the
  language and the way the different
  primitives can be combined together,
  independently of any particular
  representation or encoding.



Concrete Syntax

• Describes specific representations of
  the modeling language, covering
  encoding and/or visual appearance



Semantics

• Describing the meaning of the
  elements defined in the language
  and the meaning of the different
  ways of combining them.
A first look
Abstract Syntax

• Describes the structure of the
  language and the way the different
  primitives can be combined together,
  independently of any particular
  representation or encoding.



Concrete Syntax

• Describes specific representations of
  the modeling language, covering
  encoding and/or visual appearance



Semantics
                                           How this is
• Describing the meaning of the
  elements defined in the language         executed?
  and the meaning of the different
  ways of combining them.
Anatomy


 Concepts &     Well-formed
                              Textual   Graphical   Denotational   Pragmatic   Translational   Operational
relationships      rules




  Abstract                    Concrete
                                                                   Semantics
  Syntax                       Syntax


                                         DSL
Abstract Syntax
• Metamodelling techniques
   – UML notation
       •   Concept => Class
       •   Property => Attribute
       •   Contaiment Relationship => Composite Association
       •   Relationship => Association
       •   Specialization => Inheritance
       •   Package => Package
• Well-formed rules
   – OCL expressions
   context Transition
   inv: self.source <> self.target

   context Machine
   inv: self.states
        ->exists(s | s.oclIsKinfOf(InitialState))
Anatomy


 Concepts &     Well-formed
                              Textual   Graphical   Denotational   Pragmatic   Translational   Operational
relationships      rules




  Abstract                    Concrete
                                                                   Semantics
  Syntax                       Syntax


                                         DSL
Concrete Syntax




   Textual
             Graphical
Concrete Syntax




   Textual
Concrete Syntax
• Textual                                          • Graphical
digraph Modernization {
  Start -> ExtractingModels;
  ExtractingModels -> MDD [label="C2M"];
  MDD -> MDD [label="M2M"];
  MDD -> SystemGeneration [label="M2C"];
  SystemGeneration -> End;

    Start
      [shape=point,width=0.2,label=""];
    ExtractingModels
      [label="Extracting Models",shape=ellipse];
    MDD
      [shape=ellipse];
    SystemGeneration
      [label="System Generation",shape=ellipse];
    End
      [shape=doublecircle,label="",width=0.2,
       fillcolor=black,style=filled];
}
Textual Syntax

              Grammar
                                                   Metamodel




conforms To                       conforms To




Machine                 Machine       Model A                  Model C
  A           Machine     C
                B

                                                    Model B




          Grammarware                           Modelware
Textual Syntax

              Grammar
                                                   Metamodel




conforms To                       conforms To




Machine                 Machine       Model A                  Model C
  A           Machine     C
                B

                                                    Model B




          Grammarware                           Modelware
Textual Syntax
machineDefinition:
  MACHINE OPEN_SEP stateList
  transitionList CLOSE_SEP;

stateList:
  state (COMMA state)*;

state:
  ID_STATE;

transitionList:
  transition (COMMA transition)*;

transition:
  ID_TRANSITION OPEN_SEP
  state state CLOSE_SEP;

MACHINE: ‘machine’;
                                    conforms To   machine {
OPEN_SEP: ‘{’;
                                                    SOne STwo
CLOSE_SEP: ‘{’;
                                                    T1 { SOne STwo }
COMMA: ‘,’;
                                                  }
ID_STATE: ‘S’ ID;
ID_TRANSITION: ‘T’ (0..9)+;
ID: (a..zA..Z_) (a..zA..Z0..9)*;
Textual Syntax
machineDefinition:
  MACHINE OPEN_SEP stateList
  transitionList CLOSE_SEP;

stateList:
  state (COMMA state)*;

state:
  ID_STATE;

transitionList:
  transition (COMMA transition)*;

transition:
  ID_TRANSITION OPEN_SEP
  state state CLOSE_SEP;

MACHINE: ‘machine’;
                                    conforms To   machine {
OPEN_SEP: ‘{’;
                                                    SOne STwo
CLOSE_SEP: ‘{’;
                                                    T1 { SOne STwo }
COMMA: ‘,’;
                                                  }
ID_STATE: ‘S’ ID;
ID_TRANSITION: ‘T’ (0..9)+;
ID: (a..zA..Z_) (a..zA..Z0..9)*;
You have already work with one
package Courses {
  class Student {
    attribute studentid : number key
    attribute firstName : string
    attribute lastName : string
  }
                                                sintax of
    class Course {
      attribute name : string key                            conforms To
      attribute description : string optional
      attribute ects: number
    }
}

package Courses {                                           Ecore MM
  class Student {
    attribute studentid : number key
    attribute firstName : string
    attribute lastName : string
  }                                                          conforms To

    class Course {
      attribute name : string key               sintax of
      attribute description : string optional
      attribute ects: number
    }

    association Enrolment {
      end student : Student [1..*]
      end course : Course [0..*]
    }
}
Textual Syntax
• Grammar-oriented (Xtext)

           Grammar                        Metamodel




 conforms To                      conforms To




          Graph B                           Model A
Xtext
• Model-Driven framework to develop textual DSLs
• Is part of Eclipse Modeling Project
• Is part of a DSL tooling initally called Open Architecture
  Ware
• Main features:
   –   Syntax Coloring
   –   Content Assist
   –   Validation and Quick Fixes
   –   Advanced Java Integration
   –   Integration with other Eclipse tools
Textual Syntax
• Metamodel-oriented (EMFText)

           Grammar                        Metamodel




 conforms To                      conforms To




          Graph B                           Model A
EMFText
• Model-Driven framework to develop textual DSLs
• Developed as a Eclipse plugin
• Main features:
   –   Syntax Coloring
   –   Content Assist
   –   Validation and Quick Fixes
   –   Reference resolving mechanism
EMFText
• Model-Driven framework to develop textual DSLs
• Developed as a Eclipse plugin
• Main features:
   –   Syntax Coloring
   –   Content Assist
   –   Validation and Quick Fixes
   –   Reference resolving mechanism
Graphical Syntax

A draw is better than a long explanation
digraph Modernization {
  Start -> ExtractingModels;
  ExtractingModels -> MDD [label="C2M"];
  MDD -> MDD [label="M2M"];
  MDD -> SystemGeneration [label="M2C"];
  SystemGeneration -> End;

    Start
      [shape=point,width=0.2,label=""];
    ExtractingModels
      [label="Extracting Models",shape=ellipse];
    MDD
      [shape=ellipse];
    SystemGeneration
      [label="System Generation",shape=ellipse];
    End
      [shape=doublecircle,label="",width=0.2,
        fillcolor=black,style=filled];
}
GMF
• Graphical Modeling Framework
  – Model-Driven Framework to develop graphical editors based on EMF and
    GEF
  – GMF is part of Eclipse Modeling Project
  – Provides a generative component to create the DSL tooling
  – Provides a runtime infrastructure to facilitate the development of
    graphical DSLs
Alternatives
• GMF can be too complex
• EuGENia
   – Automatically generated GMF
     infrastructure
   – Lowers the entrance barrier for
     creating GMF editors
   – Provides textual DSLs and
     wizards to define the graphical
     DSL
• GMF simple mapping editor
   – Graphical DSL to configure
     GMF
   – Generators for creating the
     required GMF infrastructure
Graphical vs. Textual
• Success depends on how the notation fits the domain
    class Person {           Person has (name, surname)
      private String name;
      private String name;
    }                                     Person
                                     name : string
                                     surname : string
Graphical vs. Textual
• Success depends on how the notation fits the domain
    class Person {           Person has (name, surname)
      private String name;
      private String name;
    }                                     Person
                                     name : string
                                     surname : string



 • Graphical DSLs are not always easier to understand
Graphical vs. Textual
• Expression of common concerns simple and concise
     class Person {
       private String name;
                              Person has (name, surname)
       private String name;
     }
Graphical vs. Textual
• Expression of common concerns simple and concise
      class Person {
        private String name;
                                          Person has (name, surname)
        private String name;
      }


• Providing sensible defaults
   public class MyClass {
     public void readStream(InputStream stream, boolean closeStreamAferReading) {
        ...
     }
   }


   public class MyClass {
     public void readStream(InputStream stream) {
       readStream(stream, true);
     }
     public void readStream(InputStream stream, boolean closeStreamAferReading) {
        ...
     }
   }
Graphical vs. Textual
• Verbosity for less common concerns
   Person has (name, surname)    Person has (name, surname)
                                   extension
                                     name is String
                                     surname is String



• Tool support and limitations
   –   Syntax highlighting
   –   Outline
   –   Auto-completion
   –   Validation
   –   Layout
   –   …
Graphical AND Textual
Recommendations
Recommendations

                        Semiotic clarity

                                            Perceptual
       Cognitive Fit
                                           Discriminality




 Graphic
Economy
                   Physics                             Semantics
                                                     transparency

                     of
                  notations
                                                   Complexity
 Dual Coding
                                                  Management



                   Visual            Cognitive
               Expressiveness       Integration
Recommendations

                                              There should be a 1:1 correspondence
                        Semiotic clarity      between concepts and graphical symbols
                                            Perceptual
       Cognitive Fit
                                           Discriminality




 Graphic
Economy
                   Physics                             Semantics
                                                     transparency

                     of
                  notations
                                                   Complexity
 Dual Coding
                                                  Management



                   Visual            Cognitive
               Expressiveness       Integration
Recommendations

                        Semiotic clarity

                                            Perceptual
       Cognitive Fit
                                           Discriminality




 Graphic
Economy
                   Physics                             Semantics
                                                     transparency

                     of
                  notations
                                                   Complexity
 Dual Coding
                                                  Management



                   Visual            Cognitive
               Expressiveness       Integration
Recommendations

                        Semiotic clarity
                                                            Different symbols should be
                                            Perceptual      clearly distinguishable from each
       Cognitive Fit
                                           Discriminality   other




 Graphic
Economy
                   Physics                             Semantics
                                                     transparency

                     of
                  notations
                                                   Complexity
 Dual Coding
                                                  Management



                   Visual            Cognitive
               Expressiveness       Integration
Recommendations

                        Semiotic clarity

                                            Perceptual
       Cognitive Fit
                                           Discriminality




 Graphic
Economy
                   Physics                             Semantics
                                                     transparency

                     of
                  notations
                                                   Complexity
 Dual Coding
                                                  Management



                   Visual            Cognitive
               Expressiveness       Integration
Recommendations

                        Semiotic clarity

                                            Perceptual
       Cognitive Fit
                                           Discriminality




 Graphic
Economy
                   Physics                             Semantics
                                                     transparency

                     of                                     Use visual representations

                  notations                                 whose apprarance suggests their
                                                            meaning
                                                   Complexity
 Dual Coding
                                                  Management



                   Visual            Cognitive
               Expressiveness       Integration
Recommendations

                        Semiotic clarity

                                            Perceptual
       Cognitive Fit
                                           Discriminality




 Graphic
Economy
                   Physics                             Semantics
                                                     transparency

                     of
                  notations
                                                   Complexity
 Dual Coding
                                                  Management


                                                            Include mechanisms for dealing
                   Visual            Cognitive              with complexity
               Expressiveness       Integration
Recommendations

                        Semiotic clarity

                                            Perceptual
       Cognitive Fit
                                           Discriminality




 Graphic
Economy
                   Physics                              Semantics
                                                      transparency

                     of
                  notations
                                                    Complexity
 Dual Coding
                                                   Management



                   Visual            Cognitive
               Expressiveness       Integration

                                                  Include explicit mechanisms to
                                                  support integration of information
                                                  from different diagrams
Recommendations

                        Semiotic clarity

                                            Perceptual
       Cognitive Fit
                                           Discriminality




 Graphic
Economy
                   Physics                             Semantics
                                                     transparency

                     of
                  notations
                                                   Complexity
 Dual Coding
                                                  Management



                   Visual            Cognitive
               Expressiveness       Integration

                                    Use the full range and capacities
                                    of visual variables
Recommendations

                        Semiotic clarity

                                            Perceptual
       Cognitive Fit
                                           Discriminality




 Graphic
Economy
                   Physics                             Semantics
                                                     transparency

                     of
                  notations
                                                   Complexity
 Dual Coding
                                                  Management



                   Visual            Cognitive
               Expressiveness       Integration
Recommendations

                        Semiotic clarity

                                            Perceptual
       Cognitive Fit
                                           Discriminality




 Graphic
Economy
                   Physics                             Semantics
                                                     transparency

                     of
                  notations
                                                   Complexity
 Dual Coding
                                                  Management



                   Visual            Cognitive
               Expressiveness       Integration
Recommendations

                        Semiotic clarity

                                            Perceptual
       Cognitive Fit
                                           Discriminality




 Graphic
Economy
                   Physics                             Semantics
                                                     transparency

                     of
                  notations
                                                   Complexity
 Dual Coding
                                                  Management



                   Visual            Cognitive
               Expressiveness       Integration
Recommendations

                                                  Semiotic clarity

                                                                      Perceptual
                                  Cognitive Fit
                                                                     Discriminality




                         Graphic
                        Economy
                                              Physics                            Semantics
                                                                               transparency

                                                of
                                             notations
                                                                             Complexity
                          Dual Coding
                                                                            Management


Use text to complement graphics
                                             Visual            Cognitive
                                         Expressiveness       Integration
Recommendations

                        Semiotic clarity

                                            Perceptual
       Cognitive Fit
                                           Discriminality




 Graphic
Economy
                   Physics                             Semantics
                                                     transparency

                     of
                  notations
                                                   Complexity
 Dual Coding
                                                  Management



                   Visual            Cognitive
               Expressiveness       Integration
Recommendations

                                                     Semiotic clarity

                                                                         Perceptual
                                    Cognitive Fit
                                                                        Discriminality




                             Graphic
                            Economy
                                                Physics                             Semantics
                                                                                  transparency

The number of different graphical
symbols should be cognitively
                                                  of
manageable
                                               notations
                                                                                Complexity
                              Dual Coding
                                                                               Management



                                                Visual            Cognitive
                                            Expressiveness       Integration
Recommendations

Use different visual dialects for
different tasks and audiences
                                                     Semiotic clarity

                                                                         Perceptual
                                    Cognitive Fit
                                                                        Discriminality




                             Graphic
                            Economy
                                                Physics                             Semantics
                                                                                  transparency

                                                  of
                                               notations
                                                                                Complexity
                              Dual Coding
                                                                               Management



                                                Visual            Cognitive
                                            Expressiveness       Integration
Anatomy


 Concepts &     Well-formed
                              Textual   Graphical   Denotational   Pragmatic   Translational   Operational
relationships      rules




  Abstract                    Concrete
                                                                   Semantics
  Syntax                       Syntax


                                         DSL
Semantics
Denotational
 • Use of mathematical formalisms
 • Complex


Pragmatic
 • Use of examples to illustrate the language
 • Input / outputs
 • Hard to deduce the real semantics


Traslational
 • Translation to other well-known language
 • Similar to compilation


Operational
 • Sequence of operations
 • Virtual machine
DSL

The big picture

  What is a DSL? Why?

    Anatomy

     Development

    Actors

  Best practices

Worst practices
Development process
         • Create a new one or reuse an existing one
Decision • Enable non-technical users to participate


           • Problem domain identified
           • Domain knowledge gathered from end-users
Analysis   • Domain model: Scope, vocabulary, concepts, commonalities and variabilities


           • Define the DSL components (abstract and concrete syntaxes, semantics)
 Design    • Decide best approach to implement the language



         • Develop DSL components (Xtext, EMFText, GMF, etc…)
Implemen • If it is executable, develop the corresponding interpreter or compiler
  tation


           • Test the language
Validation • Validate the language with the end-user
Regarding the implementation
          External               vs   Internal

                  DSL
                Grammar               Host Language



conforms To

                                      Internal DSL 1

         DSL              DSL
         Text             Text                Internal DSL 2
Internal DSL
External vs Internal

 Internal   External
DSL

The big picture

  What is a DSL? Why?

    Anatomy

     Development

    Actors

  Best practices

Worst practices
Actors
Actors

High
Domain Knowledge




Low
                   Low                     High
                         Technical Level
DSL

The big picture

  What is a DSL? Why?

    Anatomy

     Development

    Actors

  Best practices

Worst practices
Best practices

     Limit
                 Viewpoints
Expressiveness



                 Learn from
  Evolution
                   GPLs



   Support        Tooling
DSL

The big picture

  What is a DSL? Why?

    Anatomy

     Development

    Actors

  Best practices

Worst practices
Worst practices
• Initial conditions
  – Only Gurus allowed
     • Believe that only gurus can build languages ir that
       “I‟m smart and don‟t need help”
  – Lack of Domain Understanding
     • Insufficiently understanding the problem domain or
       the solution domain
  – Analysis paralysis
     • Wanting the language to be theoretically complete,
       with its implementation assured
Worst practices
• The source for Language Concepts
  – UML: New Wine in Old Wineskins
     • Extending a large, general-purpose modeling language
  – 3GL Visual Programming
     • Duplicanting the concepts and semantics of traditional
       programming languages
  – Code: The Library is the Language
     • Focusing the language on the current code‟s technical
       details
  – Tool: if you have a hammer
     • Letting the tool‟s technical limitations dictate language
       development
Worst practices
• The resulting language
  – Too Generic / Too Specific
    • Creating a language with a few generic concepts or
      too many specific concepts, or a language that can
      create only a few models
  – Misplaced Emphasis
    • Too strongly emphasizing a particular domain
      feature
  – Sacred at Birth
    • Viewing the initial language version as unalterable
Worst practices
• Language Notation
  – Predetermined Paradigm
    • Choosing the wrong representational paradigm or
      the basis of a blinkered view
  – Simplistic Symbols
    • Using symbols that are too simple or similar or
      downright ugly
Worst practices
• Language Use
  – Ignoring the use process
    • Failing to consider the language‟s real-life usage
  – No training
    • Assuming everyone understands the language like
      its creator
  – Pre-adoption Stagnation
    • Letting the language stagnate after successful
      adoption
Outline


Languages

 Domain-Specific Languages

 Xtext

GMF
Xtext
• Eclipse Project
  – Part of Eclipse Modeling
  – Part of Open Architecture Ware
• Model-driven development of Textual DSLs
• Part of a family of languages
  – Xtext
  – Xtend
  – Xbase
  – Xpand
  – Xcore
Eclipse Modeling Project
Eclipse Modeling Project
The grammar language
• Corner-stone of Xtext
• DSL to define textual languages
  – Describe the concrete syntax
  – Specify the mapping between concrete syntax
    and domain model
• From the grammar, it is generated:
  – The domain model
  – The parser
  – The tooling
Main advantages
•   Consistent look and feel
•   Textual DSLs are a resource in Eclipse
•   Open editors can be extended
•   Complete framework to develop DSLs
•   Easy to connect to any Java-based language
Proposed development process
                    Create Xtext Project


                         Defining the DSL
    Grammar definition                      Workflow definition


                 Configure Fomatting (opt)


                  Configure Scoping (opt)


                 Configure validation (opt)


                    Configure generator


                   Generate DSL tooling
Example DSL
• Poll System application
  – Define a Poll with the corresponding questions
  – Each question has a text and a set of options
  – Each option has a text
• Generate the application in different
  platforms


         Poll System
                       Generator
          Definition
Example DSL




        Generator
Grammar Definition
Grammar
definition
Grammar Definition
        Grammar
         reuse
Grammar Definition

 Derived
metamodel
Grammar Definition
Parser Rules
Grammar Definition
Keywords
Grammar Definition

        Multivalue asignment




       Simple asignment


                               ?= Boolean asignment
Grammar Definition

         Cardinality (others: * ?)
Grammar Definition




                Containment
Grammar Definition
Grammar Definition
Grammar Definition
Grammar Definition
Xtext Demo
Outline


Languages

 Domain-Specific Languages

 Xtext

GMF
GMF
• Eclipse project
  – Eclipse Modelling components
  – Uses
     • EMF (Eclipse Modeling Framework)
     • GEF (Graphical Editing Framework)
• Model-driven framework for Graphical DSLs
  – Everything is a model
• Still under development (perpetual beta)
• The only alternative for now
• DSL definition easy, tweaking hard
Eclipse Modeling Project
Eclipse Modeling Project
Parts of GMF
• Tooling
  – Editors for notation, semantic and tooling
  – GMF Dashboard
  – Generator to produce the DSL implementation
• Runtime
  – Generated DSLs depend on the GMF Runtime
    to produce an extensible graphical editor
Main advantages
• Consistent look and feel
• Diagram persistence
• Open editors can be extended by third-parties
• Already integrated with various Eclipse
  components
• Extensible notation metamodel to enable the
  isolation of notation from semantic concerns
• Future community enhancements will easily be
  integrated
Proposed development process
                  Create GMF Project


                   Defining the DSL
   Domain Model      Graphical Definition   Tooling Definition



              Develop Mapping Model


              Create Generator Model


             Generate Diagram Plugin
Proposed development process
Defining a graphical DSL


Domain   Graphical     Tooling
Model    Definition   Definition



 Mapping Model
Example DSL
Domain Model
• Concepts
  –   PollSystem
  –   Poll
  –   Question
  –   Option
• Attributes
  – A Poll has a name
  – A Question has an identifier and a descriptive text
  – An Option has an identifier and a descriptive text
• Relationships
  – PollSystem is composed of polls and questions
  – Question has a set of options
Graphical Definition
• Defines the graphical representation of the DSL elements
• Tree-based editor
• Main elements
   –   Node  DSL node
   –   Connector  DSL link
   –   Compartment  Node compartment (for complex nodes)
   –   Label  The label of a Node, Connector or compartment
   –   Figure descriptor  Graphical representation of a Node
        •   Rectangle, ellipse, polygon,…
        •   Polyline,…
        •   Decorators, icons, …
        •   Custom figures,…

• Provides simple figures that they can be customized
Graphical Definition
•   A model will represent a PollSystem
•   A Poll will be a node
•   A Question will be a rectangular node
•   An Option will be a rectangular node included in the Question node
Tooling Definition
• Defines the tooling to create the DSL elements in the
  editor
• Tree-based editor
• Main elements
   – Tool Group  Set of tools
   – Creation Tool  Tool for creating a DSL element (node, connector,
     etc,…)
• Each tool can have an icon and a contextual help
Mapping Model
• Defines the correspondeces
  between model elements, graphical
  elements and tooling elements
• Automatically generated (at least a
  kick-off version)
• Tree-based editor
• Main elements
   – Top Node Reference  Maps a
     concept of the root model element
   – Node Mapping  Maps a concept with
     the graphical node and tooling
   – Feature Label Mapping  Maps a
     concept attribute with the graphical label
   – Child Reference  Maps a
     containment reference with the
     compartment
   – Compartment Mapping  Maps a
     concet with the graphical node
   – Link Mapping  Maps a reference of
     the root model elements
GMF Demo
References
1.    Kleppe, A.: Software Language Engineering
2.    J. Bézivin, “Model Driven Engineering: An Emerging Technical Space,” in GTTSE conf., 2006, vol.
      4143, pp. 36–64
3.    M. Brambilla, J. Cabot, M. Wimmer. “Model-Driven Software Engineering in Practice”. Morgan &
      Claypool
4.    M. Mernik, J. Heering, and A. M. Sloane, “When and how to develop domain-specific languages,” ACM
      Computing Surveys, vol. 37, no. 4, pp. 316–344, Dec. 2005.
5.    Brambilla, M., Cabot, J., Wimmer, M.: Model-Driven Software Engineering in Practice
6.    Y. Sun and Z. Demirezen, “Is My DSL a Modeling or Programming Language?,” in DSPD conf., 2008.
7.    M. Strembeck and U. Zdun, “An approach for the systematic development of domain specific
      languages,” Software: Practice and Experience, vol. 39, pp. 1253–1292, 2009.
8.    J.-M. Favre, “Foundations of Meta-Pyramids : Languages vs . Metamodels,” pp. 1–28.
9.    J. De Lara and E. Guerra, “Languages for Model Driven Engineering,” in ECMDA conf., 2012, vol.
      7349, pp. 259–274.
10.   D. L. Moody, “The „physics‟ of notations: Toward a scientific basis for constructing visual notations in
      software engineering,” Software Engineering, IEEE Transactions on, vol. 35, no. 6, pp. 756–779, Nov.
      2009.
11.   D. L. Moody and J. Van Hillegersberg, “Evaluating the visual syntax of UML: An analysis of the
      cognitive effectiveness of the UML family of diagrams,” in SLE conf., 2009, vol. 5452, no. Figure 1, pp.
      16–34.
12.   M. Völter, “MD */ DSL Best Practices Update March 2011,” 2011.
13.   S. Kelly and R. Pohjonen, “Worst practices for domain-specific modeling,” IEEE Software, vol. 26, no.
      4, pp. 22–29, 2009.
14.   M. Völter, “DSL Engineering. Designing, Implementing and Using Domain-Specific Languages”.
15.   I. Kurtev, J. Bézivin, and M. Aksit, “Technological Spaces  an Initial Appraisal,” in DOA, 2002, pp. 1–6.
                                                                  :
16.   Xtext Reference Guide
17.   GMF documentation

Más contenido relacionado

La actualidad más candente

What is machine translation
What is machine translationWhat is machine translation
What is machine translationStephen Peacock
 
Scope of translation technologies in indusstry 5.0
Scope of translation technologies in indusstry 5.0Scope of translation technologies in indusstry 5.0
Scope of translation technologies in indusstry 5.0SubramanianMuthusamy3
 
Computational linguistics
Computational linguisticsComputational linguistics
Computational linguisticsAdnanBaloch15
 
Translation studies slides 1st Lecture.ppt
Translation studies slides 1st Lecture.pptTranslation studies slides 1st Lecture.ppt
Translation studies slides 1st Lecture.pptmuhammadahmad709
 
Syntax and semantics
Syntax and semanticsSyntax and semantics
Syntax and semanticsRushdi Shams
 
A paedagogical model of english for pakistan
A paedagogical model of english for pakistanA paedagogical model of english for pakistan
A paedagogical model of english for pakistanLaiba Yaseen
 
Functional theories
Functional theoriesFunctional theories
Functional theoriesLy Berns
 
Machine Translation Introduction
Machine Translation IntroductionMachine Translation Introduction
Machine Translation Introductionnlab_utokyo
 
Mentalist and Behaviorist Theory of SLA
Mentalist and Behaviorist Theory of SLAMentalist and Behaviorist Theory of SLA
Mentalist and Behaviorist Theory of SLAWenlie Jean
 
Halliday's model of language and discousre
Halliday's model of language and discousreHalliday's model of language and discousre
Halliday's model of language and discousreHuddaFayyaz
 

La actualidad más candente (20)

What is machine translation
What is machine translationWhat is machine translation
What is machine translation
 
Scope of translation technologies in indusstry 5.0
Scope of translation technologies in indusstry 5.0Scope of translation technologies in indusstry 5.0
Scope of translation technologies in indusstry 5.0
 
Machine Translation
Machine TranslationMachine Translation
Machine Translation
 
Computational linguistics
Computational linguisticsComputational linguistics
Computational linguistics
 
Translation studies slides 1st Lecture.ppt
Translation studies slides 1st Lecture.pptTranslation studies slides 1st Lecture.ppt
Translation studies slides 1st Lecture.ppt
 
Syntax and semantics
Syntax and semanticsSyntax and semantics
Syntax and semantics
 
Foregrounding2
Foregrounding2Foregrounding2
Foregrounding2
 
A paedagogical model of english for pakistan
A paedagogical model of english for pakistanA paedagogical model of english for pakistan
A paedagogical model of english for pakistan
 
Functional theories
Functional theoriesFunctional theories
Functional theories
 
Machine Translation Introduction
Machine Translation IntroductionMachine Translation Introduction
Machine Translation Introduction
 
Mentalist and Behaviorist Theory of SLA
Mentalist and Behaviorist Theory of SLAMentalist and Behaviorist Theory of SLA
Mentalist and Behaviorist Theory of SLA
 
Sociolinguistics
SociolinguisticsSociolinguistics
Sociolinguistics
 
14 morphological typology
14 morphological typology14 morphological typology
14 morphological typology
 
Halliday's model of language and discousre
Halliday's model of language and discousreHalliday's model of language and discousre
Halliday's model of language and discousre
 
Minimalist program
Minimalist programMinimalist program
Minimalist program
 
DISCOURSE AND PRAGMATICS
DISCOURSE AND PRAGMATICSDISCOURSE AND PRAGMATICS
DISCOURSE AND PRAGMATICS
 
Diachronic Analysis
Diachronic AnalysisDiachronic Analysis
Diachronic Analysis
 
Paradigmatic
ParadigmaticParadigmatic
Paradigmatic
 
Generative grammar
Generative grammarGenerative grammar
Generative grammar
 
SYSTEMIC FUNCTIONAL LINGUISTICS: REGISTER & GENRE
SYSTEMIC FUNCTIONAL LINGUISTICS: REGISTER & GENRESYSTEMIC FUNCTIONAL LINGUISTICS: REGISTER & GENRE
SYSTEMIC FUNCTIONAL LINGUISTICS: REGISTER & GENRE
 

Destacado

Real world DSL - making technical and business people speaking the same language
Real world DSL - making technical and business people speaking the same languageReal world DSL - making technical and business people speaking the same language
Real world DSL - making technical and business people speaking the same languageMario Fusco
 
The Unbearable Stupidity of Modeling
The Unbearable Stupidity of ModelingThe Unbearable Stupidity of Modeling
The Unbearable Stupidity of ModelingPeter Friese
 
Model-Driven Software Engineering in Practice - Chapter 1 - Introduction
Model-Driven Software Engineering in Practice - Chapter 1 - IntroductionModel-Driven Software Engineering in Practice - Chapter 1 - Introduction
Model-Driven Software Engineering in Practice - Chapter 1 - IntroductionMarco Brambilla
 
MDD - Desarrollo de software dirigido por modelos que funciona (de verdad!)
MDD - Desarrollo de software dirigido por modelos que funciona (de verdad!)MDD - Desarrollo de software dirigido por modelos que funciona (de verdad!)
MDD - Desarrollo de software dirigido por modelos que funciona (de verdad!)Jordi Cabot
 
EMF Compare 2.0: Scaling to Millions (updated)
EMF Compare 2.0: Scaling to Millions (updated)EMF Compare 2.0: Scaling to Millions (updated)
EMF Compare 2.0: Scaling to Millions (updated)mikaelbarbero
 
MoDisco EclipseCon2010
MoDisco EclipseCon2010MoDisco EclipseCon2010
MoDisco EclipseCon2010fmadiot
 
You need to extend your models? EMF Facet vs. EMF Profiles
You need to extend your models? EMF Facet vs. EMF ProfilesYou need to extend your models? EMF Facet vs. EMF Profiles
You need to extend your models? EMF Facet vs. EMF ProfilesPhilip Langer
 
Industrial and Academic Experiences with a User Interaction Modeling Language...
Industrial and Academic Experiences with a User Interaction Modeling Language...Industrial and Academic Experiences with a User Interaction Modeling Language...
Industrial and Academic Experiences with a User Interaction Modeling Language...Marco Brambilla
 
IFML - The interaction flow modeling language, the OMG standard for UI modeli...
IFML - The interaction flow modeling language, the OMG standard for UI modeli...IFML - The interaction flow modeling language, the OMG standard for UI modeli...
IFML - The interaction flow modeling language, the OMG standard for UI modeli...Marco Brambilla
 
Textual Modeling Framework Xtext
Textual Modeling Framework XtextTextual Modeling Framework Xtext
Textual Modeling Framework XtextSebastian Zarnekow
 
Programming in UML: An Introduction to fUML and Alf
Programming in UML: An Introduction to fUML and AlfProgramming in UML: An Introduction to fUML and Alf
Programming in UML: An Introduction to fUML and AlfEd Seidewitz
 
ATL tutorial - EclipseCon 2008
ATL tutorial - EclipseCon 2008ATL tutorial - EclipseCon 2008
ATL tutorial - EclipseCon 2008William Piers
 
20 examples on Domain-Specific Modeling Languages
20 examples on Domain-Specific Modeling Languages20 examples on Domain-Specific Modeling Languages
20 examples on Domain-Specific Modeling LanguagesJuha-Pekka Tolvanen
 
Fantastic DSL in Python
Fantastic DSL in PythonFantastic DSL in Python
Fantastic DSL in Pythonkwatch
 
Creating Domain Specific Languages in Python
Creating Domain Specific Languages in PythonCreating Domain Specific Languages in Python
Creating Domain Specific Languages in PythonSiddhi
 

Destacado (20)

Real world DSL - making technical and business people speaking the same language
Real world DSL - making technical and business people speaking the same languageReal world DSL - making technical and business people speaking the same language
Real world DSL - making technical and business people speaking the same language
 
The Unbearable Stupidity of Modeling
The Unbearable Stupidity of ModelingThe Unbearable Stupidity of Modeling
The Unbearable Stupidity of Modeling
 
Introducing MDSD
Introducing MDSDIntroducing MDSD
Introducing MDSD
 
Model-Driven Software Engineering in Practice - Chapter 1 - Introduction
Model-Driven Software Engineering in Practice - Chapter 1 - IntroductionModel-Driven Software Engineering in Practice - Chapter 1 - Introduction
Model-Driven Software Engineering in Practice - Chapter 1 - Introduction
 
MDD - Desarrollo de software dirigido por modelos que funciona (de verdad!)
MDD - Desarrollo de software dirigido por modelos que funciona (de verdad!)MDD - Desarrollo de software dirigido por modelos que funciona (de verdad!)
MDD - Desarrollo de software dirigido por modelos que funciona (de verdad!)
 
EMF Compare 2.0: Scaling to Millions (updated)
EMF Compare 2.0: Scaling to Millions (updated)EMF Compare 2.0: Scaling to Millions (updated)
EMF Compare 2.0: Scaling to Millions (updated)
 
MoDisco EclipseCon2010
MoDisco EclipseCon2010MoDisco EclipseCon2010
MoDisco EclipseCon2010
 
OCL tutorial
OCL tutorial OCL tutorial
OCL tutorial
 
You need to extend your models? EMF Facet vs. EMF Profiles
You need to extend your models? EMF Facet vs. EMF ProfilesYou need to extend your models? EMF Facet vs. EMF Profiles
You need to extend your models? EMF Facet vs. EMF Profiles
 
Industrial and Academic Experiences with a User Interaction Modeling Language...
Industrial and Academic Experiences with a User Interaction Modeling Language...Industrial and Academic Experiences with a User Interaction Modeling Language...
Industrial and Academic Experiences with a User Interaction Modeling Language...
 
IFML - The interaction flow modeling language, the OMG standard for UI modeli...
IFML - The interaction flow modeling language, the OMG standard for UI modeli...IFML - The interaction flow modeling language, the OMG standard for UI modeli...
IFML - The interaction flow modeling language, the OMG standard for UI modeli...
 
Textual Modeling Framework Xtext
Textual Modeling Framework XtextTextual Modeling Framework Xtext
Textual Modeling Framework Xtext
 
Programming in UML: An Introduction to fUML and Alf
Programming in UML: An Introduction to fUML and AlfProgramming in UML: An Introduction to fUML and Alf
Programming in UML: An Introduction to fUML and Alf
 
Acceleo Code Generation
Acceleo Code GenerationAcceleo Code Generation
Acceleo Code Generation
 
Eugenia
EugeniaEugenia
Eugenia
 
ATL tutorial - EclipseCon 2008
ATL tutorial - EclipseCon 2008ATL tutorial - EclipseCon 2008
ATL tutorial - EclipseCon 2008
 
20 examples on Domain-Specific Modeling Languages
20 examples on Domain-Specific Modeling Languages20 examples on Domain-Specific Modeling Languages
20 examples on Domain-Specific Modeling Languages
 
Fantastic DSL in Python
Fantastic DSL in PythonFantastic DSL in Python
Fantastic DSL in Python
 
Creating Domain Specific Languages in Python
Creating Domain Specific Languages in PythonCreating Domain Specific Languages in Python
Creating Domain Specific Languages in Python
 
Domain Specific Languages
Domain Specific LanguagesDomain Specific Languages
Domain Specific Languages
 

Similar a Domain-Specific Languages

Expression trees in c#, Алексей Голубь (Svitla Systems)
Expression trees in c#, Алексей Голубь (Svitla Systems)Expression trees in c#, Алексей Голубь (Svitla Systems)
Expression trees in c#, Алексей Голубь (Svitla Systems)Alina Vilk
 
Expression trees in c#
Expression trees in c#Expression trees in c#
Expression trees in c#Oleksii Holub
 
A Sceptical Guide to Functional Programming
A Sceptical Guide to Functional ProgrammingA Sceptical Guide to Functional Programming
A Sceptical Guide to Functional ProgrammingGarth Gilmour
 
Introduction to source{d} Engine and source{d} Lookout
Introduction to source{d} Engine and source{d} Lookout Introduction to source{d} Engine and source{d} Lookout
Introduction to source{d} Engine and source{d} Lookout source{d}
 
Building DSLs On CLR and DLR (Microsoft.NET)
Building DSLs On CLR and DLR (Microsoft.NET)Building DSLs On CLR and DLR (Microsoft.NET)
Building DSLs On CLR and DLR (Microsoft.NET)Vitaly Baum
 
Big Data Day LA 2015 - Compiling DSLs for Diverse Execution Environments by Z...
Big Data Day LA 2015 - Compiling DSLs for Diverse Execution Environments by Z...Big Data Day LA 2015 - Compiling DSLs for Diverse Execution Environments by Z...
Big Data Day LA 2015 - Compiling DSLs for Diverse Execution Environments by Z...Data Con LA
 
Templates presentation
Templates presentationTemplates presentation
Templates presentationmalaybpramanik
 
BCS SPA 2010 - An Introduction to Scala for Java Developers
BCS SPA 2010 - An Introduction to Scala for Java DevelopersBCS SPA 2010 - An Introduction to Scala for Java Developers
BCS SPA 2010 - An Introduction to Scala for Java DevelopersMiles Sabin
 
An Introduction to Scala for Java Developers
An Introduction to Scala for Java DevelopersAn Introduction to Scala for Java Developers
An Introduction to Scala for Java DevelopersMiles Sabin
 
Beyond javascript using the features of tomorrow
Beyond javascript   using the features of tomorrowBeyond javascript   using the features of tomorrow
Beyond javascript using the features of tomorrowAlexander Varwijk
 
What can be done with Java, but should better be done with Erlang (@pavlobaron)
What can be done with Java, but should better be done with Erlang (@pavlobaron)What can be done with Java, but should better be done with Erlang (@pavlobaron)
What can be done with Java, but should better be done with Erlang (@pavlobaron)Pavlo Baron
 
Flow or Type - how to React to that?
Flow or Type - how to React to that?Flow or Type - how to React to that?
Flow or Type - how to React to that?Krešimir Antolić
 
Clojure made simple - Lightning talk
Clojure made simple - Lightning talkClojure made simple - Lightning talk
Clojure made simple - Lightning talkJohn Stevenson
 
How Xslate Works
How Xslate WorksHow Xslate Works
How Xslate WorksGoro Fuji
 
Introduction to Scalding and Monoids
Introduction to Scalding and MonoidsIntroduction to Scalding and Monoids
Introduction to Scalding and MonoidsHugo Gävert
 

Similar a Domain-Specific Languages (20)

Java gets a closure
Java gets a closureJava gets a closure
Java gets a closure
 
C notes.pdf
C notes.pdfC notes.pdf
C notes.pdf
 
Expression trees in c#, Алексей Голубь (Svitla Systems)
Expression trees in c#, Алексей Голубь (Svitla Systems)Expression trees in c#, Алексей Голубь (Svitla Systems)
Expression trees in c#, Алексей Голубь (Svitla Systems)
 
Expression trees in c#
Expression trees in c#Expression trees in c#
Expression trees in c#
 
The Style of C++ 11
The Style of C++ 11The Style of C++ 11
The Style of C++ 11
 
A Sceptical Guide to Functional Programming
A Sceptical Guide to Functional ProgrammingA Sceptical Guide to Functional Programming
A Sceptical Guide to Functional Programming
 
Introduction to source{d} Engine and source{d} Lookout
Introduction to source{d} Engine and source{d} Lookout Introduction to source{d} Engine and source{d} Lookout
Introduction to source{d} Engine and source{d} Lookout
 
Building DSLs On CLR and DLR (Microsoft.NET)
Building DSLs On CLR and DLR (Microsoft.NET)Building DSLs On CLR and DLR (Microsoft.NET)
Building DSLs On CLR and DLR (Microsoft.NET)
 
Big Data Day LA 2015 - Compiling DSLs for Diverse Execution Environments by Z...
Big Data Day LA 2015 - Compiling DSLs for Diverse Execution Environments by Z...Big Data Day LA 2015 - Compiling DSLs for Diverse Execution Environments by Z...
Big Data Day LA 2015 - Compiling DSLs for Diverse Execution Environments by Z...
 
Templates presentation
Templates presentationTemplates presentation
Templates presentation
 
Os Welton
Os WeltonOs Welton
Os Welton
 
Java q ref 2018
Java q ref 2018Java q ref 2018
Java q ref 2018
 
BCS SPA 2010 - An Introduction to Scala for Java Developers
BCS SPA 2010 - An Introduction to Scala for Java DevelopersBCS SPA 2010 - An Introduction to Scala for Java Developers
BCS SPA 2010 - An Introduction to Scala for Java Developers
 
An Introduction to Scala for Java Developers
An Introduction to Scala for Java DevelopersAn Introduction to Scala for Java Developers
An Introduction to Scala for Java Developers
 
Beyond javascript using the features of tomorrow
Beyond javascript   using the features of tomorrowBeyond javascript   using the features of tomorrow
Beyond javascript using the features of tomorrow
 
What can be done with Java, but should better be done with Erlang (@pavlobaron)
What can be done with Java, but should better be done with Erlang (@pavlobaron)What can be done with Java, but should better be done with Erlang (@pavlobaron)
What can be done with Java, but should better be done with Erlang (@pavlobaron)
 
Flow or Type - how to React to that?
Flow or Type - how to React to that?Flow or Type - how to React to that?
Flow or Type - how to React to that?
 
Clojure made simple - Lightning talk
Clojure made simple - Lightning talkClojure made simple - Lightning talk
Clojure made simple - Lightning talk
 
How Xslate Works
How Xslate WorksHow Xslate Works
How Xslate Works
 
Introduction to Scalding and Monoids
Introduction to Scalding and MonoidsIntroduction to Scalding and Monoids
Introduction to Scalding and Monoids
 

Más de Javier Canovas

On the Analysis of Non-Coding Roles in Open Source Development
On the Analysis of Non-Coding Roles in Open Source DevelopmentOn the Analysis of Non-Coding Roles in Open Source Development
On the Analysis of Non-Coding Roles in Open Source DevelopmentJavier Canovas
 
Open Source Software Governance Guide: Developing a Matrix of Leading Questio...
Open Source Software Governance Guide: Developing a Matrix of Leading Questio...Open Source Software Governance Guide: Developing a Matrix of Leading Questio...
Open Source Software Governance Guide: Developing a Matrix of Leading Questio...Javier Canovas
 
A Model-based Chatbot Generation Approach to Converse with Open Data Sources
A Model-based Chatbot Generation Approach to Converse with Open Data SourcesA Model-based Chatbot Generation Approach to Converse with Open Data Sources
A Model-based Chatbot Generation Approach to Converse with Open Data SourcesJavier Canovas
 
Chatbots to Democratize the Access to Information and Internet Services
Chatbots to Democratize the Access to Information and Internet ServicesChatbots to Democratize the Access to Information and Internet Services
Chatbots to Democratize the Access to Information and Internet ServicesJavier Canovas
 
Analysis and Modeling of the Governance in General Programming Languages
Analysis and Modeling of the Governance in General Programming LanguagesAnalysis and Modeling of the Governance in General Programming Languages
Analysis and Modeling of the Governance in General Programming LanguagesJavier Canovas
 
Automatic Generation of Test Cases for REST APIs: a Specification-Based Approach
Automatic Generation of Test Cases for REST APIs: a Specification-Based ApproachAutomatic Generation of Test Cases for REST APIs: a Specification-Based Approach
Automatic Generation of Test Cases for REST APIs: a Specification-Based ApproachJavier Canovas
 
A UML Profile for Privacy Enforcement
A UML Profile for Privacy EnforcementA UML Profile for Privacy Enforcement
A UML Profile for Privacy EnforcementJavier Canovas
 
The Role of Foundations in Open Source Projects
The Role of Foundations in Open Source ProjectsThe Role of Foundations in Open Source Projects
The Role of Foundations in Open Source ProjectsJavier Canovas
 
An Empirical Study on the Maturity of the Eclipse Modeling Ecosystem
An Empirical Study on the Maturity of the Eclipse Modeling EcosystemAn Empirical Study on the Maturity of the Eclipse Modeling Ecosystem
An Empirical Study on the Maturity of the Eclipse Modeling EcosystemJavier Canovas
 
Example-driven Web API Specification Discovery
Example-driven Web API Specification DiscoveryExample-driven Web API Specification Discovery
Example-driven Web API Specification DiscoveryJavier Canovas
 
Software Modernization Revisited: Challenges and Prospects
Software Modernization Revisited:Challenges and ProspectsSoftware Modernization Revisited:Challenges and Prospects
Software Modernization Revisited: Challenges and ProspectsJavier Canovas
 
Findings from GitHub. Methods, Datasets and Limitations
Findings from GitHub. Methods, Datasets and LimitationsFindings from GitHub. Methods, Datasets and Limitations
Findings from GitHub. Methods, Datasets and LimitationsJavier Canovas
 
Enabling the Definition and Enforcement of Governance Rules in Open Source Sy...
Enabling the Definition and Enforcement of Governance Rules in Open Source Sy...Enabling the Definition and Enforcement of Governance Rules in Open Source Sy...
Enabling the Definition and Enforcement of Governance Rules in Open Source Sy...Javier Canovas
 
Exploring the Use of Labels to Categorize Issues in Open-Source Software Pro...
Exploring the Use of Labels to Categorize Issues in Open-Source Software Pro...Exploring the Use of Labels to Categorize Issues in Open-Source Software Pro...
Exploring the Use of Labels to Categorize Issues in Open-Source Software Pro...Javier Canovas
 
Composing JSON-based Web APIs
Composing JSON-based Web APIsComposing JSON-based Web APIs
Composing JSON-based Web APIsJavier Canovas
 
Retos Actuales en el Desarrollo de Lenguajes Específicos del Dominio
Retos Actuales en el Desarrollo de Lenguajes Específicos del DominioRetos Actuales en el Desarrollo de Lenguajes Específicos del Dominio
Retos Actuales en el Desarrollo de Lenguajes Específicos del DominioJavier Canovas
 
Discovering Implicit Schemas in JSON Data
Discovering Implicit Schemas in JSON DataDiscovering Implicit Schemas in JSON Data
Discovering Implicit Schemas in JSON DataJavier Canovas
 
Enabling the Collaborative Definition of DSMLs
Enabling the Collaborative Definition of DSMLsEnabling the Collaborative Definition of DSMLs
Enabling the Collaborative Definition of DSMLsJavier Canovas
 
Modernization in Eclipse
Modernization in EclipseModernization in Eclipse
Modernization in EclipseJavier Canovas
 
Software Modernization
Software ModernizationSoftware Modernization
Software ModernizationJavier Canovas
 

Más de Javier Canovas (20)

On the Analysis of Non-Coding Roles in Open Source Development
On the Analysis of Non-Coding Roles in Open Source DevelopmentOn the Analysis of Non-Coding Roles in Open Source Development
On the Analysis of Non-Coding Roles in Open Source Development
 
Open Source Software Governance Guide: Developing a Matrix of Leading Questio...
Open Source Software Governance Guide: Developing a Matrix of Leading Questio...Open Source Software Governance Guide: Developing a Matrix of Leading Questio...
Open Source Software Governance Guide: Developing a Matrix of Leading Questio...
 
A Model-based Chatbot Generation Approach to Converse with Open Data Sources
A Model-based Chatbot Generation Approach to Converse with Open Data SourcesA Model-based Chatbot Generation Approach to Converse with Open Data Sources
A Model-based Chatbot Generation Approach to Converse with Open Data Sources
 
Chatbots to Democratize the Access to Information and Internet Services
Chatbots to Democratize the Access to Information and Internet ServicesChatbots to Democratize the Access to Information and Internet Services
Chatbots to Democratize the Access to Information and Internet Services
 
Analysis and Modeling of the Governance in General Programming Languages
Analysis and Modeling of the Governance in General Programming LanguagesAnalysis and Modeling of the Governance in General Programming Languages
Analysis and Modeling of the Governance in General Programming Languages
 
Automatic Generation of Test Cases for REST APIs: a Specification-Based Approach
Automatic Generation of Test Cases for REST APIs: a Specification-Based ApproachAutomatic Generation of Test Cases for REST APIs: a Specification-Based Approach
Automatic Generation of Test Cases for REST APIs: a Specification-Based Approach
 
A UML Profile for Privacy Enforcement
A UML Profile for Privacy EnforcementA UML Profile for Privacy Enforcement
A UML Profile for Privacy Enforcement
 
The Role of Foundations in Open Source Projects
The Role of Foundations in Open Source ProjectsThe Role of Foundations in Open Source Projects
The Role of Foundations in Open Source Projects
 
An Empirical Study on the Maturity of the Eclipse Modeling Ecosystem
An Empirical Study on the Maturity of the Eclipse Modeling EcosystemAn Empirical Study on the Maturity of the Eclipse Modeling Ecosystem
An Empirical Study on the Maturity of the Eclipse Modeling Ecosystem
 
Example-driven Web API Specification Discovery
Example-driven Web API Specification DiscoveryExample-driven Web API Specification Discovery
Example-driven Web API Specification Discovery
 
Software Modernization Revisited: Challenges and Prospects
Software Modernization Revisited:Challenges and ProspectsSoftware Modernization Revisited:Challenges and Prospects
Software Modernization Revisited: Challenges and Prospects
 
Findings from GitHub. Methods, Datasets and Limitations
Findings from GitHub. Methods, Datasets and LimitationsFindings from GitHub. Methods, Datasets and Limitations
Findings from GitHub. Methods, Datasets and Limitations
 
Enabling the Definition and Enforcement of Governance Rules in Open Source Sy...
Enabling the Definition and Enforcement of Governance Rules in Open Source Sy...Enabling the Definition and Enforcement of Governance Rules in Open Source Sy...
Enabling the Definition and Enforcement of Governance Rules in Open Source Sy...
 
Exploring the Use of Labels to Categorize Issues in Open-Source Software Pro...
Exploring the Use of Labels to Categorize Issues in Open-Source Software Pro...Exploring the Use of Labels to Categorize Issues in Open-Source Software Pro...
Exploring the Use of Labels to Categorize Issues in Open-Source Software Pro...
 
Composing JSON-based Web APIs
Composing JSON-based Web APIsComposing JSON-based Web APIs
Composing JSON-based Web APIs
 
Retos Actuales en el Desarrollo de Lenguajes Específicos del Dominio
Retos Actuales en el Desarrollo de Lenguajes Específicos del DominioRetos Actuales en el Desarrollo de Lenguajes Específicos del Dominio
Retos Actuales en el Desarrollo de Lenguajes Específicos del Dominio
 
Discovering Implicit Schemas in JSON Data
Discovering Implicit Schemas in JSON DataDiscovering Implicit Schemas in JSON Data
Discovering Implicit Schemas in JSON Data
 
Enabling the Collaborative Definition of DSMLs
Enabling the Collaborative Definition of DSMLsEnabling the Collaborative Definition of DSMLs
Enabling the Collaborative Definition of DSMLs
 
Modernization in Eclipse
Modernization in EclipseModernization in Eclipse
Modernization in Eclipse
 
Software Modernization
Software ModernizationSoftware Modernization
Software Modernization
 

Último

Russian Call Girls in Andheri Airport Mumbai WhatsApp 9167673311 💞 Full Nigh...
Russian Call Girls in Andheri Airport Mumbai WhatsApp  9167673311 💞 Full Nigh...Russian Call Girls in Andheri Airport Mumbai WhatsApp  9167673311 💞 Full Nigh...
Russian Call Girls in Andheri Airport Mumbai WhatsApp 9167673311 💞 Full Nigh...Pooja Nehwal
 
JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...
JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...
JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...anjaliyadav012327
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)eniolaolutunde
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfciinovamais
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactdawncurless
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdfSoniaTolstoy
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...EduSkills OECD
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphThiyagu K
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxSayali Powar
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfsanyamsingh5019
 
mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docxPoojaSen20
 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDThiyagu K
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxheathfieldcps1
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationnomboosow
 
The byproduct of sericulture in different industries.pptx
The byproduct of sericulture in different industries.pptxThe byproduct of sericulture in different industries.pptx
The byproduct of sericulture in different industries.pptxShobhayan Kirtania
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Krashi Coaching
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introductionMaksud Ahmed
 
9548086042 for call girls in Indira Nagar with room service
9548086042  for call girls in Indira Nagar  with room service9548086042  for call girls in Indira Nagar  with room service
9548086042 for call girls in Indira Nagar with room servicediscovermytutordmt
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionSafetyChain Software
 

Último (20)

Russian Call Girls in Andheri Airport Mumbai WhatsApp 9167673311 💞 Full Nigh...
Russian Call Girls in Andheri Airport Mumbai WhatsApp  9167673311 💞 Full Nigh...Russian Call Girls in Andheri Airport Mumbai WhatsApp  9167673311 💞 Full Nigh...
Russian Call Girls in Andheri Airport Mumbai WhatsApp 9167673311 💞 Full Nigh...
 
JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...
JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...
JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impact
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot Graph
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdf
 
mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docx
 
Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1
 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SD
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communication
 
The byproduct of sericulture in different industries.pptx
The byproduct of sericulture in different industries.pptxThe byproduct of sericulture in different industries.pptx
The byproduct of sericulture in different industries.pptx
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
9548086042 for call girls in Indira Nagar with room service
9548086042  for call girls in Indira Nagar  with room service9548086042  for call girls in Indira Nagar  with room service
9548086042 for call girls in Indira Nagar with room service
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory Inspection
 

Domain-Specific Languages

  • 1. Domain-specific Languages Javier Luis Cánovas Izquierdo javier.canovas@inria.fr February 2013
  • 5. What is a language? From Wikipedia: Language is the human capacity for acquiring and using complex systems of communication, and a language is any specific example of such a system.
  • 6. What is a language? From Wikipedia: Language is the human capacity for acquiring and using complex systems of communication, and a language is any specific example of such a system. Why? How?
  • 7. What is a language? From Wikipedia: Language is the human capacity for acquiring and using complex systems of communication, and a language is any specific example of such a system. Why? How?
  • 8. What is a language? From Wikipedia: Language is the human capacity for acquiring and using complex systems of communication, and a language is any specific example of such a system. Why? How?
  • 9. What is a language? Table
  • 10. What is a language? From the formal language theory: A language is a set of linguistic utterances, (i.e., words), also called strings or sentences, which are composed by a set of symbols of an alphabet. A grammar is the set of structural rules that governs the composition of linguistic utterances
  • 11. What is a language? From the formal language theory: A language is a set of linguistic utterances, (i.e., words), also called strings or sentences, which are composed by a set of symbols of an alphabet. A grammar is the set of structural rules that governs the composition of linguistic utterances Why? How?
  • 12. What is a language? From the formal language theory: A language is a set of linguistic utterances, (i.e., words), also called strings or sentences, which are composed by a set of symbols of an alphabet. A grammar is the set of structural rules that governs the composition of linguistic utterances Why? How?
  • 13. What is a language? From the formal language theory: A language is a set of linguistic utterances, (i.e., words), also called strings or sentences, which are composed by a set of symbols of an alphabet. A grammar is the set of structural rules that governs the composition of linguistic utterances Why? How?
  • 14. A grammar? machineDefinition: MACHINE OPEN_SEP stateList transitionList CLOSE_SEP; machine { stateList: SOne STwo state (COMMA state)*; T1 { SOne STwo } } state: ID_STATE; machine { transitionList: S_first S_second transition (COMMA transition)*; T1 { S_first S_second} T1 { S_second S_first } transition: ID_TRANSITION OPEN_SEP } state state CLOSE_SEP; MACHINE: ‘machine’; machine { OPEN_SEP: ‘{’; SA SB SC SD CLOSE_SEP: ‘{’; T1 { SA SD } COMMA: ‘,’; T2 { SA SB } ID_STATE: ‘S’ ID; T3 { SB SC } ID_TRANSITION: ‘T’ (0..9)+; T4 { SB SA } ID: (a..zA..Z_) (a..zA..Z0..9)*; }
  • 21. GPLs • Java • Delphi class HelloWorldApp { program ObjectPascalExample; public static void main(String[] args) { type System.out.println("Hello World!"); } THelloWorld = object } procedure Put; end; var • C HelloWorld: THelloWorld; procedure THelloWorld.Put; begin #include <stdio.h> WriteLn('Hello, World!'); int main(void) end; { begin printf("hello, worldn"); New(HelloWorld); } HelloWorld.Put; Dispose(HelloWorld); end. • Python print("Hello world")
  • 23. DSLs • SQL • CSS CREATE TABLE Employee ( body { id INT NOT NULL IDENTITY (1,1) PRIMARY KEY, text-align: left; name VARCHAR(50), font-family: helvetica, sans-serif; surname VARCHAR(50), } address VARCHAR(255), h1 { city VARCHAR(60), border: 1px solid #b4b9bf; telephone VARCHAR(15), font-size: 35px;} ) • HTML • LaTeX ifthenelse{boolean{showcomments}} {newcommand{nb}[2]{ <html> fcolorbox{gray}{yellow}{ <head> bfseriessffamilyscriptsize#1 <title>Example</title> } </head> {sfsmalltextit{#2}} <body> } <p>Example</p> newcommand{version}{scriptsize$-$working$-$} </body> } </html> {newcommand{nb}[2]{} newcommand{version}{} }
  • 24. DSLs • OCL employees->includes(#dent) self.questions->size self.employer->size self.employee->select (v | v.wages>10000 )->size Student.allInstances • MiniUML ->forAll( p1, p2 | package Courses { p1 <> p2 implies p1.name <> p2.name ) class Student { attribute studentid : number key attribute firstName : string attribute lastName : string • ATL } class Course { unique lazy rule customFuncCall { attribute name : string key from attribute description : string optional src : TupleType(class1 : MM!EClass, attribute ects: number class2 : MM!EClass) } to } t : FOL!CustomFuncCall( name <- src.class1.name, declaration <- src.class1, arguments <- Sequence{thisModule.variable(src)} ) }
  • 25. GPLs vs DSLs
  • 26. GPLs vs DSLs A GPL provides notations that are used to describe a computation in a human-readable form that can be translated into a machine-readable representation. A GPL is a formal notation that can be used to describe problem solutions in a precise manner. A GPL is a notation that can be used to write programs. A GPL is a notation for expressing computation. A GPL is a standardized communication technique for expressing instructions to a computer. It is a set of syntactic and semantic rules used to define computer programs.
  • 27. GPLs vs DSLs The boundary isn‟t as clear as it could be. Domain-specificity is not black-and- white, but instead gradual: a language is more or less domain specific
  • 28. GPLs vs DSLs The boundary isn‟t as clear as it could be. Domain-specificity is not black-and- white, but instead gradual: a language is more or less domain specific
  • 30. DSL The big picture What is a DSL? Why? Anatomy Development Actors Best practices Worst practices
  • 31. DSL The big picture What is a DSL? Why? Anatomy Development Actors Best practices Worst practices
  • 37. DSL The big picture What is a DSL? Why? Anatomy Development Actors Best practices Worst practices
  • 38. What is a DSL • In general: Language specially designed to perform a task in a certain domain
  • 39. What is a DSL • In general: Language specially designed to perform a task in a certain domain • In the context of computer science: A formal processable language targeting at a specific viewpoint or aspect of a software system. It's semantics flexibility and notation is designed in order to support working with that viewpoint as good as possible
  • 40. And the rest of languages? DSLs SQL, HTML C, Cobol Assembler Machine
  • 41. Why DSLs? Abstraction Gap Assembler C, Java DSLs Problem Solution Domain Domain
  • 42. What is offered? Higher Avoid abstractions redundancy Separation Use domain of concerns concepts
  • 43. What are the advantages? Productivity Platform Independent Quality Benefits No Overhead V&V Domain Communication Expert
  • 44. What for? Architecture • Generation of interfaces Utility • Generation of WSDL Full Technical • Set up of skeleton projects Requirements Application Analysis Product Line
  • 45. What for? Architecture Utility Full Technical • Architecture-Definition Languages • AUTOSAR Requirements Application Analysis Product Line
  • 46. What for? Architecture • Model transformation languages: ATL, Acceleo Utility • Constraints language: OCL Full Technical Requirements Application Analysis Product Line
  • 47. What for? Architecture Utility Full Technical Requirements • Describe a cooling algorithm in refrigerators Application • Configure hearing aids Analysis • Insurance mathematics Product Line
  • 48. What for? Architecture Utility Full Technical Requirements Application Analysis • Pseudo-structured natural languages Product Line
  • 49. What for? Architecture Utility Full Technical Requirements Application • Mathematical formalisms Analysis Product Line
  • 50. What for? Architecture Utility Full Technical Requirements • Composition languages • Workflow languages Application Analysis Product Line
  • 51. What is a domain? Inductive / Bottom-up • The domain is defined in terms of existing software used to address a particular class of problems or products • A domain D is identified as a set of programs with common characteristics or similar purpose • Often such domains do not exists outside the realm of software • Special case when we define a domain as a subset of programs written in a specific language (idiom) Deductive / top-down • The domain is defined as a body of knowledge about the real world, i.e., outside the realm of software • A domain D is a body of knowledge for which we want to provide some form of software support • Much harder to address using DSLs because of the need to understand precisely the nature of the domain and identify interesting programs in such domain
  • 53. DSL The big picture What is a DSL? Why? Anatomy Development Actors Best practices Worst practices
  • 54. Anatomy Concepts & Well-formed Textual Graphical Denotational Pragmatic Translational Operational relationships rules Abstract Concrete Semantics Syntax Syntax DSL
  • 55. A first look Abstract Syntax • Describes the structure of the language and the way the different primitives can be combined together, independently of any particular representation or encoding. Concrete Syntax • Describes specific representations of the modeling language, covering encoding and/or visual appearance Semantics • Describing the meaning of the elements defined in the language and the meaning of the different ways of combining them.
  • 56. A first look Abstract Syntax • Describes the structure of the language and the way the different primitives can be combined together, independently of any particular representation or encoding. Concrete Syntax • Describes specific representations of the modeling language, covering encoding and/or visual appearance Semantics • Describing the meaning of the elements defined in the language and the meaning of the different ways of combining them.
  • 57. A first look Abstract Syntax • Describes the structure of the language and the way the different primitives can be combined together, independently of any particular representation or encoding. Concrete Syntax • Describes specific representations of the modeling language, covering encoding and/or visual appearance Semantics How this is • Describing the meaning of the elements defined in the language executed? and the meaning of the different ways of combining them.
  • 58. Anatomy Concepts & Well-formed Textual Graphical Denotational Pragmatic Translational Operational relationships rules Abstract Concrete Semantics Syntax Syntax DSL
  • 59. Abstract Syntax • Metamodelling techniques – UML notation • Concept => Class • Property => Attribute • Contaiment Relationship => Composite Association • Relationship => Association • Specialization => Inheritance • Package => Package • Well-formed rules – OCL expressions context Transition inv: self.source <> self.target context Machine inv: self.states ->exists(s | s.oclIsKinfOf(InitialState))
  • 60. Anatomy Concepts & Well-formed Textual Graphical Denotational Pragmatic Translational Operational relationships rules Abstract Concrete Semantics Syntax Syntax DSL
  • 61. Concrete Syntax Textual Graphical
  • 62. Concrete Syntax Textual
  • 63. Concrete Syntax • Textual • Graphical digraph Modernization { Start -> ExtractingModels; ExtractingModels -> MDD [label="C2M"]; MDD -> MDD [label="M2M"]; MDD -> SystemGeneration [label="M2C"]; SystemGeneration -> End; Start [shape=point,width=0.2,label=""]; ExtractingModels [label="Extracting Models",shape=ellipse]; MDD [shape=ellipse]; SystemGeneration [label="System Generation",shape=ellipse]; End [shape=doublecircle,label="",width=0.2, fillcolor=black,style=filled]; }
  • 64. Textual Syntax Grammar Metamodel conforms To conforms To Machine Machine Model A Model C A Machine C B Model B Grammarware Modelware
  • 65. Textual Syntax Grammar Metamodel conforms To conforms To Machine Machine Model A Model C A Machine C B Model B Grammarware Modelware
  • 66. Textual Syntax machineDefinition: MACHINE OPEN_SEP stateList transitionList CLOSE_SEP; stateList: state (COMMA state)*; state: ID_STATE; transitionList: transition (COMMA transition)*; transition: ID_TRANSITION OPEN_SEP state state CLOSE_SEP; MACHINE: ‘machine’; conforms To machine { OPEN_SEP: ‘{’; SOne STwo CLOSE_SEP: ‘{’; T1 { SOne STwo } COMMA: ‘,’; } ID_STATE: ‘S’ ID; ID_TRANSITION: ‘T’ (0..9)+; ID: (a..zA..Z_) (a..zA..Z0..9)*;
  • 67. Textual Syntax machineDefinition: MACHINE OPEN_SEP stateList transitionList CLOSE_SEP; stateList: state (COMMA state)*; state: ID_STATE; transitionList: transition (COMMA transition)*; transition: ID_TRANSITION OPEN_SEP state state CLOSE_SEP; MACHINE: ‘machine’; conforms To machine { OPEN_SEP: ‘{’; SOne STwo CLOSE_SEP: ‘{’; T1 { SOne STwo } COMMA: ‘,’; } ID_STATE: ‘S’ ID; ID_TRANSITION: ‘T’ (0..9)+; ID: (a..zA..Z_) (a..zA..Z0..9)*;
  • 68. You have already work with one package Courses { class Student { attribute studentid : number key attribute firstName : string attribute lastName : string } sintax of class Course { attribute name : string key conforms To attribute description : string optional attribute ects: number } } package Courses { Ecore MM class Student { attribute studentid : number key attribute firstName : string attribute lastName : string } conforms To class Course { attribute name : string key sintax of attribute description : string optional attribute ects: number } association Enrolment { end student : Student [1..*] end course : Course [0..*] } }
  • 69. Textual Syntax • Grammar-oriented (Xtext) Grammar Metamodel conforms To conforms To Graph B Model A
  • 70. Xtext • Model-Driven framework to develop textual DSLs • Is part of Eclipse Modeling Project • Is part of a DSL tooling initally called Open Architecture Ware • Main features: – Syntax Coloring – Content Assist – Validation and Quick Fixes – Advanced Java Integration – Integration with other Eclipse tools
  • 71. Textual Syntax • Metamodel-oriented (EMFText) Grammar Metamodel conforms To conforms To Graph B Model A
  • 72. EMFText • Model-Driven framework to develop textual DSLs • Developed as a Eclipse plugin • Main features: – Syntax Coloring – Content Assist – Validation and Quick Fixes – Reference resolving mechanism
  • 73. EMFText • Model-Driven framework to develop textual DSLs • Developed as a Eclipse plugin • Main features: – Syntax Coloring – Content Assist – Validation and Quick Fixes – Reference resolving mechanism
  • 74. Graphical Syntax A draw is better than a long explanation digraph Modernization { Start -> ExtractingModels; ExtractingModels -> MDD [label="C2M"]; MDD -> MDD [label="M2M"]; MDD -> SystemGeneration [label="M2C"]; SystemGeneration -> End; Start [shape=point,width=0.2,label=""]; ExtractingModels [label="Extracting Models",shape=ellipse]; MDD [shape=ellipse]; SystemGeneration [label="System Generation",shape=ellipse]; End [shape=doublecircle,label="",width=0.2, fillcolor=black,style=filled]; }
  • 75. GMF • Graphical Modeling Framework – Model-Driven Framework to develop graphical editors based on EMF and GEF – GMF is part of Eclipse Modeling Project – Provides a generative component to create the DSL tooling – Provides a runtime infrastructure to facilitate the development of graphical DSLs
  • 76. Alternatives • GMF can be too complex • EuGENia – Automatically generated GMF infrastructure – Lowers the entrance barrier for creating GMF editors – Provides textual DSLs and wizards to define the graphical DSL • GMF simple mapping editor – Graphical DSL to configure GMF – Generators for creating the required GMF infrastructure
  • 77. Graphical vs. Textual • Success depends on how the notation fits the domain class Person { Person has (name, surname) private String name; private String name; } Person name : string surname : string
  • 78. Graphical vs. Textual • Success depends on how the notation fits the domain class Person { Person has (name, surname) private String name; private String name; } Person name : string surname : string • Graphical DSLs are not always easier to understand
  • 79. Graphical vs. Textual • Expression of common concerns simple and concise class Person { private String name; Person has (name, surname) private String name; }
  • 80. Graphical vs. Textual • Expression of common concerns simple and concise class Person { private String name; Person has (name, surname) private String name; } • Providing sensible defaults public class MyClass { public void readStream(InputStream stream, boolean closeStreamAferReading) { ... } } public class MyClass { public void readStream(InputStream stream) { readStream(stream, true); } public void readStream(InputStream stream, boolean closeStreamAferReading) { ... } }
  • 81. Graphical vs. Textual • Verbosity for less common concerns Person has (name, surname) Person has (name, surname) extension name is String surname is String • Tool support and limitations – Syntax highlighting – Outline – Auto-completion – Validation – Layout – …
  • 84. Recommendations Semiotic clarity Perceptual Cognitive Fit Discriminality Graphic Economy Physics Semantics transparency of notations Complexity Dual Coding Management Visual Cognitive Expressiveness Integration
  • 85. Recommendations There should be a 1:1 correspondence Semiotic clarity between concepts and graphical symbols Perceptual Cognitive Fit Discriminality Graphic Economy Physics Semantics transparency of notations Complexity Dual Coding Management Visual Cognitive Expressiveness Integration
  • 86. Recommendations Semiotic clarity Perceptual Cognitive Fit Discriminality Graphic Economy Physics Semantics transparency of notations Complexity Dual Coding Management Visual Cognitive Expressiveness Integration
  • 87. Recommendations Semiotic clarity Different symbols should be Perceptual clearly distinguishable from each Cognitive Fit Discriminality other Graphic Economy Physics Semantics transparency of notations Complexity Dual Coding Management Visual Cognitive Expressiveness Integration
  • 88. Recommendations Semiotic clarity Perceptual Cognitive Fit Discriminality Graphic Economy Physics Semantics transparency of notations Complexity Dual Coding Management Visual Cognitive Expressiveness Integration
  • 89. Recommendations Semiotic clarity Perceptual Cognitive Fit Discriminality Graphic Economy Physics Semantics transparency of Use visual representations notations whose apprarance suggests their meaning Complexity Dual Coding Management Visual Cognitive Expressiveness Integration
  • 90. Recommendations Semiotic clarity Perceptual Cognitive Fit Discriminality Graphic Economy Physics Semantics transparency of notations Complexity Dual Coding Management Include mechanisms for dealing Visual Cognitive with complexity Expressiveness Integration
  • 91. Recommendations Semiotic clarity Perceptual Cognitive Fit Discriminality Graphic Economy Physics Semantics transparency of notations Complexity Dual Coding Management Visual Cognitive Expressiveness Integration Include explicit mechanisms to support integration of information from different diagrams
  • 92. Recommendations Semiotic clarity Perceptual Cognitive Fit Discriminality Graphic Economy Physics Semantics transparency of notations Complexity Dual Coding Management Visual Cognitive Expressiveness Integration Use the full range and capacities of visual variables
  • 93. Recommendations Semiotic clarity Perceptual Cognitive Fit Discriminality Graphic Economy Physics Semantics transparency of notations Complexity Dual Coding Management Visual Cognitive Expressiveness Integration
  • 94. Recommendations Semiotic clarity Perceptual Cognitive Fit Discriminality Graphic Economy Physics Semantics transparency of notations Complexity Dual Coding Management Visual Cognitive Expressiveness Integration
  • 95. Recommendations Semiotic clarity Perceptual Cognitive Fit Discriminality Graphic Economy Physics Semantics transparency of notations Complexity Dual Coding Management Visual Cognitive Expressiveness Integration
  • 96. Recommendations Semiotic clarity Perceptual Cognitive Fit Discriminality Graphic Economy Physics Semantics transparency of notations Complexity Dual Coding Management Use text to complement graphics Visual Cognitive Expressiveness Integration
  • 97. Recommendations Semiotic clarity Perceptual Cognitive Fit Discriminality Graphic Economy Physics Semantics transparency of notations Complexity Dual Coding Management Visual Cognitive Expressiveness Integration
  • 98. Recommendations Semiotic clarity Perceptual Cognitive Fit Discriminality Graphic Economy Physics Semantics transparency The number of different graphical symbols should be cognitively of manageable notations Complexity Dual Coding Management Visual Cognitive Expressiveness Integration
  • 99. Recommendations Use different visual dialects for different tasks and audiences Semiotic clarity Perceptual Cognitive Fit Discriminality Graphic Economy Physics Semantics transparency of notations Complexity Dual Coding Management Visual Cognitive Expressiveness Integration
  • 100. Anatomy Concepts & Well-formed Textual Graphical Denotational Pragmatic Translational Operational relationships rules Abstract Concrete Semantics Syntax Syntax DSL
  • 101. Semantics Denotational • Use of mathematical formalisms • Complex Pragmatic • Use of examples to illustrate the language • Input / outputs • Hard to deduce the real semantics Traslational • Translation to other well-known language • Similar to compilation Operational • Sequence of operations • Virtual machine
  • 102. DSL The big picture What is a DSL? Why? Anatomy Development Actors Best practices Worst practices
  • 103. Development process • Create a new one or reuse an existing one Decision • Enable non-technical users to participate • Problem domain identified • Domain knowledge gathered from end-users Analysis • Domain model: Scope, vocabulary, concepts, commonalities and variabilities • Define the DSL components (abstract and concrete syntaxes, semantics) Design • Decide best approach to implement the language • Develop DSL components (Xtext, EMFText, GMF, etc…) Implemen • If it is executable, develop the corresponding interpreter or compiler tation • Test the language Validation • Validate the language with the end-user
  • 104. Regarding the implementation External vs Internal DSL Grammar Host Language conforms To Internal DSL 1 DSL DSL Text Text Internal DSL 2
  • 106. External vs Internal Internal External
  • 107. DSL The big picture What is a DSL? Why? Anatomy Development Actors Best practices Worst practices
  • 108. Actors
  • 109. Actors High Domain Knowledge Low Low High Technical Level
  • 110. DSL The big picture What is a DSL? Why? Anatomy Development Actors Best practices Worst practices
  • 111. Best practices Limit Viewpoints Expressiveness Learn from Evolution GPLs Support Tooling
  • 112. DSL The big picture What is a DSL? Why? Anatomy Development Actors Best practices Worst practices
  • 113. Worst practices • Initial conditions – Only Gurus allowed • Believe that only gurus can build languages ir that “I‟m smart and don‟t need help” – Lack of Domain Understanding • Insufficiently understanding the problem domain or the solution domain – Analysis paralysis • Wanting the language to be theoretically complete, with its implementation assured
  • 114. Worst practices • The source for Language Concepts – UML: New Wine in Old Wineskins • Extending a large, general-purpose modeling language – 3GL Visual Programming • Duplicanting the concepts and semantics of traditional programming languages – Code: The Library is the Language • Focusing the language on the current code‟s technical details – Tool: if you have a hammer • Letting the tool‟s technical limitations dictate language development
  • 115. Worst practices • The resulting language – Too Generic / Too Specific • Creating a language with a few generic concepts or too many specific concepts, or a language that can create only a few models – Misplaced Emphasis • Too strongly emphasizing a particular domain feature – Sacred at Birth • Viewing the initial language version as unalterable
  • 116. Worst practices • Language Notation – Predetermined Paradigm • Choosing the wrong representational paradigm or the basis of a blinkered view – Simplistic Symbols • Using symbols that are too simple or similar or downright ugly
  • 117. Worst practices • Language Use – Ignoring the use process • Failing to consider the language‟s real-life usage – No training • Assuming everyone understands the language like its creator – Pre-adoption Stagnation • Letting the language stagnate after successful adoption
  • 119. Xtext • Eclipse Project – Part of Eclipse Modeling – Part of Open Architecture Ware • Model-driven development of Textual DSLs • Part of a family of languages – Xtext – Xtend – Xbase – Xpand – Xcore
  • 122. The grammar language • Corner-stone of Xtext • DSL to define textual languages – Describe the concrete syntax – Specify the mapping between concrete syntax and domain model • From the grammar, it is generated: – The domain model – The parser – The tooling
  • 123. Main advantages • Consistent look and feel • Textual DSLs are a resource in Eclipse • Open editors can be extended • Complete framework to develop DSLs • Easy to connect to any Java-based language
  • 124. Proposed development process Create Xtext Project Defining the DSL Grammar definition Workflow definition Configure Fomatting (opt) Configure Scoping (opt) Configure validation (opt) Configure generator Generate DSL tooling
  • 125. Example DSL • Poll System application – Define a Poll with the corresponding questions – Each question has a text and a set of options – Each option has a text • Generate the application in different platforms Poll System Generator Definition
  • 126. Example DSL Generator
  • 128. Grammar Definition Grammar reuse
  • 132. Grammar Definition Multivalue asignment Simple asignment ?= Boolean asignment
  • 133. Grammar Definition Cardinality (others: * ?)
  • 134. Grammar Definition Containment
  • 141. GMF • Eclipse project – Eclipse Modelling components – Uses • EMF (Eclipse Modeling Framework) • GEF (Graphical Editing Framework) • Model-driven framework for Graphical DSLs – Everything is a model • Still under development (perpetual beta) • The only alternative for now • DSL definition easy, tweaking hard
  • 144. Parts of GMF • Tooling – Editors for notation, semantic and tooling – GMF Dashboard – Generator to produce the DSL implementation • Runtime – Generated DSLs depend on the GMF Runtime to produce an extensible graphical editor
  • 145. Main advantages • Consistent look and feel • Diagram persistence • Open editors can be extended by third-parties • Already integrated with various Eclipse components • Extensible notation metamodel to enable the isolation of notation from semantic concerns • Future community enhancements will easily be integrated
  • 146. Proposed development process Create GMF Project Defining the DSL Domain Model Graphical Definition Tooling Definition Develop Mapping Model Create Generator Model Generate Diagram Plugin
  • 148. Defining a graphical DSL Domain Graphical Tooling Model Definition Definition Mapping Model
  • 150. Domain Model • Concepts – PollSystem – Poll – Question – Option • Attributes – A Poll has a name – A Question has an identifier and a descriptive text – An Option has an identifier and a descriptive text • Relationships – PollSystem is composed of polls and questions – Question has a set of options
  • 151. Graphical Definition • Defines the graphical representation of the DSL elements • Tree-based editor • Main elements – Node  DSL node – Connector  DSL link – Compartment  Node compartment (for complex nodes) – Label  The label of a Node, Connector or compartment – Figure descriptor  Graphical representation of a Node • Rectangle, ellipse, polygon,… • Polyline,… • Decorators, icons, … • Custom figures,… • Provides simple figures that they can be customized
  • 152. Graphical Definition • A model will represent a PollSystem • A Poll will be a node • A Question will be a rectangular node • An Option will be a rectangular node included in the Question node
  • 153. Tooling Definition • Defines the tooling to create the DSL elements in the editor • Tree-based editor • Main elements – Tool Group  Set of tools – Creation Tool  Tool for creating a DSL element (node, connector, etc,…) • Each tool can have an icon and a contextual help
  • 154. Mapping Model • Defines the correspondeces between model elements, graphical elements and tooling elements • Automatically generated (at least a kick-off version) • Tree-based editor • Main elements – Top Node Reference  Maps a concept of the root model element – Node Mapping  Maps a concept with the graphical node and tooling – Feature Label Mapping  Maps a concept attribute with the graphical label – Child Reference  Maps a containment reference with the compartment – Compartment Mapping  Maps a concet with the graphical node – Link Mapping  Maps a reference of the root model elements
  • 156. References 1. Kleppe, A.: Software Language Engineering 2. J. Bézivin, “Model Driven Engineering: An Emerging Technical Space,” in GTTSE conf., 2006, vol. 4143, pp. 36–64 3. M. Brambilla, J. Cabot, M. Wimmer. “Model-Driven Software Engineering in Practice”. Morgan & Claypool 4. M. Mernik, J. Heering, and A. M. Sloane, “When and how to develop domain-specific languages,” ACM Computing Surveys, vol. 37, no. 4, pp. 316–344, Dec. 2005. 5. Brambilla, M., Cabot, J., Wimmer, M.: Model-Driven Software Engineering in Practice 6. Y. Sun and Z. Demirezen, “Is My DSL a Modeling or Programming Language?,” in DSPD conf., 2008. 7. M. Strembeck and U. Zdun, “An approach for the systematic development of domain specific languages,” Software: Practice and Experience, vol. 39, pp. 1253–1292, 2009. 8. J.-M. Favre, “Foundations of Meta-Pyramids : Languages vs . Metamodels,” pp. 1–28. 9. J. De Lara and E. Guerra, “Languages for Model Driven Engineering,” in ECMDA conf., 2012, vol. 7349, pp. 259–274. 10. D. L. Moody, “The „physics‟ of notations: Toward a scientific basis for constructing visual notations in software engineering,” Software Engineering, IEEE Transactions on, vol. 35, no. 6, pp. 756–779, Nov. 2009. 11. D. L. Moody and J. Van Hillegersberg, “Evaluating the visual syntax of UML: An analysis of the cognitive effectiveness of the UML family of diagrams,” in SLE conf., 2009, vol. 5452, no. Figure 1, pp. 16–34. 12. M. Völter, “MD */ DSL Best Practices Update March 2011,” 2011. 13. S. Kelly and R. Pohjonen, “Worst practices for domain-specific modeling,” IEEE Software, vol. 26, no. 4, pp. 22–29, 2009. 14. M. Völter, “DSL Engineering. Designing, Implementing and Using Domain-Specific Languages”. 15. I. Kurtev, J. Bézivin, and M. Aksit, “Technological Spaces  an Initial Appraisal,” in DOA, 2002, pp. 1–6. : 16. Xtext Reference Guide 17. GMF documentation