2019-12-03 15:12:13 +01:00
|
|
|
digraph G {
|
2019-12-09 21:47:09 +01:00
|
|
|
a1 [label = <Enter<br/>z = z_in<br/>x = x_in<br/>y = y_in>, shape = rect];
|
|
|
|
a2 [label = "z += x"];
|
|
|
|
a3 [label = "y++"];
|
|
|
|
a4 [label = <z_out = z<br/>y_out = y<br/>Exit>, shape = rect];
|
|
|
|
a1 -> a2 -> a3 -> a4
|
|
|
|
|
2019-12-03 15:12:13 +01:00
|
|
|
// p [label=<x_in = a + b<br/>y_in = c<br/>f()<br/>c = y_out>,shape=rect];
|
|
|
|
f_call [label="f()"]
|
2019-12-09 21:47:09 +01:00
|
|
|
x_in [label="x_in = a + 1"]
|
|
|
|
y_in [label="y_in = b"]
|
|
|
|
z_in [label="z_in = z"]
|
|
|
|
y_out [label="b = y_out"]
|
|
|
|
z_out [label="z = z_out"]
|
|
|
|
f_call -> {z_in x_in y_in y_out z_out};
|
|
|
|
|
|
|
|
f_start [label="enter f", shape = rect];
|
2019-12-03 15:12:13 +01:00
|
|
|
fx_in [label="x = x_in"];
|
|
|
|
fy_in [label="y = y_in"];
|
2019-12-09 21:47:09 +01:00
|
|
|
fz_in [label="z = z_in"];
|
2019-12-03 15:12:13 +01:00
|
|
|
fy_out [label="y_out = y"];
|
2019-12-09 21:47:09 +01:00
|
|
|
fz_out [label="z_out = z"];
|
|
|
|
f_start -> {fz_in fx_in fy_in fy_out fz_out};
|
2019-12-03 15:12:13 +01:00
|
|
|
f_call -> f_start [style=bold];
|
|
|
|
y_in -> f_start [style=invis];
|
2019-12-09 21:47:09 +01:00
|
|
|
{
|
|
|
|
edge [style = dashed];
|
|
|
|
z_in -> fz_in
|
|
|
|
x_in -> fx_in
|
|
|
|
y_in -> fy_in
|
|
|
|
fy_out -> y_out
|
|
|
|
fz_out -> z_out
|
|
|
|
}
|
2019-12-03 15:12:13 +01:00
|
|
|
invis [height=0.001,width=0.001,style=invis];
|
|
|
|
invis2 [height=0.001,width=0.001,style=invis];
|
2019-12-09 21:47:09 +01:00
|
|
|
{rank=same; x_in y_in y_out z_in z_out invis};
|
|
|
|
{rank=same; fx_in fy_in invis2 fy_out fz_in fz_out};
|
2019-12-03 15:12:13 +01:00
|
|
|
{edge [style=invis];
|
2019-12-09 21:47:09 +01:00
|
|
|
z_in -> x_in -> y_in -> invis -> y_out -> z_out;
|
|
|
|
fz_in -> fx_in -> fy_in -> invis2 -> fy_out -> fz_out;
|
|
|
|
}
|
|
|
|
|
|
|
|
{rank = max;
|
|
|
|
zplus [label = "z += x"];
|
|
|
|
yplus [label = "y++"];
|
|
|
|
}
|
|
|
|
f_start -> {zplus yplus};
|
|
|
|
{
|
|
|
|
edge [color = red];
|
|
|
|
{fz_in fx_in} -> zplus;
|
|
|
|
fy_in -> yplus;
|
|
|
|
edge [constraint = false];
|
|
|
|
zplus -> fz_out;
|
|
|
|
yplus -> fy_out;
|
|
|
|
}
|
|
|
|
|
|
|
|
{
|
|
|
|
edge [color = blue, constraint = false, style = bold];
|
|
|
|
{z_in x_in} -> z_out;
|
|
|
|
y_in -> y_out;
|
2019-12-03 15:12:13 +01:00
|
|
|
}
|
2019-12-09 21:47:09 +01:00
|
|
|
|
2019-12-03 15:12:13 +01:00
|
|
|
}
|