• No results found

Operation Mapping-based LTS Composition

7.3 LTS Composition

7.3.1 Operation Mapping-based LTS Composition

In the conventional parallel composition, the transitions in the composed LTS are a result of parallel and interleaving transitions of the participating LTSs based on shared and unshared actions, respectively. With similar conception, we define an LTS composition mechanism where the parallel transitions are invoked in the participating service protocols on the basis of the operation correspondences between the request and the offers.

In the given scenario, requester operation mapping comprises possible complex operation correspondences. In correlation to the conventional LTS composition, the operation sequences in these correspondences can be un-derstood as the shared actions of the participating LTSs and can be invoked in parallel in the respective LTSs resulting into a transition in the composed LTS.

Fig.7.5gives a closer insight into our LTS composition mechanism, which performs a parallel composition of all the participating LTSs, i.e., ltsr, lts1o, . . ., ltsko on the basis of the requester operation mapping OpM apr. We use the term overlapping parts for the parts of the participating LTSs that

correspond on the basis of an operation correspondence. This will be later explained in detail with examples. Consequently, our composition mecha-nism aims at composing these overlapping parts of the participating LTSs.

In correlation to the conventional LTS composition, those requested and offered operations that are not part of any operation correspondence are termed as the unshared actions. In our composition mechanism, such un-shared actions are not considered in the composed LTS. This is a salient feature of our composition mechanism called as selective composition strat-egy which only composes selective parts of the participating LTSs where the selection is moderated through the requester LTS. This means that only those parts of the offered LTSs are considered that are relevant for the re-quester, i.e., that overlap with the requested LTS based on the identified operation correspondences. In comparison to a conventionally composed LTS in this case with the unshared actions as well, the selectively composed LTS with the proposed mechanism is smaller in size and hence easier to analyze.

ltsr Parallel Composer

ltsr Parallel Composer

ltsr i=1...kltsoi

O M C d

...

lts1 ltsk

OpMapr Composed

LTS

ltso ltso

Figure 7.5: An Insight into the LTS Composition Mechanism The resulting composed LTS can be formally defined as follows:

Definition 10 (Operation Mapping-based Composed LTS). Given the fol-lowing:

- A request r with operation mapping OpM apr; - The requested LTS ltsr according to Def.9;

- The offered LTSs lts1o, . . ., ltsko according to Def. 9 for the selected offers o1, . . ., ok, respectively.

179

The composed LTS ltscomp = ltsr ki=1,...,kOpM ap

r ltsio. It is a 5-tuple (S, s0, Sf, A, δ) where:

(i) The set of composed states is given as S = r.S × o1.S × . . . ok.S.

Hence, a composed state sc ∈ S ∧ sc = (sr, so1, . . . , sok) where sr ∈ r.S, s1o ∈ o1.S, . . .,sko ∈ ok.S. This means that a composed state is represented as a vector of its comprising states from the participating LTSs;

(ii) The initial state is given as s0∈ S ∧ s0= (r.s0, o1.s0, . . . , ok.s0). This means that the initial state in the composed LTS is a composition of the initial states of all the participating LTSs;

(iii) The set of final states is given as Sf ⊆ S ∧ Sf = r.Sf × o1.S × . . . ok.S. This means that the set of final states in the composed LTS comprises of the states where the requested LTS ltsris in its final state and the offered LTSs lts1o, . . ., ltsko can be in any state;

(iv) The set of possible actions is given as A = seqr||seqo: (seqr, seqo) ∈ OpM apr. This means that the set of possible actions for the composed LTS is based on the requester operation mapping OpM apr. An action is defined as a parallel invocation of the requested and offered operation sequences comprising an operation correspondence in OpM apr.

(v) The transition relation is given as δ = S × A × S. With composed states sic = (sir, sio1, . . . , siok), sjc = (sjr, sjo1, . . . , sjok), and an action a = seqr||seqo, a composed transition sic−→ sa jc is a composition of the parallel transitions δr ⊆ r.δ and δox ⊆ ox.δ : ox∈ {o1, . . . , ok}, where:

- Given seqr = opr1 → . . . → oprn, δr is the sequence of transi-tions sir −−→ sopr1 i+1r , . . . , sj−1r

oprn

−−−→ sjr in ltsr resulting from the invocation of seqr.

- Given seqo = opo1 → . . . → opom, δox is the sequence of transi-tions siox−−→ sopo1 i+1ox , . . . , sj−1ox −−−→ sopom jox in ltsox resulting from the invocation of seqo.

- ∀o ∈ {o1, . . . , ok} \ {ox} : sio= sjo

Similar to Def. 9, the elements of ltscomp can be referred as comp.S, comp.s0, comp.Sf, compo.A, and comp.δ.

Def. 10 specifies the composed LTS resulting from the parallel composi-tion of the participating LTSs based on the requester operacomposi-tion mapping.

We explain this with the help of an example shown in Fig. 7.6(a), which is an excerpt of the composed LTS for our running example. Conforming to (i) in Def. 10, every state in this composed LTS is a composition of the states of the participating LTSs. Similarly, as specified in (ii) in Def.10, cs1 in the composed LTS is the initial state, which is a composition of all the participating initial states. According to (iii) in Def. 10, the composed LTS is in its final state if the requester LTS ltsr is in its final state notifying a possible service composition. This notion of final state and possible service composition will be discussed in more detail in Sec.7.4.

According to Def. 10(iv), the set of possible actions in the composed LTS comprises of the requested and offered operation sequences in an oper-ation correspondence invoked in parallel. Hence, the parallel invocoper-ation of the operation sequences in (hrs.checkAvailability() → hrs.viewDetails() , hotelX.searchRoom()) in their respective LTSs LT Shrs and LT ShotelX forms an action for the composed LTS. The invocation of such an action results in a composed transition in the composed LTS, which is a composi-tion of the parallel transicomposi-tions in the participating LTSs. For instance, the operation sequences mentioned above can be invoked in the participating LTSs from their respective states in cs1. This results in a composed transi-tion from cs1 to cs7. In this case, cs7 represents a composed state, where the participating LTSs, i.e., LT Shrs and LT ShotelX are in their respective states hrs.s3 and hotelX.s2, respectively after the parallel invocation of the operation sequences. The states of the other participating LTSs remain unchanged.

As a result of the parallel invocation of operation sequences, the invoked transitions of LT Shrs and LT ShotelX are shown in Fig.7.6(b). We call these the overlapping parts of the participating LTSs.

Def. 10 defines the structure of the operation mapping-based composed LTS in the given approach. However, an important question in this direc-tion is that how such a composed LTS can be built from scratch for the participating LTSs. For this purpose, a concrete strategy is required and keeping this requirement is mind, we devised an algorithm that gradually builds such a composed LTS for the participating LTSs on the basis of their operation correspondences. In the next section, we present our algorithm to construct the composed LTS conforming to Def. 10. It also provides a more detailed insight into Def.10 based on the running example.

181

(a)  (b) 

s1 ca s2 vd s3

LTShrs

s1

s2 sr

LTShotelX

ca checkAvailability()

vd viewDetails() sr searchRoom()

Figure 7.6: (a)Composed LTS after the first Iteration (b) Overlapping Parts of the participating LTSs