let doEdge s succ d =
    let kinstr = Kstmt s in
    (* Check if there are some after-annotations to verify *)
    let annots_after, specs =
      Annotations.single_fold_stmt
        (fun annot (annot_after,spec as acc) ->
          match annot with
          | Before
              (User { annot_content = AStmtSpec spec' }
              | AI (_,{annot_content = AStmtSpec spec' }) )
            ->
              let spec = match spec with
              | None -> spec'
              | Some s -> Logic_utils.merge_funspec s spec'; s
              in
              (annot_after, Some spec)
          | After
              (User { annot_content = AStmtSpec _spec' }
              | AI (_,{annot_content = AStmtSpec _spec' }) ) ->
              CilE.warn_once
                "Ignoring statement contract rooted after statement";
                acc
          | After (AI (_, a) | User a) -> a :: annot_after, spec
          | Before _ -> acc)
        s
        ([], None)
    in
    CilE.start_stmt kinstr;
    List.iter
      (fun annot -> d.value := interp_annot !(d.value) s annot)
      annots_after;
    ( match specs with
      Some spec ->
        let init_state = 
          Current_table.find_superposition current_table kinstr 
        in
        d.value :=
          check_postconditions
            (current_kf())
            kinstr
            ~result:None
            ~slevel
            "statement"
            (State_imp.to_set init_state)
            !(d.value)
            Normal
            spec.spec_behavior
    | None -> ());
    CilE.end_stmt ();
    let d =
      match AnalysisParam.blocks_closed_by_edge s succ with
        [] -> d
      | closed_blocks ->
          CilE.start_stmt kinstr;
          let block_top_addresses_of_locals =
            block_top_addresses_of_locals closed_blocks
          in
          let d = copy d in
          d.value :=
            State_set.fold
              (fun state set ->
                let state =
                  Relations_type.Model.uninitialize_locals closed_blocks state
                in
                State_set.add (block_top_addresses_of_locals state) set)
              !(d.value) State_set.empty;
          CilE.end_stmt ();
          d
    in
    d