CallGraph Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
A kind of call graph whose nodes represent Q# callables or type parameterized callables.
public sealed class CallGraph
type CallGraph = class
Public NotInheritable Class CallGraph
- Inheritance
-
CallGraph
Constructors
| CallGraph(IEnumerable<QsCallable>) |
Constructs a call graph from callables. |
| CallGraph(QsCompilation, Boolean) |
Constructs a call graph from a compilation. The optional trim argument may be used to specify the call graph to be trimmed to only include callables that entry points are dependent on. |
Properties
| Nodes |
A hash set of the nodes in the call graph. |
Methods
| GetCallCycles() |
Finds and returns a list of all cycles in the call graph, each one being represented by an array of nodes. To get the edges between the nodes of a given cycle, use the GetDirectDependencies method. |
| GetDirectDependencies(CallGraphNode) |
Returns the children nodes of a given node. Each key in the returned lookup is a child node of the given node. Each value in the lookup is an edge connecting the given node to the child node represented by the associated key. Returns an empty ILookup if the node was found with no dependencies or was not found in the graph. |
| VerifyAllCycles(Func<ImmutableArray<CallGraphNode>,Boolean>) |
Given a call graph edges, finds all cycles and determines if each is valid.
Invalid cycles are those that cause type parameters to be mapped to
other type parameters of the same callable (constricting resolutions)
or to a type containing a nested reference to the same type parameter,
i.e Foo.A -> Foo.A[]. If a |