method find_global_function (v:varinfo) =
(* return a pair (found,spec_or_body) *)
let found:bool ref = ref false in
let spec:bool ref = ref false in
iterGlobals (Ast.get()) (
function glob ->
match glob with
| GFun (s,_) -> (* function with code *)
if (s.svar==v) then found:=true;spec:=false
| GVarDecl (_,s,_) -> (* function w/o code *)
if (s==v) then found:=true;spec:=true
| _ -> ());
(!found,!spec)