A Verification Mechanism of Feature Models for Mobile and Context-Aware Software Product Lines Fabiana G. Marinho * and Rossana M. C. Andrade Graduate Program in Computer Science Federal University of Ceará Fortaleza, Brazil {fabiana, rossana}@great.ufc.br Cláudia Werner Systems Engineering and Computer Science Program Federal University of Rio de Janeiro Rio de Janeiro, Brazil werner@cos.ufrj.br Abstract - Software Product Lines (SPLs) have been used to develop mobile and context-aware applications, which provide services and data for their users from anywhere and at any time using context information. In SPLs, commonality and variability of a system family are identified and often documented in a feature model. However, the development of a feature model for mobile and context-aware SPLs is not trivial, since it should comprise system and context information. Furthermore, the consistency check of feature models in the considered domain is also complex and demands advanced skills of software engineers. This paper proposes a mechanism to formalize and verify the correctness and consistency of feature models for mobile and context-aware SPLs based on a profile enriched with OCL specifications. Keywords - Mobile and Context-aware domain, feature model, software product lines, consistency checking, OCL. I. INTRODUCTION The technological advances in mobile devices are fostering the creation of highly distributed and interactive applications, characterized by the dynamicity and uncertainness of resources. Requirements such as mobility and context- awareness demand interoperable, uncoupled, adaptable, and autonomous programming abstractions [1]. In these applications, human activities are extended by means of computational services that can adapt their behavior to the context in which they are inserted in a transparent way to the users [2]. The environment, user requirements and interfaces between software and hardware may change dynamically during the execution of this kind of application, requiring a response to these changes [3]. To enable adaptation without user intervention, the software, called mobile and context-aware in this paper, must be able to use the environment (physical or computational) and user information to provide relevant services or information [4]. Considering the aforementioned scenario, the development of mobile and context-aware software has become increasingly complex. On the other hand, Software Product Line (SPL) is a reuse-driven development paradigm, which has been successfully applied in various domains. SPLs propose systematic software development based on a family of products that share commonalities and variabilities [5]. In [3], Hallsteinsen et al. affirm that SPLs have shown to be an efficient way to handle the requirements from the mobile and context-awareness domain. In SPLs, a feature model is often used to capture and manage commonalities and variabilities, but there are many variant notations suggested by different authors, such as in [6], [7], [8], [9], [10], and [11]. As a matter of fact, variability is a key concept for SPLs, since it increases their flexibility and capacity to adapt according to user needs. In this sense, it is important to formalize and represent concepts related to variability in a consistent way to minimize variability modeling problems, especially in the mobile and context-awareness domain, where the construction of feature models is not trivial. In the considered domain, the feature model should capture the context information that may impact the variability modeling, according to changes in the execution environment. Furthermore, it involves complex requirements such as mobility, context-awareness, and adaptability. Moreover, inconsistencies can arise between system features and feature adaptations triggered by changes in context. Whenever these inconsistent combinations are not considered, unexpected system behavior may emerge. Therefore, it is important not only to build a mobile and context-aware SPL, but also to create a verification mechanism to check the correctness and consistency of these SPLs and their configured products. There are many consistency checking approaches for feature models in literature [12]. For example, Ziadi et al., [8] present a UML profile to model variability and suggest the use of OCL [13] to ensure some structural constraints. However, this approach is not suitable for the considered domain and it is necessary to invest efforts for modeling mobile and context- aware SPL. An attempt in this direction is done by Fernandes et al. in [14] with the UbiFEX-Notation. Our proposal extends these works, including concepts of domain driven design and formal methods to minimize errors and inconsistencies in feature models. We focus on feature models because they are used since early stages of SPL engineering, so any error in this model will inevitably affect the configurated models and later the final products. __________________________ * Doctorate student in Computer Science - CNPq process number 552924/2008.3