summaryrefslogtreecommitdiff
path: root/docs/chapter20/lattice2.gv
blob: 6aa37fa0bdf3da34dd0717c30aa810f737c83670 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
digraph Lattice {
    compound = true;
    // Define nodes
    splines=false;
    node [shape=oval, style=filled];
    nodesep=0.2;
    ranksep=0.4;

    TOP [label="~scalar\n+int+tmp+0", fillcolor=black, fontcolor=white, group=center];

    // ------------------------
    PTRHQ [label="~tmp\n+tmp+0", fillcolor=green, fontcolor=white, group=left];
    TOP -> PTRHQ

    VALH_ [label="~nscalar\n+int+tmp", fillcolor=white, group=center];
    TOP -> VALH_

    INTHQ [label="~int\n+int+0", fillcolor=lightblue, group=right];
    TOP -> INTHQ

    LEFTHI [label="junk", style=invis, group=junkleft]
  

    PTRHQ -> LEFTHI-> VALH_ -> INTHQ [style=invis];
    { rank=same; PTRHQ; LEFTHI; VALH_; INTHQ }

    // ------------------------
    PTRH_ [label="~ntmp\n+tmp", fillcolor=green, fontcolor=white, group=left];
    VALH_ -> PTRH_
    PTRHQ -> PTRH_

    INTH_ [label="~nint\n+int", fillcolor=lightblue, group=right];
    VALH_ -> INTH_
    INTHQ -> INTH_
    { rank=same; PTRH_; INTH_ }

    // ------------------------
    NILX_ [label="~nil\n[int,tmp]+0", fillcolor=aqua, group=junkleft];
    INTHQ -> NILX_
    PTRHQ -> NILX_
    
    NIL__ [label="nil\n[+int+tmp],0", fillcolor=pink];
    VALH_ -> NIL__;
    
    NILX_ -> NIL__  [style=invis];
    { rank=same; NIL__; NILX_ }

    // ------------------------
    PTRL_ [label="ntmp\ntmp", fillcolor=green, fontcolor=white, group=left];
    PTRH_ -> PTRL_

    INTL_ [label="nint\nint", fillcolor=lightblue, group=right];
    INTH_ -> INTL_
    { rank=same; PTRL_; INTL_ }
    
    // ------------------------
    PTRL0 [label="tmp\ntmp,0", fillcolor=green, fontcolor=white, group=left];
    PTRL_ -> PTRL0
    NIL__ -> PTRL0

    VALL_ [label="nscalar\nint,tmp", fillcolor=white, group=center];
    PTRL_ -> VALL_
    INTL_ -> VALL_
    NILX_ -> VALL_

    INTL0 [label="int\nint,0", fillcolor=lightblue, group=right];
    INTL_ -> INTL0
    NIL__ -> INTL0

    PTRL0 -> VALL_ -> INTL0 [style=invis];
    { rank=same; PTRL0; VALL_; INTL0 }

    // ------------------------
    BOT [label="scalar\nint,tmp,0", fillcolor=black, fontcolor=white, group=center];
    PTRL0 -> BOT
    INTL0 -> BOT
    VALL_ -> BOT

    // ------------------------
    // Verticle alignment
    TOP -> VALH_ -> VALL_ -> BOT [style=invis];
    PTRHQ -> PTRH_ -> PTRL_ -> PTRL0 [style=invis];
    INTHQ -> INTH_ -> INTL_ -> INTL0 [style=invis];
    LEFTHI -> NILX_ [style=invis]
}