SlideShare uma empresa Scribd logo
1 de 74
INGÉNIERIE DES MODÈLES &
  LANGAGES SPÉCIFIQUES
     AUX DOMAINES
              Sébastien Mosser
     Université de Nice - Sophia Antipolis,
          CNRS, I3S, Equipe Modalis

    Polytech’Nice Sophia SI5 - Master 2 IFI
       Année universitaire 2009 - 2010
CONCLUSION

De toutes façons, les modèles,
     ça marchera jamais


                                      DR
                                   u G 09
                                s d 20
                          ur née vier
                       Jo      Jan
                        GP L,
CONCLUSION

De toutes façons, les modèles,
     ça marchera jamais
  avec des informaticiens.
                                      DR
                                   u G 09
                                s d 20
                          ur née vier
                       Jo      Jan
                        GP L,
MÉTIER
=> PASSE-PARTOUT
INDUSTRIALISATION
=> DÉDIÉ DOMAINE
DIVERSIFICATION
=> MAUVAIS DOMAINE
MOTIVATION PAR L’EXEMPLE
                                      représente

                        Modèle de
                       faits Prolog
                                         SOA
           décrit


                                        génère
                           raisonne
Pour un «vrai» système:
 plus de 50.000 faits !!
                              9
INTRODUCTION                 et toujours 50.000 faits !!
   D’UN DSL
                           Modèle de
                          faits Prolog
                                               représente

   décrit   Pour un «vrai» système:
            seulement 400 lignes !!
                                                SOA

                    est compilé vers
                                                  génère
    Langage                       raisonne
   Spécifique
                     10
AGENDA

1.Rappels sur les
 langages              4. Construction d’un DSL
                        dirigée par :
2.Quelques «langages
 domaines»
                        • Les besoins
                        • La syntaxe abstraite
3.Des métamodèles       • Les modèles (bis)
 aux langages
                       5. Conclusions
LANGAGES ... (RAPPELS)
SUR LES LANGAGES ...
        « Languages are the primary way in which
    system developers communicate, design and
    implement systems »

        « Languages   provide abstractions that can
    encapsulate       complexity, embrace the
    diversity of      technologies and design
    abstractions,     and unite modern and legacy
    systems »
                                   Tony Clark, Andy Evans,
                                 Paul Sammut, James Willans
                            13
pam@MDD4DRES’09
CECI N’A PAS LA PRÉTENTION
D’ÊTRE UN COURS DE COMPILATION !
CONFORMITÉ
     «est un mot de»


           eBNF

 «est un mot de»


    Grammaire

«est un mot de»


   Code Source
                           15
LANGAGES TEXTUELS (RAPPELS)
•   Code source

    •   Syntaxe concrète du langage, «Ce que j’écris»

•   Analyse lexicale

    •   Production de Lexèmes

•   Analyse syntaxique

    •   Appartenance au langage

•   Arbre de Syntaxe Abstraite

    •   Syntaxe abstraite du langage, «Ce que j’ai voulu dire»
                                  16
DU SOURCE À L’ARBRE DE
SYNTAXE ABSTRAITE ...
            Analyseur
              Lexical
          Lex
                             Arbre de
Source             Lexèmes    Syntaxe
                             Abstraite
                 Analyseur
                Syntaxique
         Yacc
                      17           pfz@SI4
function foo() {
                                         EXEMPLE
  echo «Hello, World !»;
}           (Syntaxe concrète)

                            FUNCTION                (AST)
     #FUNC
#SYMBOL(«foo»)              foo      DEFINITION
    #LPAREN                          STATEMENT
    #RPAREN                       FUNCTIONCALL
       ...
                                  echo           ARGS
  #RBRACKET
                                         «Hello, World !»
     (lexèmes)         18
MINIMALISME DE SCHEME
     & PURETÉ SYNTAXIQUE




                                      C
                                      ul
(define foo ()   (Syntaxe concrète)




                                          tu
                                             re
  (print «Hello, World !»))




                                             G
                                              én
                S-Expressions




                                                  ér
                                                    al
                                                      e
          (define foo ()          (AST)
            (print «Hello, World !»))


                         19
                                                     λ
ET LE COMPILATEUR
  DANS TOUT ÇA ? (EN GROS)
                             est interprété par
              Partie                                      cible
              Avant      Arbre
          r




                                                     it
       pa




                          de




                                                   du
                                                  pro
      sé




                        Syntaxe
   aly




                                        Partie
  an




                       Abstraite
est




                                        Arrière
source             produit


                              20                   inspiré de pfz@SI4
«  Another lesson we should have learned
 from the recent past is that the development
 of "richer" or "more powerful" programming
 languages was a mistake in the sense that these
 monstrosities, these conglomerations of
 idiosyncrasies, are really unmanageable, both
 mechanically and mentally. I see a great future
 for very systematic and very modest
 programming languages. »

                  E.W. DIJKSTRA (1972)
pam@MDD4DRES’09         21
DESIGN D’UN DSL (TYPIQUE)
 • Identify
          the problem domain and gather all relevant
   knowledge in this domain

 • Cluster  this knowledge in a handful of semantic
   notions and operations on them

 • Construct         a library that implements the semantic notions

 • Design     and implement a compiler that translates
   language statements to sequences of library calls

 • Write     programs for all desired applications and compile
   them                                                                      J. C. Cleaveland.
                             A. van Deursen and P. Klint.
                                                                     Building application generators.
                        Little languages: Little maintenance?
                                                                     IEEE Software, pages 25-33, July
                  Journal of Software Maintenance, 10:75-92, 1998.
                                                  22                                1988.
pam@MDD4DRES’09
«LANGAGES DOMAINES»
GRAPHVIZ
UML
KML
DES MÉTAMODÈLES
 AUX LANGAGES
MODÈLES, MÉTAMODÈLES
           & LANGAGES
                                                                 «métatriangle»
                                        représente
        Métamodèle                                       Langage

                                         o t de
             est conforme à         n   m
                              est u

                                            représente
        Modèle                                           Chose


                                                  29
pam@MDD4DRES’09
METAMODELING ARCHITECTURE
                                    Langage de
Métamétamodèle       représente
                                  description des
                                     langages
est conforme à
                                    Langage de
      Métamodèle
                     représente
                                  description des
                                      choses
 est conforme à

                     représente
          Modèle                      Chose

                   Implémentation
                            30
pam@MDD4DRES’09
DES MÉTAMODÈLES
              AUX LANGAGES
                        Syntaxe
                       générique
                                           ECore
                       Syntaxe
                       abstraite        Spécifications
    Syntaxe
      Syntaxe
    concrète
        Syntaxe
     concrète                               métamodèle
                       Sémantique
       concrète
                  langage
                                   31
pam@MDD4DRES’09
CONSTRUCTION D’UN DSL
& INGÉNIERIE DES MODÈLES
PROBLÈME GÉNÉRAL


                     Modèle
Texte




               33
PROBLÉME GÉNÉRAL (IRL)



                   Modèle
Texte




            34         mh@GPL’09
PROBLÉME GÉNÉRAL (IRL)
                  Métalangage
                         conforme
                  Métamodèle
                         conforme
                    Modèle
Texte




            34          mh@GPL’09
PROBLÉME GÉNÉRAL (IRL)
                     Templates      util             Métalangage
                                        ise
                                                            conforme
                          utilise                    Métamodèle
                                                            conforme
            d uit   Générateur             utilise
        p ro         de texte                          Modèle
Texte




                               34                          mh@GPL’09
PROBLÉME GÉNÉRAL (IRL)
                                 Templates              util             Métalangage
                                                            ise
                                                                                    conforme
                                       utilise                           Métamodèle
                                                                                    conforme
                       d uit   Générateur                      utilise
                 p ro           de texte                                    Modèle
Texte
                                                                                    produit
est
      uti
         lisé
                pa             Analyseurs                           Interpreteur
                   r                    pro
                                            du
                                                   it                         ise
                                lise




Grammaire                                               AST              util
                               uti




                                              34                                    mh@GPL’09
DIRIGÉE PAR LES BESOINS



ma@bbq              35
Syntaxe
             Concrète
      rit
 d éc



déc
      rit
            Template de
             génération
                  36
Analyseur                       Analyseur
 Lexical                        Syntaxique



                   Syntaxe
                   Concrète
            rit                 Métamodèle
       d éc
                                  ECore

      déc                         Plugin
            rit
                                 d’édition
                  Template de
                   génération
                        36
EXEMPLE: UN LANGAGE
         DE DÉFINITION D’ENTITÉS
type String
type Bool
entity Session {
  property Title: String
  property IsTutorial : Bool
}
entity Conference {
  property Name : String
  property Attendees : Person[]
  property Speakers : Speaker[]
}
entity Person {
  property Name : String
}
entity Speaker extends Person {
  property Sessions : Session[]
}                          37
     http://www.eclipse.org/Xtext/documentation/latest/xtext.html#getting-started-xtext
EXEMPLE: UN LANGAGE
         DE DÉFINITION D’ENTITÉS
                             public class Person {

                                 private String name;

                                 public String getName() {
                                   return this.name;
                                 }

                                 public void setName(String name) {
                                   this.name = name;
                                 }
                             }                                 Cible: Java
entity Person {
  property Name : String
}



                                       37
     http://www.eclipse.org/Xtext/documentation/latest/xtext.html#getting-started-xtext
SYNTAXE CONCRÈTE




                                  38
http://www.eclipse.org/Xtext/documentation/latest/xtext.html#getting-started-xtext
EDITEUR AUTO-GÉNÉRÉ




                                  39
http://www.eclipse.org/Xtext/documentation/latest/xtext.html#getting-started-xtext
TEMPLATE DE GÉNÉRATION JAVA
«IMPORT entities»

«DEFINE entity FOR Entity»
  «FILE this.name + ".java"»
    public class «this.name» {
      «EXPAND property FOREACH this.properties»
    }
  «ENDFILE»
«ENDDEFINE»

«DEFINE property FOR Property»
  private «this.type.name» «this.name»;
  public void set«this.name.toFirstUpper()»
         («this.type.name» «this.name») {
    this.«this.name» = «this.name»;
  }
  public «this.type.name» get«this.name.toFirstUpper()»() {
    return this.«this.name»;
  }
«ENDDEFINE»
                                        40
      http://www.eclipse.org/Xtext/documentation/latest/xtext.html#getting-started-xtext
DIRIGÉE PAR LA
         SYNTAXE ABSTRAITE

                             T P
ma@bbq           41
Syntaxe Abstraite



                  Métamodèle
         éc rit
        d



       décrit
                    Syntaxe
                    concrète
                         42
Syntaxe Abstraite
                                Plugin
                               d’édition
                  Métamodèle
         éc rit
        d



       décrit
                    Syntaxe
                    concrète
                         42
EXEMPLE: UN DSL DE
DESCRIPTION DE SANDWICHES




                              43
 http://www.emftext.org/index.php/EMFText_Concrete_Syntax_Sandwich
SYNTAXE ABSTRAITE
         (MÉTAMODÈLE)




                             44
http://www.emftext.org/index.php/EMFText_Concrete_Syntax_Sandwich
SYNTAXE CONCRÈTE




                             45
http://www.emftext.org/index.php/EMFText_Concrete_Syntax_Sandwich
DIRIGÉE PAR LES MODÈLES


                         ks
                    inta
                  S
           46
Modèle de
Métamodèle           Sintaks              syntaxe concrète

             dé
               cri               c r it
                  t            dé




                        47
Métalangage            confor
                                 m  eà
                                                      Métamodèle de
                                                     syntaxe concrète
conforme à
                                                    conforme à

                                                       Modèle de
   Métamodèle            Sintaks                    syntaxe concrète

                 dé
                   cri                     c r it
                      t                  dé




                               47
BOOTSTRAP: HUTN

                          conforme   Métalangage
 Métamodèle de
syntaxe concrète                           conforme
conforme
                                     Métamodèle
                      référence
   Modèle de                               conforme
syntaxe concrète                      Modèle
                           utilise
           conforme

      Texte              Sintaks
                             48                mh@GPL’09
BOOTSTRAP: HUTN

                          conforme   Métalangage
 Métamodèle de
syntaxe concrète                           conforme
                      HUTN
conforme
                                     Métamodèle
                      référence
   Modèle de                               conforme
syntaxe concrète                      Modèle
                           utilise
           conforme

      Texte              Sintaks
                             48                mh@GPL’09
AGILITÉ DU CYCLE DE VIE:
     DEV. EN SPIRALE

                Métamodèle
                      conforme

                  Modèle




           49              mh@GPL’09
AGILITÉ DU CYCLE DE VIE:
       DEV. EN SPIRALE
                   HUTN

                   référence   Métamodèle
   Modèle de
syntaxe concrète                     conforme

                                 Modèle




                         49               mh@GPL’09
AGILITÉ DU CYCLE DE VIE:
       DEV. EN SPIRALE

                   référence   Métamodèle
   Modèle de
syntaxe concrète                     conforme

                                 Modèle




                         49               mh@GPL’09
AGILITÉ DU CYCLE DE VIE:
       DEV. EN SPIRALE

                   référence   Métamodèle
   Modèle de
syntaxe concrète                     conforme

conforme                         Modèle
      Texte
                     Sintaks
                         49               mh@GPL’09
AGILITÉ DU CYCLE DE VIE:
       DEV. EN SPIRALE

                      référence    Métamodèle
   Modèle de
syntaxe concrète                         conforme

conforme                             Modèle
                   «Bidouillage»
      Texte
                        Sintaks
                            49                mh@GPL’09
UN EXEMPLE DE MODÈLE DE
   SYNTAXE CONCRÈTE
Type Mail {
  From: User
  To: User
}
Type User {
  Name: String
}
Type String;
                 50
                      pam@MDD4DRES’09
DIRIGÉE PAR LES MODÈLES
          (BIS)



           51
TOUT EST MODÈLE ...
              ET INDÉPENDANT !!
• Domaine        : Concepts métiers                  Mapping :

  • Les   entités que je dois manipuler                    Quoi
• Graphique        : Boites, boutons, ...
                                                           Comment
  • Les   entités que je veut afficher
                                                           Quand
• Outils: Palette, actions, ...

  • Comment     je manipule tout cela (créer, supprimer, ...)
                                    52
   http://fondement.free.fr/lgl/courses/mde/documentation_succinte_gmf.pdf
WORKFLOW GMF




                Plugin
               d’Edition
         53
WORKFLOW GMF

 Modèle      Modèle       Modèle
«Outils»   «Domaine»   «Graphique»




                               Plugin
                              d’Edition
                53
WORKFLOW GMF

 Modèle      Modèle            Modèle
«Outils»   «Domaine»        «Graphique»


         Modèle            Modèle
       «Mapping»        «Génération»

                                        Plugin
                                       d’Edition
                   53
CONCLUSIONS
LIMITATIONS (VOLONTAIRES)

• On      s’est intéressé ici aux langages «textuels»

   • C’est   plus «rapide» à mettre en oeuvre

• Il   existe des approches «graphiques»

   • Eclipse     GMF, créateur d’éditeur graphique dirigé par les
       modèles

• Trop      peu de temps pour monter un cours / TP

   • Et   il existe de nombreux tutoriels sur le Web
                                   55
E.W. DIJKSTRA
                     (1972)




«  I see a great future for very
systematic and very modest
programming languages. »
If the only tool you have is a hammer ...




           ... then everything looks like a nail!!
CRÉDITS & REMERCIEMENTS
• Pierre   Alain Muller
   «pam@MDD4DRES’09»
• Michel   Hassenforder
            «mh@GPL’09»
• Paul   Franchi
                   «pfz@SI4»

• Mathieu   Acher
                   «ma@bbq»
• Images:

 • http://sxc.hu               58
De toutes façons, les modèles,
     ça marchera jamais
  avec des informaticiens.

Mais conteúdo relacionado

Mais procurados

Cours Visual Basic.NET
Cours Visual Basic.NETCours Visual Basic.NET
Cours Visual Basic.NETAziz Darouichi
 
Cours algorithme
Cours algorithmeCours algorithme
Cours algorithmebadr zaimi
 
Chp6 - De UML vers C++
Chp6 - De UML vers C++Chp6 - De UML vers C++
Chp6 - De UML vers C++Lilia Sfaxi
 
Chap1V2019: Cours en C++
Chap1V2019: Cours en C++Chap1V2019: Cours en C++
Chap1V2019: Cours en C++Aziz Darouichi
 
Transformation M2M avec ATL
Transformation M2M avec ATL Transformation M2M avec ATL
Transformation M2M avec ATL Halima Bouabdelli
 
Dotnet csharp
Dotnet csharpDotnet csharp
Dotnet csharpSDFG5
 
La programmation GPU avec C++ AMP pour les performances extrêmes
La programmation GPU avec C++ AMP pour les performances extrêmesLa programmation GPU avec C++ AMP pour les performances extrêmes
La programmation GPU avec C++ AMP pour les performances extrêmesMicrosoft
 
Chapitre4: Pointeurs et références
Chapitre4: Pointeurs et références Chapitre4: Pointeurs et références
Chapitre4: Pointeurs et références Aziz Darouichi
 
Chap 6 : classes et interfaces
Chap 6 : classes et interfacesChap 6 : classes et interfaces
Chap 6 : classes et interfacesAziz Darouichi
 
C# 5 versus Java 8... Quand C++ 11 s'invite à la fête
C# 5 versus Java 8... Quand C++ 11 s'invite à la fêteC# 5 versus Java 8... Quand C++ 11 s'invite à la fête
C# 5 versus Java 8... Quand C++ 11 s'invite à la fêteFabrice JEAN-FRANCOIS
 
Programmation fonctionnelle
Programmation fonctionnelleProgrammation fonctionnelle
Programmation fonctionnelleJean Detoeuf
 
cours algorithme et structure de données 1er année
cours algorithme et structure de données 1er annéecours algorithme et structure de données 1er année
cours algorithme et structure de données 1er annéeMissaoui Abdelbaki
 

Mais procurados (20)

Cours compilation
Cours compilationCours compilation
Cours compilation
 
Uml
UmlUml
Uml
 
Cours Visual Basic.NET
Cours Visual Basic.NETCours Visual Basic.NET
Cours Visual Basic.NET
 
Cours algorithme
Cours algorithmeCours algorithme
Cours algorithme
 
Chp6 - De UML vers C++
Chp6 - De UML vers C++Chp6 - De UML vers C++
Chp6 - De UML vers C++
 
Chap1V2019: Cours en C++
Chap1V2019: Cours en C++Chap1V2019: Cours en C++
Chap1V2019: Cours en C++
 
Transformation M2M avec ATL
Transformation M2M avec ATL Transformation M2M avec ATL
Transformation M2M avec ATL
 
Tutoriel java
Tutoriel javaTutoriel java
Tutoriel java
 
Dotnet csharp
Dotnet csharpDotnet csharp
Dotnet csharp
 
La programmation GPU avec C++ AMP pour les performances extrêmes
La programmation GPU avec C++ AMP pour les performances extrêmesLa programmation GPU avec C++ AMP pour les performances extrêmes
La programmation GPU avec C++ AMP pour les performances extrêmes
 
C#
C#C#
C#
 
Chapitre4: Pointeurs et références
Chapitre4: Pointeurs et références Chapitre4: Pointeurs et références
Chapitre4: Pointeurs et références
 
Chap 6 : classes et interfaces
Chap 6 : classes et interfacesChap 6 : classes et interfaces
Chap 6 : classes et interfaces
 
C# 5 versus Java 8... Quand C++ 11 s'invite à la fête
C# 5 versus Java 8... Quand C++ 11 s'invite à la fêteC# 5 versus Java 8... Quand C++ 11 s'invite à la fête
C# 5 versus Java 8... Quand C++ 11 s'invite à la fête
 
Language java
Language javaLanguage java
Language java
 
Programmation fonctionnelle
Programmation fonctionnelleProgrammation fonctionnelle
Programmation fonctionnelle
 
Chap1: Cours en C++
Chap1: Cours en C++Chap1: Cours en C++
Chap1: Cours en C++
 
Tutoriel java
Tutoriel javaTutoriel java
Tutoriel java
 
Cours de c
Cours de cCours de c
Cours de c
 
cours algorithme et structure de données 1er année
cours algorithme et structure de données 1er annéecours algorithme et structure de données 1er année
cours algorithme et structure de données 1er année
 

Semelhante a Builsing DSL using MDE

Mix it 2011 - Clojure
Mix it 2011 - ClojureMix it 2011 - Clojure
Mix it 2011 - Clojurelolopetit
 
Sinitier_a_la_programmation_et_a_loriente_objet__avec_des_exemples_en_C_C_C_J...
Sinitier_a_la_programmation_et_a_loriente_objet__avec_des_exemples_en_C_C_C_J...Sinitier_a_la_programmation_et_a_loriente_objet__avec_des_exemples_en_C_C_C_J...
Sinitier_a_la_programmation_et_a_loriente_objet__avec_des_exemples_en_C_C_C_J...JUSTINDAVONDAMBAT
 
Introduction a la compilation Aperçu de la compilation / Assembleur MIPS - C1
Introduction a la compilation  Aperçu de la compilation / Assembleur MIPS - C1Introduction a la compilation  Aperçu de la compilation / Assembleur MIPS - C1
Introduction a la compilation Aperçu de la compilation / Assembleur MIPS - C1Beligh HAMDI
 
DDD, CQRS et Event Sourcing : quand coder propre n'est plus suffisant
 DDD, CQRS et Event Sourcing : quand coder propre n'est plus suffisant DDD, CQRS et Event Sourcing : quand coder propre n'est plus suffisant
DDD, CQRS et Event Sourcing : quand coder propre n'est plus suffisantcluelessjoe
 
De l'IA au Calcul Littéraire: Pourquoi j'ai zappé le Web Sémantique
De l'IA au Calcul Littéraire: Pourquoi j'ai zappé le Web Sémantique De l'IA au Calcul Littéraire: Pourquoi j'ai zappé le Web Sémantique
De l'IA au Calcul Littéraire: Pourquoi j'ai zappé le Web Sémantique Jean Rohmer
 
2015: L'année d'Elixir, Code, écosystème et communauté
2015: L'année d'Elixir, Code, écosystème et communauté2015: L'année d'Elixir, Code, écosystème et communauté
2015: L'année d'Elixir, Code, écosystème et communautéMickaël Rémond
 
soft-shake.ch - Un zeste d’Erlang dans le shaker!
soft-shake.ch - Un zeste d’Erlang dans le shaker!soft-shake.ch - Un zeste d’Erlang dans le shaker!
soft-shake.ch - Un zeste d’Erlang dans le shaker!soft-shake.ch
 
Dans les entrailles du langage C
Dans les entrailles du langage CDans les entrailles du langage C
Dans les entrailles du langage CStephanie Ouillon
 
Domain-Specific Languages avec Groovy
Domain-Specific Languages avec GroovyDomain-Specific Languages avec Groovy
Domain-Specific Languages avec GroovyGuillaume Laforge
 
Samar - Premier bilan d'étape - Oct. 2010
Samar - Premier bilan d'étape - Oct. 2010Samar - Premier bilan d'étape - Oct. 2010
Samar - Premier bilan d'étape - Oct. 2010Stefane Fermigier
 
Patrons de conception de la programmation fonctionnelle
Patrons de conception de la programmation fonctionnellePatrons de conception de la programmation fonctionnelle
Patrons de conception de la programmation fonctionnelleAssociation Agile Nantes
 
Initiation aux langages informatiques (2)
Initiation aux langages informatiques (2)Initiation aux langages informatiques (2)
Initiation aux langages informatiques (2)Pierre Tran
 
Corpus communication médiée par les réseaux en français et corpus allemand et...
Corpus communication médiée par les réseaux en français et corpus allemand et...Corpus communication médiée par les réseaux en français et corpus allemand et...
Corpus communication médiée par les réseaux en français et corpus allemand et...Thierry Chanier
 
Séminaire Inria IST - Référentiels et interoperabilité (2)
Séminaire Inria IST - Référentiels et interoperabilité (2)Séminaire Inria IST - Référentiels et interoperabilité (2)
Séminaire Inria IST - Référentiels et interoperabilité (2)Antoine Isaac
 

Semelhante a Builsing DSL using MDE (20)

Jean Rohmer
Jean RohmerJean Rohmer
Jean Rohmer
 
Mix it 2011 - Clojure
Mix it 2011 - ClojureMix it 2011 - Clojure
Mix it 2011 - Clojure
 
Formation LaTeX
Formation LaTeXFormation LaTeX
Formation LaTeX
 
Drools
DroolsDrools
Drools
 
Sinitier_a_la_programmation_et_a_loriente_objet__avec_des_exemples_en_C_C_C_J...
Sinitier_a_la_programmation_et_a_loriente_objet__avec_des_exemples_en_C_C_C_J...Sinitier_a_la_programmation_et_a_loriente_objet__avec_des_exemples_en_C_C_C_J...
Sinitier_a_la_programmation_et_a_loriente_objet__avec_des_exemples_en_C_C_C_J...
 
Introduction a la compilation Aperçu de la compilation / Assembleur MIPS - C1
Introduction a la compilation  Aperçu de la compilation / Assembleur MIPS - C1Introduction a la compilation  Aperçu de la compilation / Assembleur MIPS - C1
Introduction a la compilation Aperçu de la compilation / Assembleur MIPS - C1
 
DDD, CQRS et Event Sourcing : quand coder propre n'est plus suffisant
 DDD, CQRS et Event Sourcing : quand coder propre n'est plus suffisant DDD, CQRS et Event Sourcing : quand coder propre n'est plus suffisant
DDD, CQRS et Event Sourcing : quand coder propre n'est plus suffisant
 
De l'IA au Calcul Littéraire: Pourquoi j'ai zappé le Web Sémantique
De l'IA au Calcul Littéraire: Pourquoi j'ai zappé le Web Sémantique De l'IA au Calcul Littéraire: Pourquoi j'ai zappé le Web Sémantique
De l'IA au Calcul Littéraire: Pourquoi j'ai zappé le Web Sémantique
 
Multi-Threading Et Cocoa
Multi-Threading Et CocoaMulti-Threading Et Cocoa
Multi-Threading Et Cocoa
 
2015: L'année d'Elixir, Code, écosystème et communauté
2015: L'année d'Elixir, Code, écosystème et communauté2015: L'année d'Elixir, Code, écosystème et communauté
2015: L'année d'Elixir, Code, écosystème et communauté
 
soft-shake.ch - Un zeste d’Erlang dans le shaker!
soft-shake.ch - Un zeste d’Erlang dans le shaker!soft-shake.ch - Un zeste d’Erlang dans le shaker!
soft-shake.ch - Un zeste d’Erlang dans le shaker!
 
Dans les entrailles du langage C
Dans les entrailles du langage CDans les entrailles du langage C
Dans les entrailles du langage C
 
Domain-Specific Languages avec Groovy
Domain-Specific Languages avec GroovyDomain-Specific Languages avec Groovy
Domain-Specific Languages avec Groovy
 
Samar - Premier bilan d'étape - Oct. 2010
Samar - Premier bilan d'étape - Oct. 2010Samar - Premier bilan d'étape - Oct. 2010
Samar - Premier bilan d'étape - Oct. 2010
 
Patrons de conception de la programmation fonctionnelle
Patrons de conception de la programmation fonctionnellePatrons de conception de la programmation fonctionnelle
Patrons de conception de la programmation fonctionnelle
 
Soutenance.final
Soutenance.finalSoutenance.final
Soutenance.final
 
Initiation aux langages informatiques (2)
Initiation aux langages informatiques (2)Initiation aux langages informatiques (2)
Initiation aux langages informatiques (2)
 
Corpus communication médiée par les réseaux en français et corpus allemand et...
Corpus communication médiée par les réseaux en français et corpus allemand et...Corpus communication médiée par les réseaux en français et corpus allemand et...
Corpus communication médiée par les réseaux en français et corpus allemand et...
 
Séminaire Inria IST - Référentiels et interoperabilité (2)
Séminaire Inria IST - Référentiels et interoperabilité (2)Séminaire Inria IST - Référentiels et interoperabilité (2)
Séminaire Inria IST - Référentiels et interoperabilité (2)
 
Introduction à Uml
Introduction à UmlIntroduction à Uml
Introduction à Uml
 

Mais de Sébastien Mosser

A commutative model composition operator to support software adaptation
A commutative model composition operator to support software adaptationA commutative model composition operator to support software adaptation
A commutative model composition operator to support software adaptationSébastien Mosser
 
Towards CloudML, a Model-Based Approach to Provision Resources in the Clouds
Towards CloudML, a Model-Based Approach  to Provision Resources in the CloudsTowards CloudML, a Model-Based Approach  to Provision Resources in the Clouds
Towards CloudML, a Model-Based Approach to Provision Resources in the CloudsSébastien Mosser
 
Tools For Software Engineering
Tools For Software EngineeringTools For Software Engineering
Tools For Software EngineeringSébastien Mosser
 
Using Domain Feature to handle Feature Interactions
Using Domain Feature to handle Feature InteractionsUsing Domain Feature to handle Feature Interactions
Using Domain Feature to handle Feature InteractionsSébastien Mosser
 
Cloud Computing: From Revolution to Evolution
Cloud Computing: From Revolution to EvolutionCloud Computing: From Revolution to Evolution
Cloud Computing: From Revolution to EvolutionSébastien Mosser
 
Introducing Security Access Control Policies into Legacy Business Processes
Introducing Security Access Control Policies into Legacy Business ProcessesIntroducing Security Access Control Policies into Legacy Business Processes
Introducing Security Access Control Policies into Legacy Business ProcessesSébastien Mosser
 
Undoing Event-driven Adaptation of Business Processes
Undoing Event-driven Adaptation of Business ProcessesUndoing Event-driven Adaptation of Business Processes
Undoing Event-driven Adaptation of Business ProcessesSébastien Mosser
 
Talk Session COSMAL du GDR GPL 2011
Talk Session COSMAL du GDR GPL 2011Talk Session COSMAL du GDR GPL 2011
Talk Session COSMAL du GDR GPL 2011Sébastien Mosser
 
Behavioral Compositions in Service-Oriented Architecture
Behavioral Compositions in Service-Oriented ArchitectureBehavioral Compositions in Service-Oriented Architecture
Behavioral Compositions in Service-Oriented ArchitectureSébastien Mosser
 
jSeduite "Quickies" au Riviera JUG
jSeduite "Quickies" au Riviera JUGjSeduite "Quickies" au Riviera JUG
jSeduite "Quickies" au Riviera JUGSébastien Mosser
 
Taming Orchestration Design Using ADORE
Taming Orchestration Design Using ADORETaming Orchestration Design Using ADORE
Taming Orchestration Design Using ADORESébastien Mosser
 
Adore Demonstration (AOSD'10)
Adore Demonstration (AOSD'10)Adore Demonstration (AOSD'10)
Adore Demonstration (AOSD'10)Sébastien Mosser
 

Mais de Sébastien Mosser (18)

A commutative model composition operator to support software adaptation
A commutative model composition operator to support software adaptationA commutative model composition operator to support software adaptation
A commutative model composition operator to support software adaptation
 
Towards CloudML, a Model-Based Approach to Provision Resources in the Clouds
Towards CloudML, a Model-Based Approach  to Provision Resources in the CloudsTowards CloudML, a Model-Based Approach  to Provision Resources in the Clouds
Towards CloudML, a Model-Based Approach to Provision Resources in the Clouds
 
Tools For Software Engineering
Tools For Software EngineeringTools For Software Engineering
Tools For Software Engineering
 
La Thèse ...
La Thèse ...La Thèse ...
La Thèse ...
 
Using Domain Feature to handle Feature Interactions
Using Domain Feature to handle Feature InteractionsUsing Domain Feature to handle Feature Interactions
Using Domain Feature to handle Feature Interactions
 
Cloud Computing: From Revolution to Evolution
Cloud Computing: From Revolution to EvolutionCloud Computing: From Revolution to Evolution
Cloud Computing: From Revolution to Evolution
 
Introducing Security Access Control Policies into Legacy Business Processes
Introducing Security Access Control Policies into Legacy Business ProcessesIntroducing Security Access Control Policies into Legacy Business Processes
Introducing Security Access Control Policies into Legacy Business Processes
 
Undoing Event-driven Adaptation of Business Processes
Undoing Event-driven Adaptation of Business ProcessesUndoing Event-driven Adaptation of Business Processes
Undoing Event-driven Adaptation of Business Processes
 
Talk Session COSMAL du GDR GPL 2011
Talk Session COSMAL du GDR GPL 2011Talk Session COSMAL du GDR GPL 2011
Talk Session COSMAL du GDR GPL 2011
 
Behavioral Compositions in Service-Oriented Architecture
Behavioral Compositions in Service-Oriented ArchitectureBehavioral Compositions in Service-Oriented Architecture
Behavioral Compositions in Service-Oriented Architecture
 
ADAM Seminary
ADAM SeminaryADAM Seminary
ADAM Seminary
 
Software Composition 2010
Software Composition 2010Software Composition 2010
Software Composition 2010
 
jSeduite "Quickies" au Riviera JUG
jSeduite "Quickies" au Riviera JUGjSeduite "Quickies" au Riviera JUG
jSeduite "Quickies" au Riviera JUG
 
jSeduite @UNICE Foundation
jSeduite @UNICE FoundationjSeduite @UNICE Foundation
jSeduite @UNICE Foundation
 
Taming Orchestration Design Using ADORE
Taming Orchestration Design Using ADORETaming Orchestration Design Using ADORE
Taming Orchestration Design Using ADORE
 
Adore Demonstration (AOSD'10)
Adore Demonstration (AOSD'10)Adore Demonstration (AOSD'10)
Adore Demonstration (AOSD'10)
 
Entrepôt'Lytech JM2L
Entrepôt'Lytech JM2LEntrepôt'Lytech JM2L
Entrepôt'Lytech JM2L
 
Le Framework jSeduite
Le Framework jSeduiteLe Framework jSeduite
Le Framework jSeduite
 

Último

Boléro. pptx Film français réalisé par une femme.
Boléro.  pptx   Film   français   réalisé  par une  femme.Boléro.  pptx   Film   français   réalisé  par une  femme.
Boléro. pptx Film français réalisé par une femme.Txaruka
 
Sidonie au Japon . pptx Un film français
Sidonie    au   Japon  .  pptx  Un film françaisSidonie    au   Japon  .  pptx  Un film français
Sidonie au Japon . pptx Un film françaisTxaruka
 
Approche-des-risques-par-l’analyse-des-accidents-1.pptx
Approche-des-risques-par-l’analyse-des-accidents-1.pptxApproche-des-risques-par-l’analyse-des-accidents-1.pptx
Approche-des-risques-par-l’analyse-des-accidents-1.pptxssusercbaa22
 
Bolero. pptx . Film de A nnne Fontaine
Bolero. pptx . Film   de  A nnne FontaineBolero. pptx . Film   de  A nnne Fontaine
Bolero. pptx . Film de A nnne FontaineTxaruka
 
COURS SVT 3 EME ANNEE COLLEGE 2EME SEM.pdf
COURS SVT 3 EME ANNEE COLLEGE 2EME SEM.pdfCOURS SVT 3 EME ANNEE COLLEGE 2EME SEM.pdf
COURS SVT 3 EME ANNEE COLLEGE 2EME SEM.pdfabatanebureau
 
MaintenanceLa Maintenance Corrective.ppt
MaintenanceLa Maintenance Corrective.pptMaintenanceLa Maintenance Corrective.ppt
MaintenanceLa Maintenance Corrective.pptssusercbaa22
 
La nouvelle femme . pptx Film français
La   nouvelle   femme  . pptx  Film françaisLa   nouvelle   femme  . pptx  Film français
La nouvelle femme . pptx Film françaisTxaruka
 
gestion des conflits dans les entreprises
gestion des  conflits dans les entreprisesgestion des  conflits dans les entreprises
gestion des conflits dans les entreprisesMajdaKtiri2
 
SUPPORT DE SUR COURS_GOUVERNANCE_SI_M2.pptx
SUPPORT DE SUR COURS_GOUVERNANCE_SI_M2.pptxSUPPORT DE SUR COURS_GOUVERNANCE_SI_M2.pptx
SUPPORT DE SUR COURS_GOUVERNANCE_SI_M2.pptxssuserbd075f
 
Cours ofppt du Trade-Marketing-Présentation.pdf
Cours ofppt du Trade-Marketing-Présentation.pdfCours ofppt du Trade-Marketing-Présentation.pdf
Cours ofppt du Trade-Marketing-Présentation.pdfachrafbrahimi1
 
Mécanique Automobile LE TURBOCOMPRESSEUR.ppt
Mécanique Automobile LE TURBOCOMPRESSEUR.pptMécanique Automobile LE TURBOCOMPRESSEUR.ppt
Mécanique Automobile LE TURBOCOMPRESSEUR.pptssusercbaa22
 
666148532-Formation-Habilitation-ELECTRIQUE-ENTREPRISE-MARS-2017.pptx
666148532-Formation-Habilitation-ELECTRIQUE-ENTREPRISE-MARS-2017.pptx666148532-Formation-Habilitation-ELECTRIQUE-ENTREPRISE-MARS-2017.pptx
666148532-Formation-Habilitation-ELECTRIQUE-ENTREPRISE-MARS-2017.pptxSAID MASHATE
 
Formation M2i - Intelligence Artificielle Comment booster votre productivité ...
Formation M2i - Intelligence Artificielle Comment booster votre productivité ...Formation M2i - Intelligence Artificielle Comment booster votre productivité ...
Formation M2i - Intelligence Artificielle Comment booster votre productivité ...M2i Formation
 
A3iFormations, organisme de formations certifié qualiopi.
A3iFormations, organisme de formations certifié qualiopi.A3iFormations, organisme de formations certifié qualiopi.
A3iFormations, organisme de formations certifié qualiopi.Franck Apolis
 
presentation l'interactionnisme symbolique finale.pptx
presentation l'interactionnisme symbolique  finale.pptxpresentation l'interactionnisme symbolique  finale.pptx
presentation l'interactionnisme symbolique finale.pptxMalikaIdseaid1
 

Último (16)

Boléro. pptx Film français réalisé par une femme.
Boléro.  pptx   Film   français   réalisé  par une  femme.Boléro.  pptx   Film   français   réalisé  par une  femme.
Boléro. pptx Film français réalisé par une femme.
 
Sidonie au Japon . pptx Un film français
Sidonie    au   Japon  .  pptx  Un film françaisSidonie    au   Japon  .  pptx  Un film français
Sidonie au Japon . pptx Un film français
 
Evaluación Alumnos de Ecole Victor Hugo
Evaluación Alumnos de Ecole  Victor HugoEvaluación Alumnos de Ecole  Victor Hugo
Evaluación Alumnos de Ecole Victor Hugo
 
Approche-des-risques-par-l’analyse-des-accidents-1.pptx
Approche-des-risques-par-l’analyse-des-accidents-1.pptxApproche-des-risques-par-l’analyse-des-accidents-1.pptx
Approche-des-risques-par-l’analyse-des-accidents-1.pptx
 
Bolero. pptx . Film de A nnne Fontaine
Bolero. pptx . Film   de  A nnne FontaineBolero. pptx . Film   de  A nnne Fontaine
Bolero. pptx . Film de A nnne Fontaine
 
COURS SVT 3 EME ANNEE COLLEGE 2EME SEM.pdf
COURS SVT 3 EME ANNEE COLLEGE 2EME SEM.pdfCOURS SVT 3 EME ANNEE COLLEGE 2EME SEM.pdf
COURS SVT 3 EME ANNEE COLLEGE 2EME SEM.pdf
 
MaintenanceLa Maintenance Corrective.ppt
MaintenanceLa Maintenance Corrective.pptMaintenanceLa Maintenance Corrective.ppt
MaintenanceLa Maintenance Corrective.ppt
 
La nouvelle femme . pptx Film français
La   nouvelle   femme  . pptx  Film françaisLa   nouvelle   femme  . pptx  Film français
La nouvelle femme . pptx Film français
 
gestion des conflits dans les entreprises
gestion des  conflits dans les entreprisesgestion des  conflits dans les entreprises
gestion des conflits dans les entreprises
 
SUPPORT DE SUR COURS_GOUVERNANCE_SI_M2.pptx
SUPPORT DE SUR COURS_GOUVERNANCE_SI_M2.pptxSUPPORT DE SUR COURS_GOUVERNANCE_SI_M2.pptx
SUPPORT DE SUR COURS_GOUVERNANCE_SI_M2.pptx
 
Cours ofppt du Trade-Marketing-Présentation.pdf
Cours ofppt du Trade-Marketing-Présentation.pdfCours ofppt du Trade-Marketing-Présentation.pdf
Cours ofppt du Trade-Marketing-Présentation.pdf
 
Mécanique Automobile LE TURBOCOMPRESSEUR.ppt
Mécanique Automobile LE TURBOCOMPRESSEUR.pptMécanique Automobile LE TURBOCOMPRESSEUR.ppt
Mécanique Automobile LE TURBOCOMPRESSEUR.ppt
 
666148532-Formation-Habilitation-ELECTRIQUE-ENTREPRISE-MARS-2017.pptx
666148532-Formation-Habilitation-ELECTRIQUE-ENTREPRISE-MARS-2017.pptx666148532-Formation-Habilitation-ELECTRIQUE-ENTREPRISE-MARS-2017.pptx
666148532-Formation-Habilitation-ELECTRIQUE-ENTREPRISE-MARS-2017.pptx
 
Formation M2i - Intelligence Artificielle Comment booster votre productivité ...
Formation M2i - Intelligence Artificielle Comment booster votre productivité ...Formation M2i - Intelligence Artificielle Comment booster votre productivité ...
Formation M2i - Intelligence Artificielle Comment booster votre productivité ...
 
A3iFormations, organisme de formations certifié qualiopi.
A3iFormations, organisme de formations certifié qualiopi.A3iFormations, organisme de formations certifié qualiopi.
A3iFormations, organisme de formations certifié qualiopi.
 
presentation l'interactionnisme symbolique finale.pptx
presentation l'interactionnisme symbolique  finale.pptxpresentation l'interactionnisme symbolique  finale.pptx
presentation l'interactionnisme symbolique finale.pptx
 

Builsing DSL using MDE

  • 1. INGÉNIERIE DES MODÈLES & LANGAGES SPÉCIFIQUES AUX DOMAINES Sébastien Mosser Université de Nice - Sophia Antipolis, CNRS, I3S, Equipe Modalis Polytech’Nice Sophia SI5 - Master 2 IFI Année universitaire 2009 - 2010
  • 2. CONCLUSION De toutes façons, les modèles, ça marchera jamais DR u G 09 s d 20 ur née vier Jo Jan GP L,
  • 3. CONCLUSION De toutes façons, les modèles, ça marchera jamais avec des informaticiens. DR u G 09 s d 20 ur née vier Jo Jan GP L,
  • 10. MOTIVATION PAR L’EXEMPLE représente Modèle de faits Prolog SOA décrit génère raisonne Pour un «vrai» système: plus de 50.000 faits !! 9
  • 11. INTRODUCTION et toujours 50.000 faits !! D’UN DSL Modèle de faits Prolog représente décrit Pour un «vrai» système: seulement 400 lignes !! SOA est compilé vers génère Langage raisonne Spécifique 10
  • 12. AGENDA 1.Rappels sur les langages 4. Construction d’un DSL dirigée par : 2.Quelques «langages domaines» • Les besoins • La syntaxe abstraite 3.Des métamodèles • Les modèles (bis) aux langages 5. Conclusions
  • 14. SUR LES LANGAGES ... « Languages are the primary way in which system developers communicate, design and implement systems » « Languages provide abstractions that can encapsulate complexity, embrace the diversity of technologies and design abstractions, and unite modern and legacy systems » Tony Clark, Andy Evans, Paul Sammut, James Willans 13 pam@MDD4DRES’09
  • 15. CECI N’A PAS LA PRÉTENTION D’ÊTRE UN COURS DE COMPILATION !
  • 16. CONFORMITÉ «est un mot de» eBNF «est un mot de» Grammaire «est un mot de» Code Source 15
  • 17. LANGAGES TEXTUELS (RAPPELS) • Code source • Syntaxe concrète du langage, «Ce que j’écris» • Analyse lexicale • Production de Lexèmes • Analyse syntaxique • Appartenance au langage • Arbre de Syntaxe Abstraite • Syntaxe abstraite du langage, «Ce que j’ai voulu dire» 16
  • 18. DU SOURCE À L’ARBRE DE SYNTAXE ABSTRAITE ... Analyseur Lexical Lex Arbre de Source Lexèmes Syntaxe Abstraite Analyseur Syntaxique Yacc 17 pfz@SI4
  • 19. function foo() { EXEMPLE echo «Hello, World !»; } (Syntaxe concrète) FUNCTION (AST) #FUNC #SYMBOL(«foo») foo DEFINITION #LPAREN STATEMENT #RPAREN FUNCTIONCALL ... echo ARGS #RBRACKET «Hello, World !» (lexèmes) 18
  • 20. MINIMALISME DE SCHEME & PURETÉ SYNTAXIQUE C ul (define foo () (Syntaxe concrète) tu re (print «Hello, World !»)) G én S-Expressions ér al e (define foo () (AST) (print «Hello, World !»)) 19 λ
  • 21. ET LE COMPILATEUR DANS TOUT ÇA ? (EN GROS) est interprété par Partie cible Avant Arbre r it pa de du pro sé Syntaxe aly Partie an Abstraite est Arrière source produit 20 inspiré de pfz@SI4
  • 22. «  Another lesson we should have learned from the recent past is that the development of "richer" or "more powerful" programming languages was a mistake in the sense that these monstrosities, these conglomerations of idiosyncrasies, are really unmanageable, both mechanically and mentally. I see a great future for very systematic and very modest programming languages. » E.W. DIJKSTRA (1972) pam@MDD4DRES’09 21
  • 23. DESIGN D’UN DSL (TYPIQUE) • Identify the problem domain and gather all relevant knowledge in this domain • Cluster this knowledge in a handful of semantic notions and operations on them • Construct a library that implements the semantic notions • Design and implement a compiler that translates language statements to sequences of library calls • Write programs for all desired applications and compile them J. C. Cleaveland. A. van Deursen and P. Klint. Building application generators. Little languages: Little maintenance? IEEE Software, pages 25-33, July Journal of Software Maintenance, 10:75-92, 1998. 22 1988. pam@MDD4DRES’09
  • 25.
  • 27. UML
  • 28. KML
  • 30. MODÈLES, MÉTAMODÈLES & LANGAGES «métatriangle» représente Métamodèle Langage o t de est conforme à n m est u représente Modèle Chose 29 pam@MDD4DRES’09
  • 31. METAMODELING ARCHITECTURE Langage de Métamétamodèle représente description des langages est conforme à Langage de Métamodèle représente description des choses est conforme à représente Modèle Chose Implémentation 30 pam@MDD4DRES’09
  • 32. DES MÉTAMODÈLES AUX LANGAGES Syntaxe générique ECore Syntaxe abstraite Spécifications Syntaxe Syntaxe concrète Syntaxe concrète métamodèle Sémantique concrète langage 31 pam@MDD4DRES’09
  • 33. CONSTRUCTION D’UN DSL & INGÉNIERIE DES MODÈLES
  • 34. PROBLÈME GÉNÉRAL Modèle Texte 33
  • 35. PROBLÉME GÉNÉRAL (IRL) Modèle Texte 34 mh@GPL’09
  • 36. PROBLÉME GÉNÉRAL (IRL) Métalangage conforme Métamodèle conforme Modèle Texte 34 mh@GPL’09
  • 37. PROBLÉME GÉNÉRAL (IRL) Templates util Métalangage ise conforme utilise Métamodèle conforme d uit Générateur utilise p ro de texte Modèle Texte 34 mh@GPL’09
  • 38. PROBLÉME GÉNÉRAL (IRL) Templates util Métalangage ise conforme utilise Métamodèle conforme d uit Générateur utilise p ro de texte Modèle Texte produit est uti lisé pa Analyseurs Interpreteur r pro du it ise lise Grammaire AST util uti 34 mh@GPL’09
  • 39. DIRIGÉE PAR LES BESOINS ma@bbq 35
  • 40. Syntaxe Concrète rit d éc déc rit Template de génération 36
  • 41. Analyseur Analyseur Lexical Syntaxique Syntaxe Concrète rit Métamodèle d éc ECore déc Plugin rit d’édition Template de génération 36
  • 42. EXEMPLE: UN LANGAGE DE DÉFINITION D’ENTITÉS type String type Bool entity Session {   property Title: String   property IsTutorial : Bool } entity Conference {   property Name : String   property Attendees : Person[]   property Speakers : Speaker[] } entity Person {   property Name : String } entity Speaker extends Person {   property Sessions : Session[] } 37 http://www.eclipse.org/Xtext/documentation/latest/xtext.html#getting-started-xtext
  • 43. EXEMPLE: UN LANGAGE DE DÉFINITION D’ENTITÉS public class Person { private String name; public String getName() { return this.name; } public void setName(String name) { this.name = name; } } Cible: Java entity Person {   property Name : String } 37 http://www.eclipse.org/Xtext/documentation/latest/xtext.html#getting-started-xtext
  • 44. SYNTAXE CONCRÈTE 38 http://www.eclipse.org/Xtext/documentation/latest/xtext.html#getting-started-xtext
  • 45. EDITEUR AUTO-GÉNÉRÉ 39 http://www.eclipse.org/Xtext/documentation/latest/xtext.html#getting-started-xtext
  • 46. TEMPLATE DE GÉNÉRATION JAVA «IMPORT entities» «DEFINE entity FOR Entity»   «FILE this.name + ".java"»     public class «this.name» {       «EXPAND property FOREACH this.properties»     }   «ENDFILE» «ENDDEFINE» «DEFINE property FOR Property»   private «this.type.name» «this.name»;   public void set«this.name.toFirstUpper()» («this.type.name» «this.name») {     this.«this.name» = «this.name»;   }   public «this.type.name» get«this.name.toFirstUpper()»() {     return this.«this.name»;   } «ENDDEFINE» 40 http://www.eclipse.org/Xtext/documentation/latest/xtext.html#getting-started-xtext
  • 47. DIRIGÉE PAR LA SYNTAXE ABSTRAITE T P ma@bbq 41
  • 48. Syntaxe Abstraite Métamodèle éc rit d décrit Syntaxe concrète 42
  • 49. Syntaxe Abstraite Plugin d’édition Métamodèle éc rit d décrit Syntaxe concrète 42
  • 50. EXEMPLE: UN DSL DE DESCRIPTION DE SANDWICHES 43 http://www.emftext.org/index.php/EMFText_Concrete_Syntax_Sandwich
  • 51. SYNTAXE ABSTRAITE (MÉTAMODÈLE) 44 http://www.emftext.org/index.php/EMFText_Concrete_Syntax_Sandwich
  • 52. SYNTAXE CONCRÈTE 45 http://www.emftext.org/index.php/EMFText_Concrete_Syntax_Sandwich
  • 53. DIRIGÉE PAR LES MODÈLES ks inta S 46
  • 54. Modèle de Métamodèle Sintaks syntaxe concrète dé cri c r it t dé 47
  • 55. Métalangage confor m eà Métamodèle de syntaxe concrète conforme à conforme à Modèle de Métamodèle Sintaks syntaxe concrète dé cri c r it t dé 47
  • 56. BOOTSTRAP: HUTN conforme Métalangage Métamodèle de syntaxe concrète conforme conforme Métamodèle référence Modèle de conforme syntaxe concrète Modèle utilise conforme Texte Sintaks 48 mh@GPL’09
  • 57. BOOTSTRAP: HUTN conforme Métalangage Métamodèle de syntaxe concrète conforme HUTN conforme Métamodèle référence Modèle de conforme syntaxe concrète Modèle utilise conforme Texte Sintaks 48 mh@GPL’09
  • 58. AGILITÉ DU CYCLE DE VIE: DEV. EN SPIRALE Métamodèle conforme Modèle 49 mh@GPL’09
  • 59. AGILITÉ DU CYCLE DE VIE: DEV. EN SPIRALE HUTN référence Métamodèle Modèle de syntaxe concrète conforme Modèle 49 mh@GPL’09
  • 60. AGILITÉ DU CYCLE DE VIE: DEV. EN SPIRALE référence Métamodèle Modèle de syntaxe concrète conforme Modèle 49 mh@GPL’09
  • 61. AGILITÉ DU CYCLE DE VIE: DEV. EN SPIRALE référence Métamodèle Modèle de syntaxe concrète conforme conforme Modèle Texte Sintaks 49 mh@GPL’09
  • 62. AGILITÉ DU CYCLE DE VIE: DEV. EN SPIRALE référence Métamodèle Modèle de syntaxe concrète conforme conforme Modèle «Bidouillage» Texte Sintaks 49 mh@GPL’09
  • 63. UN EXEMPLE DE MODÈLE DE SYNTAXE CONCRÈTE Type Mail { From: User To: User } Type User { Name: String } Type String; 50 pam@MDD4DRES’09
  • 64. DIRIGÉE PAR LES MODÈLES (BIS) 51
  • 65. TOUT EST MODÈLE ... ET INDÉPENDANT !! • Domaine : Concepts métiers Mapping : • Les entités que je dois manipuler Quoi • Graphique : Boites, boutons, ... Comment • Les entités que je veut afficher Quand • Outils: Palette, actions, ... • Comment je manipule tout cela (créer, supprimer, ...) 52 http://fondement.free.fr/lgl/courses/mde/documentation_succinte_gmf.pdf
  • 66. WORKFLOW GMF Plugin d’Edition 53
  • 67. WORKFLOW GMF Modèle Modèle Modèle «Outils» «Domaine» «Graphique» Plugin d’Edition 53
  • 68. WORKFLOW GMF Modèle Modèle Modèle «Outils» «Domaine» «Graphique» Modèle Modèle «Mapping» «Génération» Plugin d’Edition 53
  • 70. LIMITATIONS (VOLONTAIRES) • On s’est intéressé ici aux langages «textuels» • C’est plus «rapide» à mettre en oeuvre • Il existe des approches «graphiques» • Eclipse GMF, créateur d’éditeur graphique dirigé par les modèles • Trop peu de temps pour monter un cours / TP • Et il existe de nombreux tutoriels sur le Web 55
  • 71. E.W. DIJKSTRA (1972) «  I see a great future for very systematic and very modest programming languages. »
  • 72. If the only tool you have is a hammer ... ... then everything looks like a nail!!
  • 73. CRÉDITS & REMERCIEMENTS • Pierre Alain Muller «pam@MDD4DRES’09» • Michel Hassenforder «mh@GPL’09» • Paul Franchi «pfz@SI4» • Mathieu Acher «ma@bbq» • Images: • http://sxc.hu 58
  • 74. De toutes façons, les modèles, ça marchera jamais avec des informaticiens.