let add_called_pre config called_kf s spec =
debug "[add_called_pre] for %a@."
Kernel_function.pretty called_kf;
let add_behav acc b =
let assumes = (Ast_info.behavior_assumes b) in
let add_pre acc pre =
let id = mk_call_pre_id called_kf b s pre in
let kind = WpStrategy.AcallPre (goal_to_select config id) in
WpStrategy.add_prop_call_pre acc kind id ~assumes pre
in List.fold_left add_pre acc b.b_requires
in
let acc =
List.fold_left add_behav WpStrategy.empty_acc spec.spec_behavior
in
if acc = WpStrategy.empty_acc then
debug "no called precond for %a@."
Kernel_function.pretty called_kf;
acc