Research Article

An Approach for Composing Services Based on Environment Ontology

Algorithm 5

Decomposition algorithm based on the structure of the .
DecByHsmStr(Req, ReqSet) // input Req, which can be represented by a Tree-like hierarchal state machine(thsm), output ReqSet
(1) rootfsm:= GetRootfsm(Req);
(2) for(each subhsm of rootfsm)//subhsm.rootfsm.superstate rootfsm
(3)  ReqSet:= ReqSet create(subhsm, Req);
(4) end for
(5) ReqSet:= ReqSet create(rootfsm, Req);