method vfunc f =
let my_kf = Extlib.the self#current_kf in
let vi = Kernel_function.get_vi my_kf in
let spec = Kernel_function.get_spec my_kf in
let loc = Kernel_function.get_location my_kf in
let fct_name = Kernel_function.get_name my_kf in
begin
match kind_of_func vi with
| Pre_func _ | Post_func _ ->
Aorai_option.fatal
"functions managing automaton's state are not supposed to have a body"
| Not_auto_func ->
let bhvs = mk_post my_kf in
let auto_state_pre = Data_for_aorai.get_func_pre fct_name in
let requires =
Aorai_utils.force_transition
loc my_kf Promelaast.Call auto_state_pre
in
let bhvs =
match Cil.find_default_behavior spec with
Some b ->
b.b_requires <- requires @ b.b_requires; bhvs
| None ->
let bhv = Cil.mk_behavior ~requires () in
bhv::bhvs
in
spec.spec_behavior <- bhvs @ spec.spec_behavior
end;
let after f = update_assigns f.svar.vdecl spec; f in
ChangeDoChildrenPost(f,after)