1digraph g 2{ 3 graph 4 [ 5 nodesep="0.6" 6 ]; 7 8 edge 9 [ 10 fontname="Helvetica", 11 fontsize=10, 12 labelfontname="Helvetica", 13 labelfontsize=10 14 ]; 15 16 node 17 [ 18 fontname="Helvetica", 19 fontsize=10, 20 shape=box 21 ]; 22 23 edge 24 [ 25 arrowhead="open" 26 ] 27 28 // Program elements. 29 { 30 operating_system [ label="Operating System", shape=ellipse ]; 31 io_context [ label="I/O Execution Context\ne.g. io_context" ]; 32 io_object [ label="I/O Object\ne.g. socket" ]; 33 your_program [ label="Your Program" ]; 34 } 35 36 // Owning relationships. 37 { 38 edge [ arrowtail="diamond" ]; 39 your_program:w -> io_object:nw; 40 your_program:se -> io_context:ne; 41 } 42 43 // Non-owning relationships; 44 { 45 io_object:sw -> io_context:w; 46 } 47 48 // Actions. 49 { 50 edge [ style="dashed", color="#808080" ]; 51 52 // Forward actions. 53 { 54 your_program:sw -> io_object:n [ label="1" ]; 55 io_object:s -> io_context:nw [ label="2" ]; 56 io_context:sw -> operating_system:nw [ label="3" ]; 57 } 58 59 // Reverse actions. 60 { 61 edge [ arrowhead="none", arrowtail="open" ]; 62 io_context:se -> operating_system:ne [ label="4" ]; 63 io_object:se -> io_context:n [ label="5" ]; 64 your_program:s -> io_object:ne [ label="6" ]; 65 } 66 } 67} 68