method vterm t =
match t.term_node with
| Tat (t, l) ->
let old_label = self#change_label l in
let new_t = {t with term_node = Ttypeof t} in
Cil.ChangeDoChildrenPost (new_t, self#restore_term old_label)
| TAddrOf (h, _) | TLval (h, _) | TStartOf (h, _) ->
let old_label = current_label in
let at_label = match h with
| TResult _ -> Some Logic_const.post_label
| _ -> old_label
in
current_label <- None;
let post t =
current_label <- old_label;
match at_label with
| Some label -> {t with term_node = Tat (t, label)}
| None -> t
in Cil.ChangeDoChildrenPost (t, post)
| Tapp _ ->
let post = function
| {term_node=Tapp(predicate,labels,args)} as t ->
let new_labels =
List.map
(fun (logic_lab, stmt_lab) -> logic_lab, label_map stmt_lab)
labels
in { t with term_node=Tapp(predicate,new_labels,args) }
| _ -> assert false
in
Cil.ChangeDoChildrenPost (t,post)
| _ -> Cil.DoChildren