Adding State and Visibility Control to Traits using Lexical Nesting

Tom Van Cutsem 1 Alexandre Bergel 2 Stéphane Ducasse 2, * Wolfgang De Meuter 1
* Auteur correspondant
2 RMOD - Analyses and Languages Constructs for Object-Oriented Application Evolution
LIFL - Laboratoire d'Informatique Fondamentale de Lille, Inria Lille - Nord Europe
Abstract : Traits are reusable building blocks that can be composed to share methods across unrelated class hierarchies. Original traits are stateless and cannot express visibility control for methods. Two extensions, stateful traits and freezable traits, have been proposed to overcome these limitations. However, these extensions introduce complexity and have not yet been combined to simultaneously add both state and visibility control to traits. This paper revisits the addition of state and visibility control to traits. Rather than extending the original traits model with additional operations, we allow traits to be lexically nested within other modules. Traits can then have (shared) state and visibility control by hiding variables or methods in their lexical scope. Although the Traits' “flattening property” has to be revisited, the combination of traits with lexical nesting results in a simple and expressive trait model. We discuss an implementation of the model in AmbientTalk and specify its operational semantics.
Type de document :
Communication dans un congrès
ECOOP, Jul 2009, Genova, Italy. 2009
Liste complète des métadonnées

Littérature citée [33 références]  Voir  Masquer  Télécharger

https://hal.inria.fr/inria-00498397
Contributeur : Lse Lse <>
Soumis le : mercredi 7 juillet 2010 - 14:24:50
Dernière modification le : jeudi 11 janvier 2018 - 06:22:25
Document(s) archivé(s) le : mardi 23 octobre 2012 - 10:05:17

Fichier

Cuts09a-ECOOP09-Traits.pdf
Fichiers produits par l'(les) auteur(s)

Identifiants

  • HAL Id : inria-00498397, version 1

Citation

Tom Van Cutsem, Alexandre Bergel, Stéphane Ducasse, Wolfgang De Meuter. Adding State and Visibility Control to Traits using Lexical Nesting. ECOOP, Jul 2009, Genova, Italy. 2009. 〈inria-00498397〉

Partager

Métriques

Consultations de la notice

241

Téléchargements de fichiers

138