abstract class AbstractIFDSAnalysis[IFDSFact <: AbstractIFDSFact] extends FPCFAnalysis
A framework for IFDS analyses.
- IFDSFact
The type of flow facts the concrete analysis wants to track
- Alphabetic
- By Inheritance
- AbstractIFDSAnalysis
- FPCFAnalysis
- ProjectBasedAnalysis
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Instance Constructors
- new AbstractIFDSAnalysis()
Type Members
Abstract Value Members
- abstract def callFlow(call: Statement, calleeContext: Context, in: Set[IFDSFact]): Set[IFDSFact]
Computes the data flow for a call to start edge.
Computes the data flow for a call to start edge.
- call
The analyzed call statement.
- calleeContext
The called method.
- in
Some facts valid before the execution of the
call
.- returns
The facts valid after the execution of
statement
under the assumption thatin
held beforestatement
andstatement
callscallee
.
- abstract def callToReturnFlow(call: Statement, successor: Statement, in: Set[IFDSFact]): Set[IFDSFact]
Computes the data flow for a call to return edge.
Computes the data flow for a call to return edge.
- call
The statement, which invoked the call.
- successor
The statement, which will be executed after the call.
- in
Some facts valid before the
call
.- returns
The facts valid after the call independently of what happens in the callee under the assumption that
in
held beforecall
.
- abstract def createPropertyValue(result: Map[Statement, Set[IFDSFact]]): IFDSProperty[IFDSFact]
Creates an IFDSProperty containing the result of this analysis.
Creates an IFDSProperty containing the result of this analysis.
- result
Maps each exit statement to the facts valid after the exit statement.
- returns
An IFDSProperty containing the
result
.
- abstract val entryPoints: Map[Context, IFDSFact]
The entry points of this analysis.
- abstract def nativeCall(call: Statement, calleeContext: Context, successor: Statement, in: Set[IFDSFact]): Set[IFDSFact]
Computes the data flow for a summary edge of a native method call.
Computes the data flow for a summary edge of a native method call.
- call
The statement, which invoked the call.
- calleeContext
The method, called by
call
.- successor
The statement, which will be executed after the call.
- in
Some facts valid before the
call
.- returns
The facts valid after the call, excluding the call-to-return flow.
- abstract def normalFlow(statement: Statement, successor: Statement, in: Set[IFDSFact]): Set[IFDSFact]
Computes the data flow for a normal statement.
Computes the data flow for a normal statement.
- statement
The analyzed statement.
- successor
The successor of the analyzed
statement
, to which the data flow is considered.- in
Some facts valid before the execution of the
statement
.- returns
The facts valid after the execution of
statement
under the assumption thatin
held beforestatement
andsuccessor
will be executed next.
- abstract val project: SomeProject
- Definition Classes
- ProjectBasedAnalysis
- abstract val propertyKey: IFDSPropertyMetaInformation[IFDSFact]
Provides the concrete property key that must be unique for every distinct concrete analysis and the lower bound for the IFDSProperty.
- abstract def returnFlow(call: Statement, calleeContext: Context, exit: Statement, successor: Statement, in: Set[IFDSFact]): Set[IFDSFact]
Computes the data flow for a exit to return edge.
Computes the data flow for a exit to return edge.
- call
The statement, which called the
callee
.- calleeContext
The method called by
call
.- exit
The statement, which terminated the
calle
.- successor
The statement of the caller, which will be executed after the
callee
returned.- in
Some facts valid before the execution of the
exit
.- returns
The facts valid after the execution of
exit
in the caller's context under the assumption thatin
held before the execution ofexit
and thatsuccessor
will be executed next.
Concrete Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- def addCgDependency(basicBlock: BasicBlock, ep: EOptionP[DeclaredMethod, Callees])(implicit state: State): Unit
Sets the cgDependency to
ep
and adds thebasicBlock
to the pending cg call sites.Sets the cgDependency to
ep
and adds thebasicBlock
to the pending cg call sites.- basicBlock
The basic block, which will be added to the pending cg call sites.
- ep
The result of the call graph analysis.
- def addIfdsDependee(entity: (Context, IFDSFact), calleeProperty: EOptionP[(Context, IFDSFact), IFDSProperty[IFDSFact]], callBB: BasicBlock, callIndex: Int)(implicit state: State): Unit
Adds a method-fact-pair as to the IFDS call sites and dependees.
Adds a method-fact-pair as to the IFDS call sites and dependees.
- entity
The method-fact-pair.
- calleeProperty
The property, that was returned for
entity
.- callBB
The basic block of the call site.
- callIndex
The index of the call site.
- def analyzeBasicBlock(basicBlock: BasicBlock, in: Set[IFDSFact], calleeWithUpdateIndex: Option[Int], calleeWithUpdate: Option[Context], calleeWithUpdateFact: Option[IFDSFact])(implicit state: State): Map[CFGNode, Set[IFDSFact]]
Computes for one basic block the facts valid on each CFG edge leaving the block if
sources
hold before the block.Computes for one basic block the facts valid on each CFG edge leaving the block if
sources
hold before the block.- basicBlock
The basic block, that will be analyzed.
- in
The facts, that hold before the block.
- calleeWithUpdateIndex
If the basic block is analyzed because there is new information for a callee, this is the call site's index.
- calleeWithUpdate
If the basic block is analyzed because there is new information for a callee, this is the callee.
- calleeWithUpdateFact
If the basic block is analyzed because there is new information for a callee with a specific input fact, this is the input fact.
- returns
A map, mapping each successor node to its input facts. Instead of catch nodes, this map contains their handler nodes.
- def asCall(statement: Stmt[V]): Call[V]
Gets the call for a statement that contains a call.
Gets the call for a statement that contains a call.
- statement
The statement.
- returns
The call contained in
statement
.
- Attributes
- protected[this]
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- final def ch: ClassHierarchy
- Definition Classes
- ProjectBasedAnalysis
- implicit final def classHierarchy: ClassHierarchy
- Definition Classes
- ProjectBasedAnalysis
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native() @IntrinsicCandidate()
- def collectResult(exit: CFGNode)(implicit state: State): Map[Statement, Set[IFDSFact]]
Collects the facts valid at an exit node based on the current results.
Collects the facts valid at an exit node based on the current results.
- exit
The exit node.
- returns
A map, mapping from each predecessor of the
exit
node to the facts valid at theexit
node under the assumption that the predecessor was executed before.
- def createResult()(implicit state: State): ProperPropertyComputationResult
Creates the current (intermediate) result for the analysis.
Creates the current (intermediate) result for the analysis.
- returns
A result containing a map, which maps each exit statement to the facts valid after the statement, based on the current results. If the analysis is still waiting for its method's TAC or call graph or the IFDS of another method, an interim result will be returned.
- implicit final val declaredMethods: DeclaredMethods
All declared methods in the project.
All declared methods in the project.
- Attributes
- protected[this]
- def definedMethods(declaredMethods: Iterator[Context]): Set[Method]
Maps some declared methods to their defined methods.
Maps some declared methods to their defined methods.
- declaredMethods
Some declared methods.
- returns
All defined methods of
declaredMethods
.
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- def getCallees(basicBlock: BasicBlock, pc: Int)(implicit state: State): Set[Context]
Gets the set of all methods possibly called at some call statement.
Gets the set of all methods possibly called at some call statement.
- basicBlock
The basic block containing the call.
- pc
The call's program counter.
- returns
All methods possibly called at the statement index.
- def getCalleesIfCallStatement(basicBlock: BasicBlock, index: Int)(implicit state: State): Option[Set[Context]]
Gets the set of all methods possibly called at some statement.
Gets the set of all methods possibly called at some statement.
- basicBlock
The basic block containing the statement.
- index
The statement's index.
- returns
All methods possibly called at the statement index or None, if the statement does not contain a call.
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @IntrinsicCandidate()
- def getExpression(statement: Stmt[V]): Expr[V]
Retrieves the expression of an assignment or expression statement.
Retrieves the expression of an assignment or expression statement.
- statement
The statement. Must be an Assignment or ExprStmt.
- returns
The statement's expression.
- def handleCall(basicBlock: BasicBlock, call: Statement, callees: Set[Context], in: Set[IFDSFact], calleeWithUpdateFact: Option[IFDSFact])(implicit state: State): Map[Statement, Set[IFDSFact]]
Processes a statement with a call.
Processes a statement with a call.
- basicBlock
The basic block that contains the statement
- call
The call statement.
- callees
All possible callees of the call.
- in
The facts valid before the call statement.
- calleeWithUpdateFact
If present, the
callees
will only be analyzed with this fact instead of the facts returned by callFlow.- returns
A map, mapping from each successor statement of the
call
to the facts valid at their start.
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @IntrinsicCandidate()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- implicit final def logContext: LogContext
- Definition Classes
- ProjectBasedAnalysis
- def mapDifference[S, T](minuend: Map[S, Set[T]], subtrahend: Map[S, Set[T]]): Map[S, Set[T]]
Computes the difference of two maps that have sets as their values.
Computes the difference of two maps that have sets as their values.
- minuend
The map, from which elements will be removed.
- subtrahend
The map, whose elements will be removed from
minuend
.- returns
A map, containing the keys and values of
minuend
. The values of the result only contain those elements not present insubtrahend
for the same key.
- def mergeMaps[S, T](map1: Map[S, Set[T]], map2: Map[S, Set[T]]): Map[S, Set[T]]
Merges two maps that have sets as values.
Merges two maps that have sets as values.
- map1
The first map.
- map2
The second map.
- returns
A map containing the keys of both maps. Each key is mapped to the union of both maps' values.
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @IntrinsicCandidate()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @IntrinsicCandidate()
- implicit final def p: SomeProject
- Definition Classes
- ProjectBasedAnalysis
- def performAnalysis(entity: (Context, IFDSFact)): ProperPropertyComputationResult
Performs an IFDS analysis for a method-fact-pair.
Performs an IFDS analysis for a method-fact-pair.
- entity
The method-fact-pair that will be analyzed.
- returns
An IFDS property mapping from exit statements to the data flow facts valid after these exit statements. Returns an interim result, if the TAC or call graph of this method or the IFDS analysis for a callee is still pending.
- def process(worklist: Queue[(BasicBlock, Set[IFDSFact], Option[Int], Option[Context], Option[IFDSFact])])(implicit state: State): Unit
Analyzes a queue of BasicBlocks.
Analyzes a queue of BasicBlocks.
- worklist
A queue of the following elements: bb The basic block that will be analyzed. in New data flow facts found to hold at the beginning of the basic block. calleeWithUpdateIndex If the basic block is analyzed because there is new information for a callee, this is the call site's index. calleeWithUpdate If the basic block is analyzed because there is new information for a callee, this is the callee. calleeWithUpdateFact If the basic block is analyzed because there is new information for a callee with a specific input fact, this is the input fact.
- def propagateNullFact(from: Set[IFDSFact], to: Set[IFDSFact]): Set[IFDSFact]
If
from
contains a null fact, it will be added toto
.If
from
contains a null fact, it will be added toto
.- from
The set, which may contain the null fact initially.
- to
The set, to which the null fact may be added.
- returns
to
with the null fact added, if it is contained infrom
.
- implicit final val propertyStore: PropertyStore
- Definition Classes
- FPCFAnalysis
- def propertyUpdate(eps: SomeEPS)(implicit state: State): ProperPropertyComputationResult
Called, when the call graph for this method or an IFDSProperty for another method was computed.
Called, when the call graph for this method or an IFDSProperty for another method was computed. Re-analyzes the relevant parts of this method and returns the new analysis result.
- eps
The new property value.
- returns
The new (interim) result of this analysis.
- final def ps: PropertyStore
- Definition Classes
- FPCFAnalysis
- def reAnalyzeCalls(callSites: Set[(BasicBlock, Int)], calleeContext: Context, fact: Option[IFDSFact])(implicit state: State): Unit
Re-analyzes some call sites with respect to one specific callee.
Re-analyzes some call sites with respect to one specific callee.
- callSites
The call sites, which are analyzed.
- fact
If defined, the
callee
will only be analyzed for this fact.
- def reAnalyzebasicBlocks(basicBlocks: Set[BasicBlock])(implicit state: State): Unit
Re-analyzes some basic blocks.
Re-analyzes some basic blocks.
- basicBlocks
The basic blocks, that will be re-analyzed.
- def successorStatements(statement: Statement, basicBlock: BasicBlock)(implicit state: State): Set[Statement]
Determines the successor statements for one source statement.
Determines the successor statements for one source statement.
- statement
The source statement.
- basicBlock
The basic block containing the source statement.
- returns
All successors of
statement
.
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- implicit val typeIterator: TypeIterator
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
Deprecated Value Members
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable]) @Deprecated
- Deprecated