Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
/* Qilin - a Java Pointer Analysis Framework
* Copyright (C) 2021-2030 Qilin developers
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation, either version 3.0 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Lesser Public License for more details.
*
* You should have received a copy of the GNU General Lesser Public
* License along with this program. If not, see
* .
*/
package qilin.stat;
import com.google.common.collect.Sets;
import java.util.*;
import qilin.CoreConfig;
import qilin.core.PTA;
import qilin.core.builder.MethodNodeFactory;
import qilin.core.context.Context;
import qilin.core.pag.*;
import qilin.core.sets.PointsToSet;
import qilin.util.PTAUtils;
import qilin.util.Triple;
import sootup.core.jimple.basic.Local;
import sootup.core.model.SootClass;
import sootup.core.model.SootMethod;
import sootup.core.signatures.FieldSignature;
import sootup.core.types.ClassType;
import sootup.core.types.ReferenceType;
import sootup.core.types.Type;
public class PointsToStat implements AbstractStat {
private final PTA pta;
private final PAG pag;
private int contextCnt = 0;
private double avgCtxPerMthd = 0.0;
private int ciAllocs = 0;
private int csAllocs = 0;
private int totalGlobalPointers = 0;
private int totalGlobalPointsToCi = 0;
private int totalGlobalPointsToCs = 0;
private int appGlobalPointers = 0;
private int appGlobalPointsToCi = 0;
private int appGlobalPointsToCs = 0;
private int totalLocalPointersCi = 0;
private int totalLocalPointersCs = 0;
private int totalLocalCiToCi = 0;
private int totalLocalCiToCs = 0;
private int totalLocalCsToCi = 0;
private int totalLocalCsToCs = 0;
private int appLocalPointersCi = 0;
private int appLocalPointersCs = 0;
private int appLocalCiToCi = 0;
private int appLocalCiToCs = 0;
private int appLocalCsToCi = 0;
private int appLocalCsToCs = 0;
private int totalFieldPointsToCs = 0;
private int methodThrowCnt = 0;
private final Map methodThrowPts;
private final Set mLocalVarNodes = new HashSet<>();
private int ptsCnt = 0;
private int varCnt = 0;
private final Set mLocalVarNodesNoNative = new HashSet<>();
private int ptsCntNoNative = 0;
private int varCntNoNative = 0;
public PointsToStat(PTA pta) {
this.pta = pta;
this.pag = pta.getPag();
methodThrowPts = new HashMap<>();
init();
}
private final Set handledNatives =
Sets.newHashSet(
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"");
protected Set