SlideShare a Scribd company logo
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 Languages
Markus Voelter
 
Choose flutter
Choose flutterChoose flutter
Choose flutter
SamuelAdetunji2
 
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
Vaclav Pech
 
Introduction to c_sharp
Introduction to c_sharpIntroduction to c_sharp
Introduction to c_sharp
Jayanta Basak
 
Programming Language Selection
Programming Language SelectionProgramming Language Selection
Programming Language Selection
Dhananjay Nene
 
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 programmerBusayo Oyebisi
 
Implementing Refactorings in IntelliJ IDEA
Implementing Refactorings in IntelliJ IDEAImplementing Refactorings in IntelliJ IDEA
Implementing Refactorings in IntelliJ IDEA
intelliyole
 
Concepts of JetBrains MPS
Concepts of JetBrains MPSConcepts of JetBrains MPS
Concepts of JetBrains MPS
Vaclav 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 30
Mahmoud 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 88
Mahmoud 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 & Toolkit
Samsung 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 31
Mahmoud 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 Passolo
Annie Markova
 
Translating software with SDL Passolo
Translating software with SDL PassoloTranslating software with SDL Passolo
Translating software with SDL Passolo
SDL Trados
 
Text to-speech & voice recognition
Text to-speech & voice recognitionText to-speech & voice recognition
Text to-speech & voice recognition
Mark 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 Festival
Kim_Spence_49
 
Happy New Year!
Happy New Year!Happy New Year!
Happy New Year!
Kim_Spence_49
 
Film Independent's 2009 Spirit Awards
Film Independent's 2009 Spirit AwardsFilm Independent's 2009 Spirit Awards
Film Independent's 2009 Spirit Awards
Kim_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
 
Gwt and Xtend
Gwt and XtendGwt and Xtend
Gwt and Xtend
Sven Efftinge
 
Presentation To Cumbria Cim
Presentation To Cumbria CimPresentation To Cumbria Cim
Presentation To Cumbria Cim
Lakeland
 
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
Sebastian Zarnekow
 
Eclipse Xtend
Eclipse XtendEclipse Xtend
Eclipse Xtend
Sven Efftinge
 
Introduction to Xbase
Introduction to XbaseIntroduction to Xbase
Introduction to Xbase
Holger Schill
 
Getting rid of backtracking
Getting rid of backtrackingGetting rid of backtracking
Getting rid of backtracking
Dr. Jan Köhnlein
 
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 development
ESUG
 
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_sharp
HEM 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 Worlds
Istvan Rath
 
Beyond Sharing: Open Source Design
Beyond Sharing: Open Source DesignBeyond Sharing: Open Source Design
Beyond Sharing: Open Source Design
Mushon 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 Workbenches
Markus 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 Metaprogramming
Skills Matter
 
Metamorphic Domain-Specific Languages
Metamorphic Domain-Specific LanguagesMetamorphic Domain-Specific Languages
Metamorphic Domain-Specific Languages
University of Rennes, INSA Rennes, Inria/IRISA, CNRS
 
Introduction to programming world
Introduction to programming worldIntroduction to programming world
Introduction to programming world
Jaskaran Singh
 
Overview new programming languages
Overview new programming languagesOverview new programming languages
Overview new programming languagesumoren
 
DSL Best Practices
DSL Best PracticesDSL Best Practices
DSL Best Practices
Markus Voelter
 
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 Ruby
ThoughtWorks
 
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 Xtext
Sven 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 Xtend
Sven Efftinge
 
Functional programming with Xtend
Functional programming with XtendFunctional programming with Xtend
Functional programming with Xtend
Sven Efftinge
 
Codegeneration With Xtend
Codegeneration With XtendCodegeneration With Xtend
Codegeneration With Xtend
Sven Efftinge
 
Xtend @ EclipseCon 2012
Xtend @ EclipseCon 2012Xtend @ EclipseCon 2012
Xtend @ EclipseCon 2012
Sven 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 Java
Sven 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 Projects
Sven Efftinge
 
Xtext Eclipse Con
Xtext Eclipse ConXtext Eclipse Con
Xtext Eclipse Con
Sven Efftinge
 
Generic Editor
Generic EditorGeneric Editor
Generic Editor
Sven 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 Praxis
Sven 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

Premium MEAN Stack Development Solutions for Modern Businesses
Premium MEAN Stack Development Solutions for Modern BusinessesPremium MEAN Stack Development Solutions for Modern Businesses
Premium MEAN Stack Development Solutions for Modern Businesses
SynapseIndia
 
Business Valuation Principles for Entrepreneurs
Business Valuation Principles for EntrepreneursBusiness Valuation Principles for Entrepreneurs
Business Valuation Principles for Entrepreneurs
Ben Wann
 
Introduction to Amazon company 111111111111
Introduction to Amazon company 111111111111Introduction to Amazon company 111111111111
Introduction to Amazon company 111111111111
zoyaansari11365
 
ModelingMarketingStrategiesMKS.CollumbiaUniversitypdf
ModelingMarketingStrategiesMKS.CollumbiaUniversitypdfModelingMarketingStrategiesMKS.CollumbiaUniversitypdf
ModelingMarketingStrategiesMKS.CollumbiaUniversitypdf
fisherameliaisabella
 
3.0 Project 2_ Developing My Brand Identity Kit.pptx
3.0 Project 2_ Developing My Brand Identity Kit.pptx3.0 Project 2_ Developing My Brand Identity Kit.pptx
3.0 Project 2_ Developing My Brand Identity Kit.pptx
tanyjahb
 
Putting the SPARK into Virtual Training.pptx
Putting the SPARK into Virtual Training.pptxPutting the SPARK into Virtual Training.pptx
Putting the SPARK into Virtual Training.pptx
Cynthia Clay
 
LA HUG - Video Testimonials with Chynna Morgan - June 2024
LA HUG - Video Testimonials with Chynna Morgan - June 2024LA HUG - Video Testimonials with Chynna Morgan - June 2024
LA HUG - Video Testimonials with Chynna Morgan - June 2024
Lital Barkan
 
Sustainability: Balancing the Environment, Equity & Economy
Sustainability: Balancing the Environment, Equity & EconomySustainability: Balancing the Environment, Equity & Economy
Sustainability: Balancing the Environment, Equity & Economy
Operational Excellence Consulting
 
ikea_woodgreen_petscharity_dog-alogue_digital.pdf
ikea_woodgreen_petscharity_dog-alogue_digital.pdfikea_woodgreen_petscharity_dog-alogue_digital.pdf
ikea_woodgreen_petscharity_dog-alogue_digital.pdf
agatadrynko
 
amptalk_RecruitingDeck_english_2024.06.05
amptalk_RecruitingDeck_english_2024.06.05amptalk_RecruitingDeck_english_2024.06.05
amptalk_RecruitingDeck_english_2024.06.05
marketing317746
 
What is the TDS Return Filing Due Date for FY 2024-25.pdf
What is the TDS Return Filing Due Date for FY 2024-25.pdfWhat is the TDS Return Filing Due Date for FY 2024-25.pdf
What is the TDS Return Filing Due Date for FY 2024-25.pdf
seoforlegalpillers
 
FINAL PRESENTATION.pptx12143241324134134
FINAL PRESENTATION.pptx12143241324134134FINAL PRESENTATION.pptx12143241324134134
FINAL PRESENTATION.pptx12143241324134134
LR1709MUSIC
 
The-McKinsey-7S-Framework. strategic management
The-McKinsey-7S-Framework. strategic managementThe-McKinsey-7S-Framework. strategic management
The-McKinsey-7S-Framework. strategic management
Bojamma2
 
Unveiling the Secrets How Does Generative AI Work.pdf
Unveiling the Secrets How Does Generative AI Work.pdfUnveiling the Secrets How Does Generative AI Work.pdf
Unveiling the Secrets How Does Generative AI Work.pdf
Sam H
 
ikea_woodgreen_petscharity_cat-alogue_digital.pdf
ikea_woodgreen_petscharity_cat-alogue_digital.pdfikea_woodgreen_petscharity_cat-alogue_digital.pdf
ikea_woodgreen_petscharity_cat-alogue_digital.pdf
agatadrynko
 
BeMetals Presentation_May_22_2024 .pdf
BeMetals Presentation_May_22_2024   .pdfBeMetals Presentation_May_22_2024   .pdf
BeMetals Presentation_May_22_2024 .pdf
DerekIwanaka1
 
Memorandum Of Association Constitution of Company.ppt
Memorandum Of Association Constitution of Company.pptMemorandum Of Association Constitution of Company.ppt
Memorandum Of Association Constitution of Company.ppt
seri bangash
 
Skye Residences | Extended Stay Residences Near Toronto Airport
Skye Residences | Extended Stay Residences Near Toronto AirportSkye Residences | Extended Stay Residences Near Toronto Airport
Skye Residences | Extended Stay Residences Near Toronto Airport
marketingjdass
 
5 Things You Need To Know Before Hiring a Videographer
5 Things You Need To Know Before Hiring a Videographer5 Things You Need To Know Before Hiring a Videographer
5 Things You Need To Know Before Hiring a Videographer
ofm712785
 
CADAVER AS OUR FIRST TEACHER anatomt in your.pptx
CADAVER AS OUR FIRST TEACHER anatomt in your.pptxCADAVER AS OUR FIRST TEACHER anatomt in your.pptx
CADAVER AS OUR FIRST TEACHER anatomt in your.pptx
fakeloginn69
 

Recently uploaded (20)

Premium MEAN Stack Development Solutions for Modern Businesses
Premium MEAN Stack Development Solutions for Modern BusinessesPremium MEAN Stack Development Solutions for Modern Businesses
Premium MEAN Stack Development Solutions for Modern Businesses
 
Business Valuation Principles for Entrepreneurs
Business Valuation Principles for EntrepreneursBusiness Valuation Principles for Entrepreneurs
Business Valuation Principles for Entrepreneurs
 
Introduction to Amazon company 111111111111
Introduction to Amazon company 111111111111Introduction to Amazon company 111111111111
Introduction to Amazon company 111111111111
 
ModelingMarketingStrategiesMKS.CollumbiaUniversitypdf
ModelingMarketingStrategiesMKS.CollumbiaUniversitypdfModelingMarketingStrategiesMKS.CollumbiaUniversitypdf
ModelingMarketingStrategiesMKS.CollumbiaUniversitypdf
 
3.0 Project 2_ Developing My Brand Identity Kit.pptx
3.0 Project 2_ Developing My Brand Identity Kit.pptx3.0 Project 2_ Developing My Brand Identity Kit.pptx
3.0 Project 2_ Developing My Brand Identity Kit.pptx
 
Putting the SPARK into Virtual Training.pptx
Putting the SPARK into Virtual Training.pptxPutting the SPARK into Virtual Training.pptx
Putting the SPARK into Virtual Training.pptx
 
LA HUG - Video Testimonials with Chynna Morgan - June 2024
LA HUG - Video Testimonials with Chynna Morgan - June 2024LA HUG - Video Testimonials with Chynna Morgan - June 2024
LA HUG - Video Testimonials with Chynna Morgan - June 2024
 
Sustainability: Balancing the Environment, Equity & Economy
Sustainability: Balancing the Environment, Equity & EconomySustainability: Balancing the Environment, Equity & Economy
Sustainability: Balancing the Environment, Equity & Economy
 
ikea_woodgreen_petscharity_dog-alogue_digital.pdf
ikea_woodgreen_petscharity_dog-alogue_digital.pdfikea_woodgreen_petscharity_dog-alogue_digital.pdf
ikea_woodgreen_petscharity_dog-alogue_digital.pdf
 
amptalk_RecruitingDeck_english_2024.06.05
amptalk_RecruitingDeck_english_2024.06.05amptalk_RecruitingDeck_english_2024.06.05
amptalk_RecruitingDeck_english_2024.06.05
 
What is the TDS Return Filing Due Date for FY 2024-25.pdf
What is the TDS Return Filing Due Date for FY 2024-25.pdfWhat is the TDS Return Filing Due Date for FY 2024-25.pdf
What is the TDS Return Filing Due Date for FY 2024-25.pdf
 
FINAL PRESENTATION.pptx12143241324134134
FINAL PRESENTATION.pptx12143241324134134FINAL PRESENTATION.pptx12143241324134134
FINAL PRESENTATION.pptx12143241324134134
 
The-McKinsey-7S-Framework. strategic management
The-McKinsey-7S-Framework. strategic managementThe-McKinsey-7S-Framework. strategic management
The-McKinsey-7S-Framework. strategic management
 
Unveiling the Secrets How Does Generative AI Work.pdf
Unveiling the Secrets How Does Generative AI Work.pdfUnveiling the Secrets How Does Generative AI Work.pdf
Unveiling the Secrets How Does Generative AI Work.pdf
 
ikea_woodgreen_petscharity_cat-alogue_digital.pdf
ikea_woodgreen_petscharity_cat-alogue_digital.pdfikea_woodgreen_petscharity_cat-alogue_digital.pdf
ikea_woodgreen_petscharity_cat-alogue_digital.pdf
 
BeMetals Presentation_May_22_2024 .pdf
BeMetals Presentation_May_22_2024   .pdfBeMetals Presentation_May_22_2024   .pdf
BeMetals Presentation_May_22_2024 .pdf
 
Memorandum Of Association Constitution of Company.ppt
Memorandum Of Association Constitution of Company.pptMemorandum Of Association Constitution of Company.ppt
Memorandum Of Association Constitution of Company.ppt
 
Skye Residences | Extended Stay Residences Near Toronto Airport
Skye Residences | Extended Stay Residences Near Toronto AirportSkye Residences | Extended Stay Residences Near Toronto Airport
Skye Residences | Extended Stay Residences Near Toronto Airport
 
5 Things You Need To Know Before Hiring a Videographer
5 Things You Need To Know Before Hiring a Videographer5 Things You Need To Know Before Hiring a Videographer
5 Things You Need To Know Before Hiring a Videographer
 
CADAVER AS OUR FIRST TEACHER anatomt in your.pptx
CADAVER AS OUR FIRST TEACHER anatomt in your.pptxCADAVER AS OUR FIRST TEACHER anatomt in your.pptx
CADAVER AS OUR FIRST TEACHER anatomt in your.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