let unique_initial_trans root =
let (_,tr) = Data_for_aorai.getAutomata () in
let res =
List.fold_left
(fun acc tr ->
if tr.start.Promelaast.init = Bool3.True then begin
match acc, isCrossableAtInit tr root with
| _, false -> acc
| Some(false,_),_ -> acc
(* once we decide that there could be two transitions active,
stay that way. *)
| Some(true,idx), true -> Some(false,idx)
(* we already have one transition that might be active. If we find
another, we don't have unicity. *)
| None, true -> Some(true,tr.numt)
(* All transitions seen so far were not active, we have found one
that is (or might be). just take it.
*)
end else acc
)
None
tr
in
match res with
None -> None
| Some(false,_) -> None
| Some(true,idx) -> Some idx