5.4 Evaluation
6.1.2 Context-Enriched State Space
According to the first goal G1 of this thesis, a context-aware DSPL has to be capa- ble to autonomously react on changes in the contextual situation. Such a DSPL is able to execute reconfigurations for potentially compatible or incompatible con- texts emerging at runtime without external assistance. For example, if a user enters the contextHome and the throughput of his Internet connection is below a certain threshold, the context Slow Network becomes active in combination with the context Home. Based on the context-feature model, a corresponding config- uration is derivable, which satisfies the requirements of the imposed contextual situation.
The design of aKS provides the basis to specify the reconfiguration behavior of a DSPL w.r.t. the contextual constraints specified in a context-feature model. In a context-enrichedKS, an association between states and contexts is derivable, i.e., which states may be chosen as target states for a contextual situation. Such an association between contexts and states is accomplished by context-coverage criteria, e.g., every single context, every valid pair-wise combination of contexts, every valid three-wise combination of contexts, etc. For example, the require- ments imposed by the contextual situation {Home, Slow Network} are satisfiable by three states of the Nexus DSPL, whereas the context Home and Concert are incompatible because they rely on different communication infrastructures.
AKS as defined in Definition6.1 is used to represent context-aware reconfigu- ration processes as specified by a context-feature model cfm. Each configuration state s ∈ S corresponds to a configuration γ ∈ ˆΓcfm of features and contexts of
a context-feature model cfm as defined in Definition 4.19. Therefore, the inter- pretation of features as well as supported contexts are encoded in a state s ∈ S, i.e.,
• s(f) =tholds iff feature f ∈F is active in the state s and • s(c) =tholds iff context c ∈C is supported by the state s.
A context-enriched configuration state s ∈S is a state that reflects a configuration γ ∈ ˆΓcfm, for all feature variables f ∈ F and context variables c ∈ C. Thus, a context-aware state space consists of states that fully configure all feature variables and context variables of a context-feature model cfm.
R esour ce C onstraint R untime A d apt a tion
A state of the configuration state space is used to satisfy the requirements im- posed by the currently active contextual situation of a device. Such a contextual situation C+ is specified as a subset C+ ⊆ C of contexts, which are currently ac- tive in the contextual environment of a device. For instance, assume that a user is at Home and working in his Office. This contextual situation is denoted as C+ ={Home, Office}.
Notation 6.1 (Contextual Situation). A contextual situation is denoted as a subset of contexts C+ ⊆C.
Each context of a contextual situation C+has to be active or irrelevant in a state s ∈S that is a suitable state for that situation, i.e.,
∀c ∈ C+ : s(c) > ⊥.
Note that the case of interpreting a context as irrelevant s(c) = ⊥ is discussed in detail with the introduction of a partial state in Section6.3. For now, let us assume a contextual situation consists of a set of active contexts.
Every contextual situation C+ reflects the requirements imposed by a set of ac- tive contexts. For example, for a state s ∈S to be suitable for the contextual situa- tion C+={Office,Home} s has to interpret the individual contexts as s(Office) =t and s(Home) =t.
The concept of an autonomous context-aware DSPL is depicted in Figure6.5. In contrast to a standard DSPL state space depicted in Figure6.4(b)the pre-planned context-aware state space divides the state space into several subsets. Each con- text-specific subset consists of configuration states that satisfy the requirements imposed by a contextual situation.
Change of Context Context-Specific Subset of States Pre-Planning Apply FM Product Configuration Active Product Configuration Figure 6.5:Context-Aware DSPL
Multiple configuration states may satisfy the requirements imposed by one con- textual situation C+. Thus, a subset of states S ⊆S may be suitable for a contextual situation C+.
A change in the contextual situation of a device, therefore, may be satisfiable by a set of states S ⊆S. In this regard, a transition may be executed from a currently
R esour ce C onstraint R untime A d apt a tion
active state s ∈ S to one of the states s ∈ S that satisfy the requirements of the emerging contextual situation, as depicted on the right-hand side in Figure6.5.
Example 6.2 (Context Specific State Space).
The contextOfficerequires anInfrastructure-based communication and some possibility to execute a Phone Call. Additionally, the Game Hub is excluded from the set of suitable states that satisfyOffice. The context Officeis satisfi- able by a set of 24 states.
In contrast to the state depicted in6.3, which illustrates a configuration state for a standard DSPL, the state of a context-aware DSPL contains the configu- ration of the software features as well as of the contextual features. Figure 6.6 depicts a context-aware state for the Nexus DSPL, indicating an extract of the complete configuration for the contextual situation {Office}.
VoIP = t BGP = t Navigation = f Game Hub = t Car = f Office = t ... Concert = f Sensors = f ...
Figure 6.6:Configuration State for the ContextOffice
The contextual situation consisting of the contextsSlow NetworkandOffice results in the intersecting subset of states that satisfy both states, consisting of six states. A combination of the contexts Office andConcertresults in an empty set of suitable configuration states. Both contexts exclude each other, since Concert(implicitly) requires an Ad Hoc-based communication instead of anInfrastructure-based communication.
Thus, the state space may contain multiple states that satisfy a contextual situation or even states that are incompatible to any possible contextual situation. Hence, there are states in the state space, which are expendable. Therefore, a criterion to minimize the state space w.r.t. the requirements imposed by a contextual situation is discussed in the next section.