27 lines
484 B
Text
27 lines
484 B
Text
digraph g {
|
|
Start [shape=box];
|
|
s1 [label="x = x_in"];
|
|
s0 [label="y = y_in"];
|
|
s2 [label="while (x > y)"];
|
|
s3 [label="x = x + 1"];
|
|
s4 [label="print(x)"];
|
|
s5 [label="x_out = x"];
|
|
// Rank
|
|
{ rank=same; s0; s1; s5; }
|
|
{ rank=same; s2; s4; }
|
|
{ rank=min; Start; }
|
|
s0 -> s2 [style=invis];
|
|
// Control
|
|
{
|
|
edge [style = bold];
|
|
Start -> {s0 s1 s2 s4 s5};
|
|
s2 -> s3;
|
|
}
|
|
// Data
|
|
{
|
|
edge [color = red];
|
|
edge [constraint = false];
|
|
{s1 s3} -> {s2 s3 s4 s5};
|
|
s0 -> s2;
|
|
}
|
|
}
|