Removing various deprecated pieces of code...Fixed some fault checks in AbstractIntef...
[repair.git] / Repair / RepairCompiler / MCC / IR / DependencyBuilder.java
index 3c26256491e48c9cecfb131378af4e749c5e16ae..4184851ff898c430b870550f208d92a6d12ee24f 100755 (executable)
@@ -14,8 +14,7 @@ public class DependencyBuilder {
     }
 
     public void calculate() {
-                     
-        /* reinitialize (clear) nodes */
+       /* reinitialize (clear) nodes */
         constraintnodes = new Hashtable();
         rulenodes = new Hashtable();
 
@@ -33,6 +32,8 @@ public class DependencyBuilder {
             Iterator targets = inclusion.getTargetDescriptors().iterator();
             String additionallabel = new String();
 
+            /* #ATTN#: is this meant to be while, not if? */
+            /* perhaps there is only one descriptor for targets */
             if (targets.hasNext()) {
                 Descriptor d = (Descriptor)targets.next();
                 additionallabel = "\\n" + d.getSymbol();
@@ -77,7 +78,7 @@ public class DependencyBuilder {
                         otherrulenode.addEdge(new GraphNode.Edge(d.getSymbol(), rulenode));
                     }
                 }
-            }           
+            }
         }
 
         /* build constraint->rule dependencies */
@@ -107,77 +108,12 @@ public class DependencyBuilder {
                         edge.setDotNodeParameters("style=dotted");
                         otherrulenode.addEdge(edge);
                     }
-                }               
-            }           
+                }
+            }
         }
 
         /* store results in state */
         state.rulenodes = rulenodes;
         state.constraintnodes = constraintnodes;
     }
-
-    static class IntegerLattice {
-
-        boolean top;
-        boolean isNum;
-        int num;
-
-        public static final IntegerLattice TOP = new IntegerLattice(true);
-        public static final IntegerLattice BOT = new IntegerLattice(false);
-
-        private IntegerLattice(boolean top) {
-            this.top = top;
-            isNum = false;
-        }
-
-        public IntegerLattice(int num) {
-            isNum = true;
-            this.num = num;
-        }
-
-    }
-
-    public IntegerLattice setSize(SetDescriptor sd) {
-        String setname = sd.getSymbol();
-
-        if (setname.equals("Block")) {
-            return IntegerLattice.TOP;
-        } else if (setname.equals("UsedBlock")) {
-            return IntegerLattice.TOP;
-        } else if (setname.equals("FreeBlock")) {
-            return IntegerLattice.TOP;
-        } else if (setname.equals("Inode")) {
-            return IntegerLattice.TOP;
-        } else if (setname.equals("UsedInode")) {
-            return IntegerLattice.TOP;
-        } else if (setname.equals("FileInode")) {
-            return IntegerLattice.TOP;
-        } else if (setname.equals("DirectoryInode")) {
-            return new IntegerLattice(1);
-        } else if (setname.equals("RootDirectoryInode")) {
-            return new IntegerLattice(1);
-        } else if (setname.equals("SuperBlock")) {
-            return new IntegerLattice(1);
-        } else if (setname.equals("GroupBlock")) {
-            return new IntegerLattice(1);
-        } else if (setname.equals("FileDirectoryBlock")) {
-            return IntegerLattice.TOP;
-        } else if (setname.equals("InodeTableBlock")) {
-            return new IntegerLattice(1);
-        } else if (setname.equals("InodeBitmapBlock")) {
-            return new IntegerLattice(1);
-        } else if (setname.equals("BlockBitmapBlock")) {
-            return new IntegerLattice(1);
-        } else if (setname.equals("DirectoryBlock")) {
-            return new IntegerLattice(0);
-        } else if (setname.equals("FileBlock")) {
-            return IntegerLattice.TOP;
-        } else if (setname.equals("DirectoryEntry")) {
-            return IntegerLattice.TOP;
-        } else {
-            throw new IRException();
-        }
-            
-    }
-
 }