let get_internal =
Internals.memo
(fun kf ->
!Value.compute ();
match kf.fundec with
| Definition (f,_) ->
(try
Stack.iter
(fun g -> if kf == g then begin
Cil.warn
"recursive call detected during input analysis of %a. Ignoring it is safe if the value analysis suceeded without problem."
Kernel_function.pretty_name kf;
raise Ignore
end
)
call_stack;
Stack.push kf call_stack;
let computer = new do_it in
ignore (visitCilFunction (computer:>cilVisitor) f);
let _ = Stack.pop call_stack in
computer#result
with Ignore ->
Zone.bottom)
| Declaration (_,_,_,_) ->
let state = Value.get_initial_state kf in
let behaviors = !Value.valid_behaviors kf state in
let assigns = Ast_info.merge_assigns behaviors in
!Value.assigns_to_zone_inputs_state state assigns)