let select n =
let curalternatives = match !solverstate with
| (Alternatives gl)::xs -> gl
| _ -> raise WrongState in
let desired_graph = try List.nth curalternatives n with _ -> raise BadSelectIndex in
replace_context desired_graph