let add_code_annot before_after s asked_bh a (acc_before,acc_after as acc) = 
  match a with
  | User ca | AI (_,ca) ->
      match ca.annot_content with
        | AAssert (b_list,p,_) -> 
            if test_behav asked_bh b_list then
              if before_after then
                add_annot before_after s ca.annot_id p acc_before, acc_after
              else acc_before, add_annot before_after s ca.annot_id p acc_after
            else acc
        | AInvariant _ -> (* handled in 'get_loop_invariant' *) acc
        | AAssigns _ -> (* handled in 'get_loop_assigns *) acc
        | APragma _ | AVariant _ -> 
            Wp_parameters.warning "ignored annotation : %a"
              !Ast_printer.d_code_annotation ca;
            acc
        | AStmtSpec _ -> assert false