Loading iacfg/src/test/java/es/upv/mist/slicing/graphs/icfg/ICFGTest.java +5 −2 Original line number Diff line number Diff line Loading @@ -50,8 +50,8 @@ public class ICFGTest { /*createGraph("TestExamplePaperSimple.java", "grafoPaperSimple"); System.out.println("Grafo 12 generado...");*/ createGraph("TestExamplePaperSimpleContra1.java", "contra1"); System.out.println("Grafo 13 generado..."); /*createGraph("TestExamplePaperSimpleContra1.java", "contra1"); System.out.println("Grafo 13 generado...");*/ /* createGraph("TestExamplePaperSimpleContra2.java", "contra2"); System.out.println("Grafo 14 generado..."); */ Loading @@ -67,6 +67,9 @@ public class ICFGTest { /* createGraph("TestExamplePaperSimpleContra6.java", "contra6"); System.out.println("Grafo 18 generado..."); */ createGraph("TestExamplePaperSimpleContra7.java", "contra7"); System.out.println("Grafo 19 generado..."); } private static void createGraph(String fileName, String graphName) throws IOException { Loading iacfg/src/test/resources/TestExamplePaperSimpleContra7.java 0 → 100644 +86 −0 Original line number Diff line number Diff line public class TestExamplePaperSimple { public static void main(String[] args) { while (1 > 2) { System.out.println("S1"); p1(); System.out.println("S2"); p1(); System.out.println("S3"); } if (1 > 2) { System.out.println("S4"); r1(); System.out.println("S5"); } else { System.out.println("S6"); r1(); System.out.println("S7"); } if (20 < 10) { while (10 > 0) { r1(); System.out.println("S9"); } } else { while (10 > 0) { r1(); System.out.println("S10"); } } System.out.println("S11"); l(); System.out.println("S12"); } public static void p1() { p2(); l(); } public static void p2() { p3(); } public static void p3() { while (1 > 2) { System.out.println("P3!"); } l(); } public static void r1() { System.out.println("S20"); if (21 > 0) { r1(); } System.out.println("S23"); l(); System.out.println("S24"); } public static void l() { if (1 > 0) { m(); System.out.println("L3"); } } public static void m() { if (1 > 0) { n(); System.out.println("M3"); } } public static void n() { if (1 > 0) { l(); System.out.println("N3"); } } } No newline at end of file Loading
iacfg/src/test/java/es/upv/mist/slicing/graphs/icfg/ICFGTest.java +5 −2 Original line number Diff line number Diff line Loading @@ -50,8 +50,8 @@ public class ICFGTest { /*createGraph("TestExamplePaperSimple.java", "grafoPaperSimple"); System.out.println("Grafo 12 generado...");*/ createGraph("TestExamplePaperSimpleContra1.java", "contra1"); System.out.println("Grafo 13 generado..."); /*createGraph("TestExamplePaperSimpleContra1.java", "contra1"); System.out.println("Grafo 13 generado...");*/ /* createGraph("TestExamplePaperSimpleContra2.java", "contra2"); System.out.println("Grafo 14 generado..."); */ Loading @@ -67,6 +67,9 @@ public class ICFGTest { /* createGraph("TestExamplePaperSimpleContra6.java", "contra6"); System.out.println("Grafo 18 generado..."); */ createGraph("TestExamplePaperSimpleContra7.java", "contra7"); System.out.println("Grafo 19 generado..."); } private static void createGraph(String fileName, String graphName) throws IOException { Loading
iacfg/src/test/resources/TestExamplePaperSimpleContra7.java 0 → 100644 +86 −0 Original line number Diff line number Diff line public class TestExamplePaperSimple { public static void main(String[] args) { while (1 > 2) { System.out.println("S1"); p1(); System.out.println("S2"); p1(); System.out.println("S3"); } if (1 > 2) { System.out.println("S4"); r1(); System.out.println("S5"); } else { System.out.println("S6"); r1(); System.out.println("S7"); } if (20 < 10) { while (10 > 0) { r1(); System.out.println("S9"); } } else { while (10 > 0) { r1(); System.out.println("S10"); } } System.out.println("S11"); l(); System.out.println("S12"); } public static void p1() { p2(); l(); } public static void p2() { p3(); } public static void p3() { while (1 > 2) { System.out.println("P3!"); } l(); } public static void r1() { System.out.println("S20"); if (21 > 0) { r1(); } System.out.println("S23"); l(); System.out.println("S24"); } public static void l() { if (1 > 0) { m(); System.out.println("L3"); } } public static void m() { if (1 > 0) { n(); System.out.println("M3"); } } public static void n() { if (1 > 0) { l(); System.out.println("N3"); } } } No newline at end of file