/** * Derives a new abstraction that models the current local being caught as an * exception * * @param ap The access path in which the tainted exception is stored * @return The newly derived abstraction */ public Abstraction deriveNewAbstractionOnCatch(AccessPath ap) { assert this.exceptionThrown; Abstraction abs = deriveNewAbstractionMutable(ap, null); if (abs == null) return null; abs.exceptionThrown = false; return abs; }
public Abstraction deriveNewAbstraction(AccessPath p, Stmt currentStmt, boolean isImplicit) { // If the new abstraction looks exactly like the current one, there is // no need to create a new object if (this.accessPath.equals(p) && this.currentStmt == currentStmt && this.isImplicit == isImplicit) return this; Abstraction abs = deriveNewAbstractionMutable(p, currentStmt); if (abs == null) return null; abs.isImplicit = isImplicit; return abs; }
public Abstraction deriveConditionalAbstractionEnter(UnitContainer postdom, Stmt conditionalUnit) { assert this.isAbstractionActive(); if (postdominators != null && postdominators.contains(postdom)) return this; Abstraction abs = deriveNewAbstractionMutable(AccessPath.getEmptyAccessPath(), conditionalUnit); if (abs == null) return null; if (abs.postdominators == null) abs.postdominators = Collections.singletonList(postdom); else abs.postdominators.add(0, postdom); return abs; }
public Abstraction deriveConditionalAbstractionCall(Unit conditionalCallSite) { assert this.isAbstractionActive(); assert conditionalCallSite != null; Abstraction abs = deriveNewAbstractionMutable(AccessPath.getEmptyAccessPath(), (Stmt) conditionalCallSite); if (abs == null) return null; // Postdominators are only kept intraprocedurally in order to not // mess up the summary functions with caller-side information abs.postdominators = null; return abs; }
public Abstraction deriveInactiveAbstraction(Stmt activationUnit) { if (!flowSensitiveAliasing) { assert this.isAbstractionActive(); return this; } // If this abstraction is already inactive, we keep it if (!this.isAbstractionActive()) return this; Abstraction a = deriveNewAbstractionMutable(accessPath, null); if (a == null) return null; a.postdominators = null; a.activationUnit = activationUnit; a.dependsOnCutAP |= a.getAccessPath().isCutOffApproximation(); return a; }