| Input: : The input graph |
| : The current node to be inspected |
| Output: : The trailer node |
| 1: // Takes |
| care of nested regions |
| 2: if then |
| 3: // Do |
| the composition following composition rules |
| 4: // Update with CCG at |
| 5: else // Indicates a nested region is found |
| 6: // is the entry node |
| 7: |
| 8: |
| // recursively repeat the composition |
| 9: end if |
| 10: return |
| Function ComposeRegion(G, RegionFound) |