tfm-report/img/parameter-passing.dot
Carlos Galindo 20bfa1a8c0 checkpoing
2019-12-09 20:47:09 +00:00

63 lines
No EOL
1.7 KiB
Text

digraph G {
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
// p [label=<x_in = a + b<br/>y_in = c<br/>f()<br/>c = y_out>,shape=rect];
f_call [label="f()"]
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];
fx_in [label="x = x_in"];
fy_in [label="y = y_in"];
fz_in [label="z = z_in"];
fy_out [label="y_out = y"];
fz_out [label="z_out = z"];
f_start -> {fz_in fx_in fy_in fy_out fz_out};
f_call -> f_start [style=bold];
y_in -> f_start [style=invis];
{
edge [style = dashed];
z_in -> fz_in
x_in -> fx_in
y_in -> fy_in
fy_out -> y_out
fz_out -> z_out
}
invis [height=0.001,width=0.001,style=invis];
invis2 [height=0.001,width=0.001,style=invis];
{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};
{edge [style=invis];
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;
}
}