Research Article
An Approach for Composing Services Based on Environment Ontology
Algorithm 1
Decomposition algorithm among unrelated environmental entities.
DecByDep(Req, ReqSet) //input Req, output ReqSet | (1) while(Req.Ents ≠ ⌀) | (2) := get (Req.Ents); | (3) if(Relate() ≠ Req.Ents)//Relate() refer to a set include e and the entities depend on | (4) := create (Relate()); //create a set include the elements in Relate() | (5) ReqSet:= ReqSet ∪ create(, Req); //create(, Req) is to acquire a requirement corresponding to the Set | (6) Req:= Req.Remove(); //Removing a requirement corresponding to the Set from Req | (7) end if | (8) end while | (9) ReqSet:= ReqSet ∪ Req; |
|