- inputGLBSet.add(rhsLocation);
- inputGLBSet.add(constraint);
- srcLocation = CompositeLattice.calculateGLB(inputGLBSet, generateErrorMessage(cd, an));
+
+ if (!CompositeLattice.isGreaterThan(constraint, destLocation, generateErrorMessage(cd, an))) {
+ throw new Error("The value flow from " + constraint + " to " + destLocation
+ + " does not respect location hierarchy on the assignment " + an.printNode(0)
+ + " at " + cd.getSourceFileName() + "::" + an.getNumLine());
+ }
+ // inputGLBSet.add(rhsLocation);
+ // inputGLBSet.add(constraint);
+ // srcLocation = CompositeLattice.calculateGLB(inputGLBSet,
+ // generateErrorMessage(cd, an));
+ srcLocation = rhsLocation;