let is_computed_kf kf =
  (* check whether annotations are computed for function kf
     for the selected set of command-line options *)

  match kf.fundec with
    | Declaration _ -> true
    | Definition _ ->
        (* check whether options have changed for function kf *)
        let old_gen_opts = StateManager.find_current_gen_options kf
        and new_gen_opts = Parameter_map.gen_from_command_line_options ()
        and old_other_opts = StateManager.find_current_other_options kf
        and new_other_opts = Parameter_map.other_from_command_line_options ()
        in
          (* case 1: generating options have changed *)
          Parameter_map.compare old_gen_opts new_gen_opts <> 0
        ||
          (* case 2: no generating option has changed, but the user wants to
             generate the same annotations with const folding, warning
             enabled ... *)

          (Parameter_map.is_one_true ~except:None new_gen_opts &&
             Parameter_map.compare old_other_opts new_other_opts <> 0)