fix_instance item (Environment.find item e)
with Not_found -> [])
in
+
+ (* items with 1 choice are interpreted ASAP *)
+ let aliases, todo_dom =
+ let rec aux (aliases,acc) = function
+ | [] -> aliases, acc
+ | (Node (_, item,extra) as node) :: tl ->
+ let tl = tl @ extra in
+ let choices = lookup_choices item in
+ if List.length choices <> 1 then aux (aliases, acc@[node]) tl
+ else if Environment.mem item aliases then aux (aliases, acc) tl
+ else aux (Environment.add item (List.hd choices) aliases, acc) tl
+ in
+ aux (aliases,[]) todo_dom
+ in
+
(*
(* <benchmark> *)
let _ =