Cardinality-Based Feature Models and Model-Driven Engineering

Total Page:16

File Type:pdf, Size:1020Kb

Cardinality-Based Feature Models and Model-Driven Engineering Cardinality-Based Feature Modeling and Model-Driven Engineering: Fitting them Together Abel Gómez1, Isidro Ramos2 Department of Information Systems and Computation Universidad Politécnica de Valencia Valencia, Spain [email protected] [email protected] Abstract—Feature Modeling is a technique which uses a spe- Generative Programming and SPLs facilitate the development cific visual notation to characterize the variability of product lines of software products for different platforms and their use under by means of diagrams. In this sense, the arrival of metamodeling different technologies. frameworks in the Model-Driven Engineering field has provided the necessary background to exploit these diagrams (called In this paper we discuss the main issues that arise when feature models) in complex software development processes. trying to use feature models in a MDE process, and how to However, these frameworks (such as the Eclipse Modeling Frame- easily overcome them. We also present a tool that allows the work) have some limitations when they must deal with software developers of SPLs to define, use and exploit feature models artifacts at several abstraction layers. This paper presents a in a modeling and metamodeling tool. In our case, we have prototype that allows the developers to define cardinality-based feature models with constraints. These models are automatically chosen the Eclipse Modeling Framework (EMF). Moreover, translated to Domain Variability Models (DVM) by means the EMF framework provides several tools which permit us to of model-to-model transformations. Thus, such models can be enrich these models (by means of OCL expressions and OCL instantiated, and each different instantiation is a configuration interpreters) and to deal easily with them (by using model of the feature model. This appproach allows us to take advantage transformations). All these features of EMF allows us to use of existing generative programming tools, query languages and validation formalisms; and, what is more, DVMs can play a key this framework to start a Software Product Line. role in MDE processes as they can be used as inputs in complex The remainder of this paper is structured as follows: in model transformations. sectionII we present the starting point of our work and the Keywords-Software Product Lines; Model Driven Architecture; main problems that arise when trying to use feature models Feature Modeling; UML; OCL in a MDA process; and in sections III andIV we present both the ideal approach and the practical approaches to use I. INTRODUCTION feature modeling in a MDA context. In sectionV we show The key aspect of Software Product Lines (SPL) [6] that our feature metamodel and how we operationalize the solution characterizes this approach against other software reuse tech- presented in sectionIV in our prototype tool. Related works niques is how to describe and manage variability. Although are discussed in sectionVI and in section VII we present our several approaches have addressed this problem, the most of conclusions and future works. them are based on feature modeling, proposed in [12]. In II. FOUNDATIONS this approach, the commonalities and varibilities among the products of a SPL are expressed by means of the so-called A. Cardinality-based feature models at a glance features (user-visible aspect or characteristic of the domain), Cardinality-based feature modeling [8] integrates several of which are hierarchically organized in feature models. the different extensions that have been proposed to the original The use of feature models can be exploited by means of FODA notation [12]. In this sense, a cardinality based feature metamodeling standards. In this context, the Model-Driven model is also a hierarchy of features, but the main difference Architecture [14] proposed by the Object Management Group with the original FODA proposal is that each feature has is a widely used standard which arises as a suitable frame- associated a feature cardinality which specifies how many work. In this sense, the Meta Object Facility (MOF) and the clones of the feature are allowed in a specific configuration. Query/Views/Transformations (QVT) standards allows us to Cloning features is useful in order to define multiple copies define feature models and their instances, and use them in of a part of the system that can be differently configured. a Model-Driven Engineering (MDE) process. In this context, Moreover, features can be organized in feature groups, MDE and the Generative Programming approach [7] provides which also have a group cardinality. This cardinality restricts a suitable basis to support the development of SPLs. Moreover, the minimun and the maximun number of group members that can be selected. Finally, an attribute type can be specified for model level, thus, we can have mutiple copies of the same a given feature. Thus, a primitive value for this feature can be feature. Several specializations can be done at model level defined during configuration. until only one variant is possible. In feature models is also quite common to describe con- straints between features such as the implies and the excludes C. Cardinality-based feature models and MDE main issues relationships, which are the most common used ones. Accord- In previous paragraphs we have described what cardinality ing to the original FODA notation, these constraints can be based feature models are and how they are usually exploited. expressed by means of propositional formulas [2], thus, it is Nevertheless, there are some issues, that we will address in possible to reason about the satisfiability of the feature model. the remaining of this paper, that cause some problems when As explained in [8], this interpretation for feature models is not trying to use feature models in a MDE process. very adequated when dealing with cardinality-based feature The first one comes from the classical definition of config- models due to the fact that we can have multiple copies of the uration of a feature model (the set of features that are selected same feature. Therefore, it is necessary to clearly define the from a feature model). This definition tends to define the semantics of the constraint relationships in the new context, configuration as a copy mechanism instead of as an instan- where features can have multiple copies, and features can tiation mechanism. Although this definition can be somewhat have an attribute type and a value. In this case, we need intuitive when dealing with traditional feature models, it can more expressive approaches to (i) define constraints between be confusing when dealing with cardinality-based ones. In features and (ii) perform formal reasoning over the feature this case, the instantiation concept is best suited when talking models and their constraints. about cardinality-based feature models with attribute types, B. Feature models and their configuration given that the configuration is more easily understandable as an instance-of relationship rather than as a copy-and-refinement- A configuration of a feature model is usually defined as of the set of features that are selected from a feature model relationship. without violating any of the constraints defined in it, but it The second issue that comes up is how to deal with model can also be defined as a valid set of instances of a feature constraints when features can be cloned in our models and model. I.e., the relationship between a feature model and a such features can have an attribute type. In this case, as pointed configuration is comparable to the relationship between a class out in sectionII, we need to use more expressive languages and an object. The first definition, is well-suited when dealing that allows us (i) to deal with sets of features (i.e. n copies of with “traditional” feature models (those that can be defined feature A) and (ii) to deal with typed variables which values by using the original FODA notation). In this case, every can be unbounded in order to easily represent attribute types. instantiation of the elements of the feature model will follow III. PUTTING MODEL-DRIVEN ENGINEERING AND the singleton pattern, that is, every feature can have at most FEATURE MODELING TOGETHER one instance. Fig.1 shows an example of this. In Fig. 1a an example feature model is represented. This The Meta Object Facility standard (MOF, [16]), which pro- feature model represents a system S, with two features A and vides support for meta-modeling, defines a strict classification B. The first one, feature A, is mandatory (it must be included of software artifacts in a four-layer architecture (from M3 to in every possible product of the product line), and the second M0 layer). The meta-metamodel layer (M3) is where the MOF one, feature B, is optional (it can be included in a particular language is found. MOF can be seen as a subset of the UML product or not). Thus, we have two possible configurations for class diagram, and can be used to define metamodels at M2 this feature model, which are represented in figures 1b and 1c. layer. This way, artifacts that reside in layer x, are expressed As can be seen, this process of selection of features (ac- in terms of the constructors defined in layer x + 1. cording to the defined constraints) is closely related with a In turn, the Query/Views/Transformations (QVT, [15]) stan- copy mechanism, that is, a configuration of a feature model dard describes how to provide support to queries and model is a more restrictive copy of the original one that represents transformations in a MDE process. QVT uses the pre-existent exactly one variant. This mechanism can also be used in Object Constraint Language (OCL, [17]) language to perform cardinality-based feature models. In this case, when features queries over software artifacts. The QVT standard provides have an upper bound greater than 1 they can be cloned at three different languages to describe these transformations.
Recommended publications
  • Change and Version Management in Variability Models for Modular Ontologies
    Change and Version Management in Variability Models for Modular Ontologies Melanie Langermeier1, Thomas Driessen1, Heiner Oberkampf1;2, Peter Rosina1 and Bernhard Bauer1 1Software Methodologies for Distributed Systems, University of Augsburg, Augsburg, Germany 2Siemens AG, Corporate Technology, Munich, Germany Keywords: Variability Model, Modular Ontologies, Version Management, Change Management, Enterprise Architecture Management. Abstract: Modular ontology management tries to overcome the disadvantages of large ontologies regarding reuse and performance. A possibility for the formalization of the various combinations are variability models, which originate from the software product line domain. Similar to that domain, knowledge models can then be individualized for a specific application through selection and exclusion of modules. However, the ontology repository as well as the requirements of the domain are not stable over time. A process is needed, that enables knowledge engineers and domain experts to adapt the principles of version and change management to the domain of modular ontology management. In this paper, we define the existing change scenarios and provide support for keeping the repository, the variability model and also the configurations consistent using Semantic Web technologies. The approach is presented with a use case from the enterprise architecture domain as running example. 1 INTRODUCTION quirements, for instance, that the domain Ontology A and Ontology B should not be used together. For the Knowledge management is an important aspect in or- creation of a configuration, this variability knowledge ganizations. Typically, different models are used to can be automatically processed, and therewith sup- capture all relevant aspects of the organization. These ports the domain expert in creating a consistent con- models can extend each other, but can also overlay figuration.
    [Show full text]
  • Innovations in Model-Based Software and Systems Engineering
    Journal of Object Technology Published by AITO — Association Internationale pour les Technologies Objets http://www.jot.fm/ Innovations in Model-based Software And Systems Engineering Katrin Hölldoblera Judith Michaela Jan Oliver Ringertb Bernhard Rumpea Andreas Wortmanna a. Software Engineering, RWTH Aachen University, Germany b. Department of Informatics, University of Leicester, UK Abstract Engineering software and software intensive systems has become in- creasingly complex over the last decades. In the ongoing digitalization of all aspects of our lives in almost every domain, including, e.g., mechanical engineering, electrical engineering, medicine, entertainment, or jurisdiction, software is not only used to enable low-level controls of machines, but also to understand system conditions and optimizations potentials. To remain in control of all these heterogeneous systems of systems, a precise, but abstract understanding of these systems is necessary. To this end, models in their various forms are an important prerequisite to gain this understanding. In this article, we summarize research activities focusing on the de- velopment and use of models in software and systems engineering. This research has been carried out by the working group of Bernhard Rumpe, which started 25 years ago in Munich, continued in Braunschweig, and since 10 years carries on at RWTH Aachen University. Keywords Model, Modeling, Software Engineering, Language Workbench 1 Introduction Development of a system consists of understanding what the system should do, decom- posing the problem into smaller problems until they can be solved individually and composed into an overall solution. An important part of this process is decomposition, which leads to an architecture for the individual components.
    [Show full text]
  • Feature-Based Composition of Software Architectures Carlos Parra, Anthony Cleve, Xavier Blanc, Laurence Duchien
    Feature-based Composition of Software Architectures Carlos Parra, Anthony Cleve, Xavier Blanc, Laurence Duchien To cite this version: Carlos Parra, Anthony Cleve, Xavier Blanc, Laurence Duchien. Feature-based Composition of Soft- ware Architectures. 4th European Conference on Software Architecture, Aug 2010, Copenhagen, Denmark. pp.230-245, 10.1007/978-3-642-15114-9_18. inria-00512716 HAL Id: inria-00512716 https://hal.inria.fr/inria-00512716 Submitted on 31 Aug 2010 HAL is a multi-disciplinary open access L’archive ouverte pluridisciplinaire HAL, est archive for the deposit and dissemination of sci- destinée au dépôt et à la diffusion de documents entific research documents, whether they are pub- scientifiques de niveau recherche, publiés ou non, lished or not. The documents may come from émanant des établissements d’enseignement et de teaching and research institutions in France or recherche français ou étrangers, des laboratoires abroad, or from public or private research centers. publics ou privés. Feature-based Composition of Software Architectures Carlos Parra, Anthony Cleve, Xavier Blanc, and Laurence Duchien INRIA Lille-Nord Europe, LIFL CNRS UMR 8022, Universit´edes Sciences et Technologies de Lille, France {carlos.parra, anthony.cleve, xavier.blanc, laurence.duchien}@inria.fr Abstract. In Software Product Lines variability refers to the definition and utilization of differences between several products. Feature Diagrams (FD) are a well-known approach to express variability, and can be used to automate the derivation process. Nevertheless, this may be highly complex due to possible interactions between selected features and the artifacts realizing them. Deriving concrete products typically involves the composition of such inter-dependent software artifacts.
    [Show full text]
  • A Model-Based Approach to Managing Feature Binding Time in Software Product Line Engineering
    A Model-Based Approach to Managing Feature Binding Time in Software Product Line Engineering Armaya’u Zango Umar Jaejoon Lee Lancaster University Lancaster University Lancaster, United Kingdom Lancaster, United Kingdom [email protected] [email protected] ABSTRACT EduPL Software Product Line Engineering (SPLE) is a software reuse par- Course Registration adigm for developing software products, from managed reusable Result Computation................. Account Creation Payment ...... ..... assets, based on analysis of commonality and variability (C & V) .......... ......... Application of a product line. Many approaches of SPLE use a feature as a Messaging Service Sub-degree key abstraction to capture the C&V. Recently, there have been in- Contact Validation Email Graduate creasing demands for the provision of flexibility about not only Text Message Under Graduate the variability of features but also the variability of when features Composition Rule Legend should be selected (i.e., variability on feature binding times). Cur- Contact Validation Requires Messaging Service Optional Alternative Group rent approaches to support variations of feature binding time mostly GraduateRequires Payment OR group Composed-of relationship focused on ad hoc implementation mechanisms. In this paper, we first identify the challenges of feature binding time management and then propose an approach to analyze the variation of feature Figure 1: Partial feature model of EduPl binding times and use the results to specify model-based architec- tural components for the product line. Based on the specification, components implementing variable features are parameterized with be tailored to produce a potentially unique architecture for each of the binding times and the source codes for the components and the the products of a product line.
    [Show full text]
  • Reactive Variability Realization with Test-Driven Development and Refactoring
    Reactive Variability Realization with Test-Driven Development and Refactoring Glauco Silva Neves Patrícia Vilain Informatics and Statistics Department - INE Informatics and Statistics Department - INE Federal University of Santa Catarina - UFSC Federal University of Santa Catarina - UFSC Florianópolis, Brazil Florianópolis, Brazil [email protected] [email protected] Abstract— Software product line is a practice that has proven its Despite its advantages, a SPL requires a high upfront and advantages since it can offer to a company the reduction of time long-term investment to design and to develop the core assets to market, the decrease of development costs, the increase of repository, hindering the SPL use in dynamic markets due to productivity and the improvement of the final product quality. the risk of unforeseen changes and the cost of developing However, this practice requires a high initial investment and artifacts that may no longer be reused. To overcome this offers long-term risks to dynamic markets where changes are difficulty, there is a proposal of combining agile software difficult to predict. One of these markets is the mobile application development practices with SPL, resulting in the Agile Product development, which presents a growing demand, with Line Engineering (APLE) [2]. smartphone and tablets having already surpassed sales of PCs and notebooks. Currently, proposals bring the advantages of One example of a dynamic market that has grown rapidly is software product line for dynamic markets through the use of the one of applications for mobile devices. Smartphones and agile software development practices, which is called Agile tablets have surpassed PC and laptop sales [3].
    [Show full text]
  • Feature and Class Models in Clafer: Mixed, Specialized, and Coupled
    Feature and Class Models in Clafer: Mixed, Specialized, and Coupled University of Waterloo Technical Report CS-2010-10 Kacper Bąk1, Krzysztof Czarnecki1, and Andrzej Wąsowski2 1 Generative Software Development Lab, University of Waterloo, Canada, {kbak,kczarnec}@gsd.uwaterloo.ca 2 IT University of Copenhagen, Denmark, [email protected] Abstract. We present Clafer, a class modeling language with first-class support for feature modeling. We designed Clafer as a concise notation for class models, feature models, mixtures of class and feature models (such as components with options), and models that couple feature models and class models via constraints (such as mapping feature configurations to component configurations). Clafer also allows arranging models into mul- tiple specialization and extension layers via constraints and inheritance. We identified four key mechanisms allowing a class modeling language to express feature models concisely and show that Clafer meets its design objectives using a sample product line. 1 Introduction Both feature and class modeling have been used in software product line en- gineering to model variability. Feature models are tree-like menus of mostly Boolean—but sometimes also integer and string—configuration options, aug- mented with cross-tree constraints [15]. These models are typically used to show the variation of user-relevant characteristics of products within a product line. In contrast, class models, as supported by the Unified Modeling Language (UML), have been used to represent the components and connectors of product line ar- chitectures and the valid ways to connect them. Thus, the nature of variability expressed by each type of models is different: feature models capture simple se- lections from predefined (mostly Boolean) choices within a fixed (tree) structure; and class models support making new structures by creating multiple instances of classes and connecting them via object references.
    [Show full text]
  • Mapping SPL Feature Models to a Relational Database
    Mapping SPL Feature Models to a Relational Database Hazim Shatnawi∗ H. Conrad Cunningham University of Mississippi University of Mississippi Department of Computer and Information Science Department of Computer and Information Science University, Mississippi 38677 University, Mississippi 38677 [email protected] [email protected] ABSTRACT may vary in how those features are realized. To identify these com- Building a software product line (SPL) is a systematic strategy for monalities and variabilities, developers must analyze the domain reusing software within a family of related systems from some ap- to identify the organization’s business goals, the SPL’s scope, the plication domain. To dene an SPL, domain analysts must identify types of products to be developed, and the features of those prod- the common and variable aspects of systems in the family and cap- ucts. They often document the details of the feature analysis as a ture this information so that it can be used eectively to construct tree-structured feature model. A parent node represents a decision specic products. Often analysts record this information using a fea- in the design of a product. The children of that node represent more ture model expressed visually as a feature diagram. The overall goal detailed decisions for realizing the parent decision. The constraints of this project is to enable wider use of SPLs by identifying relevant among the nodes determine how valid products can be congured concepts, dening systematic methods, and developing practical in the SPL. tools that leverage familiar web programming technologies. This Feature models are represented in various ways in the litera- paper presents a novel approach to specication of feature models: ture.
    [Show full text]
  • Using Feature Modeling for Program Comprehension and Software
    Using Feature Modeling for Program Comprehension and Software Architecture Recovery Ilian Pashov, Matthias Riebisch Technical University Ilmenau, Max-Planck-Ring 14, P.O. Box 100565 98684 Ilmenau, Germany {idpashov|matthias.riebisch}@tu-ilmenau.de Abstract: The available evidence in a legacy software their life cycle. Evolving often means refactoring or system, which can help in its understanding and recovery migrating to a new approach, for example component based systems or product lines. However, to succeed in of its architecture are not always sufficient. Very often the system’s documentation is poor and outdated. One such a step, a full understanding of the software system may argue that the most reliable resource of information is required leading to the need for its architecture and design decisions to be recovered. is the system’s source code. Nevertheless a significant knowledge about the problem domain is required in Due to the long life cycle of these systems, in most of order to facilitate the extraction of the system’s useful the cases it is impossible to keep the same development architectural information. team. A lot of knowledge about the system is lost along In this approach feature modeling is introduced as an with the developers. Often the system’s documentation is additional step in a system’s architectural recovery out of date and insufficient. This means that additional process. Feature modeling structures the system’s help is required for the architectural recovery of the system from the reverse engineers and the reverse functionality and supports reverse engineering by detecting the relations between source code elements and engineering methods.
    [Show full text]
  • An Overview of Feature-Oriented Software Development
    Vol. 8, No. 4, July{August 2009 An Overview of Feature-Oriented Software Development Sven Apel, Department of Informatics and Mathematics, University of Passau, Germany Christian K¨astner, School of Computer Science, University of Magdeburg, Germany Feature-oriented software development (FOSD) is a paradigm for the construction, customization, and synthesis of large-scale software systems. In this survey, we give an overview and a personal perspective on the roots of FOSD, connections to other software development paradigms, and recent developments in this field. Our aim is to point to connections between different lines of research and to identify open issues. 1 INTRODUCTION Feature-oriented software development (FOSD) is a paradigm for the construction, customization, and synthesis of large-scale software systems. The concept of a fea- ture is at the heart of FOSD. A feature is a unit of functionality of a software system that satisfies a requirement, represents a design decision, and provides a potential configuration option. The basic idea of FOSD is to decompose a software system in terms of the features it provides. The goal of the decomposition is to construct well-structured software that can be tailored to the needs of the user and the appli- cation scenario. Typically, from a set of features, many different software systems can be generated that share common features and differ in other features. The set of software systems generated from a set of features is also called a software product line [45,101]. FOSD aims essentially at three properties: structure, reuse, and variation. De- velopers use the concept of a feature to structure design and code of a software system, features are the primary units of reuse in FOSD, and the variants of a software system vary in the features they provide.
    [Show full text]
  • Quality Attributes Modeling in Feature Models and Feature Model
    A thesis submitted in fulfillment of requirement for the degree of Doctor of Philosophy GUOHENG ZHANG School of Electrical Engineering and Computer Science The University of Newcastle, Callaghan, NSW, 2308, Australia March 2013 Statement of Originality The thesis contains no material which has been accepted for the award of any other degree or diploma in any university or other tertiary institution and, to the best of my knowledge and belief, contains no material previously published or written by another person, except where due reference has been made in the text. I give consent to the final version of my thesis being made available worldwide when deposited in the University’s Digital Repository. Guoheng Zhang Acknowledgement I would like to acknowledge the support and encouragement of several people, without whom, this thesis would not be possible. Firstly, I am grateful for my two supervisors, Associate Prof. Huilin Ye and Dr. Yuqing Lin. I have learnt almost everything about research from them. In the last four years, they have given me guidance and encouragement, support and generosity in sharing their time, knowledge, and expertise during the preparation of my Ph.D thesis and throughout my research work. My research has been funded by Australian Research Council under Discovery Project DP0772799. I would like to thank the Council for this great opportunity. I wish to thank my wife for her love, encouragement and continuous support. I am grateful to my parents for their support and education. During several conferences, I had the pleasure to meet many passionate people from the software product line community.
    [Show full text]
  • Agile Product Line Engineering: the Agifpl Method
    Agile Product Line Engineering: The AgiFPL Method Hassan Haidar1, Manuel Kolp1 and Yves Wautelet2 1LouRIM-CEMIS, Université Catholique de Louvain, Belgium 2KULeuven, Faculty of Economics and Business, Belgium Keywords: Software Product Line Engineering, Agile Software Development, Agile Product Line Engineering, AgiFPL, Scrum, Scrumban, Features. Abstract: Integrating Agile Software Development (ASD) with Software Product Line Engineering (PLE) has resulted in proposing Agile Product Line Engineering (APLE). The goal of combining both approaches is to overcome the weaknesses of each other while maximizing their benefits. However, combining them represents a big challenge in software engineering. Several methods have been proposed to provide a practical process for applying APLE in organizations, but none covers all the required APLE features. This paper proposes an APLE methodology called AgiFPL: Agile Framework for managing evolving PL with the intention to address the deficiencies identified in current methods, while making use of their advantages. 1 INTRODUCTION as presenting strengths and weaknesses. Furthermore, the study of the existing APLE methods has revealed Over the past years, the software industry has been that no single method covers all the needed APLE searching for methods, processes and techniques to features. increase the delivery of high quality software while In this context, this paper proposes an APLE reducing development costs. Several paradigms have methodology called AgiFPL (Agile Framework for been proposed in order to fulfil this target. “Agile managing evolving SPL). The intention behind the Software Development” (ASD) and “Product Line definition of this APLE method is to address the Engineering” (PLE) are well-known approaches deficiencies identified in current methods, while proposed by researchers and practitioners for dealing making use of their advantages.
    [Show full text]
  • Applying Feature-Oriented Software Development in Saas Systems: Real Experience, Measurements, and Findings
    Applying Feature-Oriented Software Development in SaaS Systems: Real Experience, Measurements, and Findings Oscar Pedreira1, Fernando Silva-Coira1, Angeles´ Saavedra Places1, Miguel R. Luaces1 and Leticia Gonzalez´ Folgueira2 1Universidade da Coruña, Centro de Investigación CITIC, Facultade de Informática, A Coruña, Spain 2Enxenio S.L., A Coruña, Spain E-mail: [email protected]; [email protected]; [email protected]; [email protected]; [email protected] Received 14 January 2019; Accepted 06 June 2019 Abstract Distributing software as a service (SaaS) has become a major trend for web-based systems. However, this software distribution model poses many challenges. One of them is feature variability, that is, some features of the system may be required by some users, but not by all of them. In addition, variability is more complex than just including or excluding a feature, since different types of relationships may exist between features. The implementation of this variability, and the parametrization and configuration of the system can be complex in this context, so the development process of a SaaS system must adequately address variability management. In this paper we present an Journal of Web Engineering, Vol. 18 4-6, 447–476. doi: 10.13052/jwe1540-9589.18467 c 2019 River Publishers 448 O. Pedreira et al. experience applying feature oriented software development (FOSD) in the context of SaaS web-based systems development. We present a real experience in the development of a web-based system for managing home care services for dependent people. The article describes the problem of variability management in this domain, and the feature model of the system.
    [Show full text]