• Nenhum resultado encontrado

Formal Definition

No documento Nebil Ben Mabrouk (páginas 109-112)

Formally, the task class concept can be defined as follows:

Definition 9 Task Class

Let GT = (V, E, µ) be the graph representing the user task. A task class is a set of graphs G ={G1, ..,Gn} where for each graph Gi = (Vi, Ei, µi) (iœ[1, n]):

1. Gi is isomorphic to GT, or 2. Gi is a subdivision of GT, or

V.6 A Subgraph-Homeomorphism-based Approach to Behavioural Adaptation

3. GT is a subdivision of Gi.

This definition means that the task class concept comprehends abstract compositions which are obtained either by changing the order in which the activities are executed, or by dividing one or more coarse-grained activity into finer-grained activities, or by merging one or more fine-grained activities into coarse-grained activities. The statement number (4) in the task class definition means that the task class may further comprehend abstract compositions which are obtained by simultaneously: (i) dividing one or more coarse-grained activities in the user task into finer-grained activities and (ii) merging one or more fine-grained activities into coarse- grained activities.

6 A Subgraph-Homeomorphism-based Approach to Be- havioural Adaptation

In this section, we explain how to reduce the behavioural adaptation problem to vdSH determination. We start from the assumption that when a failure occurs during the execution of a user taskT, and service adaptation is not feasible, we determine the subgraphGf representing the part of T that is not executed. Then, we attempt to find an alternative behavioural graph (in the same task class as T), which contains a subgraph Ga that is functionally equivalent to Gf, but behaving differently.

By different behaviour we mean having abstract activities with different granularities. Two cases should be considered to this regard. First, the user task is adapted by dividing one or more activities inGf into finer-grained activities, i.e., Gf is a topological minor of Ga. In this case we are interested in determining if there is a vdSH from theGf into Ga.

Second, the user task is adapted by merging one or more activities inGf into coarse-grained activities. In this case we are interested in determining whether Ga is a topological minor of Gf, i.e., there is a vdSH from Ga intoGf.

In order to determine the subgraph Ga, we consider the difference between each graph in the task class and the activities ofT that are already executed. To do so, we use the notion of difference graph defined below.

Definition 10 Difference graph

Given a graph G = (V, E, µ) and a subgraph S = (Vs, Es, µs) of G, the difference of G and S is the subgraph denoted GS and defined by the set of vertices VVs.

Based on the definition of difference graph, we formulate both aforementioned cases of behavioural adaptation as follows:

1. Given a subgraph Ge (representing the executed part of the user task), a subgraph Gf

(representing the non-executed part of the user task) and a graph G, we aim at deter- mining whether Gf / GGe. More generally, given a family of graphs G ={G1, ..,Gn} (representing the task class to whichGe and Gf belong), we aim at determining whether there is a graphGi (1ÆiÆn) such thatGf /GiGe. Solving this problem is equivalent to determine if there exists a vertex disjoint subgraph homeomorphism fromGf into each graphGiGe.

2. Given a subgraph Ge (representing the executed part of the user task), a subgraph Gf

(representing the non-executed part of the user task) and a graph G, we aim at deter- mining whether GGe / Gf. More generally, given a family of graphs G ={G1, ..,Gn} (representing the task class to whichGe and Gf belong), we aim at determining whether there is a graphGi (1ÆiÆn) such thatGiGe /Gf. Solving this problem is equivalent to determine if there exists a vertex disjoint subgraph homeomorphism from each graph GiGe into Gf.

To resolve the aforementioned behavioural adaptation problem, we recall the algorithm for vdSH determination defined in [Xiao et al., 2007]. This algorithm is based on a state-space searching [Nilsson, 1980] and employs heuristics to prune the search space. The basic idea of a space-state search is to divide the mapping process into several states and to define transitions from one state to another. Each state Ê can be associated with a partial mapping solution Mω = (V M, EM), where V M and EM are respectively the set of vertex mapping and the set of edge-path mapping at state Ê. For each state Ê, there is an evaluation function Ï(Ê) which describes the quality of the represented solution. The states are expanding themselves according to the value ofÏ(Ê). In the mapping process, the next state is more complete than the previous one and will probably be a subset of the final mapping.

Nevertheless, as already mentioned in Section 3, the vdSH determination algorithm is not enough to state that two subgraphs (representing two abstract sub-compositions) are functio- nally equivalent. To cope with this issue, we present two main solutions. First, before proceeding to vdSH determination, we add a preliminary step of vertex mapping aiming to verify that both subgraphs (subjects of vdSH determination) cover the same set of functionalities. Second, we introduce a set of extensions to the vdSH determination algorithm. These extensions aim at en- suring that functional semantics are preserved during vdSH determination, consequently during

V.6 A Subgraph-Homeomorphism-based Approach to Behavioural Adaptation

behavioural adaptation.

Next, we detail the preliminary step of vertex mapping (Section 6.1). We use the term vertex mapping to denote the correspondence between two sets of vertices belonging to two subgraphs, and we use the termvertex matching to denote the semantic matching between two single vertices based on their descriptions.

No documento Nebil Ben Mabrouk (páginas 109-112)