protected String dotnodeparams = new String();
boolean merge=false;
String nodeoption="";
+ private int uid;
+ private static int nodeid=0;
private final HashSet flagstate;
private final ClassDescriptor cd;
public FlagState(ClassDescriptor cd) {
this.flagstate=new HashSet();
this.cd=cd;
+ this.uid=FlagState.nodeid++;
}
private FlagState(HashSet flagstate, ClassDescriptor cd) {
this.flagstate=flagstate;
this.cd=cd;
+ this.uid=FlagState.nodeid++;
}
public boolean get(FlagDescriptor fd) {
}
public String getLabel() {
- return getTextLabel();
+ return "N"+uid;
}
public String getTextLabel() {
}
private void traverse() {
- Set cycleset=FlagState.findcycles(nodes);
-
Iterator i = nodes.iterator();
while (i.hasNext()) {
FlagState gn = (FlagState) i.next();
File dotfile= new File("graph"+cd.getSymbol()+".dot");
- /*FileOutputStream dotstream=new FileOutputStream(dotfile,true);
+ FileOutputStream dotstream=new FileOutputStream(dotfile,true);
FlagState.DOTVisitor.visit(dotstream,((Hashtable)flagstates.get(cd)).values());
- */
-
- FileWriter dotwriter=new FileWriter(dotfile,true);
-
- dotwriter.write("digraph G{ \n");
- dotwriter.write("center=true;\norientation=landscape;\n");
-
- //***debug***
- FlagDescriptor[] flg=(FlagDescriptor [])flags.get(cd);
- for(int i = 0; i < flg.length ; i++)
- {
- dotwriter.write(flg[i].toString()+"\n");
- }
-
- //*** debug***
- Iterator it_sourcenodes=((Hashtable)flagstates.get(cd)).values().iterator();
- while(it_sourcenodes.hasNext()) {
- FlagState fsv = (FlagState)(it_sourcenodes.next());
- System.out.println(fsv.toString());
-
- for(Iterator it_edges=fsv.edges();it_edges.hasNext();) {
- Edge tonode=(Edge)it_edges.next();
- dotwriter.write(fsv.toString(flg)+" -> "+tonode.getTarget().toString(flg)+"[label=\""+tonode.getLabel()+"\"];\n");
- }
-
- }
- dotwriter.write("}\n");
- dotwriter.flush();
- dotwriter.close();
- }
+ }
private String getTaskName(TaskDescriptor td) {