Product Lines and Handling of the complexity of variants is one of the current challenges in many industries. In the engineering process, it is important to find the correct views on the engineering data for the product lines and variants. Requirements engineering is no exception.
Requirements and Variants
In the publicly funded research project IMES, itemis as one of the partners is investigating new tool platforms that seamlessly integrate the software engineering artifacts of OEMs and 1st-tier suppliers. This blog article describes our current implementation of variant handling for requirements. This solution allows the specification of presence conditions (i.e. specifying which requirements are applicable to which features) and the tailoring of the requirements models. We are using the Eclipse technologies Xtext, EFM and RMF – but everything is usable in standalone mode as a Java program from the command line, so it could be generally applied to any tool that handles ReqIF.
Eclipse Feature Model
For the modeling of features, we are using the Eclipse Feature Model Project, which contains meta-models for feature and variant models contributed by Pure Systems, a company specialised on tools for product line and variant management. The project does provide the basic EMF editors, and we added Xtext-based textual editors for features (but they are not part of this blog article).
For each requirement, we want to specify for which features the requirement is applicable. A simple selection box is not sufficient, since we might want more powerful expressions (e.g. a requirement applies for a specific car, if it is “sold in the Asian market and it has more then 200 hp”). Since the 2.x version of Xtext, it is easy to write for these expressions. Our Xtext solution examines the feature model and provides the features in the expression language.
The Eclipse Requirement Modeling Framework is the Eclipse-EMF based implementation of the ReqIF standard meta-model for requirements. It is expected that most tools will support the standard with some of the next releases.
To support product line / variant management with requirements, we have the following steps:
- Model the features in the feature model
- Model one or more variants in a variant model
- Add an additional attribute for the presence condition to your requirements
- Define the presence conditions
- Run the tool
You will now have a tailored version of your requirements that provide a specific view on the variant. We are using a feature of the ReqIF standard: The hierarchy structure of requirements is not stored in the requirements. Instead, you can have one or more so-called “specification hierarchies”. The elements of these hierarchies are just used to build up the structure, they do not contain any data but only point to the actual requirements. So a requirement can be referenced by zero to one hierarchies.
We create a second hierarchy, that is a copy of the first hierarchy, with the presence conditions applied. So the original data is preserved.
Command Line and GUI
For the standalone version, only the variant model, feature model and an ReqIF file with presence condition attributes are required. So you could basically enter the presence condition in any tool with text input.
For Eclipse-based tooling, we provide additional support for the presence condition. The Xtext editors for the language can be embedded into the ProR editor of RMF, so you will get full content assist, error checking and navigation for your feature models.