HashSet superset=new HashSet();
superset.addAll(conjunctions);
- superset.addAll(abstractrepair);
+ //superset.addAll(abstractrepair);
//superset.addAll(updatenodes);
//superset.addAll(scopenodes);
//superset.addAll(consequencenodes);
- //GraphNode.computeclosure(superset);
+ GraphNode.computeclosure(superset);
try {
GraphNode.DOTVisitor.visit(new FileOutputStream("graph.dot"),superset);
} catch (Exception e) {
e.printStackTrace();
System.exit(-1);
}
+ for(Iterator it=updatenodes.iterator();it.hasNext();) {
+ GraphNode gn=(GraphNode)it.next();
+ TermNode tn=(TermNode)gn.getOwner();
+ MultUpdateNode mun=tn.getUpdate();
+ System.out.println(gn.getTextLabel());
+ System.out.println(mun.toString());
+ }
}
void generateconjunctionnodes() {
for(int j=0;j<array.length;j++) {
AbstractRepair ar=new AbstractRepair(dp,array[j],d);
TermNode tn2=new TermNode(ar);
- GraphNode gn2=new GraphNode(gn.getLabel()+"A"+i+"B"+ar.type(),tn2);
+ GraphNode gn2=new GraphNode(gn.getLabel()+"A"+i+"B"+ar.type(),gn.getTextLabel()+" #"+i+" "+ar.type(),tn2);
GraphNode.Edge e=new GraphNode.Edge("abstract",gn2);
gn.addEdge(e);
abstractrepair.add(gn2);
continue;
}
}
-
+ if (!un.checkupdates()) /* Make sure we have a good update */
+ continue;
+
mun.addUpdate(un);
GraphNode.Edge e=new GraphNode.Edge("abstract"+compensationcount,gn2);
goodflag=false;break;
}
}
+ if (!un.checkupdates()) {
+ goodflag=false;
+ break;
+ }
mun.addUpdate(un);
}
if (goodflag) {
GraphNode gn2=new GraphNode("UpdateAdd"+addtocount,tn);
if (processquantifers(gn2,un, r)&&debugdd()&&
- processconjunction(un,ruleconj)) {
+ processconjunction(un,ruleconj)&&
+ un.checkupdates()) {
//System.out.println("Attempting to generate add to set #5");
mun.addUpdate(un);
GraphNode.Edge e=new GraphNode.Edge("abstract"+addtocount,gn2);