method private queue_assertion assertion_list =
match assertion_list with
| [] -> ()
| _ ->
let stmt = Extlib.the self#current_stmt in
let kf = Extlib.the self#current_kf in
let already_posted_assertions =
try
HStmt.find assertion_table stmt
with Not_found -> []
in
let pruned_assertion_list =
List.rev
(List.fold_left
(fun acc (assertion, status_opt) ->
if not (List.exists
(fun p ->
Logic_utils.is_same_predicate
p assertion.content)
already_posted_assertions)
then (assertion, status_opt) :: acc
else acc)
[]
assertion_list)
in
let loc_add_assertion assertion assertion_status_opt =
let rte_named_assertion =
{ content = assertion.content ;
loc = assertion.loc ; name = [ rte_prefix ] }
in
let annot =
Logic_const.new_code_annotation (AAssert ([], rte_named_assertion))
in
Annotations.add kf stmt [ rte_dep_state ] (User annot);
let ip = Property.ip_of_code_annot kf stmt annot in
List.iter(fun x -> emit_status x assertion_status_opt) ip
in
HStmt.replace assertion_table stmt
(List.rev_append
(List.rev_map (fun (a,_) -> a.content) pruned_assertion_list)
already_posted_assertions);
Queue.add
(fun () ->
List.iter
(fun (assertion, assertion_status_opt) ->
loc_add_assertion assertion assertion_status_opt)
pruned_assertion_list)
self#get_filling_actions