let cur_graph () : graph = 
  match !solverstate with 
    | (Single x)::xs -> x
    | _ -> raise WrongState