Description

The client populates Queries[v] or IndirectQueries[v] for each ssa.Value v of interest, to request that the points-to sets pts(v) or pts(*v) be computed. If the client needs both points-to sets, v may appear in both maps.

(IndirectQueries is typically used for Values corresponding to source-level lvalues, e.g. an *ssa.Global.)

The analysis populates the corresponding Result.{Indirect,}Queries map when it creates the pointer variable for v or *v. Upon completion the client can inspect that map for the results.

TODO(adonovan): this API doesn't scale well for batch tools that want to dump the entire solution. Perhaps optionally populate a map[*ssa.DebugRef]Pointer in the Result, one entry per source expression.