tfm-report/img/throw-example-cfg.dot
Carlos Galindo 20bfa1a8c0 checkpoing
2019-12-09 20:47:09 +00:00

24 lines
728 B
Text

digraph g {
Start [shape=box,label=<Start<br/>x = x_in>];
End [shape=box,label=<End>];
NE [label = <x_out = x<br/>Normal exit>];
Start -> "if (x < 0)" -> "throw" -> "Error exit" -> End;
"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];
x_out [label = "x = x_out", style = dashed];
if [label = "if (x < 0)"];
t [label = "throw"];
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};
ne -> x_out;
{ edge [color = red, constraint = false];
x_in -> {if ret};
ret -> x_out;
}
}