Files
Construction-of-Compilers/Project-02-03-04/cfgdots/while.dot
2026-01-23 13:01:50 +01:00

52 lines
1.5 KiB
Plaintext

digraph CFG {
node [fontname="Helvetica"];
n998 [label="START", shape=ellipse, style=filled, color=gray];
n998 -> n1021;
n1021 [label="10", shape=box];
n1021 -> n1022;
n1022 [label="8", shape=box];
n1022 -> n1023;
n1023 [label="CALL func", shape=box, style=filled, color=orange];
n1023 -> n1000;
n1023 -> n1025;
n1000 [label="START func(a, b)", shape=ellipse, style=filled, color=green];
n1000 -> n1003;
n1003 [label="a", shape=box];
n1003 -> n1004;
n1004 [label="0", shape=box];
n1004 -> n1005;
n1005 [label="a > 0", shape=box];
n1005 -> n1006;
n1006 [label="b", shape=box];
n1006 -> n1007;
n1007 [label="a", shape=box];
n1007 -> n1008;
n1008 [label="b != a", shape=box];
n1008 -> n1009;
n1009 [label="(a > 0) && (b != a)", shape=box];
n1009 -> n1010;
n1010 [label="<?>", shape=diamond];
n1010 -> n1001 [label="T"];
n1010 -> n1012 [label="F"];
n1001 [label="END func(a, b)", shape=ellipse, style=filled, color=green];
n1001 -> n1025;
n1025 [label="RET func", shape=box, style=filled, color=orange];
n1025 -> n999;
n999 [label="END", shape=ellipse, style=filled, color=gray];
n1012 [label="b", shape=box];
n1012 -> n1013;
n1013 [label="1", shape=box];
n1013 -> n1014;
n1014 [label="b + 1", shape=box];
n1014 -> n1015;
n1015 [label="b = (b + 1)", shape=box];
n1015 -> n1016;
n1016 [label="a", shape=box];
n1016 -> n1017;
n1017 [label="1", shape=box];
n1017 -> n1018;
n1018 [label="a - 1", shape=box];
n1018 -> n1019;
n1019 [label="a = (a - 1)", shape=box];
n1019 -> n1005;
}