Removing various deprecated pieces of code...Fixed some fault checks in AbstractIntef...
authorbdemsky <bdemsky>
Mon, 9 Aug 2004 16:47:33 +0000 (16:47 +0000)
committerbdemsky <bdemsky>
Mon, 9 Aug 2004 16:47:33 +0000 (16:47 +0000)
Repair/RepairCompiler/MCC/IR/AbstractInterferes.java
Repair/RepairCompiler/MCC/IR/DependencyBuilder.java
Repair/RepairCompiler/MCC/IR/ExprPredicate.java
Repair/RepairCompiler/MCC/IR/Predicate.java
Repair/RepairCompiler/MCC/Makefile

index fc683a956400b00670d66032646130917c19576a..359dcc7a1dfe448d5590d174b4ab098c730ac274 100755 (executable)
@@ -103,8 +103,10 @@ class AbstractInterferes {
 
     public boolean interfereswithpredicate(AbstractRepair ar, DNFPredicate dp) {
        if ((ar.getDescriptor()!=dp.getPredicate().getDescriptor()) &&
-           ((ar.getDescriptor() instanceof SetDescriptor)||
-            !dp.getPredicate().usesDescriptor((RelationDescriptor)ar.getDescriptor())))
+           //      ((ar.getDescriptor() instanceof SetDescriptor)||
+           // If the second predicate uses the size of the set, modifying the set size could falsify it...
+           !dp.getPredicate().usesDescriptor(ar.getDescriptor()))
+           //)
            return false;
 
        /* This if handles all the c comparisons in the paper */
@@ -181,6 +183,9 @@ class AbstractInterferes {
            int size2=isInt2?((ExprPredicate)dp.getPredicate()).rightSize():0;
            Expr expr2=((OpExpr)((ExprPredicate)dp.getPredicate()).expr).right;
 
+           
+           /* If the left sides of the comparisons are both from
+               different sets, the update is orthogonal to the expr dp */
            {
                Expr lexpr1=((RelationExpr)((OpExpr)((ExprPredicate)ar.getPredicate().getPredicate()).expr).getLeftExpr()).getExpr();
                Expr lexpr2=((RelationExpr)((OpExpr)((ExprPredicate)dp.getPredicate()).expr).getLeftExpr()).getExpr();
@@ -205,9 +210,11 @@ class AbstractInterferes {
                ((op2==Opcode.LT)||
                 (op2==Opcode.LE)))
                return false;
+           // FIXME
            if (((op1==Opcode.EQ)||(op1==Opcode.GE)||(op1==Opcode.LE))&&
                ((op2==Opcode.EQ)||(op2==Opcode.GE)||(op2==Opcode.LE))&&
                expr1.equals(null,expr2)) {
+               // Need to check free variables...
                return false;
            }
            if (isInt1&&isInt2) {
@@ -370,8 +377,8 @@ class AbstractInterferes {
 
     private boolean interferes(Descriptor des, boolean satisfy, DNFPredicate dp) {
        if ((des!=dp.getPredicate().getDescriptor()) &&
-           ((des instanceof SetDescriptor)||
-            !dp.getPredicate().usesDescriptor((RelationDescriptor)des)))
+           //((des instanceof SetDescriptor)||
+           !dp.getPredicate().usesDescriptor(des))//)
            return false;
 
        /* This if handles all the c comparisons in the paper */
index 9ad646059a589b84f8d7f0a58704863ccb01c796..4184851ff898c430b870550f208d92a6d12ee24f 100755 (executable)
@@ -116,69 +116,4 @@ public class DependencyBuilder {
         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();
-        }
-            
-    }
-
 }
index 64d4ec5a05e3097570a0e3651983ef3472408111..7c305db39f035989ffb47f0d57121735a3fcb055 100755 (executable)
@@ -61,7 +61,7 @@ public class ExprPredicate extends Predicate {
        return expr.inverted();
     }
 
-    public boolean usesDescriptor(RelationDescriptor rd) {
+    public boolean usesDescriptor(Descriptor rd) {
        return expr.usesDescriptor(rd);
     }
 
index be84d66a79a3e12c2ef73876080bbbf2c6bfa764..f9dcf2652b2872985ef4dad2ef149804768cccc1 100755 (executable)
@@ -10,7 +10,7 @@ public abstract class Predicate extends LogicStatement {
     abstract public int[] getRepairs(boolean negated, Termination t);
     abstract public Descriptor getDescriptor();
     abstract public boolean inverted();
-    public boolean usesDescriptor(RelationDescriptor rd) {
+    public boolean usesDescriptor(Descriptor rd) {
        return false;}
 }
     
index 10f539dde88fad1c1f694b82cbc79ed8397d2819..61e22b4be9e1fb98f946c593e4acdede4d4f39d9 100755 (executable)
@@ -41,10 +41,9 @@ IR/RelationExpr.class IR/RelationQuantifier.class                    \
 IR/ForQuantifier.class IR/GraphNode.class IR/DependencyBuilder.class   \
 IR/RelationInclusion.class IR/SetInclusion.class IR/TupleOfExpr.class  \
 IR/ElementOfExpr.class IR/Rule.class IR/Inclusion.class                        \
-IR/NaiveGenerator.class IR/CodeWriter.class IR/SymbolTableStack.class  \
-IR/StandardCodeWriter.class IR/WorklistGenerator.class                 \
-IR/WorkList.class IR/Optimizer.class IR/MetaInclusion.class            \
-IR/SizeofFunction.class IR/RelationFunctionExpr.class                  \
+IR/CodeWriter.class IR/SymbolTableStack.class  \
+IR/StandardCodeWriter.class            \
+IR/WorkList.class              \
 IR/RepairGenerator.class IR/AbstractInterferes.class                   \
 IR/PrettyPrinter.class IR/AbstractRepair.class IR/Quantifiers.class    \
 IR/Binding.class IR/ConcreteInterferes.class IR/Conjunction.class      \