Fix tabbing.... Please fix your editors so they do tabbing correctly!!! (Spaces...
[IRC.git] / Robust / src / Analysis / SSJava / Location.java
index 2fd841298de04d0dbb2e1f4ee1cc14e9ad6af9bd..decaee7c0b4fec7fe648437e817a5ab8bc0db1e4 100644 (file)
@@ -1,12 +1,14 @@
 package Analysis.SSJava;
 
 import IR.ClassDescriptor;
+import IR.TypeExtension;
 
-public class Location {
+public class Location  implements TypeExtension {
 
   public static final int TOP = 1;
   public static final int NORMAL = 2;
   public static final int BOTTOM = 3;
+  public static final int DELTA = 4;
 
   int type;
   ClassDescriptor cd;
@@ -47,13 +49,13 @@ public class Location {
 
     if (loc.getClassDescriptor().equals(getClassDescriptor())) {
       if (loc.getLocIdentifier() == null || getLocIdentifier() == null) {
-        if (loc.getType() == getType()) {
-          return true;
-        }
+       if (loc.getType() == getType()) {
+         return true;
+       }
       } else {
-        if (loc.getLocIdentifier().equals(getLocIdentifier())) {
-          return true;
-        }
+       if (loc.getLocIdentifier().equals(getLocIdentifier())) {
+         return true;
+       }
       }
     }
 
@@ -88,4 +90,8 @@ public class Location {
     return bottomLoc;
   }
 
+  public boolean isTop() {
+    return type==TOP;
+  }
+
 }