Module DefinitionTracking

Definition tracking for jump-to-defn query.

Import path

analysis.DefinitionTracking

Imports

PointsTo

Part of the combined points-to, call-graph and type-inference library. The main relation points_to(node, context, object, cls, origin) relates a control flow node to the possible objects it points-to the inferred types of those objects and the ‘origin’ of those objects. The ‘origin’ is the point in source code that the object can be traced back to.

SSA

Library for SSA representation (Static Single Assignment form).

python

Predicates

getADefinition

Gets a definition for ‘use’. This exists primarily for testing use getPreferredDefinition() instead.

getUniqueDefinition

Gets the unique definition for ‘use’, if one can be found. Helper for the jump-to-definition query.

ssa_filter_defn

Holds if ESSA edge refinement, def, is defined by defn

ssa_filter_jump_to_defn_attribute

Holds if ESSA edge refinement, def, is defined by defn of priority

ssa_variable_jump_to_defn_attribute

INTERNAL – Public for testing only. Holds if the attribute name of the ssa variable var refers to (value, cls, origin)

uni_edged_phi_defn

Holds if ESSA defn, uniphi,is defined by defn

Classes

Definition

A definition for the purposes of jump-to-definition.

NiceLocationExpr

Helper class to get suitable locations for attributes