Module DataFlow

Import path

import semmle.code.java.dataflow.DataFlow

Predicates

exprNode

Gets the node corresponding to e.

flowsTo

Holds if data can flow (inter-procedurally) from source to sink.

getFieldQualifier

Gets the node that occurs as the qualifier of fa.

getInstanceArgument

Gets the instance argument of a non-static call.

hasNonlocalValue

Holds if the FieldRead is not completely determined by explicit SSA updates.

localExprFlow

Holds if data can flow from e1 to e2 in zero or more local (intra-procedural) steps.

localFlow

Holds if data can flow from node1 to node2 in zero or more local (intra-procedural) steps.

localFlowStep

Holds if data can flow from node1 to node2 in one local step.

parameterNode

Gets the node corresponding to p.

simpleLocalFlowStep

INTERNAL: do not use.

Classes

BarrierGuard

A guard that validates some expression.

Configuration

A configuration of interprocedural data flow analysis. This defines sources, sinks, and any other configurable aspect of the analysis. Each use of the global data flow library must define its own unique extension of this abstract class. To create a configuration, extend this class with a subclass whose characteristic predicate is a unique singleton string. For example, write

EnclosingInstanceAccess

An access to an enclosing instance.

ExplicitParameterNode

A parameter, viewed as a node in a data flow graph.

ExprNode

An expression, viewed as a node in a data flow graph.

ImplicitInstanceAccess

An implicit read of this or A.this.

ImplicitVarargsArray

An implicit varargs array creation expression.

InstanceAccessExt

A generalization of InstanceAccess that includes implicit accesses.

InstanceParameterNode

An instance parameter for an instance method or constructor.

Node

An element, viewed as a node in a data flow graph. Either an expression, a parameter, or an implicit varargs array creation.

OwnInstanceAccess

An access to an object’s own instance.

ParameterNode

An explicit or implicit parameter.

PartialPathNode

A Node augmented with a call context, an access path, and a configuration.

PathNode

A Node augmented with a call context (except for sinks), an access path, and a configuration. Only those PathNodes that are reachable from a source are generated.

PostUpdateNode

A node associated with an object after an operation that might have changed its state.

Modules

PartialPathGraph

Provides the query predicates needed to include a graph in a path-problem query.

PathGraph

Provides the query predicates needed to include a graph in a path-problem query.