Gonzalez Montesinos, Sebastian Andres
[UCL]
Mens, Kim
[UCL]
Colacioiu, Marius
[Universita degli Studi di Milano, Italy]
Cazzola, Walter
[Universita degli Studi di Milano, Italy]
Context-oriented programming emerged as a new paradigm to support fine-grained dynamic adaptation of software behaviour according to the context of execution. Though existing context-oriented approaches permit the adaptation of individual methods, in practice behavioural adaptations to specific contexts often require the modification of groups of interrelated methods. Furthermore, existing approaches impose a composition semantics that cannot be adjusted on a domain-specific basis. The mechanism of traits seems to provide a more appropriate level of granularity for defining adaptations, and brings along a flexible composition mechanism that can be exploited in a dynamic setting. This paper explores how to achieve context-oriented programming by using traits as units of adaptation, and trait composition as a mechanism to introduce behavioural adaptations at run time. First-class contexts reify relevant aspects of the environment in which the application executes, and they directly influence the trait composition of the objects that make up the application. To resolve conflicts arising from dynamic composition of behavioural adaptations, programmers can explicitly encode composition policies. With all this, the notion of context traits offers a promising approach to implementing dynamically adaptable systems. To validate the context traits model we implemented a JavaScript library and conducted case studies on context-driven adaptability.
Bibliographic reference |
Gonzalez Montesinos, Sebastian Andres ; Mens, Kim ; Colacioiu, Marius ; Cazzola, Walter. Context Traits : Dynamic Behaviour Adaptation Through Run-Time Trait Recomposition.International conference on aspect-oriented software development (Fukuoka, Japan, du 24/03/2013 au 29/03/2013). In: Hidehiko Masuhara ; Shigeru Chiba ; Naoyasu Ubayashi, Proceedings of the 12th annual international conference on Aspect-oriented software development, ACM : Fukuoka, Japan2013, p.209-220 |
Permanent URL |
http://hdl.handle.net/2078.1/122295 |