CodeQL library for Go
codeql/go-all 3.0.1-dev (changelog, source)
Search

Module TypeTracking::CallGraphConstruction

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 TypeTracker::step/4, because step/3 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 codeql.typetracking.internal.TypeTrackingImpl

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.