- // compute all possible callee set
- // transform all DELETE set from the any possible
- // callees to the caller
- calleeUnionBoundDeleteSet.clear();
- calleeIntersectBoundSharedSet.clear();
-
- MethodDescriptor mdCallee = fc.getMethod();
- Set<MethodDescriptor> setPossibleCallees = new HashSet<MethodDescriptor>();
- setPossibleCallees.addAll(callGraph.getMethods(mdCallee));
-
- // create mapping from arg idx to its heap paths
- Hashtable<Integer, NTuple<Descriptor>> mapArgIdx2CallerArgHeapPath =
- new Hashtable<Integer, NTuple<Descriptor>>();
-
- // arg idx is starting from 'this' arg
- if (fc.getThis() != null) {
- NTuple<Descriptor> thisHeapPath = mapHeapPath.get(fc.getThis());
- if (thisHeapPath == null) {
- // method is called without creating new flat node representing 'this'
- thisHeapPath = new NTuple<Descriptor>();
- thisHeapPath.add(fc.getThis());
- }
-
- mapArgIdx2CallerArgHeapPath.put(Integer.valueOf(0), thisHeapPath);
- }
-
- for (int i = 0; i < fc.numArgs(); i++) {
- TempDescriptor arg = fc.getArg(i);
- NTuple<Descriptor> argHeapPath = computePath(arg);
- mapArgIdx2CallerArgHeapPath.put(Integer.valueOf(i + 1), argHeapPath);
- }
-
- for (Iterator iterator = setPossibleCallees.iterator(); iterator.hasNext();) {
- MethodDescriptor callee = (MethodDescriptor) iterator.next();
- FlatMethod calleeFlatMethod = state.getMethodFlat(callee);
-
- // binding caller's args and callee's params
-
- Set<NTuple<Descriptor>> calleeReadSet = mapFlatMethodToDeleteSet.get(calleeFlatMethod);
- if (calleeReadSet == null) {
- calleeReadSet = new HashSet<NTuple<Descriptor>>();
- mapFlatMethodToDeleteSet.put(calleeFlatMethod, calleeReadSet);
- }
-
- Hashtable<Integer, TempDescriptor> mapParamIdx2ParamTempDesc =
- new Hashtable<Integer, TempDescriptor>();
- int offset = 0;
- if (calleeFlatMethod.getMethod().isStatic()) {
- // static method does not have implicit 'this' arg
- offset = 1;
- }
- for (int i = 0; i < calleeFlatMethod.numParameters(); i++) {
- TempDescriptor param = calleeFlatMethod.getParameter(i);
- mapParamIdx2ParamTempDesc.put(Integer.valueOf(i + offset), param);
- }
-
- Set<NTuple<Descriptor>> calleeBoundDeleteSet =
- bindSet(calleeReadSet, mapParamIdx2ParamTempDesc, mapArgIdx2CallerArgHeapPath);
- // union of the current read set and the current callee's
- // read set
- calleeUnionBoundDeleteSet.addAll(calleeBoundDeleteSet);
-
- SharedLocMappingSet calleeSharedLocMap =
- mapFlatMethodToSharedLocMappingSet.get(calleeFlatMethod);
-
- Set<NTuple<Descriptor>> calleeHeapPathKeySet = calleeSharedLocMap.getHeapPathKeySet();
-
- for (Iterator iterator2 = calleeHeapPathKeySet.iterator(); iterator2.hasNext();) {
- NTuple<Descriptor> calleeHeapPathKey = (NTuple<Descriptor>) iterator2.next();
-
- NTuple<Descriptor> calleeBoundHeapPathKey =
- bind(calleeHeapPathKey, mapParamIdx2ParamTempDesc, mapArgIdx2CallerArgHeapPath);
-
- Set<Location> calleeLocSet = calleeSharedLocMap.getLocationKeySet(calleeHeapPathKey);
-
- for (Iterator iterator3 = calleeLocSet.iterator(); iterator3.hasNext();) {
- Location calleeLocKey = (Location) iterator3.next();
- Set<Descriptor> calleeWriteSet =
- calleeSharedLocMap.getWriteSet(calleeHeapPathKey, calleeLocKey);
-
- calleeIntersectBoundSharedSet.intersectWriteSet(calleeBoundHeapPathKey, calleeLocKey,
- calleeWriteSet);
-
- }
-
- }
-
- }
-
+ // // compute all possible callee set
+ // // transform all DELETE set from the any possible
+ // // callees to the caller
+ // calleeUnionBoundDeleteSet.clear();
+ // calleeIntersectBoundSharedSet.clear();
+ //
+ // MethodDescriptor mdCallee = fc.getMethod();
+ // Set<MethodDescriptor> setPossibleCallees = new
+ // HashSet<MethodDescriptor>();
+ // setPossibleCallees.addAll(callGraph.getMethods(mdCallee));
+ //
+ // // create mapping from arg idx to its heap paths
+ // Hashtable<Integer, NTuple<Descriptor>> mapArgIdx2CallerArgHeapPath =
+ // new Hashtable<Integer, NTuple<Descriptor>>();
+ //
+ // // arg idx is starting from 'this' arg
+ // if (fc.getThis() != null) {
+ // NTuple<Descriptor> thisHeapPath = mapHeapPath.get(fc.getThis());
+ // if (thisHeapPath == null) {
+ // // method is called without creating new flat node representing 'this'
+ // thisHeapPath = new NTuple<Descriptor>();
+ // thisHeapPath.add(fc.getThis());
+ // }
+ //
+ // mapArgIdx2CallerArgHeapPath.put(Integer.valueOf(0), thisHeapPath);
+ // }
+ //
+ // for (int i = 0; i < fc.numArgs(); i++) {
+ // TempDescriptor arg = fc.getArg(i);
+ // NTuple<Descriptor> argHeapPath = computePath(arg);
+ // mapArgIdx2CallerArgHeapPath.put(Integer.valueOf(i + 1), argHeapPath);
+ // }
+ //
+ // for (Iterator iterator = setPossibleCallees.iterator();
+ // iterator.hasNext();) {
+ // MethodDescriptor callee = (MethodDescriptor) iterator.next();
+ // FlatMethod calleeFlatMethod = state.getMethodFlat(callee);
+ //
+ // // binding caller's args and callee's params
+ //
+ // Set<NTuple<Descriptor>> calleeReadSet =
+ // mapFlatMethodToDeleteSet.get(calleeFlatMethod);
+ // if (calleeReadSet == null) {
+ // calleeReadSet = new HashSet<NTuple<Descriptor>>();
+ // mapFlatMethodToDeleteSet.put(calleeFlatMethod, calleeReadSet);
+ // }
+ //
+ // Hashtable<Integer, TempDescriptor> mapParamIdx2ParamTempDesc =
+ // new Hashtable<Integer, TempDescriptor>();
+ // int offset = 0;
+ // if (calleeFlatMethod.getMethod().isStatic()) {
+ // // static method does not have implicit 'this' arg
+ // offset = 1;
+ // }
+ // for (int i = 0; i < calleeFlatMethod.numParameters(); i++) {
+ // TempDescriptor param = calleeFlatMethod.getParameter(i);
+ // mapParamIdx2ParamTempDesc.put(Integer.valueOf(i + offset), param);
+ // }
+ //
+ // Set<NTuple<Descriptor>> calleeBoundDeleteSet =
+ // bindSet(calleeReadSet, mapParamIdx2ParamTempDesc,
+ // mapArgIdx2CallerArgHeapPath);
+ // // union of the current read set and the current callee's
+ // // read set
+ // calleeUnionBoundDeleteSet.addAll(calleeBoundDeleteSet);
+ //
+ // SharedLocMappingSet calleeSharedLocMap =
+ // mapFlatMethodToSharedLocMappingSet.get(calleeFlatMethod);
+ //
+ // Set<NTuple<Descriptor>> calleeHeapPathKeySet =
+ // calleeSharedLocMap.getHeapPathKeySet();
+ //
+ // for (Iterator iterator2 = calleeHeapPathKeySet.iterator();
+ // iterator2.hasNext();) {
+ // NTuple<Descriptor> calleeHeapPathKey = (NTuple<Descriptor>)
+ // iterator2.next();
+ //
+ // NTuple<Descriptor> calleeBoundHeapPathKey =
+ // bind(calleeHeapPathKey, mapParamIdx2ParamTempDesc,
+ // mapArgIdx2CallerArgHeapPath);
+ //
+ // Set<Location> calleeLocSet =
+ // calleeSharedLocMap.getLocationKeySet(calleeHeapPathKey);
+ //
+ // for (Iterator iterator3 = calleeLocSet.iterator(); iterator3.hasNext();)
+ // {
+ // Location calleeLocKey = (Location) iterator3.next();
+ // Set<Descriptor> calleeWriteSet =
+ // calleeSharedLocMap.getWriteSet(calleeHeapPathKey, calleeLocKey);
+ //
+ // calleeIntersectBoundSharedSet.intersectWriteSet(calleeBoundHeapPathKey,
+ // calleeLocKey,
+ // calleeWriteSet);
+ //
+ // }
+ //
+ // }
+ //
+ // }
+ //