method vterm t =
let preaction_term t =
match t.term_node with
| Tapp(callee,labels,args) ->
let args = List.map (fun arg ->
(* Type of [arg] has not been changed. *)
match arg.term_type with
| Ltype _ | Lvar _ | Linteger | Lreal | Larrow _ -> arg
| Ctype ty ->
if isStructOrUnionType ty then
match arg.term_node with
| TLval lv ->
(* Arguments translated under address here may
* be translated back to dereference when treating
* left-values. This is why we add a normalization
* in [postaction_term]. *)
{
arg with
term_node = TAddrOf lv;
term_type = Ctype(mkTRef ty);
}
| _ -> assert false (* Should not be possible *)
else arg
) args in
{ t with term_node = Tapp(callee,labels,args); }
| _ -> t
in
(* Renormalize the term tree. *)
let postaction_term t =
match t.term_node with
| TAddrOf(TMem t,TNoOffset) -> t
| _ -> t
in
ChangeDoChildrenPost (preaction_term t, postaction_term)