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 ->
acc
| Some b ->
let _ = get_variant spec in
let _ = get_terminates spec in
let p_acc, e_acc =
add_stmt_spec_postcond config s l_post b Agoal acc in
let p_acc =
add_bhv_assigns config Agoal ki p_acc Assigns_Stmt b
in (p_acc, e_acc)
end
| _ ->
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)