let rec solve_xor_eqns
   unif_nonstd
  (std_ls,xor_eqns,rem_ls,fv,ctr              )
  (var_identif                   : t_partition)
  (vi_ctrs                       : t_vi_ctrs  )
  (std_vars, xor_vars                         )
                                 : t_subst    =

  (* apply the choice of theory to the std substitution std_ls *)
  let std_ls = apply_choice_std var_identif xor_vars std_ls
  in
  (* extract partial order on variables from std_ls *)
  let po = get_po var_identif std_ls
  in

  (* Try to solve xor_eqns with the partial order po.
   * This may raise the exception No_Solution. *)

  let xor_ls = unif_nonstd xor_eqns po std_vars
  in

  (* test, if xor_ls identifies variables that are not allowed to be identified,
   * by vi_ctrs *)

  (if is_allowed_sub vi_ctrs xor_ls then
    (* remove the identification constraints from xor_ls, before combining
     * xor_ls and std_ls *)

    let xor_ls = remove_identif var_identif [] xor_ls
    in

    (* combining the substitutions possibly raises No_Solution, namely
     * if the negative constraints ctr do not allow this substitution. *)

    let combined_sub = combine_subs std_ls xor_ls rem_ls fv ctr in

    combined_sub
  else
    (* The solution we get from unif_nonstd identifies variables, that are not
     * allowed to be identified. This means, that we would get this solution
     * also somewhere else. So, this variable identification is invalid. *)

    raise Invalid_Var_Identif
  )