let conflicting_from_trace s trace =
let all_procs = procs_on_trace trace in
let rec forward_rec acc ls trace = match trace with
| [] -> acc
| (tr, procs, _) :: rest_trace ->
let sigma = List.combine tr.tr_args procs in
let itr = instance_of_transition tr all_procs [] sigma in
let nls, acc =
List.fold_left (fun (nls, acc) (sa, args) ->
List.fold_left (fun (nls, acc) (nsa, nargs) ->
(nsa, nargs) :: nls, nsa :: acc
) (nls, acc) (post_inst sa args all_procs itr)
) ([], acc) ls
in
forward_rec acc nls rest_trace
in
forward_rec [] (mkinits all_procs s) trace