(getApp().hashCode() << 1) ^
getValue().hashCode();
}
+
+ public String toString() {
+ return "<"+getAttribute()+", "+getValue()+", "+getApp()+", "+ismanual+">";
+ }
}
static class IndexObject {
return nodes.get(id);
}
+ public void printGraph() {
+ System.out.println("digraph testgraph {");
+ for(Integer i : nodes.keySet()) {
+ Node n = nodes.get(i);
+ System.out.print("N"+i+"[label=\"");
+
+ for(IndexObject io:n.lastUpdates.keySet()) {
+ for(Update u:n.lastUpdates.get(io)) {
+ System.out.print(u.toString().replace("\"", "\\\"")+", ");
+ }
+ }
+ System.out.println("\"];");
+ for(Edge e:n.outEdges) {
+ System.out.print("N"+e.getSrc().getId()+"->N"+e.getDst().getId()+"[label=\"");
+ for(Update u:e.getUpdates()) {
+ System.out.print(u.toString().replace("\"", "\\\"")+", ");
+ }
+ System.out.println("\"];");
+ }
+ }
+
+ System.out.println("}");
+ }
+
@Override
public void stateAdvanced(Search search) {
String theEnd = null;
@Override
public void searchFinished(Search search) {
out.println("----------------------------------- search finished");
+
+ //Comment out the following line to print the explored graph
+ // printGraph();
}
private String getValue(ThreadInfo ti, Instruction inst, byte type) {