let fresh pool x kind =
let x = if Datalib.has_reserved_prefix (x^"_") then
let new_name = "G_"^x in
if Datalib.has_reserved_prefix new_name then
Wp_parameters.fatal
"Reserved prefix for '%s' is clashing. Frama-C WP plugin cannot reserve the prefix 'G'"
new_name
else new_name
else x
in
let vx =
match kind with
| Formula.Model t -> Fol.Var.VarT(x,fresh_var pool x,t,None)
| Formula.Acsl(t,ty) -> Fol.Var.VarT(x,fresh_var pool x,t,Some ty)
in vx