let p_fresh pool x kind =
let x =
if Fol_decl.has_reserved_prefix (x^"_") then
let new_name = "G_"^x in
if Fol_decl.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 =
let tau, ltype = match kind with
| Formula.Model t -> t, None
| Formula.Acsl(t,ty) -> t, Some (ty)
in Fol.Var.mk x (fresh_var pool x) tau ltype
in vx