@Test public void testVariableAssignmentToString() { TreeMap<String, Vertex> assignment = new TreeMap<>(); assertEquals(" { }", FirstOrderFormula.variableAssignmentToString(assignment)); assignment.put("x", createVertex("0")); assertEquals(" { x↦0 }", FirstOrderFormula.variableAssignmentToString(assignment)); assignment.put("y", createVertex("1")); assertEquals(" { x↦0, y↦1 }", FirstOrderFormula.variableAssignmentToString(assignment)); assignment.put("z", createVertex("2")); assertEquals(" { x↦0, y↦1, z↦2 }", FirstOrderFormula.variableAssignmentToString(assignment)); }
public static String variableAssignmentToString(Map<String, Vertex> assignment) { if (assignment.isEmpty()) return " { }"; return " { " + assignment.entrySet().stream() .map((e) -> e.getKey() + "↦" + e.getValue().id) .collect(Collectors.joining(", ")) + " }"; }
FirstOrderFormula { public static String variableAssignmentToString(Map<String, Vertex> assignment) { if (assignment.isEmpty()) return " { }"; return " { " + assignment.entrySet().stream() .map((e) -> e.getKey() + "↦" + e.getValue().id) .collect(Collectors.joining(", ")) + " }"; } }
FirstOrderFormula { public static String variableAssignmentToString(Map<String, Vertex> assignment) { if (assignment.isEmpty()) return " { }"; return " { " + assignment.entrySet().stream() .map((e) -> e.getKey() + "↦" + e.getValue().id) .collect(Collectors.joining(", ")) + " }"; }  }
FirstOrderFormula { public static String variableAssignmentToString(Map<String, Vertex> assignment) { if (assignment.isEmpty()) return " { }"; return " { " + assignment.entrySet().stream() .map((e) -> e.getKey() + "↦" + e.getValue().id) .collect(Collectors.joining(", ")) + " }"; }  abstract Subformula evaluateProver(Structure s,
        HashMap<String, Vertex> varassign, ProgressHandler onprogress); abstract GameGraphResult constructGameGraph(Structure s,
        HashMap<String, Vertex> varassign, FiniteGame game,
        Vector2D coor); abstract Set<String> variables(); abstract String substitute(HashMap<String, String> replace); abstract boolean evaluate(Structure s,
        HashMap<String, Vertex> varassign, ProgressHandler onprogress); static String variableAssignmentToString(Map<String, Vertex> assignment); @Override String toString(); abstract String toString(FormulaPosition pos, FormulaEndPosition endPos); }
FirstOrderFormula { public static String variableAssignmentToString(Map<String, Vertex> assignment) { if (assignment.isEmpty()) return " { }"; return " { " + assignment.entrySet().stream() .map((e) -> e.getKey() + "↦" + e.getValue().id) .collect(Collectors.joining(", ")) + " }"; }  abstract Subformula evaluateProver(Structure s,
        HashMap<String, Vertex> varassign, ProgressHandler onprogress); abstract GameGraphResult constructGameGraph(Structure s,
        HashMap<String, Vertex> varassign, FiniteGame game,
        Vector2D coor); abstract Set<String> variables(); abstract String substitute(HashMap<String, String> replace); abstract boolean evaluate(Structure s,
        HashMap<String, Vertex> varassign, ProgressHandler onprogress); static String variableAssignmentToString(Map<String, Vertex> assignment); @Override String toString(); abstract String toString(FormulaPosition pos, FormulaEndPosition endPos);  }