Research Article
Compositional Mining of Multiple Object API Protocols through State Abstraction
Algorithm 3
The algorithm to find the same state in corresponding typestates for a state in the state change of interaction annotations.
Input: state in a state change, typestates for every concerning type | Output: state with the same field-value label as | (1) take of that is the type associated with | (2) if is a concrete class then | (3) foreach do | (4) if has the same field-value label as then | (5) | (6) break | (7) endif | (8) endfor | (9) else | (10) take the object associated with | (11) find the typstate part of extracted from o | (12) foreach do | (13) if has the same field-value label as then | (14) | (15) break | (16) endif | (17) endfor | (18) return |
|