Class ControlFlowSensitiveDFGPass
- All Implemented Interfaces:
java.util.function.Consumer<TranslationResult>
public class ControlFlowSensitiveDFGPass extends Pass
Control Flow Sensitivity in the DFG is only performed on VariableDeclarations and not on FieldDeclarations. The reason for this being the fact, that the value of a field might be modified to a value that is not present in the method, thus it is not detected by our variable tracking
This pass will split up at every branch in the EOG. Because of the existence of loops and multiple paths being able to run to through the same Declared reference expression we have to keep track of the set of values (assignments) associated to a variable at JoinPoints. If the set reaching a Joinpoint is not adding new values to one variable the path does not have to be further explored. This ensures that the algorithm terminates and scales with the number of different paths in the program finally reaching a fixpoint.
This is only feasible because the values associate to a variable at fix-points is the location assignment and not its symbolically executed value, in which case we could not ensure termination for the algorithm.
We here do not solve the problem of Exception-Handling, for this we will need additional semantics on Edges.
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected classControlFlowSensitiveDFGPass.FunctionLevelFixpointIteratorprotected static interfaceControlFlowSensitiveDFGPass.IterationFunction -
Field Summary
-
Constructor Summary
Constructors Constructor Description ControlFlowSensitiveDFGPass() -
Method Summary
Modifier and Type Method Description voidaccept(TranslationResult translationResult)voidcleanup()protected voidhandle(de.fraunhofer.aisec.cpg.graph.Node node)ControlFlowSensitiveDFG Pass is performed on every method.protected voidremoveValues(ControlFlowSensitiveDFGPass.FunctionLevelFixpointIterator fixDFGs)Removes unrefined DFG edgesMethods inherited from class de.fraunhofer.aisec.cpg.passes.Pass
getLang, getName, setLang, supportsLanguageFrontendMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.function.Consumer
andThen
-
Constructor Details
-
ControlFlowSensitiveDFGPass
public ControlFlowSensitiveDFGPass()
-
-
Method Details
-
cleanup
public void cleanup() -
accept
-
removeValues
Removes unrefined DFG edges- Parameters:
fixDFGs- ControlFlowSensitiveDFG of entire Method
-
handle
protected void handle(de.fraunhofer.aisec.cpg.graph.Node node)ControlFlowSensitiveDFG Pass is performed on every method.- Parameters:
node- every node in the TranslationResult
-