• No results found

DSPL Pre-Planning at Design Time

6.5 Implementation of a Context-Aware Reconfiguration Process

6.6.1 DSPL Pre-Planning at Design Time

The configuration state space ofPKS depends on the corresponding context-fea- ture model cfm. The potential state space reduction to an incomplete state space covering k-wise context combinations depends on the number of features and con- texts and the complexity, i.e., the constraint density of cfm as well as the choice of k.

In order to investigate the benefits of an incomplete state space, the extent of the reduction of suitable states w.r.t. a context-coverage criterion k is evaluated. Further, the possibility of unrestricted contexts/features w.r.t. an upper limit l is evaluated.

Reduction of a State Space Scaling across number of Features. Figure6.16depicts the reduction of a complete state space to an incomplete state space scaling across the number of features in a feature model cfm for a k of 1, 2, 3, and 6. As a baseline, the size of the complete state space is also included. The feature models are generated using the BeTTy-Framework2 with a Cross-Tree- Constraint Ratio (CTCR) of 15%. For each measurement point, 30 feature models are generated. The results are averaged across these sets.

The feature models from the test data set are enriched to a context-feature model cfm with a context-to-feature ratio of 14, i.e., for every four features there is one context. Further, each context may have up to two constraint relations to the set of features F, i.e., require and exclude edges. In the following I refer to this ratio as the Context-Cross-Tree Constraint Ration (context-CTCR). A context-CTCR of 2 is considered to be standard for this evaluation.

Incomplete State Space

Complete k=1 k=2 k=3 k=6 15 20 25 30 35 40 45 50 55 60 Number of Features 100 1000 10000 100000

Size State Space

Figure 6.16:State Space Reduction Scaling across Number of Features

Figure 6.16 depicts a logarithmic vertical scaling across the size of the state space and a linear scaling across the number of features horizontally, i.e., starting with a feature model consisting of 15 features up to a feature model size of 60

R esour ce C onstraint R untime A d apt a tion

features. Obviously, the state space generated for context combination k = 1 (covering single contexts) is the smallest and grows with increasing k.

The averaged maximum size of the complete state spaces corresponds to 105,000 states for a cfm with 50 features, whereas with k = 6 this state space is reduced significantly to 290 states, which corresponds to 0.2h of the original size. The difference between k = 6 and k = 2 is minimal, i.e., 290 states with k = 6 and 210 states with k = 2 for a cfm with 50 features. The size of a state space with k = 6 and k = 3 is nearly identical, e.g., 290 states with k = 6 and 285 states with k = 3. Overall it is safe to assume that the ratio, in which the size of the state space grows decreases with a greater k.

An interesting anomaly is the spike in the plot for the complete state spaces at a cfm with 50 features. Usually it is safe to assume that the size of the state space grows with the number of features since the size of the state space corresponds

to 2|C∪F|. However, this assumption neglects the individual constraints of a cfm.

These constraints may lead to an anomaly that a cfm with less features may lead to more configuration states than a cfm with more features. For example, the generated cfm with 40 features leads to a larger complete state space in average than a cfm with 60 features in my evaluations.

The spike in the plot of the complete state spaces at a cfm with 50 features is independent from the reduced state spaces for k = 1, k = 2, k = 3, and k = 6. This implies that the state space increases while the amount of possible context combinationsCkcfm remains stable.

Reduction of a State Space Scaling across CTCR. Figure 6.17 de- picts a plot that ranges across the context-CTCR horizontally with a fixed number of 35 features. The context-CTCR starts with 2, e.g., 1 excluding and 1 required feature per context, and is scaled up to 10. The size of the state space is depicted vertically using a linear scaling. As in the previous evaluation setup, the standard CTCR is set to 15%.

Incomplete State Space

k=1 k=2 k=3 k=6 2 3 4 5 6 7 8 9 10 Context-CTCR 0 50 100 150 200 250 300 350

Size State Space

Figure 6.17:State Space Reduction Scaling across Context-CTCR

Figure6.17illustrates that the number of possible configurations decreases with increasing context-CTCR. Note that I left out the complete state space in this plot because the complete state space is not influenced by the context-CTCR and re- mains constantly at 105,000 states for this evaluation. As in the previous evalua-

R esour ce C onstraint R untime A d apt a tion

tion, the most significant reduction of a state space is gained with k = 1 and the state space becomes larger with a higher k. However, the size of the state space continuously decreases with an increasing of the context-CTCR. For example, the state space for k = 3 drops by 40% between a context-CTCR of 5 and 6. Addition- ally, the state space for all context-coverage criteria, i.e., k = 1, k = 2, k = 3, and k = 6, converge to the same size. For example, with a context-CTCR of 10, the size of the state space is always 50.

The reason for this is that the possibility for a valid combination of contexts decreases with a high context-CTCR, i.e, with a context-CTCR > 10, only single contexts are coverable, i.e., a greater k than 1 is not possible.

Presence of Unrestricted Contexts/Features. I further investigate the potential memory savings by state subsumptions using partial states. There- fore, the percentage of partial states in a state space, which contains either a single unrestricted context or feature (l = 1) or a pair-wise combination of contexts or features (l = 2) is measured.

Figure 6.18 shows the percentage of partial states within an incomplete state space for k = 2. For l = 1, i.e., one context or feature identifiable as unrestricted, about 50% of the states in the state space are partial states for a feature model size of 15 and 20. The remaining states are complete states for which it is not possible to derive a single unrestricted feature. The standard deviation for a feature model size of 20 indicates that up to 80% of the states may be abstracted to a partial state. If the combination of unrestricted features in a state is increased to l = 2, this amount of partial states decreases in most cases, e.g., for a feature model size of 20, 38% of the states are a partial state with a pair-wise combination of unrestricted features.

An anomaly regarding partial states is recognizable with a feature model size of 55. In this case, there are more partial states that contain a combination of unrestricted features than partial states that contain only a single unrestricted feature. The reason for this is the low amount of constraints in this set of feature models. With such a low amount of constraints it is more likely that features may become unrestricted in an arbitrary combination. Such a combinatorial set may become larger than a set of single unrestricted features and, therefore, there are more possibilities for combinations of unrestricted features.

Figure6.19shows the percentage of partial states that contain unrestricted con- texts within an incomplete state space for k = 2, scaling over the context-CTCR. With a low contexts-CTCR more contexts may become unrestricted, either one- wise l = 1 or pair-wise l = 2, and, therefore, more states in a state space are abstracted to a partial state. If the context-CTCR increases the possibility for un- restricted contexts decreases. For example, with a context-CTCR of 2, 38% of the states are partial with a single unrestricted context and 20% of the states are a partial states, which contain a pair-wise combination of unrestricted contexts. In contrast to that, with a context-CTCR of 9, 32% of the states are partial with a single unrestricted context and a pair-wise combination of unrestricted context was impossible for this set of context-feature models. Thus, with every additional

R esour ce C onstraint R untime A d apt a tion feature l=1 feature l=2 15 20 25 30 35 40 45 50 55 60 # Features 0 20 40 60 80

% of Partial States, Features

Figure 6.18:Presence of Unrestricted Feature Variables, Scaling across Number of Fea- tures

exclude a require constraint between a context and a feature, the possibility to identify unrestricted contexts decreases.

Partial States context l=1 context l=2 2.0 3.0 4.0 5.0 6.0 7.0 8.0 9.0 10.0 Context-CTCR 0 20 40 60 80 100

% of Partial States, Contexts

Figure 6.19:Presence of Unrestricted Context Variables, Scaling across Context-CTCR

Similarly, the impact of different choices for k and l is investigated w.r.t. the trade-off between resource consumption and computational efforts at runtime in the next section.