Converts a substitution, in the form of a Map from variable names to Terms, to a String. @param varnames_to_Terms A Map from variable names to Terms. @return String A String representation of the variable bindings
(Map<String, Term> varnames_to_Terms)
| 60 | * @return String A String representation of the variable bindings |
| 61 | */ |
| 62 | public static String subsToString(Map<String, Term> varnames_to_Terms) { |
| 63 | if (varnames_to_Terms == null) { |
| 64 | return "[no solution]"; |
| 65 | } else { |
| 66 | Iterator<String> varnames = varnames_to_Terms.keySet().iterator(); |
| 67 | String s = "Bindings: "; |
| 68 | while (varnames.hasNext()) { |
| 69 | String varname = varnames.next(); |
| 70 | s += varname + "=" + varnames_to_Terms.get(varname).toString() + "; "; |
| 71 | } |
| 72 | return s; |
| 73 | } |
| 74 | } |
| 75 | |
| 76 | /** |
| 77 | * Converts a substitution, in the form of a Map from variable names to Terms, to a String. |