let do_wp_passes fun_iter behaviors property call_stmt_opt =
  let model = Wp_parameters.get_model () in
  let goals = ref Bag.empty in
  let wp_pass computer assigns =
    do_compute goals computer fun_iter assigns behaviors property call_stmt_opt
  in
  begin
    match computer model with
      | NonAssigns c ->
          Wp_parameters.warning
            ~current:false ~once:true
            "Ignored Assigns-Goals with '%s' model"
            (Wp_parameters.Model.get ()) ;
          wp_pass c WpAnnot.NoAssigns
      | OneforBoth c ->
          wp_pass c WpAnnot.WithAssigns
      | OneforEach(c1,c2) ->
        match property with
        | None
        | Some
            (NamedProp _ | IdProp(Property.IPOther _ 
                                     | Property.IPBehavior _
                                     | (* [JS 2011/08/05] I put this case here
                                          but not sure of that *)
 
                                         Property.IPUnreachable _))
          ->
          begin
            wp_pass c1 WpAnnot.NoAssigns ;
            wp_pass c2 WpAnnot.OnlyAssigns ;
          end
        | Some(IdProp(Property.IPPredicate _ 
                         | Property.IPAxiom _ | Property.IPLemma _
                         | Property.IPAxiomatic _
                         | Property.IPCodeAnnot _ | Property.IPComplete _
                         | Property.IPDisjoint _ | Property.IPDecrease _ )) ->
          wp_pass c1 WpAnnot.NoAssigns
        | Some (IdProp(Property.IPAssigns _ | Property.IPFrom _)) ->
          wp_pass c2 WpAnnot.OnlyAssigns
  end
  !goals