Research Article
Semantic-Based Requirements Content Management for Cloud Software
Algorithm 1
Breadth-first search algorithm for association relation.
Input: instance , | Output: association path between , | Algorithm Description: | (1) Flag = 0; | /Flag is a flag for existing association path / | (2) = null; | /Queue Q is an abstract data in which items are entered at one end and remove for the other end (FIFO), | inque, deque are names used for insertion operation and deletion operation respectively./ | (3) = class(), = class(); | /Get concept class , from instance , , i.e., , ; / | (4) Get indirect concept path from meta-modeling frame, | find corresponding association path from to | where , ,…, | (5) .inque(); | (6) While (!Flag) | = .deque(); | expand(); | /Expansion rule: , if concept , has association relation , | then can be expanded as: expand() = / | if | Flag = 1; return indirect association path. | else if | foreach | .inque(); // add to queue | | | (7) Return null. |
|