Loading src/main/java/tfm/graphs/pdg/ControlDependencyBuilder.java +2 −3 Original line number Diff line number Diff line package tfm.graphs.pdg; import tfm.arcs.Arc; import tfm.graphs.cfg.CFG; import tfm.graphs.pdg.PDG; import tfm.graphs.augmented.PPDG; import tfm.graphs.cfg.CFG; import tfm.nodes.GraphNode; import tfm.nodes.NodeFactory; Loading @@ -29,7 +28,7 @@ import java.util.stream.Collectors; * <b>Usage:</b> pass an empty {@link PDG} and a filled {@link CFG} and then run {@link #analyze()}. * This builder should only be used once, and then discarded. */ public class ControlDependencyBuilder { class ControlDependencyBuilder { private final PDG pdg; private final CFG cfg; Loading src/test/java/tfm/HandCraftedGraphs.java→src/test/java/tfm/graphs/pdg/HandCraftedGraphs.java +1 −2 Original line number Diff line number Diff line package tfm; package tfm.graphs.pdg; import com.github.javaparser.ast.NodeList; import com.github.javaparser.ast.body.MethodDeclaration; Loading @@ -12,7 +12,6 @@ import tfm.graphs.augmented.ACFG; import tfm.graphs.augmented.APDG; import tfm.graphs.augmented.PPDG; import tfm.nodes.GraphNode; import tfm.graphs.pdg.ControlDependencyBuilder; public class HandCraftedGraphs { public static APDG problem1WithGotos() { Loading src/test/java/tfm/PDGTests.java→src/test/java/tfm/graphs/pdg/PDGTests.java +7 −9 Original line number Diff line number Diff line package tfm; package tfm.graphs.pdg; import com.github.javaparser.JavaParser; import com.github.javaparser.ast.Modifier; Loading @@ -11,17 +11,15 @@ import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.MethodSource; import tfm.exec.GraphLog; import tfm.exec.PDGLog; import tfm.graphs.cfg.CFG; import tfm.graphs.pdg.PDG; import tfm.graphs.augmented.ACFG; import tfm.graphs.augmented.APDG; import tfm.graphs.augmented.PPDG; import tfm.graphs.cfg.CFG; import tfm.nodes.GraphNode; import tfm.slicing.GraphNodeCriterion; import tfm.slicing.Slice; import tfm.slicing.SlicingCriterion; import tfm.utils.Logger; import tfm.graphs.pdg.ControlDependencyBuilder; import java.io.File; import java.io.IOException; Loading @@ -40,19 +38,19 @@ public class PDGTests { private boolean error = false; @ParameterizedTest(name = "[{index}] {0} ({1})") @MethodSource("tfm.FileFinder#findAllMethodDeclarations") @MethodSource("tfm.utils.FileFinder#findAllMethodDeclarations") public void ppdgTest(File file, String methodName, MethodDeclaration root) throws IOException { runPdg(file, methodName, root, new PPDG()); } @ParameterizedTest(name = "[{index}] {0} ({1})") @MethodSource("tfm.FileFinder#findAllMethodDeclarations") @MethodSource("tfm.utils.FileFinder#findAllMethodDeclarations") public void apdgTest(File file, String methodName, MethodDeclaration root) throws IOException { runPdg(file, methodName, root, new APDG()); } @ParameterizedTest(name = "[{index}] {0} ({1})") @MethodSource("tfm.FileFinder#findAllMethodDeclarations") @MethodSource("tfm.utils.FileFinder#findAllMethodDeclarations") public void pdgTest(File file, String methodName, MethodDeclaration root) throws IOException { runPdg(file, methodName, root, new PDG()); } Loading @@ -70,8 +68,8 @@ public class PDGTests { } @ParameterizedTest(name = "[{index}] {0} ({1})") @MethodSource("tfm.FileFinder#findAllMethodDeclarations") public void pdgCompare(File file, String methodName, MethodDeclaration root) throws IOException { @MethodSource("tfm.utils.FileFinder#findAllMethodDeclarations") public void pdgCompare(File file, String methodName, MethodDeclaration root) { ControlDependencyBuilder ctrlDepBuilder; if (containsUnsupportedStatements(root)) { Loading src/test/java/tfm/FileFinder.java→src/test/java/tfm/utils/FileFinder.java +1 −1 Original line number Diff line number Diff line package tfm; package tfm.utils; import com.github.javaparser.JavaParser; import com.github.javaparser.ast.body.MethodDeclaration; Loading Loading
src/main/java/tfm/graphs/pdg/ControlDependencyBuilder.java +2 −3 Original line number Diff line number Diff line package tfm.graphs.pdg; import tfm.arcs.Arc; import tfm.graphs.cfg.CFG; import tfm.graphs.pdg.PDG; import tfm.graphs.augmented.PPDG; import tfm.graphs.cfg.CFG; import tfm.nodes.GraphNode; import tfm.nodes.NodeFactory; Loading @@ -29,7 +28,7 @@ import java.util.stream.Collectors; * <b>Usage:</b> pass an empty {@link PDG} and a filled {@link CFG} and then run {@link #analyze()}. * This builder should only be used once, and then discarded. */ public class ControlDependencyBuilder { class ControlDependencyBuilder { private final PDG pdg; private final CFG cfg; Loading
src/test/java/tfm/HandCraftedGraphs.java→src/test/java/tfm/graphs/pdg/HandCraftedGraphs.java +1 −2 Original line number Diff line number Diff line package tfm; package tfm.graphs.pdg; import com.github.javaparser.ast.NodeList; import com.github.javaparser.ast.body.MethodDeclaration; Loading @@ -12,7 +12,6 @@ import tfm.graphs.augmented.ACFG; import tfm.graphs.augmented.APDG; import tfm.graphs.augmented.PPDG; import tfm.nodes.GraphNode; import tfm.graphs.pdg.ControlDependencyBuilder; public class HandCraftedGraphs { public static APDG problem1WithGotos() { Loading
src/test/java/tfm/PDGTests.java→src/test/java/tfm/graphs/pdg/PDGTests.java +7 −9 Original line number Diff line number Diff line package tfm; package tfm.graphs.pdg; import com.github.javaparser.JavaParser; import com.github.javaparser.ast.Modifier; Loading @@ -11,17 +11,15 @@ import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.MethodSource; import tfm.exec.GraphLog; import tfm.exec.PDGLog; import tfm.graphs.cfg.CFG; import tfm.graphs.pdg.PDG; import tfm.graphs.augmented.ACFG; import tfm.graphs.augmented.APDG; import tfm.graphs.augmented.PPDG; import tfm.graphs.cfg.CFG; import tfm.nodes.GraphNode; import tfm.slicing.GraphNodeCriterion; import tfm.slicing.Slice; import tfm.slicing.SlicingCriterion; import tfm.utils.Logger; import tfm.graphs.pdg.ControlDependencyBuilder; import java.io.File; import java.io.IOException; Loading @@ -40,19 +38,19 @@ public class PDGTests { private boolean error = false; @ParameterizedTest(name = "[{index}] {0} ({1})") @MethodSource("tfm.FileFinder#findAllMethodDeclarations") @MethodSource("tfm.utils.FileFinder#findAllMethodDeclarations") public void ppdgTest(File file, String methodName, MethodDeclaration root) throws IOException { runPdg(file, methodName, root, new PPDG()); } @ParameterizedTest(name = "[{index}] {0} ({1})") @MethodSource("tfm.FileFinder#findAllMethodDeclarations") @MethodSource("tfm.utils.FileFinder#findAllMethodDeclarations") public void apdgTest(File file, String methodName, MethodDeclaration root) throws IOException { runPdg(file, methodName, root, new APDG()); } @ParameterizedTest(name = "[{index}] {0} ({1})") @MethodSource("tfm.FileFinder#findAllMethodDeclarations") @MethodSource("tfm.utils.FileFinder#findAllMethodDeclarations") public void pdgTest(File file, String methodName, MethodDeclaration root) throws IOException { runPdg(file, methodName, root, new PDG()); } Loading @@ -70,8 +68,8 @@ public class PDGTests { } @ParameterizedTest(name = "[{index}] {0} ({1})") @MethodSource("tfm.FileFinder#findAllMethodDeclarations") public void pdgCompare(File file, String methodName, MethodDeclaration root) throws IOException { @MethodSource("tfm.utils.FileFinder#findAllMethodDeclarations") public void pdgCompare(File file, String methodName, MethodDeclaration root) { ControlDependencyBuilder ctrlDepBuilder; if (containsUnsupportedStatements(root)) { Loading
src/test/java/tfm/FileFinder.java→src/test/java/tfm/utils/FileFinder.java +1 −1 Original line number Diff line number Diff line package tfm; package tfm.utils; import com.github.javaparser.JavaParser; import com.github.javaparser.ast.body.MethodDeclaration; Loading