Algorithm 4. Equivalence query EQ(, ).
| Input: a hypothesis and an abstract model |
| Output: a counterexample if ≠ , otherwise null |
| 1: while true do |
| 2: find a word w that separates and |
| 3: if w does not exist then |
| 4: return null |
| 5: end if |
| 6: if .isAccepted(w) = MQ(w) then |
| 7: return w |
| 8: end if |
| 9: refine with (w, MQ(w)) |
| 10: end while |