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

Module CallGraphConstruction

INTERNAL: Do not use.

Provides logic for constructing a call graph in mutual recursion with type tracking.

When type tracking is used to construct a call graph, we cannot use the join-order from stepInlineLate, because step becomes a recursive call, which means that we will have a conjunct with 3 recursive calls: the call to step, the call to stepProj, and the recursive type tracking call itself. The solution is to split the three-way non-linear recursion into two non-linear predicates: one that first joins with the projected stepCall relation, followed by a predicate that joins with the full stepCall relation (stepNoCall not being recursive, can be join-ordered in the same way as in stepInlineLate).

Import path

import semmle.python.dataflow.new.internal.TypeTracker

Modules

Make

Provides the track predicate for use in call graph construction.

Simple

A simple version of CallGraphConstruction that uses standard type tracking.

Module signatures

InputSig

The input to call graph construction.