What is (pseudocode) an algorithm for checking the invariant over Kripke structures, so that in case of violation of the invariant, the counter example returned by the algorithm has a minimum length?
You haven't provided enough details in the question, but if I had to guess I would say you are looking for Breadth First Search .