La lecture à portée de main
Description
Sujets
Informations
Publié par | Shean |
Nombre de lectures | 65 |
Langue | Français |
Extrait
THESE DE DOCTORAT
pour obtenir le titre de Docteur en Sciences de l'Université de Nice-Sophia Antipolis
Ecole doctorale « Science et Technologie de l’Information
et de la Communication » de Nice Sophia-Antipolis.
Discipline Informatique
UNIVERSITE DE NICE SOPHIA-ANTIPOLIS
FACULTE DES SCIENCES
JADAPT : UN MODELE POUR AMELIORER LA
REUTILISATION DES PREOCCUPATIONS DANS LE
PARADIGME OBJET
présentée et soutenue publiquement par
laurent QUINTIAN
Thèse dirigée par
philippe LAHIRE
Le 13 Juillet 2004 au laboratoire I3S, devant le jury composé de
Président du Jury OLIVIER LECARME Professeur, Université de Nice Sophia-Antipolis
Rapporteurs LAURENCE DUCHIEN Professeur, Université des Sciences et Techniques de Lille
GILLES ROUSSEL Maître de Conférences, HDR, Université de Marne-la-Vallée
Directeur de thèse PHILIPPE LAHIRE Maître de Conférences, Université de Nice Sophia-Antipolis
i
TABLE DES MATIERES
CHAPITRE 1 INTRODUCTION .................................................................................................................. 1
CHAPITRE 2 LA SEPARATION DES PREOCCUPATIONS : UN ETAT DE L’ART .......................... 3
2.1 APPORTS ET LIMITITATIONS DU PARADIGME DE L’OBJET........................................................................... 3
2.2 QU’EST-CE QUE LA SEPARATION DES PREOCCUPATIONS ?......................................... 4
2.3 MODELES SUPPORTANT UNE SEPARATION DES PREOCCUPATIONS.............................................................. 6
2.3.1 Programmation générique................................................ 6
2.3.2 Métaprogrammation......................................................... 7
2.3.3 Programmation par rôles ou points de vue...................................................... 8
2.3.4 Programmation par aspects............. 8
2.3.5 Programmation par sujets ................................................................................ 9
2.3.6 Filtre de composition...................... 11
2.4 LANGAGES POUR LA SEPARATION DES PREOCCUPATIONS........................................ 12
2.4.1 AspectJ............................................ 12
2.4.2 Hyper/J........................................................................... 13
2.4.3 Caesar............. 13
2.4.4 ConcernJ......................................... 16
2.4.5 Java Aspect Component.................. 16
2.4.6 Métaprogrammation logique par aspects....................................................................................... 17
2.4.7 Programmation par aspects avec des diagrammes de séquence de messages ............................... 18
2.4.8 Aspect Moderator Framework........................................................................................................ 18
2.4.9 Jiazzi............................................... 18
2.4.10 JAsCo............ 19
2.5 BILAN..................................................................................................................... 19
CHAPITRE 3 ETUDE QUALITATIVE DE LA REUTILISATION DES PREOCCUPATIONS......... 23
3.1 LES PREOCCUPATIONS NON FONCTIONNELLES........................ 23
3.1.1 Préoccupation non fonctionnelle et programmation orientée objet............................................... 24
3.1.2 Préoccupation non fonctionnelle et métaprogrammation.............................. 25
3.1.3 Préoccupation non fonctionnelle et programmation par aspects................... 27
3.1.4 Préoccupation non fonctionnelle et programmation par sujets..................... 30
3.1.5 Bilan sur les préoccupations non fonctionnelles ............................................................................ 32
3.2 PREOCCUPATIONS FONCTIONNELLES ...................................... 33
3.2.1 Préoccupation fonctionnelle et programmation orientée objets.................... 35
3.2.2 Préoccupation fonctionnelle et métaprogrammation..... 36
3.2.3 Préoccupation fonctionnelle et programmation par aspects.......................................................... 36
3.2.4 Préoccupation fonctionnelle et programmation par sujets............................ 37
3.2.5 Bilan sur les préoccupations fonctionnelles ................................................... 40
3.3 LES PATRONS DE CONCEPTION................................................................................ 41
3.3.1 Description de l’exemple 41
3.3.2 Patron de conception et programmation orientée objets ............................................................... 42
3.3.3 Patron de conception et programmation par aspects..................................... 43
3.3.3.1 Limite de l’adaptabilité fonctionnelle d’AspectJ..... 46
3.3.3.2 Bilan ........................................................................................................ 49
3.3.4 Patron de conception et programmation par sujets....... 49
3.3.5 Bilan sur les patrons de conception................................ 50
3.4 SYNTHESE DES RESULTATS ..................................................................................................................... 51
3.5 BILAN ................................ 55
CHAPITRE 4 CAHIER DES CHARGES DU MODELE.......................................................................... 59
4.1 MOTIVATIONS......................................................................... 59
ii
4.2 ARCHITECTURE DU MODELE....................................................................................................................60
4.2.1 Modélisation des préoccupations....................................................................................................60
4.2.2 Modélisation de la composition......60
4.3 EXPRESSIVITE NECESSAIRE A LA COMPOSITION.......................61
4.3.1 Plusieurs modes de composition.....61
4.3.2 Plusieurs types d’adaptation...........................................................................................................62
4.3.2.1 Implémenter de nouvelles interfaces........................62
4.3.2.2 Fusioner des classes..................63
4.3.2.3 Ajout de membres ....................................................................................................................64
4.3.2.4 Interceptions.............................65
4.4 ABSTRACTION ET REUTILISATION DE LA COMPOSITION............66
4.5 CONCLUSION...........................................................................................................................................67
CHAPITRE 5 LE MODELE.........................69
5.1 PRE-REQUIS DES LANGAGES ....................................................................................................................69
5.2 MODELE DU LANGAGE SOURCE...............70
5.2.1 La classe..........................................71
5.2.2 Le paquetage...................................................................................................72
5.2.3 L’attribut.........73
5.2.4 La signature d’un attribut...............74
5.2.5 La méthode......................................75
5.2.6 La signature de méthode .................................................................................................................76
5.2.7 Le corps de méthode........................77
5.2.8 Le modificateur de visibilité............77
5.3 NOUVELLES ENTITES INTRODUITES PAR NOTRE MODELE .........................................................................78
5.3.1 L’adaptateur....................................................................79
5.3.2 Variable d’un adaptateur................80
5.3.3 Le point de jointure.........................................................81
5.3.4 Les adaptations...............................82
5.3.4.1 Adaptation de type Interception ................................84
5.3.4.2 Adaptation de type Introduction84
5.3.4.3 Adaptation de type Fusion........................................................................86
5.4 IMPLEMENTATION DES ADAPTATIONS DANS LE MODELE MLS86
5.4.1 Implémentation des interceptions....................................86
5.4.1.1 Around......................................86
5.4.1.2 Before.......................................................................87
5.4.1.3 After.........87
5.4.1.4 OnException.............................................................................................88
5.4.1.5 OnGet / OnSet..........................................................88
5.4.2 Introduction.....................................89
5.4.2.1 Ajout et redéfinition d’une méthode.........................89
5.4.2.2 Ajout d’un attribut....................................................................................89
5.4.2.3 Ajout d’une super-classe..........90
5.4.3 Fusion..............................................................................90
5.5 BILAN......................92
CHAPITRE 6 IMPLEMENTATION DE JADAPT....................................................95
6.1 CHOIX DU LANGAGE A ETENDRE..............................................................................95