let add_stmt_spec_after config s l_post spec acc =
  let ki = (Kstmt s) in
  match config.cur_bhv with
  | StmtBhv (_n, cur_s, _cur_bhv) when s.sid = cur_s.sid ->
      begin match get_behav config ki spec.spec_behavior with
        | None -> (* in some cases, it seems that we can have several spec
                     for the same statement -> not an error *)

            acc
        | Some b ->
            let _ = get_variant spec in (* TODO *)
            let _ = get_terminates spec in (* TODO *)
            let p_acc, e_acc =
              add_stmt_spec_postcond config s l_post b Agoal acc in
            let p_acc = (* TODO: check that assigns are for post only *)
              add_bhv_assigns config Agoal ki p_acc Assigns_Stmt b
            in (p_acc, e_acc)
      end
  | _ -> (* in all other cases, use the specification as hypothesis *)
      let add_bhv_post acc b =
        add_stmt_spec_postcond  config s l_post b Ahyp acc
      in
      let p_acc, e_acc = List.fold_left add_bhv_post acc spec.spec_behavior in
      let p_acc = add_spec_assigns_as_hyp config ki p_acc spec in
        (p_acc, e_acc)