tfm-report/img/throw-example-cfg.dot

25 lines
728 B
Text
Raw Normal View History

2019-11-15 22:34:58 +01:00
digraph g {
Start [shape=box,label=<Start<br/>x = x_in>];
2019-12-09 21:47:09 +01:00
End [shape=box,label=<End>];
NE [label = <x_out = x<br/>Normal exit>];
2019-11-15 22:34:58 +01:00
Start -> "if (x < 0)" -> "throw" -> "Error exit" -> End;
2019-12-09 21:47:09 +01:00
"throw" -> "x = Math.sqrt(x)" [style=dashed];
"if (x < 0)" -> "x = Math.sqrt(x)" -> NE -> End;
// pdg
f [label="f()",shape=rect];
x_in [label = "x = x_in", style = dashed];
2019-12-09 21:47:09 +01:00
x_out [label = "x = x_out", style = dashed];
if [label = "if (x < 0)"];
t [label = "throw"];
2019-12-09 21:47:09 +01:00
ret [label = "x = Math.sqrt(x)"];
ee [label = "error exit", style = dashed];
ne [label = "normal exit", style = dashed];
f -> x_in;
f -> if -> t -> {ret ee ne};
2019-12-09 21:47:09 +01:00
ne -> x_out;
{ edge [color = red, constraint = false];
x_in -> {if ret};
2019-12-09 21:47:09 +01:00
ret -> x_out;
}
}