Function Repository Resource:

SymbolDependencyGraph

Source Notebook

Create a graph of symbol dependencies

Contributed by: Richard Hennigan (Wolfram Research)

ResourceFunction["SymbolDependencyGraph"][symbol]

displays a Graph corresponding to the symbol dependencies of symbol.

Details and Options

ResourceFunction["SymbolDependencyGraph"] takes the same options as Graph.

Examples

Basic Examples (1) 

Graph the dependencies of a symbol:

In[1]:=
a := Hold[b, c];
b := 1;
c := d;
d := Hold[a, b, e];
e := 2;
ResourceFunction["SymbolDependencyGraph"][a, VertexLabels -> "Name"]
Out[6]=

Scope (1) 

See how a function relies on other functions:

In[7]:=
ResourceFunction[
 "SymbolDependencyGraph"][GeneralUtilities`PrintDefinitions, VertexLabels -> Placed["Name", Tooltip]]
Out[7]=

Requirements

Wolfram Language 11.3 (March 2018) or above

Version History

  • 1.1.0 – 13 March 2023
  • 1.0.1 – 27 January 2023
  • 1.0.0 – 15 August 2018

Related Resources

License Information