Skip to content
Snippets Groups Projects
Commit 8a67736b authored by William Schultz's avatar William Schultz Committed by Markus Alexander Kuppe
Browse files

Try out pushing changed vars closer to node

parent 237e9131
Branches
Tags
No related merge requests found
...@@ -142,24 +142,31 @@ public class DotStateWriter extends StateWriter { ...@@ -142,24 +142,31 @@ public class DotStateWriter extends StateWriter {
} }
this.writer.append("</tr>"); this.writer.append("</tr>");
this.writer.append("<tr>"); // this.writer.append("<tr>");
// Print names of variables that changed in this transition. // Print names of variables that changed in this transition.
this.writer.append("<td bgcolor='white'><font color='#222222' point-size='9'>"); // this.writer.append("<td bgcolor='white'><font color='#222222' point-size='9'>");
// this.writer.append("("); // this.writer.append("(");
HashMap<UniqueString, Value> diffMap = state.diff(successor); HashMap<UniqueString, Value> diffMap = state.diff(successor);
ArrayList<String> changedVars = new ArrayList<>(); ArrayList<String> changedVars = new ArrayList<>();
for(UniqueString key : diffMap.keySet()) { for(UniqueString key : diffMap.keySet()) {
// changedVars.add(key.toString()); changedVars.add(key.toString());
this.writer.append(key.toString()); // this.writer.append(key.toString());
this.writer.append("<br/>"); // this.writer.append("<br/>");
} }
// this.writer.append(String.join(",", changedVars)); // this.writer.append(String.join("\n", changedVars));
// this.writer.append(")"); // this.writer.append(")");
this.writer.append("</font></td></tr></table>"); // this.writer.append("</font>");
// this.writer.append("</td>");
// this.writer.append("</tr>");
this.writer.append("</table>");
this.writer.append(">"); this.writer.append(">");
this.writer.append(" color=\"" + color +"\"]"); this.writer.append(" color=\"" + color +"\"]");
this.writer.append(" [headlabel=");
this.writer.append("\"" + String.join("\n", changedVars) + "\"");
this.writer.append(" labeldistance=\"4\" fontcolor=\"#333333\" fontsize=\"9\"]");
this.writer.append(";\n"); this.writer.append(";\n");
// If the successor is new, print the state's label. Labels are printed // If the successor is new, print the state's label. Labels are printed
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment