Skip to content

Commit dd75c42

Browse files
committed
Deployed e8dd21a with MkDocs version: 1.6.1
1 parent 29e4a46 commit dd75c42

File tree

3 files changed

+15
-4
lines changed

3 files changed

+15
-4
lines changed

getting_started/index.html

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -304,11 +304,22 @@ <h3 id="emulation">Emulation</h3>
304304
<h3 id="graphs">Graphs</h3>
305305
<pre><code class="language-python"># Get the control flow graph of the main function (and display it)
306306
Function(&quot;main&quot;).control_flow.show()
307-
308-
def callback(func):
307+
</code></pre>
308+
<p>Graph visualisation is not the most useful feature of this library, but it
309+
looks cool:</p>
310+
<p><img alt="" src="../graph.png" /></p>
311+
<p>And you can easily build the graph yourself:</p>
312+
<pre><code class="language-python">g = Graph.create()
313+
foo = g.vertex(&quot;foo&quot;)
314+
bar = g.vertex(&quot;bar&quot;)
315+
g.edge(foo, bar)
316+
g.show()
317+
</code></pre>
318+
<p>Or do some actually useful stuff with graph algorithms:</p>
319+
<pre><code class="language-python">def callback(func):
309320
print(&quot;visiting&quot;, func)
310321

311-
# Traverse the call graph of the program, while calling the callback
322+
# Traverse the program functions in topological order, and print the function names.
312323
Program.call_graph.dfs(callback)
313324
</code></pre>
314325
<h2 id="conventions">Conventions</h2>

graph.png

38.2 KB
Loading

search/search_index.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)