let pp_logic_label fmt label =
let name = match label with
| LogicLabel (_,l) -> l
| StmtLabel {contents=stmt} ->
let rec pickLabel = function
| [] -> Printf.sprintf "__unknown_label_%d" stmt.sid
| Label (l, _, _) :: _ -> l
| _ :: rest -> pickLabel rest
in pickLabel stmt.labels
in Format.pp_print_string fmt name