A Meta-Modelling Approach to Feature Modelling

Feature modelling is a key technology for product family engineering. In this paper, we describe a feature modelling technique that empowers product family engineers to define the framework within which they use feature modelling. Our technique offers three dimensions of flexibility. Firstly, it is based on a feature meta-meta-model and hence it allows users to define their own feature meta-model. Secondly, it allows users to exactly define the relationship between a family model and the models of the applications instantiated from the family. Thirdly, it allows users to define the visual rendering of a feature model. In the paper, we describe a tool that supports the proposed meta-modelling technique and a case study where the tool is configured to emulate an existing feature meta-model. 1 Background and Motivation A software product family is a set of applications that can be built from a pool of shared software assets. Product families arguably offer the most successful path to software reuse [3, 7]. There is consequently a strong interest in technologies that further their use. Feature modelling is one of the key support technologies for product family engineering. It is in particular used to describe the target domain of a product family (the set of applications that can be instantiated from the family) and to define the range of potential configurations of the reusable assets of a product family. In general, a feature is a characteristics of a system that is relevant to its end users. A feature model is a description of a set of features. Feature models are useful to identify all the features that can potentially appear in the applications to be instantiated from the family together with any constraints on their legal combinations (i.e. constraints on which combinations of features may appear in the same application). Feature models can be instantiated. A feature model is instantiated when a particular combination of its features is selected among all those which are defined by the feature model. If the feature model is used to describe the domain of a product family, its instantiation can be seen as an application model, namely as a description of a particular application within the family domain (an instance of the family). 2 O. Rohlik, A. Pasetti, K. Ekstein, P. Chevalley Effective use of feature modelling techniques requires good tool support. A feature modelling tool should offer a GUI-based environment where users can create and maintain feature models. Additionally, if the tool is to serve as a family modelling tool, it should also cover the instantiation of the feature model. Manipulation of a feature model in a tool requires: (1) a definition of what exactly constitutes a feature model, and (2) a definition of how the feature model should be rendered visually. This can be restated by saying that manipulation of a feature model in a tool requires definition of a feature meta-model and a feature display model. At present, only few feature modelling tools are available [8, 9, 10]. These tools are characterized by different feature meta-models and display models. This variety reflects a lack of consensus about the essential characteristics and visual appearance of feature models. The most common representation of feature models is through FODA-style feature diagrams [4]. Such diagrams have a tree-like structure where each node represents a feature and each feature may be described by a set of sub-features represented as children nodes. Various conventions have evolved to distinguish between mandatory features and optional features. Beyond this core set of characteristics for feature diagrams, there is however no agreement on the kind of information that should be attached to each feature, on the type of mechanisms that should be used to modularize large feature diagrams, and on the exact relationship between parent and children features. Existing feature modelling tools, in other words, are based on different – and usually incompatible – feature meta-models. This lack of consensus on a feature meta-model is, in our view, intrinsic to the feature modelling problem (as opposed to being a temporary consequence of the novelty of the technique). Our experience from using feature modelling is that different users have different needs. At one extreme, there may be high-level domain designers who only need feature diagrams with simple tree structures where all features are of the same type with only one single value attached to them. At the other extreme, there may be software engineers who use feature models to capture the possible configurations of the reusable assets of a product family. These engineers may need to differentiate between different types of features with different semantics and with structured information attached to them; they may want to express complex constraints on feature combinations; and they may wish to break large feature models into independently manageable modules. We believe that it is not appropriate to impose on such diverse users the same feature meta-model. In this paper, we present an alternative approach where the feature modelling technique is based upon a feature meta-meta-model and is parameterized with a user-defined feature meta-model. This makes it possible to build a feature modelling tool where users can define their feature meta-model and can use it to adapt the feature modelling tool to their particular needs. In summary, our objective is to empower product family engineers to define the operational framework within which they use feature modelling. We do this primarily by allowing them to define their own feature meta-model but also offer them two further dimensions of flexibility. Firstly, we allow them to exactly define how a family model is instantiated by giving them control over the process whereby an application meta-model is created from a family model. Secondly, we allow them to define how a feature model is visually rendered. A Meta-Modelling Approach to Feature Modelling 3 The next two sections describe our feature modelling technique and our feature metameta-model. Section 4 describes a prototype tool which we developed to support our proposed feature modelling technique. Section 5 presents an example of how this tool can be configures to emulate a family modelling approach proposed by another author. Finally, section 6 considers related work. 2 Feature Modelling Approach Our feature modelling approach was introduced to support product family modelling. It consequently covers three levels of modelling: – The Product Family Meta-Modelling Level – The Product Family Modelling Level – The Application Modelling Level At family meta-modelling level, the facilities available to describe a product family are defined. The family meta-model is fixed and family-independent. At family modelling level, a particular product family is described. A family model must be an instance of the family meta-model. Finally, at application modelling level, a particular application is described. The application model serves as a specification of the application to be instantiated from the family. The application model is an instance of the family model. Aut om atic Gen era tion Application Meta-Model Application Model Family Model Feature Meta-Meta-Model Meta-Meta-Modelling Level Feature Meta-Modelling Level Feature Modelling Level Family Meta-Model Fig. 1: Feature Modelling Architecture Both the family model and the application model are represented as feature models. The former describes the mandatory and optional features that may appear in applications instantiated from the family (together with the constraints on their combinations). The latter describes the actual features that appear in a particular application. The application model is a feature model where all features are mandatory and where all variability has been removed. Since both the family model and the application model are treated as feature models, it would in principle be possible to derive them both from a unique feature meta-model. However, the characteristics of these two models are rather different: the former aims to describe variability whereas the latter aims to describe a selection of features. We found that it is best to instantiate them from two distinct meta-models [1]. However, in 4 O. Rohlik, A. Pasetti, K. Ekstein, P. Chevalley order to allow manipulation of both the family model and the application model within the same tool, their respective meta-models are derived from a common meta-metamodel. This is illustrated in figure 1. The family model (a feature model) is instantiated from the family meta-model (a feature meta-model). The application meta-model (a feature meta-model) is automatically generated from the family model. The application models are instantiated from the application meta-model. Both the application meta-model and the family meta-model are instances of a single metameta-model. With this concept, a product family is fully defined by its family model and by the program that generates the application meta-model from the family model. Feature Meta-Model (XML Schema) Application Model Family Model Feature Meta-Model (XML Schema) Family-Independent Layer Family-Specific Layer Application-Specific Layer Family Meta-Model XML-Based Feature Model XML-Based Feature Model Application Meta-Model Application XSD Generator