- System.out.println("higherLocIdxCallee=" + higherLocIdxCallee);
- System.out.println("lowerLocIdxCallee=" + lowerLocIdxCallee);
-
- NTuple<Descriptor> higherArg = getArgTupleByArgIdx(methodInvokeNode, higherLocIdxCallee);
- NTuple<Descriptor> lowerArg = getArgTupleByArgIdx(methodInvokeNode, lowerLocIdxCallee);
+ String paramSymbol1 = getSymbol(0, paramFlowNode1);
+ String paramSymbol2 = getSymbol(0, paramFlowNode2);
+ // if two parameters have relation, we need to propagate this relation
+ // to the caller
+ if (calleeLattice.isComparable(paramSymbol1, paramSymbol2)) {
+ int higherLocIdxCallee;
+ int lowerLocIdxCallee;
+ if (calleeLattice.isGreaterThan(paramSymbol1, paramSymbol2)) {
+ higherLocIdxCallee = calleeFlowGraph.getParamIdx(paramFlowNode1.getDescTuple());
+ lowerLocIdxCallee = calleeFlowGraph.getParamIdx(paramFlowNode2.getDescTuple());
+ } else {
+ higherLocIdxCallee = calleeFlowGraph.getParamIdx(paramFlowNode2.getDescTuple());
+ lowerLocIdxCallee = calleeFlowGraph.getParamIdx(paramFlowNode1.getDescTuple());
+ }