let rec exp_substitution (e:exp) (removel:string list) (addl:Cil_types.exp_node list) =
{
eloc = e.eloc;
eid = e.eid;
enode = exp_node_substitution e.enode removel addl ;
}
and exp_node_substitution (exp:exp_node) (removel:string list) (addl:Cil_types.exp_node list) =
match exp with
| Const _ as t -> t
| Lval _ as t -> lval_substitution t removel addl
| SizeOf _
| SizeOfE _
| SizeOfStr _ as t -> t
| AlignOf _
| AlignOfE _ as t -> t
| UnOp (op,exp,typ) -> UnOp (op , exp_substitution exp removel addl , typ)
| BinOp (op, exp1,exp2,typ) -> BinOp (op,
exp_substitution exp1 removel addl,
exp_substitution exp2 removel addl,
typ)
| CastE (typ,exp) -> CastE (typ,exp_substitution exp removel addl)
| AddrOf _ as t -> t
| StartOf _ as t -> t
| Info (exp,exp_info) -> Info (exp_substitution exp removel addl,exp_info)