CodeQL library for Python
codeql/python-all 3.0.1-dev (changelog, source)
Search

Predicate MakeImpl::Impl::FlowExploration::partialFlowRev

Holds if there is a partial data flow path from node to sink. The approximate distance between node and the closest sink is dist and is restricted to be less than or equal to explorationLimit(). This predicate completely disregards source definitions.

This predicate is intended for data-flow exploration and debugging and may perform poorly if the number of sinks is too big and/or the exploration limit is set too high without using barriers.

To use this in a path-problem query, import the module PartialPathGraph.

Note that reverse flow has slightly lower precision than the corresponding forward flow, as reverse flow disregards type pruning among other features.

Import path

import codeql.dataflow.internal.DataFlowImpl
predicate partialFlowRev(PartialPathNode node, PartialPathNode sink, int dist)