Method for ensuring safety and liveness rules in a state based design