let do_compute
    (goals : Wpo.t Bag.t ref)
    (computer : CfgProof.computer)
    fun_iter assigns behaviors property call_stmt_opt
    =
  let do_kf kf =
    !Db.progress () ;
    let annots = match behaviors, property with
      | [], None ->
          let s = match call_stmt_opt with
            | Some stmt -> WpAnnot.get_call_pre_strategies stmt
            | None -> 
                if Wp_parameters.Froms.get () 
                then  WpFroms.get_strategies_for_froms kf
                else WpAnnot.get_function_strategies ~assigns kf
          in s
      | (_ :: _) as bhvs, None ->
        WpAnnot.get_behavior_strategies ~assigns kf bhvs
      | _, Some (IdProp p) ->
        WpAnnot.get_id_prop_strategies ~assigns p
      | _, Some (NamedProp p) ->
        WpAnnot.get_prop_strategies ~assigns kf (behaviors, p)
    in
    if Wp_parameters.Dot.get () then dot_lannots annots;
    computer#add annots
  in
  begin
    fun_iter do_kf ;
    goals := Bag.concat !goals (Bag.list computer#compute) ;
  end