| Algorithm 3 Selecting a Similar Set Based on Vertical Position |
|
Input: States s Output: Similar set of s 1: Create 2 empty stack: , 2: while do 3: a is the action that pops from the head of state s 4: if then 5: Push a to 6: else if then 7: if then 8: Pop an element from 9: end if 10: else if then 11: Clear 12: else if then 13: Push a to and clear 14: end if 15: end while 16: Measure the length of the and and mark them as and respectively 17: 18: 19: while do 20: Select from 21: Calculate and by executing Line 1 to Line 16 with 22: if and then 23: 24: 25: else 26: 27: end if 28: end while 29: Return |