Function Graph Overview
    Preparing search index...

    Graph Legend

    Green and red arrows indicate the true and false branches of an if or similar structures.

    IF Condition? THEN True IF:s->THEN:n ELSE False IF:s->ELSE:n
    IF Condition? THEN True IF:s->THEN:n ELSE False IF:s->ELSE:n

    Blue arrows indicate non-conditional transitions. These can be gotos, or more frequently branches merging after a condition.

    IF Condition? THEN True IF:s->THEN:n ELSE False IF:s->ELSE:n MERGE THEN:s->MERGE:n ELSE:s->MERGE:n A goto x B x A:s->B:n
    IF Condition? THEN True IF:s->THEN:n ELSE False IF:s->ELSE:n MERGE THEN:s->MERGE:n ELSE:s->MERGE:n A goto x B x A:s->B:n

    Thicker arrow indicate backlinks - going to an earlier line in the code. Those are most commonly seen in loops.

    A HEAD A:s->HEAD:n BODY HEAD:s->BODY:n HEAD:n->BODY:s EXIT HEAD:s->EXIT:n
    A HEAD A:s->HEAD:n BODY HEAD:s->BODY:n HEAD:n->BODY:s EXIT HEAD:s->EXIT:n

    The basic block contains any number of "basic" lines. Those can be anything from function-calls to variable assignments. Since they don't affect control flow, they are not indicated directly in the graph. The taller a block is - the more lines it has in it.

    cluster_0 Few lines cluster_1 Many lines A B
    cluster_0 Few lines cluster_1 Many lines A B

    Entry & Exit (Return)

    The function entry is marked with a green inverted-house block and all exits are marked with red house blocks.

    A B A:s->B:n C B:s->C:n
    A B A:s->B:n C B:s->C:n

    yield nodes are marked using hexagons.

    B C B:s->C:n A A:s->B:n
    B C B:s->C:n A A:s->B:n

    throw and raise nodes are marked using triangles.

    B A A:s->B:n
    B A A:s->B:n

    Clusters are used to describe constructs that cannot be cleanly represented in a pure-graph.

    Context-managers, such as Python's with statement, have a simple cluster with a single background color.

    cluster_0 IF THEN IF:s->THEN:n ELSE IF:s->ELSE:n MERGE THEN:s->MERGE:n ELSE:s->MERGE:n A A:s->IF:n
    cluster_0 IF THEN IF:s->THEN:n ELSE IF:s->ELSE:n MERGE THEN:s->MERGE:n ELSE:s->MERGE:n A A:s->IF:n

    When nested, they'll have a small border added as well for separation.

    cluster_0 cluster_1 THEN MERGE THEN:s->MERGE:n IF IF:s->THEN:n ELSE IF:s->ELSE:n ELSE:s->MERGE:n A A:s->IF:n
    cluster_0 cluster_1 THEN MERGE THEN:s->MERGE:n IF IF:s->THEN:n ELSE IF:s->ELSE:n ELSE:s->MERGE:n A A:s->IF:n

    Exceptions have somewhat complex clusters.

    • The entire try-except-else-finally clause is surrounded by a blue cluster, indicating the context;
    • the try block is placed in a green cluster;
    • all except or catch blocks are given red clusters;
    • the else block, if present, is give no additional cluster;
    • finally blocks are given yellow clusters. finally blocks are replicated for every flow that requires them. This usually means return statements inside the try or except blocks.
    cluster_tryComplex cluster_try cluster_except cluster_else cluster_finally TRY try EXCEPT except/catch ELSE else TRY:s->ELSE:n FINALLY finally EXCEPT:s->FINALLY:n ELSE:s->FINALLY:n EXIT FINALLY:s->EXIT:n ENTRY ENTRY:s->TRY:n
    cluster_tryComplex cluster_try cluster_except cluster_else cluster_finally TRY try EXCEPT except/catch ELSE else TRY:s->ELSE:n FINALLY finally EXCEPT:s->FINALLY:n ELSE:s->FINALLY:n EXIT FINALLY:s->EXIT:n ENTRY ENTRY:s->TRY:n