# Product Model Derivation from Feature Model and Formal Specification
###### Abstract  
Product derivation is the process of building a specific product from a software product line. Effective product derivation can improve software reuse productivity. Existing methods can only obtain abstract feature models, lacking detailed specifications of individual features. They are more about deriving code assets or class diagram templates without precise model descriptions for specific products. This article proposes a product derivation approach to obtain a formal specification of a specific product based on the feature model and formal specification. We use the integration ordering and behavior preserving integration techniques to integrate the formal specification for each feature pair. The method is divided into two steps. First, it determines the feature formal specification integration ordering based on the feature model. Then, the behavior-preserving integration will be conducted for pairs, including declaration integration, functional scenario path generation, and function integration based on path matching. Behavior preserving integration guarantees consistent behavior to ensure the quality of the formal specification after integration. Finally, we developed a support tool to conduct a case study. The tool first guides the user to perform feature functional scenario path matching, then performs functional integration based on the matching results and repeats the above steps to generate a product model. The result indicates that our method facilitates the derivation process and improves the quality of the generated models. product derivation; formal specification; product family modeling; behavior preserving integration +
Footnote †: journal:  
individual features. (ii) There is no systematic modeling method for the product families, resulting in the lack of organically unified variability and feature descriptions. Compared to the implementation level, some work and tools have been conducted on the requirement level. Most of the existing methods on the requirement level are _copy-based_ and \(transformation\)-_based_. In the former, an existing product variant is copied and modified, adding and/or removing some functionalities to derive a new product [11; 12]. The latter involves transforming feature elements into different forms of the element [13]. Most of them either lack formalization of the model or have a coarse and abstract granularity of formalization, resulting in poor quality products. The major reason is that the source of product derivation is the product family model, which insufficiently expresses the user requirement. This paper builds on our prior work. Our prior work provided an evolution method for high-quality product family modeling that considers the feature model and the relationship between features, and a consistent and accurate product family model can be obtained [14; 15]. It solved the problem that the source model was not formal and provided the basis for the self-service product model generation. This paper significantly extends our prior work to solve the problem that the specific product derived is not formalized or the formalization is imprecise and obtains the formal specification of the product. Based on the above work, this paper proposes a method for product derivation at the requirements level that integrates the feature specification, which focuses on feature specification rather than code implementation. Our approach has two steps. It starts with determining the feature specification integration ordering based on the feature model. This ordering is the sequence of features to be integrated. The two features to be integrated in order in the sequence are called a feature pair (an atomic integration). Then, for each feature pair, behavior-preserving integration will be conducted according to the ordering, including declaration integration, functional scenario path generation, and function integration based on path matching.