Research Article

Service-Oriented Synthesis of Distributed and Concurrent Protocol Specifications

Algorithm 3

Partitioning procedure.
Procedure:Partition_Parallel_Paths
Inputs: A PE-SPEC and an image of a fork state s in the PE-SPEC model.
Outputs: Groups of parallel pathspartitioned at state s and a set of sub-paths of each path in a group.
Steps:
(1) G1=G2={},
(2) for each transition t outgoing from state sdo
(2.1) ift, which is the first transition in an image of a parallel path p, is associated
with a service primitive thenG1=G1pelseG2=G2p,
(3) for each path p in G2do
(3.1) SUBp={}{set of sub-paths of p},
(3.2) s0=s,
(3.3) while (s0 is not a joint or free state) do
     (3.3.1) s1=successive(s0)p,
     (3.3.2) while (s1 is not a joint or free state and the outgoing transition from s1 is not
  associated with a receiving event) do
 (3.3.2.1) s1=successive(s1)p,
     (3.3.3) SUBp=SUBp subpath of p from s0 to s1,
     (3.3.4) s0=s1.