private CompositeLocation checkLocationFromArrayAccessNode(MethodDescriptor md,
SymbolTable nametable, ArrayAccessNode aan, CompositeLocation constraint, boolean isLHS) {
- // System.out.println("aan=" + aan.printNode(0) + " line#=" + aan.getNumLine());
+ System.out.println("aan=" + aan.printNode(0) + " line#=" + aan.getNumLine());
ClassDescriptor cd = md.getClassDesc();
CompositeLocation arrayLoc =
// addTypeLocation(on.getRight().getType(), rightLoc);
}
- // System.out.println("\n# OP NODE=" + on.printNode(0));
+ System.out.println("\n# OP NODE=" + on.printNode(0));
// System.out.println("# left loc=" + leftLoc + " from " +
// on.getLeft().getClass());
// if (on.getRight() != null) {
private CompositeLocation checkLocationFromNameNode(MethodDescriptor md, SymbolTable nametable,
NameNode nn, CompositeLocation loc, CompositeLocation constraint) {
+ System.out.println("checkLocationFromNameNode nn=" + nn.printNode(0));
NameDescriptor nd = nn.getName();
if (nd.getBase() != null) {
loc =
} else if (d instanceof FieldDescriptor) {
// the type of field descriptor has a location!
FieldDescriptor fd = (FieldDescriptor) d;
+ System.out.println("fd=" + fd);
if (fd.isStatic()) {
if (fd.isFinal()) {
// if it is 'static final', the location has TOP since no one can
loc.addLocation(Location.createTopLocation(md));
return loc;
} else {
+
// if 'static', the location has pre-assigned global loc
MethodLattice<String> localLattice = ssjava.getMethodLattice(md);
String globalLocId = localLattice.getGlobalLoc();
throw new Error("Global location element is not defined in the method " + md);
}
Location globalLoc = new Location(md, globalLocId);
-
+ System.out.println("static=" + globalLoc);
loc.addLocation(globalLoc);
}
} else {
}
if (innerGLBInput.size() > 0) {
+ System.out.println("######innerGLBInput=" + innerGLBInput);
CompositeLocation innerGLB = CompositeLattice.calculateGLB(innerGLBInput, errMsg);
for (int idx = 0; idx < innerGLB.getSize(); idx++) {
glbCompLoc.addLocation(innerGLB.get(idx));