4.1. SeVaTax Models (Component 1)
The SeVaTax model emerges as a design model defined for an SPL methodology applied to several geographic subdomains. In previous works [
35,
36] we defined this model based on a functionality-oriented design. That is, each functionality of the SPL is documented by a functional datasheet representing the set of services, commons (Common services are services that will be part of every product derived from the SPL) and variants, which interact to reach the desired functionality.
Each datasheet is documented by using a template composed of six items containing an
identification, such as a number or code; a
textual name, describing the main function;
the domain in which this functionality is included; the
list of services required for fulfilling this functionality; a
graphical notation, which is a set of graphical artifacts showing the service interactions (as common and variant services); and a
JSON (
https://www.json.org/json-es.html) file specifying the services and their interactions. Within the
graphical notation item (of the datasheets) any graphical artifact might be used; and particularly, we use an artifact based on variability annotation of collaboration diagrams (of UML). The required variability, according to the functionality to be represented, is attached to the diagrams by using the OVM notation [
5].
The complete set of interactions in our variability models is specified in
Table 1. As we can see, they are divided into
variability types, for denoting the variant interactions among services;
dependencies, for denoting interactions between services; and
scope, for specifying the scope of each variant point. SeVaTax models introduce three novel interactions: the
use dependency and two
scope operators. The former specifies a dependence between common services, which are not necessarily associated with a variation point; meanwhile the latter are related to the
scope defined for a variation point when it must be instantiated [
37]. There are two possibilities here: (1) a
Global Variation Point (GVP) specifies that, if the variation point is instantiated in a specific way, it will be applied in that way for all functionality, including that variation point; and (2) a
Specific Variation Point (SVP) specifies that the instantiation of the variation point is particular for each functionality, including that variation point.
The
scope operators have been added to the SeVaTax models [
9] in order to design functionalities with the possibility of reusing variation points and their instantiations. As an example for clarifying these operators, we can see
Figure 4A,B containing a Variant Variation Point, named
A, with three variants (
,
and
) and two different services (
X and
Y) in different variability models of two datasheets (1 and 2 respectively). Considering the two
scope operators, we have the following two possibilities:
GVP operator: if a
is attached to the variation point
A in both models, there will be an only one possibility to instantiate it. That is, it will be valid to have instantiations such as
Figure 4C or D but not both of them. Only one instantiation will be valid for the whole SPL platform for
A;
SVP operator: if an
is attached to the variation point
A in both models, each model will be able to choose its own instantiation. For example, an instantiation of
Figure 4A can be
Figure 4C and for B can be D. Even, both instantiations are valid in the SPL platform for
A.
Figure 4.
An example of the use of scope operators in two datasheets.
In previous works, we have modeled SeVaTax models and their datasheets for two geographical subdomains—marine ecology [
35,
36] and paleontology [
38]. As an example,
Table 2 shows a variability model for the
Add New Excavations datasheet (paleontology subdomain).
For example, in the SPL of the paleontology subdomain [
38], we can reuse the same variation point in two functionalities. One of them is
Add New Excavations (showed in
Table 2), and the other one is
Add New Paleontologist, showed in
Figure 5. As this last functionality lets the user to add a new excavation for indicating the excavation in which he/she was involved, the variation point
Load excavation data is reused in the same way for both functionalities (Here, only a part of the
Add New Excavations is reused, specifically the service
PS-T4.20). The variation point is also defined as
because it can be instantiated, in a different way, for each of those functionalities.
Finally, the last item of the datasheet is a
JSON file built according to the JSON properties (showed in the second column of
Table 1). This file is generated to allow automatic processing of SeVaTax models.
In Listing 1 we can see the JSON file for the SeVaTax model shown in
Table 2 for the variation point.
Listing 1.
Part of the JSON file for representing the SeVaTax model shown in
Table 2.
4.3. Validator (Component 3.1) and Results (Component 4)
The validator is responsible for identifying possible problems in the variability models when developing an SPL. Generally, the design of variability models is an error-prone task, that is, the development of an SPL involves functionalities and their associated variability models, which can show a conflict among functionalities. For example, in [
38], we applied SeVaTax models (represented as functional datasheets) for designing functionalities in the paleontology subdomain; however, these functionalities could have contained incompatibilities that must be analyzed in order to avoid problems during implementation and/or product derivation. To illustrate this, in
Figure 7 we introduce an anomaly as a
require dependency in the variability model showed in
Table 2—a
mandatory service (
HI-SLD2.12) requires an optional one (
HI-SLD1.9), making it also present in all products. This is an example of the kind of problems that the validator must detect.
Possible problems of the variability models are seen as queries that solvers are capable of answering. In this way, before configuring a solver, it is important to define the specific queries supported by the analysis process, that is, the set of questions that solvers are capable of answering. In previous works [
8,
9,
10], we have defined a set of questions classified as
validation scenarios. They represent possible problems of the variability models to be analyzed for providing more specific responses.
In the related work section (
Section 3), we showed the most common responses provided by proposals in the literature. They were classified as
results, indicating the support for incompatibilities (redundancies, anomalies and inconsistencies) and the level of detection, that is, from a simple identification to a correction of the specific problem. These incompatibilities have been classified in the literature as independent problems, that is, not associated to specific domains. In our work we also define them as generic or independent, which means they can be found in different variability models of different domains, but always representing classified incompatibilities.
After analyzing our previous works and the most common responses in the literature, here we extend and reorganize our previous validation scenarios in order to consider incompatibilities with respect to two main parameters: (1) the
variability interactions used in the models; and (2) the
severity of the incompatibilities (according to the proposal by Massen & Lichter [
28]).
For the first parameter, as we have showed in
Table 1, the interactions are divided into (1)
variability types, for denoting
mandatory,
optional,
alternative and
variant variation points; (2)
dependencies, for the use of
uses,
requires, and
excludes restrictions among services; and (3)
scope, for specifying the scope of each variation point at the moment of being instantiated. In this way, the variability models are firstly classified into validation scenarios by considering incompatibilities among the variability interactions involved.
Considering the second parameter, the variability models are also classified to explicitly incorporate the severity of an incompatibility. Thus, a variability model can present redundancies, when the model includes the same semantic restriction at least twice; anomalies, when the model is representing something irregular (According to Massen & Lichter an anomaly exists when potential configurations would be lost, though these configurations should be possible) that requires special attention; and inconsistencies, when the model presents contradictions making the analysis and derivations (in instantiated products) impossible. Obviously, the last one represents the most severe problem.
This new classification into the two parameters generates a comprehensive suite of validation scenarios defining possible incompatibility patterns among services. At the same time, the severity of an incompatibility helps on the identification and reparation actions when these patterns are found. In this way, from our classification of validation scenarios, we can specify specific responses provided by our validator, and take the required actions.
For each scenario, responses might be:
Warning (W)
![Information 13 00149 i015]()
: an alert is generated describing a possible problem together with the involved services;
General Identification (GI)
![Information 13 00149 i016]()
: the services generating the conflict are identified, but it is not possible to identify a specific scenario;
Specific Identification (SI)
![Information 13 00149 i017]()
: the scenario generating the conflict is identified. The causes of this conflict and the services involved for assisting the solution should be identified;
Repair (R)
![Information 13 00149 i018]()
: the scenario that generates the conflict is identified and a pre-established solution is applied/suggested. The required action can be
modification or
elimination.
These validators’ responses are obtained by using the SAT solver (Sat4j) and/or the underlying structures to identify and correct the incompatibility, whenever it is possible. In general, the underlying structures are used as a support when the SAT solver is not enough to specifically identify the services generating the incompatibility. Similarly, for the
repair response, the underlying structures are essential for suggesting the actions that could be carried out. To understand the use of these structures, in
Figure 8 we show part of the instantiation of the variability model for the
Add New Excavations functionality of
Figure 7. Specifically, we represent the variation point
PS-T4.20 with one mandatory and two optional services. We can also see the
requires dependency representing that
HI-SLD2.12 requires the
HI-SLD1.9 service. In this case, when the anomaly is detected, the instantiation is used to identify the specific services involved and provide a solution.
In
Figure 9, we can see the classification of validation scenarios considering the use of the
requires dependency. Columns are labeled according to the three different types of severity; meanwhile the rows represent the type of variability. For instance, a service with a
requires dependency presents anomalies when the dependency is directed towards another
optional,
variant or
alternative service, making it present on every instantiated product. An inconsistency appears when a
requires dependency is directed towards another
alternative service from the same variation point, that is, the variability model cannot be ever instantiated. Finally, in the figure we can see also variability models with redundancies, as the last ones. These scenarios, are independent from the variability types involved and they are present when a
requires dependency is directed towards a parent, the same service, or a set of services transitively.
Figure 9 also shows the responses provided by our validator to each validation scenario defined. In five of them, our validator suggests correcting the incompatibility and in the rest ones, it provides a specific identification of the incompatibility and the involved services. For example, for the anomaly of the
FV-O scenario (in the figure), each configurable service is evaluated individually by the SAT solver. To do so, it is necessary to pre-setup the service as false and the variation point (containing this service) as true in the CNF. If the generated CNF is inconsistent, then the service is a false optional.
Following,
Figure 10 shows incompatibilities when
excludes dependencies are involved. Here, we have three possible inconsistencies in the scenarios—
mandatory exclusion,
self dependency and
parent exclusion. At the same time, we can see that the responses of the validator are mostly
warnings for alerting the exclusion of services on all instantiated products. For example, for the
ME-A scenario, the validator uses the
Mandatory_exclude(Z,D) function, which, given two services
Z and
D (where
), checks if
D belongs to a mandatory variation point (Listing 2).
Listing 2.
Mandatory_exclude(Z,D) function.
As mentioned above, the result of the evaluation is a warning about the presence of the scenario together with the involved services (Z and D).
Figure 11 shows the validation scenarios involving both
requires and
excludes dependencies. In this case, all the scenarios present inconsistencies because they are involving services that are requiring and excluding the same services. Except for the
C-C scenario, in which the validator can identify the specific services in conflict, the other two scenarios are only identified generally. For example, the
TI-T scenario is evaluated by means of a
Services_Excludes(A,C) function, which, given two services
A and
C (where
), generates a list (
Includes_List) of all services that
requireC; recursively adding services, which in turn
require services that belong to the list (
Includes_List). Then, if the service
A belongs to
Includes_List, there is a transitive inconsistency between
A and
C (Listing 3).
Listing 3.
Services_Excludes(A,C) function.
The response of this evaluation is a general identification. The validator can only identify the involved services, but not the specific scenario.
In
Figure 12, we can see the validation scenarios involving combinations of variability types. These scenarios only generate anomalies, making services with specific associated variability cannot be really instantiated.
To evaluate these scenarios, we use the Variant_Child(B,Dts) function, which, given a variant B and a variability model , checks the number of variation points that the variant B contains. If the number of variation points is greater than one, there is a variation point violation (Listing 4).
Listing 4.
Variant_Child(B,Dts) function.
The response of the evaluation of these scenarios is a specific identification of the involved services in the anomaly.
Finally,
Figure 13 shows the validation scenarios involving
scope operators. In these cases, there are possible redundancies involving the scope operators; therefore, it would be useful to know how to proceed with their instantiation. For instance, the
M-SVP scenario is redundant because, regardless the instantiation you want to apply, the
can never contain different configurations, so the validator suggests
modifying the scope operator to .
Other redundancies occur in the CR-G and CR-S scenarios. For example, variability models in the figure are redundant considering the variation point C, because it is designed in the same way in both variability models. It is important to highlight here that these scenarios are not representing necessarily a problem, but it is useful for the designer that they are detected. Thus, the result of the evaluation is a warning about the presence of the scenario together with the involved services.
Following, an anomaly occurs in the FSVP-V scenario when a specific variation point SVP is related to an only one variant service depending on a GVP. When this happens, the scope will be always GVP because it is independent from the way the service is configured. This scenario is validated by using the Services_Consume_Variation_Point(VP) function, which given a variation point returns the number of services that use it; and when this number is one, we are in the presence of a False Specific (Listing 5).
Listing 5.
Services_Consume_Variation_Point(VP) function.
So, this variation point is suggested to be converted into a . Finally, we can see the C-S scenario representing an inconsistency when the same has different scopes in different variability models. To evaluate this scenario, for each service that represents a variation point, we register its scope into the underlying structures. Therefore, in the Service_Scope(S) function, when registering the scope, we check if the service has the same scope; in any other case, we are in the presence of a scope inconsistency (Listing 6).
Listing 6.
Service_Scope(S) function.
The result of the evaluation of this scenario suggests modifying the scope operator to .
As a summary of the validation scenarios and the responses of our validator,
Figure 14 shows, for each incompatibility, the number of scenarios according to each type of response.
Configurator (Component 3.2)
The configurator allows developers to build a specific product by means of instantiating the functional datasheets included in an SPL platform. Therefore, this component presents a user interface (UI) that allows developers to select the different variant services (associated with variation points). To perform that, a developer receives as input the validated functional datasheets (without anomalies), instantiates them, and generates a new set of datasheets without variability. This new set must be evaluated again.