let add_pre_post_from_buch file treatloops =
let visitor =
new visit_adding_pre_post_from_buch
(Data_for_aorai.getAutomata())
treatloops
in
Cil.visitCilFile (visitor :> Cil.cilVisitor) file;
(* Transfert previous annotation on the new loop statement.
Variant clause has to be preserved at the end of the annotation.*)
Hashtbl.iter
(fun old_stmt new_stmt ->
Annotations.single_iter_stmt
(fun an -> Annotations.add !new_stmt
[(* Ast.self; Aorai_option.Ltl_File.self;
Aorai_option.Buchi.self;
Aorai_option.Ya.self *) ] an)
!old_stmt;
(* Erasing annotations from old statement *)
Annotations.reset_stmt ?reset:true !old_stmt;
)
post_treatment_loops