let pop_state () = try ignore (Stack.pop state_stack) with Stack.Empty -> ()