cleare state transition in comparator, fix soundness and completeness