Model-driven generative approach for concrete syntax composition Pierre-Alain Muller, Philippe Studer, Jean-Marc J´ez´equel
To cite this version: Pierre-Alain Muller, Philippe Studer, Jean-Marc J´ez´equel. Model-driven generative approach for concrete syntax composition. Proc. of OOPSLA Workshop on Best Practices for ModelDriven Development, Oct 2004, Vancouver, Canada. 2004.
HAL Id: hal-00795063 https://hal.inria.fr/hal-00795063 Submitted on 27 Feb 2013
HAL is a multi-disciplinary open access archive for the deposit and dissemination of scientific research documents, whether they are published or not. The documents may come from teaching and research institutions in France or abroad, or from public or private research centers.
L’archive ouverte pluridisciplinaire HAL, est destin´ee au d´epˆot et `a la diffusion de documents scientifiques de niveau recherche, publi´es ou non, ´emanant des ´etablissements d’enseignement et de recherche fran¸cais ou ´etrangers, des laboratoires publics ou priv´es.
Model-driven generative approach for concrete syntax composition
! # &
"
#"$"% &$ % ! " ' ( ( * + ,( * + ) . / 0 ) 1 ( 1 ' ( / () * ( ' 0 +1 / ( + $ ( ( 1
( ( ( +
(
6 (
( )
( ( /( 4 ( /( ! () )7 ()
()
-
( - 4
! (
)
! ( . ( + (2 ) ( .)
(
( ) ( ( ( ( ) ).) ( ( ( 3 45
(
(/ ( ((
(
(
-
(
(
-
(
(
1 Introduction
* )
( + ( 7 / ! () . (
0 (7 / ! ( ( ( ' ( 17 ( ( (- - *-
'
( (/ ) 0
(
$
( ( 7( #! 1 ( 7
(
! *
1 (
()
% ( /
(
/
(
(& 7
) #! (
)
*7 /
7 / )
(8
(
(/ (/ / ) * +. ()
( ()
(( ( ( + ( ' 0 + (
()
) ( *7
. +
* !
# ! () ( (
* -*
+ ()
( ) ( (
( (
( )
. ! (1
(/ ( ( (( / ' () / ( ) ) 5 (1 ( 1 ( ( ( 7/ + 7 + ( 7 ) ( * +
.
# 1 (
(
( ( 2 ( ( ( ( ( ( + ( ( 2 -
1 . )(
() ( * + * +
( (
()
( ( ( ( ( ( . + (7 / ) ( (
( 1 (
7 /
. +
(
/ . -
(
9 (
( ( ( (
+ ; ! )
(
( !
! (
*
(
( (
( :7 /
(
(/
2 Lessons learned 2.1 Multi meta-models approach 2 ! + ! ( ; 0 % ( ( ! ( ( ) ! () ). ( ( ( ) ( ( ) ) (! ) ! ( ( < ( ( !) ( ( ( (7 * (/ ( 4 ) ) ( * *( ( 1 / ( - / ( ( ) ) . 0 ( ( 7 ' 0 ( ) *( 17 (/ / ( - - ( ! ( / ( / . )writeToOutputStream("\" visibility=\""); $_t3=$_la; visibility_($ctxt,$_t3); $ctxt->writeToOutputStream("\">\n\n"); 2 PHP function which performs the inline-expansion of the attribute template.
+ (
( / -
*
-
+
( #!
(
)
(
(
Java code generation 2 )! - (/
! /(
(
( (
3 *
'
/ /
(
.Name7 Firstname '
( (/ )
(
"
(
)
(/
7
#! ( )
(
9
( (
( Age1
( #! ( )
( 7Person
/
-
(
! )(
-
*( -
// // // Class {
generated
the
2004-10-05
at
09:53:27 Person
public
Person(){}
public public public int age;
String String
name; firstName;
} // end Person
:
(/ / / () 2 (// // // Class {
! -
9
"
*( Age ( (/ ) ( 7 /
generated
(private7
)
(
the
2004-10-05
+ (
)
(
at
09:45:49 Person
public
Person(){}
public public
String String
name; firstName;
public void setAge (int theAge) { age = theAge; } public int getAge() { return age; } private int age; } // end Person
:
)
+ ( !
'
( (/ ) -
) ( -
-
1
(
9
/ / ( ! -
"
(
( ( -
*(
( ( ( ( ( ( J ( ( -
(
(
(
/
./
4
(
(
#! (
' -
% !
'
5( +
( (
"
"
-*
/( (
(
"
9
*
!
C
c.attribute->select(Visibility != #Public)
(
Getters and Setters ;
( ,
7
(!
*
c.attribute->select(Visibility == #Public)
(
'
Public Attributes ;
( (/ )
(/
+ (
( ,
(
-
( #!
' 4
( ' - 4/ / 7 () ( ( ( ( ( ' (
+ (
( -
"
0 ) ( *
) ( * ( *7 * ( ) (/ ' /
+ ( / ! (
"
*( ( + ' ( ( -
( /
./
+ '
) ( Value Displayer ( ' 7 ) ( * 7
)
+ ! - *
-
/( (
( ( (
) #!
(
.Name 1
"
+7 -
9
( -
( 4
) 7 ' 0 ) ( Type1 (
"
! -
*
References
8
7
7 # 9 $!
7
0@K=7 6 (-
:KK= :
J
*"7
0J
7 =
'
(
. (
7 (
*
( 17
# 7
#"$"% 7 ! 7 :L.M1C??N ?NL7 # *:KK:
4 7 J )( O $ !
??7 ( 8K7 ?
(
,
== =P7 6 (4 (
(