SlideShare a Scribd company logo
1 of 125
Challenges in DSL Design
   Sebastian Zarnekow - Sven Efftinge
What do today’s DSL
  projects look like?
Lots of problems are solved
Lots of problems are solved
              textual
         DSL frameworks
Lots of problems are solved
              textual
         DSL frameworks
                             graphical
                          DSL frameworks
Lots of problems are solved
              textual
         DSL frameworks
                              graphical
                           DSL frameworks


                          nice transformation
                               languages
Lots of problems are solved
              textual
         DSL frameworks
                               graphical
                            DSL frameworks


                           nice transformation
                                languages

        open source IDEs
Lots of problems are solved
                       textual
                  DSL frameworks
                                         graphical
                                      DSL frameworks



nice validation                      nice transformation
  languages                               languages

                  open source IDEs
Lots of problems are solved
                       textual
                  DSL frameworks
 nice template                           graphical
   languages                          DSL frameworks



nice validation                      nice transformation
  languages                               languages

                  open source IDEs
Lots of problems are solved
                       textual
                  DSL frameworks
 nice template                           graphical
   languages                          DSL frameworks

              proven infrastructure
nice validation                      nice transformation
  languages                               languages

                  open source IDEs
In most cases
DSLs cover only 80%
... but what’s missing?
Expressions
Why are expressions
     missing?
Hiding
implementation details?
Information hiding in computer science is the
     principle of the hiding of design decisions in a
  computer program that are most likely to change,
   thus protecting other parts of the program from
      change if the design decision is changed. The
protection involves providing a stable interface which
    shields the remainder of the program from the
 implementation (the details that are most likely to
                         change).
 Hiding
 implementation details?
ation of c
Separ           once
                     rns?
atio   n of c
   Se par                         once
                                           rns?
 In computer science, separation of concerns (SoC) is
   the process of breaking a computer program into
distinct features that overlap in functionality as little as
possible. A concern is any piece of interest or focus in a
   program. Typically, concerns are synonymous with
                  features or behaviors.
•   expressions are complicated to
    implement
•   expressions are complicated to
    implement
•   expressions of target platform
    language are already understood
•   expressions are complicated to
    implement
•   expressions of target platform
    language are already understood
•   tooling and libraries can be reused
What’s the price we pay?
Protected Regions
Protected Regions
• generated and manually written code mixed
  up
Protected Regions
• generated and manually written code mixed
  up
• manual deletion of artifacts
Protected Regions
• generated and manually written code mixed
  up
• manual deletion of artifacts
• platform dependent information
Protected Regions
• generated and manually written code mixed
  up
• manual deletion of artifacts
• platform dependent information
• information is dispersed!
Generation Gap Pattern
Generation Gap Pattern
     technically required type hierarchies
Generation Gap Pattern
     technically required type hierarchies
                    additional complexity
Generation Gap Pattern
     technically required type hierarchies
                    additional complexity
         platform dependent information
Generation Gap Pattern
     technically required type hierarchies
                    additional complexity
         platform dependent information
            information dispersed!
Black box
target language literals
Black box
target language literals
• bound to target platform
Black box
target language literals
• bound to target platform
 • no option for MDA friends
Black box
target language literals
• bound to target platform
 • no option for MDA friends
• no tooling!
Black box
target language literals
• bound to target platform
 • no option for MDA friends
• no tooling!
• long turnarounds!
reuse target platform

     developers know it

          libraries

      very good tooling

           proven

    dispersed information

complexity in code generation

  hard to built interpreters
reuse target platform

     developers know it

          libraries

      very good tooling

           proven

    dispersed information

complexity in code generation

  hard to built interpreters
reuse target platform

     developers know it

          libraries

      very good tooling

           proven

    dispersed information

complexity in code generation

  hard to built interpreters
reuse target platform

     developers know it

          libraries

      very good tooling

           proven

    dispersed information

complexity in code generation

  hard to built interpreters
reuse target platform

     developers know it

          libraries

      very good tooling

           proven

    dispersed information

complexity in code generation

  hard to built interpreters
reuse target platform

     developers know it

          libraries

      very good tooling

           proven

    dispersed information

complexity in code generation

  hard to built interpreters
reuse target platform

     developers know it

          libraries

      very good tooling

           proven

    dispersed information

complexity in code generation

  hard to built interpreters
reuse target platform

     developers know it

          libraries

      very good tooling

           proven

    dispersed information

complexity in code generation

  hard to built interpreters
reuse target platform           invent expressions

     developers know it         non-dispersed information

          libraries                   very complex

      very good tooling               very expensive
                                relatively low potential for
           proven
                                    further abstraction
    dispersed information

complexity in code generation

  hard to built interpreters
reuse target platform           invent expressions

     developers know it         non-dispersed information

          libraries                   very complex

      very good tooling               very expensive
                                relatively low potential for
           proven
                                    further abstraction
    dispersed information

complexity in code generation

  hard to built interpreters
reuse target platform           invent expressions

     developers know it         non-dispersed information

          libraries                   very complex

      very good tooling               very expensive
                                relatively low potential for
           proven
                                    further abstraction
    dispersed information

complexity in code generation

  hard to built interpreters
reuse target platform           invent expressions

     developers know it         non-dispersed information

          libraries                   very complex

      very good tooling               very expensive
                                relatively low potential for
           proven
                                    further abstraction
    dispersed information

complexity in code generation

  hard to built interpreters
reuse target platform           invent expressions

     developers know it         non-dispersed information

          libraries                   very complex

      very good tooling               very expensive
                                relatively low potential for
           proven
                                    further abstraction
    dispersed information

complexity in code generation

  hard to built interpreters
Reusing Target Platform
• seems reasonable & pragmatic
• good compromise
But what if ...
But what if ...
  reuse target platform             expression as library

      developers know it           non-dispersed information

           libraries              nicer expression language
                                  - closures
       very good tooling
                                  - type inference
            proven                - operator overloading

     dispersed information       extendable (e.g. custom literals)

 complexity in code generation            good tooling

   hard to built interpreters       additional learning curve
But what if ...
  reuse target platform             expression as library

      developers know it           non-dispersed information

           libraries              nicer expression language
                                  - closures
       very good tooling
                                  - type inference
            proven                - operator overloading

     dispersed information       extendable (e.g. custom literals)

 complexity in code generation            good tooling

   hard to built interpreters       additional learning curve
But what if ...
  reuse target platform             expression as library

      developers know it           non-dispersed information

           libraries              nicer expression language
                                  - closures
       very good tooling
                                  - type inference
            proven                - operator overloading

     dispersed information       extendable (e.g. custom literals)

 complexity in code generation            good tooling

   hard to built interpreters       additional learning curve
But what if ...
  reuse target platform             expression as library

      developers know it           non-dispersed information

           libraries              nicer expression language
                                  - closures
       very good tooling
                                  - type inference
            proven                - operator overloading

     dispersed information       extendable (e.g. custom literals)

 complexity in code generation            good tooling

   hard to built interpreters       additional learning curve
But what if ...
  reuse target platform             expression as library

      developers know it           non-dispersed information

           libraries              nicer expression language
                                  - closures
       very good tooling
                                  - type inference
            proven                - operator overloading

     dispersed information       extendable (e.g. custom literals)

 complexity in code generation            good tooling

   hard to built interpreters       additional learning curve
But what if ...
  reuse target platform             expression as library

      developers know it           non-dispersed information

           libraries              nicer expression language
                                  - closures
       very good tooling
                                  - type inference
            proven                - operator overloading

     dispersed information       extendable (e.g. custom literals)

 complexity in code generation            good tooling

   hard to built interpreters       additional learning curve
What are the
 challenges?
concrete syntax         grammar mixing


 abstract syntax        meta model reuse


   constraints     static analysis and validation


 execution time     compiler and interpreter


development time           IDE support
concrete syntax         grammar mixing


 abstract syntax        meta model reuse


   constraints     static analysis and validation


 execution time     compiler and interpreter


development time           IDE support
concrete syntax         grammar mixing


 abstract syntax        meta model reuse


   constraints     static analysis and validation


 execution time     compiler and interpreter


development time           IDE support
concrete syntax         grammar mixing


 abstract syntax        meta model reuse


   constraints     static analysis and validation


 execution time     compiler and interpreter


development time           IDE support
concrete syntax         grammar mixing


 abstract syntax        meta model reuse


   constraints     static analysis and validation


 execution time     compiler and interpreter


development time           IDE support
concrete syntax         grammar mixing


 abstract syntax        meta model reuse


   constraints     static analysis and validation


 execution time     compiler and interpreter


development time           IDE support
concrete syntax         grammar mixing


 abstract syntax        meta model reuse


   constraints     static analysis and validation


 execution time     compiler and interpreter


development time           IDE support
concrete syntax         grammar mixing


 abstract syntax        meta model reuse


   constraints     static analysis and validation


 execution time     compiler and interpreter


development time           IDE support
concrete syntax         grammar mixing


 abstract syntax        meta model reuse


   constraints     static analysis and validation


 execution time     compiler and interpreter


development time           IDE support
concrete syntax         grammar mixing


 abstract syntax        meta model reuse


   constraints     static analysis and validation


 execution time     compiler and interpreter


development time           IDE support
Concrete syntax
Concrete syntax


• scan the document for tokens

• build a parse result from tokens
Concrete syntax


• scan the document for tokens

• build a parse result from tokens
Concrete syntax


• scan the document for tokens       contextless


                                      context-
• build a parse result from tokens     aware
Concrete syntax


• scan the document for tokens       contextless


                                      context-
• build a parse result from tokens     aware
package org.foo;
package org.foo;



Keyword
package
package org.foo;



Keyword   WS
package
package org.foo;



Keyword   WS       ID
package           org
package org.foo;



Keyword   WS       ID    K eyword
package           org        .
package org.foo;



Keyword   WS       ID    K eyword    ID
package           org        .      foo
package org.foo;



                                               o rd
Keyword   WS       ID    K eyword    ID      yw
                                          Ke
package           org        .      foo       ;
package org.foo;



                                               o rd
Keyword   WS       ID    K eyword    ID      yw
                                          Ke
package           org        .      foo       ;




   PackDecl: “package” ID (‘.’ ID)*’;’
What’s reusable?
What’s reusable?

• use rules of other language
What’s reusable?

• use rules of other language
• specialize rules of other language
What’s reusable?

• use rules of other language
• specialize rules of other language
• introduce new rules
Extensible syntax?
   Ambiguity!
Extensible syntax?
   Ambiguity!



   • alternatives may be conflicting
Extensible syntax?
   Ambiguity!



   • alternatives may be conflicting
   • static analysis can help
package org.foo;



                                               o rd
Keyword   WS       ID    K eyword    ID      yw
                                          Ke
package           org        .      foo       ;




   PackDecl: “package” ID (‘.’ ID)*’;’
package org.foo;
          package org.assert;


                                            o rd
Keyword   WS     ID   K eyword    ID      yw
                                       Ke
package         org       .      foo       ;




   PackDecl: “package” ID (‘.’ ID)*’;’
package org.foo;
          package org.assert;


                                          o rd
Keyword   WS     ID   K eyword          yw
                                     Ke
package         org       .              ;




   PackDecl: “package” ID (‘.’ ID)*’;’
package org.foo;
          package org.assert;


                                          o rd
Keyword   WS     ID   K eyword Keyword eyw
                                      K
package         org       .    assert    ;




   PackDecl: “package” ID (‘.’ ID)*’;’
What can we do?
What can we do?


• scannerless parsing
What can we do?


• scannerless parsing
• contextual lexing
package org.foo;
          package org.assert;


                                          o rd
Keyword   WS     ID   K eyword Keyword eyw
                                      K
package         org       .    assert    ;




   PackDecl: “package” ID (‘.’ ID)*’;’
package org.foo;
          package org.assert;


                                          o rd
Keyword   WS     ID   K eyword Keyword eyw
                                      K
package         org       .    assert    ;




   PackDecl: “package” ID (‘.’ ID)*’;’
package org.foo;
          package org.assert;


                                          o rd
Keyword   WS     ID   K eyword Keyword eyw
                                  ID! K
package         org       .    assert    ;




   PackDecl: “package” ID (‘.’ ID)*’;’
Context-aware scanning
   can be confusing
Context-aware scanning
      can be confusing
import “http://namespace/” as
generate import “http://namespace/” as alias




         import “http://namespace/” as generate
         import “http://namespace/” as alias
Context-aware scanning
      can be confusing
   Import:
import “http://namespace/” as lias
generate import ort ‘U RI’ as a
    
 
 
   imp “http://namespace/” as alias




      nerate:
 “http://namespace/” s algenerate
    Ge import                       as ias
                   te name  ‘URI’ a as alias
       import “http://namespace/”
    
 
 
  genera
Context-aware scanning
      can be confusing
import “http://namespace/” as
generate import “http://namespace/” as alias




         import “http://namespace/” as generate
         import “http://namespace/” as alias
Be cautious!

• be careful with new keywords
• minimize set of terminals
• think about extensibility
Abstract syntax
Abstract syntax



       meta models
       are frozen
Linking
Linking


    • inter & intra language
Linking


    • inter & intra language
    • to platform elements
Linking


    • inter & intra language
    • to platform elements
    • reachable elements
Validation
Validation
• inherited
Validation
• inherited
• invariants may not be weakened
Validation
• inherited
• invariants may not be weakened
• contract for compiler and
  interpreter
And then there are...
• compilers
• interpreters
• IDE infrastructure
 • code completion
 • formatting
 • label provider
How can we add and change
implementation non-invasively?
Example:
Customizing the LabelProvider
public class MySpecialLabelProvider
       extends BaseLanguageLabelProvider {

    public String label(Entity e) {
       return e.getName();
    }

    public String label(Feature f) {
       return f.getName()+":"+f.getType().getName();
    }
}

‣naming convention
‣polymorphic dispatch
Available June 24th.
Thank you very much!




www.itemis.com   www.xtext.org
Challenges In Dsl Design

More Related Content

What's hot

Architecting Domain-Specific Languages
Architecting Domain-Specific LanguagesArchitecting Domain-Specific Languages
Architecting Domain-Specific LanguagesMarkus Voelter
 
Advanced IDE functionality in modern language workbenches
Advanced IDE functionality in modern language workbenchesAdvanced IDE functionality in modern language workbenches
Advanced IDE functionality in modern language workbenchesVaclav Pech
 
Introduction to c_sharp
Introduction to c_sharpIntroduction to c_sharp
Introduction to c_sharpJayanta Basak
 
Programming Language Selection
Programming Language SelectionProgramming Language Selection
Programming Language SelectionDhananjay Nene
 
So you want to be a programmer
So you want to be a programmerSo you want to be a programmer
So you want to be a programmerBusayo Oyebisi
 
Implementing Refactorings in IntelliJ IDEA
Implementing Refactorings in IntelliJ IDEAImplementing Refactorings in IntelliJ IDEA
Implementing Refactorings in IntelliJ IDEAintelliyole
 
Concepts of JetBrains MPS
Concepts of JetBrains MPSConcepts of JetBrains MPS
Concepts of JetBrains MPSVaclav Pech
 
NetWork - 15.10.2011 - Applied code generation in .NET
NetWork - 15.10.2011 - Applied code generation in .NET NetWork - 15.10.2011 - Applied code generation in .NET
NetWork - 15.10.2011 - Applied code generation in .NET Dmytro Mindra
 
The Ring programming language version 1.4 book - Part 2 of 30
The Ring programming language version 1.4 book - Part 2 of 30The Ring programming language version 1.4 book - Part 2 of 30
The Ring programming language version 1.4 book - Part 2 of 30Mahmoud Samir Fayed
 
The Ring programming language version 1.3 book - Part 4 of 88
The Ring programming language version 1.3 book - Part 4 of 88The Ring programming language version 1.3 book - Part 4 of 88
The Ring programming language version 1.3 book - Part 4 of 88Mahmoud Samir Fayed
 
Enlightenment: A Cross Platform Window Manager & Toolkit
Enlightenment: A Cross Platform Window Manager & ToolkitEnlightenment: A Cross Platform Window Manager & Toolkit
Enlightenment: A Cross Platform Window Manager & ToolkitSamsung Open Source Group
 
The Ring programming language version 1.4.1 book - Part 2 of 31
The Ring programming language version 1.4.1 book - Part 2 of 31The Ring programming language version 1.4.1 book - Part 2 of 31
The Ring programming language version 1.4.1 book - Part 2 of 31Mahmoud Samir Fayed
 
APARNA_CHAUDHARY_RESUME_2015
APARNA_CHAUDHARY_RESUME_2015APARNA_CHAUDHARY_RESUME_2015
APARNA_CHAUDHARY_RESUME_2015Aparna Chaudhary
 
Introduction to SDL Passolo
Introduction to SDL PassoloIntroduction to SDL Passolo
Introduction to SDL PassoloAnnie Markova
 
Translating software with SDL Passolo
Translating software with SDL PassoloTranslating software with SDL Passolo
Translating software with SDL PassoloSDL Trados
 
Text to-speech & voice recognition
Text to-speech & voice recognitionText to-speech & voice recognition
Text to-speech & voice recognitionMark Williams
 
Introduction To C#
Introduction To C#Introduction To C#
Introduction To C#rahulsahay19
 

What's hot (20)

Architecting Domain-Specific Languages
Architecting Domain-Specific LanguagesArchitecting Domain-Specific Languages
Architecting Domain-Specific Languages
 
Choose flutter
Choose flutterChoose flutter
Choose flutter
 
Advanced IDE functionality in modern language workbenches
Advanced IDE functionality in modern language workbenchesAdvanced IDE functionality in modern language workbenches
Advanced IDE functionality in modern language workbenches
 
Introduction to c_sharp
Introduction to c_sharpIntroduction to c_sharp
Introduction to c_sharp
 
Programming Language Selection
Programming Language SelectionProgramming Language Selection
Programming Language Selection
 
C#
C#C#
C#
 
So you want to be a programmer
So you want to be a programmerSo you want to be a programmer
So you want to be a programmer
 
Implementing Refactorings in IntelliJ IDEA
Implementing Refactorings in IntelliJ IDEAImplementing Refactorings in IntelliJ IDEA
Implementing Refactorings in IntelliJ IDEA
 
Concepts of JetBrains MPS
Concepts of JetBrains MPSConcepts of JetBrains MPS
Concepts of JetBrains MPS
 
NetWork - 15.10.2011 - Applied code generation in .NET
NetWork - 15.10.2011 - Applied code generation in .NET NetWork - 15.10.2011 - Applied code generation in .NET
NetWork - 15.10.2011 - Applied code generation in .NET
 
The Ring programming language version 1.4 book - Part 2 of 30
The Ring programming language version 1.4 book - Part 2 of 30The Ring programming language version 1.4 book - Part 2 of 30
The Ring programming language version 1.4 book - Part 2 of 30
 
The Ring programming language version 1.3 book - Part 4 of 88
The Ring programming language version 1.3 book - Part 4 of 88The Ring programming language version 1.3 book - Part 4 of 88
The Ring programming language version 1.3 book - Part 4 of 88
 
Delphi
DelphiDelphi
Delphi
 
Enlightenment: A Cross Platform Window Manager & Toolkit
Enlightenment: A Cross Platform Window Manager & ToolkitEnlightenment: A Cross Platform Window Manager & Toolkit
Enlightenment: A Cross Platform Window Manager & Toolkit
 
The Ring programming language version 1.4.1 book - Part 2 of 31
The Ring programming language version 1.4.1 book - Part 2 of 31The Ring programming language version 1.4.1 book - Part 2 of 31
The Ring programming language version 1.4.1 book - Part 2 of 31
 
APARNA_CHAUDHARY_RESUME_2015
APARNA_CHAUDHARY_RESUME_2015APARNA_CHAUDHARY_RESUME_2015
APARNA_CHAUDHARY_RESUME_2015
 
Introduction to SDL Passolo
Introduction to SDL PassoloIntroduction to SDL Passolo
Introduction to SDL Passolo
 
Translating software with SDL Passolo
Translating software with SDL PassoloTranslating software with SDL Passolo
Translating software with SDL Passolo
 
Text to-speech & voice recognition
Text to-speech & voice recognitionText to-speech & voice recognition
Text to-speech & voice recognition
 
Introduction To C#
Introduction To C#Introduction To C#
Introduction To C#
 

Viewers also liked

2009 LA Film Festival
2009 LA Film Festival2009 LA Film Festival
2009 LA Film FestivalKim_Spence_49
 
Film Independent's 2009 Spirit Awards
Film Independent's 2009 Spirit AwardsFilm Independent's 2009 Spirit Awards
Film Independent's 2009 Spirit AwardsKim_Spence_49
 
Domain Specific Languages (EclipseCon 2012)
Domain Specific Languages (EclipseCon 2012)Domain Specific Languages (EclipseCon 2012)
Domain Specific Languages (EclipseCon 2012)Sven Efftinge
 
Getting the most out of Java [Nordic Coding-2010]
Getting the most out of Java [Nordic Coding-2010]Getting the most out of Java [Nordic Coding-2010]
Getting the most out of Java [Nordic Coding-2010]Sven Efftinge
 
Presentation To Cumbria Cim
Presentation To Cumbria CimPresentation To Cumbria Cim
Presentation To Cumbria CimLakeland
 
Xtend - A Language Made for Java Developers
Xtend - A Language Made for Java DevelopersXtend - A Language Made for Java Developers
Xtend - A Language Made for Java DevelopersSebastian Zarnekow
 
Introduction to Xbase
Introduction to XbaseIntroduction to Xbase
Introduction to XbaseHolger Schill
 
Dependency Injection for Eclipse developers
Dependency Injection for Eclipse developersDependency Injection for Eclipse developers
Dependency Injection for Eclipse developersSven Efftinge
 

Viewers also liked (15)

2009 LA Film Festival
2009 LA Film Festival2009 LA Film Festival
2009 LA Film Festival
 
Happy New Year!
Happy New Year!Happy New Year!
Happy New Year!
 
Film Independent's 2009 Spirit Awards
Film Independent's 2009 Spirit AwardsFilm Independent's 2009 Spirit Awards
Film Independent's 2009 Spirit Awards
 
Domain Specific Languages (EclipseCon 2012)
Domain Specific Languages (EclipseCon 2012)Domain Specific Languages (EclipseCon 2012)
Domain Specific Languages (EclipseCon 2012)
 
Getting the most out of Java [Nordic Coding-2010]
Getting the most out of Java [Nordic Coding-2010]Getting the most out of Java [Nordic Coding-2010]
Getting the most out of Java [Nordic Coding-2010]
 
Chromosomes
ChromosomesChromosomes
Chromosomes
 
Eclipse Banking Day
Eclipse Banking DayEclipse Banking Day
Eclipse Banking Day
 
Gwt and Xtend
Gwt and XtendGwt and Xtend
Gwt and Xtend
 
Presentation To Cumbria Cim
Presentation To Cumbria CimPresentation To Cumbria Cim
Presentation To Cumbria Cim
 
Xtext Webinar
Xtext WebinarXtext Webinar
Xtext Webinar
 
Xtend - A Language Made for Java Developers
Xtend - A Language Made for Java DevelopersXtend - A Language Made for Java Developers
Xtend - A Language Made for Java Developers
 
Eclipse Xtend
Eclipse XtendEclipse Xtend
Eclipse Xtend
 
Introduction to Xbase
Introduction to XbaseIntroduction to Xbase
Introduction to Xbase
 
Getting rid of backtracking
Getting rid of backtrackingGetting rid of backtracking
Getting rid of backtracking
 
Dependency Injection for Eclipse developers
Dependency Injection for Eclipse developersDependency Injection for Eclipse developers
Dependency Injection for Eclipse developers
 

Similar to Challenges In Dsl Design

Build your own Language - Why and How?
Build your own Language - Why and How?Build your own Language - Why and How?
Build your own Language - Why and How?Markus Voelter
 
DSL, the absolute weapon for the development
DSL, the absolute weapon for the developmentDSL, the absolute weapon for the development
DSL, the absolute weapon for the developmentESUG
 
Domain Specific Language Design
Domain Specific Language DesignDomain Specific Language Design
Domain Specific Language DesignMarkus Voelter
 
Introduction to c_sharp
Introduction to c_sharpIntroduction to c_sharp
Introduction to c_sharpHEM Sothon
 
Programming Languages #devcon2013
Programming Languages #devcon2013Programming Languages #devcon2013
Programming Languages #devcon2013Iván Montes
 
mbeddr meets IncQuer - Combining the Best Features of Two Modeling Worlds
mbeddr meets IncQuer - Combining the Best Features of Two Modeling Worldsmbeddr meets IncQuer - Combining the Best Features of Two Modeling Worlds
mbeddr meets IncQuer - Combining the Best Features of Two Modeling WorldsIstvan Rath
 
Beyond Sharing: Open Source Design
Beyond Sharing: Open Source DesignBeyond Sharing: Open Source Design
Beyond Sharing: Open Source DesignMushon Zer-Aviv
 
Bdd and dsl как способ построения коммуникации на проекте
Bdd and dsl как способ построения коммуникации на проектеBdd and dsl как способ построения коммуникации на проекте
Bdd and dsl как способ построения коммуникации на проектеISsoft
 
BDD or DSL как способ построения коммуникации на проекте - опыт комплексного ...
BDD or DSL как способ построения коммуникации на проекте - опыт комплексного ...BDD or DSL как способ построения коммуникации на проекте - опыт комплексного ...
BDD or DSL как способ построения коммуникации на проекте - опыт комплексного ...SQALab
 
Envisioning the Future of Language Workbenches
Envisioning the Future of Language WorkbenchesEnvisioning the Future of Language Workbenches
Envisioning the Future of Language WorkbenchesMarkus Voelter
 
Building DSLs: Marriage of High Essence and Groovy Metaprogramming
Building DSLs: Marriage of High Essence and Groovy MetaprogrammingBuilding DSLs: Marriage of High Essence and Groovy Metaprogramming
Building DSLs: Marriage of High Essence and Groovy MetaprogrammingSkills Matter
 
Introduction to programming world
Introduction to programming worldIntroduction to programming world
Introduction to programming worldJaskaran Singh
 
Overview new programming languages
Overview new programming languagesOverview new programming languages
Overview new programming languagesumoren
 
The Spoofax Language Workbench (SPLASH 2010)
The Spoofax Language Workbench (SPLASH 2010)The Spoofax Language Workbench (SPLASH 2010)
The Spoofax Language Workbench (SPLASH 2010)lennartkats
 
DSL Construction rith Ruby
DSL Construction rith RubyDSL Construction rith Ruby
DSL Construction rith RubyThoughtWorks
 
Domain Specific Languages
Domain Specific LanguagesDomain Specific Languages
Domain Specific Languageselliando dias
 
Introduction to .NET with C# @ university of wayamba
Introduction to .NET with C# @ university of wayambaIntroduction to .NET with C# @ university of wayamba
Introduction to .NET with C# @ university of wayambaPrageeth Sandakalum
 

Similar to Challenges In Dsl Design (20)

Build your own Language - Why and How?
Build your own Language - Why and How?Build your own Language - Why and How?
Build your own Language - Why and How?
 
DSL, the absolute weapon for the development
DSL, the absolute weapon for the developmentDSL, the absolute weapon for the development
DSL, the absolute weapon for the development
 
Domain Specific Language Design
Domain Specific Language DesignDomain Specific Language Design
Domain Specific Language Design
 
Introduction to c_sharp
Introduction to c_sharpIntroduction to c_sharp
Introduction to c_sharp
 
Programming Languages #devcon2013
Programming Languages #devcon2013Programming Languages #devcon2013
Programming Languages #devcon2013
 
mbeddr meets IncQuer - Combining the Best Features of Two Modeling Worlds
mbeddr meets IncQuer - Combining the Best Features of Two Modeling Worldsmbeddr meets IncQuer - Combining the Best Features of Two Modeling Worlds
mbeddr meets IncQuer - Combining the Best Features of Two Modeling Worlds
 
Beyond Sharing: Open Source Design
Beyond Sharing: Open Source DesignBeyond Sharing: Open Source Design
Beyond Sharing: Open Source Design
 
Bdd and dsl как способ построения коммуникации на проекте
Bdd and dsl как способ построения коммуникации на проектеBdd and dsl как способ построения коммуникации на проекте
Bdd and dsl как способ построения коммуникации на проекте
 
BDD or DSL как способ построения коммуникации на проекте - опыт комплексного ...
BDD or DSL как способ построения коммуникации на проекте - опыт комплексного ...BDD or DSL как способ построения коммуникации на проекте - опыт комплексного ...
BDD or DSL как способ построения коммуникации на проекте - опыт комплексного ...
 
Envisioning the Future of Language Workbenches
Envisioning the Future of Language WorkbenchesEnvisioning the Future of Language Workbenches
Envisioning the Future of Language Workbenches
 
Building DSLs: Marriage of High Essence and Groovy Metaprogramming
Building DSLs: Marriage of High Essence and Groovy MetaprogrammingBuilding DSLs: Marriage of High Essence and Groovy Metaprogramming
Building DSLs: Marriage of High Essence and Groovy Metaprogramming
 
Metamorphic Domain-Specific Languages
Metamorphic Domain-Specific LanguagesMetamorphic Domain-Specific Languages
Metamorphic Domain-Specific Languages
 
Introduction to programming world
Introduction to programming worldIntroduction to programming world
Introduction to programming world
 
Overview new programming languages
Overview new programming languagesOverview new programming languages
Overview new programming languages
 
DSL Best Practices
DSL Best PracticesDSL Best Practices
DSL Best Practices
 
The Spoofax Language Workbench (SPLASH 2010)
The Spoofax Language Workbench (SPLASH 2010)The Spoofax Language Workbench (SPLASH 2010)
The Spoofax Language Workbench (SPLASH 2010)
 
Antlr Conexaojava
Antlr ConexaojavaAntlr Conexaojava
Antlr Conexaojava
 
DSL Construction rith Ruby
DSL Construction rith RubyDSL Construction rith Ruby
DSL Construction rith Ruby
 
Domain Specific Languages
Domain Specific LanguagesDomain Specific Languages
Domain Specific Languages
 
Introduction to .NET with C# @ university of wayamba
Introduction to .NET with C# @ university of wayambaIntroduction to .NET with C# @ university of wayamba
Introduction to .NET with C# @ university of wayamba
 

More from Sven Efftinge

Parsing Expression With Xtext
Parsing Expression With XtextParsing Expression With Xtext
Parsing Expression With XtextSven Efftinge
 
Auto-GWT : Better GWT Programming with Xtend
Auto-GWT : Better GWT Programming with XtendAuto-GWT : Better GWT Programming with Xtend
Auto-GWT : Better GWT Programming with XtendSven Efftinge
 
Functional programming with Xtend
Functional programming with XtendFunctional programming with Xtend
Functional programming with XtendSven Efftinge
 
Codegeneration With Xtend
Codegeneration With XtendCodegeneration With Xtend
Codegeneration With XtendSven Efftinge
 
Xtend @ EclipseCon 2012
Xtend @ EclipseCon 2012Xtend @ EclipseCon 2012
Xtend @ EclipseCon 2012Sven Efftinge
 
This Is Not Your Father's Java
This Is Not Your Father's JavaThis Is Not Your Father's Java
This Is Not Your Father's JavaSven Efftinge
 
Xtext at MDD Day 2010
Xtext at MDD Day 2010Xtext at MDD Day 2010
Xtext at MDD Day 2010Sven Efftinge
 
Code Generation in Agile Projects
Code Generation in Agile ProjectsCode Generation in Agile Projects
Code Generation in Agile ProjectsSven Efftinge
 
Bessere Softwareentwicklung (Itemis Wintercon)
Bessere Softwareentwicklung (Itemis Wintercon)Bessere Softwareentwicklung (Itemis Wintercon)
Bessere Softwareentwicklung (Itemis Wintercon)Sven Efftinge
 
Domain-Specific Languages in der Praxis
Domain-Specific Languages in der PraxisDomain-Specific Languages in der Praxis
Domain-Specific Languages in der PraxisSven Efftinge
 
Xtext @ Profict Summer Camp
Xtext @ Profict Summer CampXtext @ Profict Summer Camp
Xtext @ Profict Summer CampSven Efftinge
 
Vermisste Sprachfeatures in Java (german)
Vermisste Sprachfeatures in Java (german)Vermisste Sprachfeatures in Java (german)
Vermisste Sprachfeatures in Java (german)Sven Efftinge
 

More from Sven Efftinge (15)

Parsing Expression With Xtext
Parsing Expression With XtextParsing Expression With Xtext
Parsing Expression With Xtext
 
Auto-GWT : Better GWT Programming with Xtend
Auto-GWT : Better GWT Programming with XtendAuto-GWT : Better GWT Programming with Xtend
Auto-GWT : Better GWT Programming with Xtend
 
Functional programming with Xtend
Functional programming with XtendFunctional programming with Xtend
Functional programming with Xtend
 
Codegeneration With Xtend
Codegeneration With XtendCodegeneration With Xtend
Codegeneration With Xtend
 
Xtend @ EclipseCon 2012
Xtend @ EclipseCon 2012Xtend @ EclipseCon 2012
Xtend @ EclipseCon 2012
 
This Is Not Your Father's Java
This Is Not Your Father's JavaThis Is Not Your Father's Java
This Is Not Your Father's Java
 
Xtext at MDD Day 2010
Xtext at MDD Day 2010Xtext at MDD Day 2010
Xtext at MDD Day 2010
 
Code Generation in Agile Projects
Code Generation in Agile ProjectsCode Generation in Agile Projects
Code Generation in Agile Projects
 
Xtext Eclipse Con
Xtext Eclipse ConXtext Eclipse Con
Xtext Eclipse Con
 
Generic Editor
Generic EditorGeneric Editor
Generic Editor
 
Bessere Softwareentwicklung (Itemis Wintercon)
Bessere Softwareentwicklung (Itemis Wintercon)Bessere Softwareentwicklung (Itemis Wintercon)
Bessere Softwareentwicklung (Itemis Wintercon)
 
Domain-Specific Languages in der Praxis
Domain-Specific Languages in der PraxisDomain-Specific Languages in der Praxis
Domain-Specific Languages in der Praxis
 
Xtext @ Profict Summer Camp
Xtext @ Profict Summer CampXtext @ Profict Summer Camp
Xtext @ Profict Summer Camp
 
Vermisste Sprachfeatures in Java (german)
Vermisste Sprachfeatures in Java (german)Vermisste Sprachfeatures in Java (german)
Vermisste Sprachfeatures in Java (german)
 
Scala
ScalaScala
Scala
 

Recently uploaded

Vip Dewas Call Girls #9907093804 Contact Number Escorts Service Dewas
Vip Dewas Call Girls #9907093804 Contact Number Escorts Service DewasVip Dewas Call Girls #9907093804 Contact Number Escorts Service Dewas
Vip Dewas Call Girls #9907093804 Contact Number Escorts Service Dewasmakika9823
 
Insurers' journeys to build a mastery in the IoT usage
Insurers' journeys to build a mastery in the IoT usageInsurers' journeys to build a mastery in the IoT usage
Insurers' journeys to build a mastery in the IoT usageMatteo Carbone
 
Call Girls Pune Just Call 9907093804 Top Class Call Girl Service Available
Call Girls Pune Just Call 9907093804 Top Class Call Girl Service AvailableCall Girls Pune Just Call 9907093804 Top Class Call Girl Service Available
Call Girls Pune Just Call 9907093804 Top Class Call Girl Service AvailableDipal Arora
 
Eni 2024 1Q Results - 24.04.24 business.
Eni 2024 1Q Results - 24.04.24 business.Eni 2024 1Q Results - 24.04.24 business.
Eni 2024 1Q Results - 24.04.24 business.Eni
 
Russian Faridabad Call Girls(Badarpur) : ☎ 8168257667, @4999
Russian Faridabad Call Girls(Badarpur) : ☎ 8168257667, @4999Russian Faridabad Call Girls(Badarpur) : ☎ 8168257667, @4999
Russian Faridabad Call Girls(Badarpur) : ☎ 8168257667, @4999Tina Ji
 
Lucknow 💋 Escorts in Lucknow - 450+ Call Girl Cash Payment 8923113531 Neha Th...
Lucknow 💋 Escorts in Lucknow - 450+ Call Girl Cash Payment 8923113531 Neha Th...Lucknow 💋 Escorts in Lucknow - 450+ Call Girl Cash Payment 8923113531 Neha Th...
Lucknow 💋 Escorts in Lucknow - 450+ Call Girl Cash Payment 8923113531 Neha Th...anilsa9823
 
Creating Low-Code Loan Applications using the Trisotech Mortgage Feature Set
Creating Low-Code Loan Applications using the Trisotech Mortgage Feature SetCreating Low-Code Loan Applications using the Trisotech Mortgage Feature Set
Creating Low-Code Loan Applications using the Trisotech Mortgage Feature SetDenis Gagné
 
The CMO Survey - Highlights and Insights Report - Spring 2024
The CMO Survey - Highlights and Insights Report - Spring 2024The CMO Survey - Highlights and Insights Report - Spring 2024
The CMO Survey - Highlights and Insights Report - Spring 2024christinemoorman
 
BEST ✨ Call Girls In Indirapuram Ghaziabad ✔️ 9871031762 ✔️ Escorts Service...
BEST ✨ Call Girls In  Indirapuram Ghaziabad  ✔️ 9871031762 ✔️ Escorts Service...BEST ✨ Call Girls In  Indirapuram Ghaziabad  ✔️ 9871031762 ✔️ Escorts Service...
BEST ✨ Call Girls In Indirapuram Ghaziabad ✔️ 9871031762 ✔️ Escorts Service...noida100girls
 
Cash Payment 9602870969 Escort Service in Udaipur Call Girls
Cash Payment 9602870969 Escort Service in Udaipur Call GirlsCash Payment 9602870969 Escort Service in Udaipur Call Girls
Cash Payment 9602870969 Escort Service in Udaipur Call GirlsApsara Of India
 
Call Girls In DLf Gurgaon ➥99902@11544 ( Best price)100% Genuine Escort In 24...
Call Girls In DLf Gurgaon ➥99902@11544 ( Best price)100% Genuine Escort In 24...Call Girls In DLf Gurgaon ➥99902@11544 ( Best price)100% Genuine Escort In 24...
Call Girls In DLf Gurgaon ➥99902@11544 ( Best price)100% Genuine Escort In 24...lizamodels9
 
Mysore Call Girls 8617370543 WhatsApp Number 24x7 Best Services
Mysore Call Girls 8617370543 WhatsApp Number 24x7 Best ServicesMysore Call Girls 8617370543 WhatsApp Number 24x7 Best Services
Mysore Call Girls 8617370543 WhatsApp Number 24x7 Best ServicesDipal Arora
 
Progress Report - Oracle Database Analyst Summit
Progress  Report - Oracle Database Analyst SummitProgress  Report - Oracle Database Analyst Summit
Progress Report - Oracle Database Analyst SummitHolger Mueller
 
Monte Carlo simulation : Simulation using MCSM
Monte Carlo simulation : Simulation using MCSMMonte Carlo simulation : Simulation using MCSM
Monte Carlo simulation : Simulation using MCSMRavindra Nath Shukla
 
0183760ssssssssssssssssssssssssssss00101011 (27).pdf
0183760ssssssssssssssssssssssssssss00101011 (27).pdf0183760ssssssssssssssssssssssssssss00101011 (27).pdf
0183760ssssssssssssssssssssssssssss00101011 (27).pdfRenandantas16
 
Call Girls In Panjim North Goa 9971646499 Genuine Service
Call Girls In Panjim North Goa 9971646499 Genuine ServiceCall Girls In Panjim North Goa 9971646499 Genuine Service
Call Girls In Panjim North Goa 9971646499 Genuine Serviceritikaroy0888
 
Pharma Works Profile of Karan Communications
Pharma Works Profile of Karan CommunicationsPharma Works Profile of Karan Communications
Pharma Works Profile of Karan Communicationskarancommunications
 
Keppel Ltd. 1Q 2024 Business Update Presentation Slides
Keppel Ltd. 1Q 2024 Business Update  Presentation SlidesKeppel Ltd. 1Q 2024 Business Update  Presentation Slides
Keppel Ltd. 1Q 2024 Business Update Presentation SlidesKeppelCorporation
 
Socio-economic-Impact-of-business-consumers-suppliers-and.pptx
Socio-economic-Impact-of-business-consumers-suppliers-and.pptxSocio-economic-Impact-of-business-consumers-suppliers-and.pptx
Socio-economic-Impact-of-business-consumers-suppliers-and.pptxtrishalcan8
 

Recently uploaded (20)

Vip Dewas Call Girls #9907093804 Contact Number Escorts Service Dewas
Vip Dewas Call Girls #9907093804 Contact Number Escorts Service DewasVip Dewas Call Girls #9907093804 Contact Number Escorts Service Dewas
Vip Dewas Call Girls #9907093804 Contact Number Escorts Service Dewas
 
Insurers' journeys to build a mastery in the IoT usage
Insurers' journeys to build a mastery in the IoT usageInsurers' journeys to build a mastery in the IoT usage
Insurers' journeys to build a mastery in the IoT usage
 
Call Girls Pune Just Call 9907093804 Top Class Call Girl Service Available
Call Girls Pune Just Call 9907093804 Top Class Call Girl Service AvailableCall Girls Pune Just Call 9907093804 Top Class Call Girl Service Available
Call Girls Pune Just Call 9907093804 Top Class Call Girl Service Available
 
Eni 2024 1Q Results - 24.04.24 business.
Eni 2024 1Q Results - 24.04.24 business.Eni 2024 1Q Results - 24.04.24 business.
Eni 2024 1Q Results - 24.04.24 business.
 
Russian Faridabad Call Girls(Badarpur) : ☎ 8168257667, @4999
Russian Faridabad Call Girls(Badarpur) : ☎ 8168257667, @4999Russian Faridabad Call Girls(Badarpur) : ☎ 8168257667, @4999
Russian Faridabad Call Girls(Badarpur) : ☎ 8168257667, @4999
 
Lucknow 💋 Escorts in Lucknow - 450+ Call Girl Cash Payment 8923113531 Neha Th...
Lucknow 💋 Escorts in Lucknow - 450+ Call Girl Cash Payment 8923113531 Neha Th...Lucknow 💋 Escorts in Lucknow - 450+ Call Girl Cash Payment 8923113531 Neha Th...
Lucknow 💋 Escorts in Lucknow - 450+ Call Girl Cash Payment 8923113531 Neha Th...
 
Creating Low-Code Loan Applications using the Trisotech Mortgage Feature Set
Creating Low-Code Loan Applications using the Trisotech Mortgage Feature SetCreating Low-Code Loan Applications using the Trisotech Mortgage Feature Set
Creating Low-Code Loan Applications using the Trisotech Mortgage Feature Set
 
Nepali Escort Girl Kakori \ 9548273370 Indian Call Girls Service Lucknow ₹,9517
Nepali Escort Girl Kakori \ 9548273370 Indian Call Girls Service Lucknow ₹,9517Nepali Escort Girl Kakori \ 9548273370 Indian Call Girls Service Lucknow ₹,9517
Nepali Escort Girl Kakori \ 9548273370 Indian Call Girls Service Lucknow ₹,9517
 
The CMO Survey - Highlights and Insights Report - Spring 2024
The CMO Survey - Highlights and Insights Report - Spring 2024The CMO Survey - Highlights and Insights Report - Spring 2024
The CMO Survey - Highlights and Insights Report - Spring 2024
 
BEST ✨ Call Girls In Indirapuram Ghaziabad ✔️ 9871031762 ✔️ Escorts Service...
BEST ✨ Call Girls In  Indirapuram Ghaziabad  ✔️ 9871031762 ✔️ Escorts Service...BEST ✨ Call Girls In  Indirapuram Ghaziabad  ✔️ 9871031762 ✔️ Escorts Service...
BEST ✨ Call Girls In Indirapuram Ghaziabad ✔️ 9871031762 ✔️ Escorts Service...
 
Cash Payment 9602870969 Escort Service in Udaipur Call Girls
Cash Payment 9602870969 Escort Service in Udaipur Call GirlsCash Payment 9602870969 Escort Service in Udaipur Call Girls
Cash Payment 9602870969 Escort Service in Udaipur Call Girls
 
Call Girls In DLf Gurgaon ➥99902@11544 ( Best price)100% Genuine Escort In 24...
Call Girls In DLf Gurgaon ➥99902@11544 ( Best price)100% Genuine Escort In 24...Call Girls In DLf Gurgaon ➥99902@11544 ( Best price)100% Genuine Escort In 24...
Call Girls In DLf Gurgaon ➥99902@11544 ( Best price)100% Genuine Escort In 24...
 
Mysore Call Girls 8617370543 WhatsApp Number 24x7 Best Services
Mysore Call Girls 8617370543 WhatsApp Number 24x7 Best ServicesMysore Call Girls 8617370543 WhatsApp Number 24x7 Best Services
Mysore Call Girls 8617370543 WhatsApp Number 24x7 Best Services
 
Progress Report - Oracle Database Analyst Summit
Progress  Report - Oracle Database Analyst SummitProgress  Report - Oracle Database Analyst Summit
Progress Report - Oracle Database Analyst Summit
 
Monte Carlo simulation : Simulation using MCSM
Monte Carlo simulation : Simulation using MCSMMonte Carlo simulation : Simulation using MCSM
Monte Carlo simulation : Simulation using MCSM
 
0183760ssssssssssssssssssssssssssss00101011 (27).pdf
0183760ssssssssssssssssssssssssssss00101011 (27).pdf0183760ssssssssssssssssssssssssssss00101011 (27).pdf
0183760ssssssssssssssssssssssssssss00101011 (27).pdf
 
Call Girls In Panjim North Goa 9971646499 Genuine Service
Call Girls In Panjim North Goa 9971646499 Genuine ServiceCall Girls In Panjim North Goa 9971646499 Genuine Service
Call Girls In Panjim North Goa 9971646499 Genuine Service
 
Pharma Works Profile of Karan Communications
Pharma Works Profile of Karan CommunicationsPharma Works Profile of Karan Communications
Pharma Works Profile of Karan Communications
 
Keppel Ltd. 1Q 2024 Business Update Presentation Slides
Keppel Ltd. 1Q 2024 Business Update  Presentation SlidesKeppel Ltd. 1Q 2024 Business Update  Presentation Slides
Keppel Ltd. 1Q 2024 Business Update Presentation Slides
 
Socio-economic-Impact-of-business-consumers-suppliers-and.pptx
Socio-economic-Impact-of-business-consumers-suppliers-and.pptxSocio-economic-Impact-of-business-consumers-suppliers-and.pptx
Socio-economic-Impact-of-business-consumers-suppliers-and.pptx
 

Challenges In Dsl Design

  • 1. Challenges in DSL Design Sebastian Zarnekow - Sven Efftinge
  • 2. What do today’s DSL projects look like?
  • 3. Lots of problems are solved
  • 4. Lots of problems are solved textual DSL frameworks
  • 5. Lots of problems are solved textual DSL frameworks graphical DSL frameworks
  • 6. Lots of problems are solved textual DSL frameworks graphical DSL frameworks nice transformation languages
  • 7. Lots of problems are solved textual DSL frameworks graphical DSL frameworks nice transformation languages open source IDEs
  • 8. Lots of problems are solved textual DSL frameworks graphical DSL frameworks nice validation nice transformation languages languages open source IDEs
  • 9. Lots of problems are solved textual DSL frameworks nice template graphical languages DSL frameworks nice validation nice transformation languages languages open source IDEs
  • 10. Lots of problems are solved textual DSL frameworks nice template graphical languages DSL frameworks proven infrastructure nice validation nice transformation languages languages open source IDEs
  • 11. In most cases DSLs cover only 80%
  • 12. ... but what’s missing?
  • 16. Information hiding in computer science is the principle of the hiding of design decisions in a computer program that are most likely to change, thus protecting other parts of the program from change if the design decision is changed. The protection involves providing a stable interface which shields the remainder of the program from the implementation (the details that are most likely to change). Hiding implementation details?
  • 17. ation of c Separ once rns?
  • 18. atio n of c Se par once rns? In computer science, separation of concerns (SoC) is the process of breaking a computer program into distinct features that overlap in functionality as little as possible. A concern is any piece of interest or focus in a program. Typically, concerns are synonymous with features or behaviors.
  • 19.
  • 20. expressions are complicated to implement
  • 21. expressions are complicated to implement • expressions of target platform language are already understood
  • 22. expressions are complicated to implement • expressions of target platform language are already understood • tooling and libraries can be reused
  • 24.
  • 26. Protected Regions • generated and manually written code mixed up
  • 27. Protected Regions • generated and manually written code mixed up • manual deletion of artifacts
  • 28. Protected Regions • generated and manually written code mixed up • manual deletion of artifacts • platform dependent information
  • 29. Protected Regions • generated and manually written code mixed up • manual deletion of artifacts • platform dependent information • information is dispersed!
  • 31. Generation Gap Pattern technically required type hierarchies
  • 32. Generation Gap Pattern technically required type hierarchies additional complexity
  • 33. Generation Gap Pattern technically required type hierarchies additional complexity platform dependent information
  • 34. Generation Gap Pattern technically required type hierarchies additional complexity platform dependent information information dispersed!
  • 36. Black box target language literals • bound to target platform
  • 37. Black box target language literals • bound to target platform • no option for MDA friends
  • 38. Black box target language literals • bound to target platform • no option for MDA friends • no tooling!
  • 39. Black box target language literals • bound to target platform • no option for MDA friends • no tooling! • long turnarounds!
  • 40.
  • 41. reuse target platform developers know it libraries very good tooling proven dispersed information complexity in code generation hard to built interpreters
  • 42. reuse target platform developers know it libraries very good tooling proven dispersed information complexity in code generation hard to built interpreters
  • 43. reuse target platform developers know it libraries very good tooling proven dispersed information complexity in code generation hard to built interpreters
  • 44. reuse target platform developers know it libraries very good tooling proven dispersed information complexity in code generation hard to built interpreters
  • 45. reuse target platform developers know it libraries very good tooling proven dispersed information complexity in code generation hard to built interpreters
  • 46. reuse target platform developers know it libraries very good tooling proven dispersed information complexity in code generation hard to built interpreters
  • 47. reuse target platform developers know it libraries very good tooling proven dispersed information complexity in code generation hard to built interpreters
  • 48. reuse target platform developers know it libraries very good tooling proven dispersed information complexity in code generation hard to built interpreters
  • 49. reuse target platform invent expressions developers know it non-dispersed information libraries very complex very good tooling very expensive relatively low potential for proven further abstraction dispersed information complexity in code generation hard to built interpreters
  • 50. reuse target platform invent expressions developers know it non-dispersed information libraries very complex very good tooling very expensive relatively low potential for proven further abstraction dispersed information complexity in code generation hard to built interpreters
  • 51. reuse target platform invent expressions developers know it non-dispersed information libraries very complex very good tooling very expensive relatively low potential for proven further abstraction dispersed information complexity in code generation hard to built interpreters
  • 52. reuse target platform invent expressions developers know it non-dispersed information libraries very complex very good tooling very expensive relatively low potential for proven further abstraction dispersed information complexity in code generation hard to built interpreters
  • 53. reuse target platform invent expressions developers know it non-dispersed information libraries very complex very good tooling very expensive relatively low potential for proven further abstraction dispersed information complexity in code generation hard to built interpreters
  • 54. Reusing Target Platform • seems reasonable & pragmatic • good compromise
  • 55. But what if ...
  • 56. But what if ... reuse target platform expression as library developers know it non-dispersed information libraries nicer expression language - closures very good tooling - type inference proven - operator overloading dispersed information extendable (e.g. custom literals) complexity in code generation good tooling hard to built interpreters additional learning curve
  • 57. But what if ... reuse target platform expression as library developers know it non-dispersed information libraries nicer expression language - closures very good tooling - type inference proven - operator overloading dispersed information extendable (e.g. custom literals) complexity in code generation good tooling hard to built interpreters additional learning curve
  • 58. But what if ... reuse target platform expression as library developers know it non-dispersed information libraries nicer expression language - closures very good tooling - type inference proven - operator overloading dispersed information extendable (e.g. custom literals) complexity in code generation good tooling hard to built interpreters additional learning curve
  • 59. But what if ... reuse target platform expression as library developers know it non-dispersed information libraries nicer expression language - closures very good tooling - type inference proven - operator overloading dispersed information extendable (e.g. custom literals) complexity in code generation good tooling hard to built interpreters additional learning curve
  • 60. But what if ... reuse target platform expression as library developers know it non-dispersed information libraries nicer expression language - closures very good tooling - type inference proven - operator overloading dispersed information extendable (e.g. custom literals) complexity in code generation good tooling hard to built interpreters additional learning curve
  • 61. But what if ... reuse target platform expression as library developers know it non-dispersed information libraries nicer expression language - closures very good tooling - type inference proven - operator overloading dispersed information extendable (e.g. custom literals) complexity in code generation good tooling hard to built interpreters additional learning curve
  • 62. What are the challenges?
  • 63.
  • 64. concrete syntax grammar mixing abstract syntax meta model reuse constraints static analysis and validation execution time compiler and interpreter development time IDE support
  • 65. concrete syntax grammar mixing abstract syntax meta model reuse constraints static analysis and validation execution time compiler and interpreter development time IDE support
  • 66. concrete syntax grammar mixing abstract syntax meta model reuse constraints static analysis and validation execution time compiler and interpreter development time IDE support
  • 67. concrete syntax grammar mixing abstract syntax meta model reuse constraints static analysis and validation execution time compiler and interpreter development time IDE support
  • 68. concrete syntax grammar mixing abstract syntax meta model reuse constraints static analysis and validation execution time compiler and interpreter development time IDE support
  • 69. concrete syntax grammar mixing abstract syntax meta model reuse constraints static analysis and validation execution time compiler and interpreter development time IDE support
  • 70. concrete syntax grammar mixing abstract syntax meta model reuse constraints static analysis and validation execution time compiler and interpreter development time IDE support
  • 71. concrete syntax grammar mixing abstract syntax meta model reuse constraints static analysis and validation execution time compiler and interpreter development time IDE support
  • 72. concrete syntax grammar mixing abstract syntax meta model reuse constraints static analysis and validation execution time compiler and interpreter development time IDE support
  • 73. concrete syntax grammar mixing abstract syntax meta model reuse constraints static analysis and validation execution time compiler and interpreter development time IDE support
  • 75. Concrete syntax • scan the document for tokens • build a parse result from tokens
  • 76. Concrete syntax • scan the document for tokens • build a parse result from tokens
  • 77. Concrete syntax • scan the document for tokens contextless context- • build a parse result from tokens aware
  • 78. Concrete syntax • scan the document for tokens contextless context- • build a parse result from tokens aware
  • 82. package org.foo; Keyword WS ID package org
  • 83. package org.foo; Keyword WS ID K eyword package org .
  • 84. package org.foo; Keyword WS ID K eyword ID package org . foo
  • 85. package org.foo; o rd Keyword WS ID K eyword ID yw Ke package org . foo ;
  • 86. package org.foo; o rd Keyword WS ID K eyword ID yw Ke package org . foo ; PackDecl: “package” ID (‘.’ ID)*’;’
  • 88. What’s reusable? • use rules of other language
  • 89. What’s reusable? • use rules of other language • specialize rules of other language
  • 90. What’s reusable? • use rules of other language • specialize rules of other language • introduce new rules
  • 91. Extensible syntax? Ambiguity!
  • 92. Extensible syntax? Ambiguity! • alternatives may be conflicting
  • 93. Extensible syntax? Ambiguity! • alternatives may be conflicting • static analysis can help
  • 94. package org.foo; o rd Keyword WS ID K eyword ID yw Ke package org . foo ; PackDecl: “package” ID (‘.’ ID)*’;’
  • 95. package org.foo; package org.assert; o rd Keyword WS ID K eyword ID yw Ke package org . foo ; PackDecl: “package” ID (‘.’ ID)*’;’
  • 96. package org.foo; package org.assert; o rd Keyword WS ID K eyword yw Ke package org . ; PackDecl: “package” ID (‘.’ ID)*’;’
  • 97. package org.foo; package org.assert; o rd Keyword WS ID K eyword Keyword eyw K package org . assert ; PackDecl: “package” ID (‘.’ ID)*’;’
  • 98. What can we do?
  • 99. What can we do? • scannerless parsing
  • 100. What can we do? • scannerless parsing • contextual lexing
  • 101. package org.foo; package org.assert; o rd Keyword WS ID K eyword Keyword eyw K package org . assert ; PackDecl: “package” ID (‘.’ ID)*’;’
  • 102. package org.foo; package org.assert; o rd Keyword WS ID K eyword Keyword eyw K package org . assert ; PackDecl: “package” ID (‘.’ ID)*’;’
  • 103. package org.foo; package org.assert; o rd Keyword WS ID K eyword Keyword eyw ID! K package org . assert ; PackDecl: “package” ID (‘.’ ID)*’;’
  • 104. Context-aware scanning can be confusing
  • 105. Context-aware scanning can be confusing import “http://namespace/” as generate import “http://namespace/” as alias import “http://namespace/” as generate import “http://namespace/” as alias
  • 106. Context-aware scanning can be confusing Import: import “http://namespace/” as lias generate import ort ‘U RI’ as a imp “http://namespace/” as alias nerate: “http://namespace/” s algenerate Ge import as ias te name ‘URI’ a as alias import “http://namespace/” genera
  • 107. Context-aware scanning can be confusing import “http://namespace/” as generate import “http://namespace/” as alias import “http://namespace/” as generate import “http://namespace/” as alias
  • 108. Be cautious! • be careful with new keywords • minimize set of terminals • think about extensibility
  • 110. Abstract syntax meta models are frozen
  • 112. Linking • inter & intra language
  • 113. Linking • inter & intra language • to platform elements
  • 114. Linking • inter & intra language • to platform elements • reachable elements
  • 115.
  • 119. Validation • inherited • invariants may not be weakened • contract for compiler and interpreter
  • 120. And then there are... • compilers • interpreters • IDE infrastructure • code completion • formatting • label provider
  • 121. How can we add and change implementation non-invasively?
  • 122. Example: Customizing the LabelProvider public class MySpecialLabelProvider extends BaseLanguageLabelProvider { public String label(Entity e) { return e.getName(); } public String label(Feature f) { return f.getName()+":"+f.getType().getName(); } } ‣naming convention ‣polymorphic dispatch
  • 124. Thank you very much! www.itemis.com www.xtext.org