added solution proposals for unconditional jumps

This commit is contained in:
Carlos Galindo 2019-12-07 18:56:01 +00:00
parent 6d747e8c29
commit 8ebf72444e
3 changed files with 199 additions and 0 deletions

View file

@ -0,0 +1,22 @@
digraph pdf {
entry [label="enter f()",style=filled];
entry -> {while; D};
while [label="while (O)",style=filled];
C [style="bold,filled"]
"if (P)" [style=filled]
"if (Q)" [style=filled]
while -> {"if (P)" C};
break2 [style=filled]
break1 [style=filled]
"if (P)" -> {"if (Q)"};
"if (Q)" -> {A break1};
break1 -> B;
break1 -> break2;
break2 -> {C while};
{rank=same; A break1 B break2}
{rank=same; "if (Q)" C}
{rank=same; while D}
{edge [style=invis];
A -> break1 -> B -> break2;
}
}

Binary file not shown.