| Input: : Fragment, a tag indicating the type of fragment |
| |
| Output: |
| 1: While ! End Offragment do // end of current fragment |
| 2: ; // Read the next element |
| in the fragment |
| 3: if then // Termination condition |
| 4: ; |
| 5: return |
| 6: end if |
| 7: case: // is a message element |
| 8: InsertAtPos; |
| 9: x = GetNextElement(); |
| 10: while do |
| 11: InsertAtPos; |
| 12: x = GetNextElement(); |
| 13: end while |
| 14: if then |
| 15: unread(x); break; |
| 16: end if |
| 17: // Create a block |
| node, with block of messages in partial order ; |
| 18: ConnectEdge; // Edge from |
| to the next node |
| 19: ; |
| 20: end case; |
| 21: case: // is a loop fragment |
| 22: |
| // Create decision node with predicate |
| in ; |
| 23: ConnectEdge; |
| 24: ; |
| 25: ConnectEdge; // Create back edge |
| 26: ; // Out edge |
| from decision node |
| 27: end case; |
| 28: case: // is an opt fragment |
| 29: |
| // Create decision node with predicate |
| in ; |
| 30: ConnectEdge; |
| 31: ; |
| 32: ; |
| 33: ConnectEdge; |
| 34: ConnectEdge; |
| 35: ; |
| 36: end case; |
| 37: case: // is a break fragment |
| 38: |
| // Create decision node with predicate |
| in ; |
| 39: ConnectEdge; |
| 40: ; |
| 41: ; |
| 42: ConnectEdge; |
| 43: ; |
| 44: end case; |
| 45: case: // is an alt fragment |
| 46: // |
| Create decision node with multioperands; |
| 47: ConnectEdge; |
| 48: ; |
| 49: for |
| 50: ; |
| 51: ; |
| 52: ConnectEdge; |
| 53: end for |
| 54: ; |
| 55: end case; |
| 56: case: // is a par fragment |
| 57: //Create fork |
| node; |
| 58: ConnectEdge; |
| 59: ; |
| 60: for |
| 61: ; |
| 62: ConnectEdge; |
| 63: end for |
| 64: ; |
| 65: end case; |
| 66: end while |
| 67: exitNode = curNode; |
| 68: return |
| Function ProcessFragment |