Loading e-Knife/src/main/java/eknife/EKnife.java +11 −3 Original line number Diff line number Diff line Loading @@ -163,7 +163,10 @@ public class EKnife { kArgs.setGraphFile(new File(args[argIndex + 1])); break; case "--ignore-constraints": kArgs.algClass = AdaptedStandardAlgorithm.class; kArgs.constrainedAlgorithm = false; break; case "--intraprocedural": kArgs.intraproceduralAlgorithm = true; break; } } Loading @@ -185,6 +188,7 @@ public class EKnife { help += " -G,--print-graph <file.dot> Exports the graph as a dot file\n"; help += " -G,--print-graph <file.pdf> Exports the graph as a PDF file\n"; help += " --ignore-constraints Generates constraints but ignores when slicing\n"; help += " --intraprocedural Makes the slice intraprocedural, the algorithm will not traverse function bounds\n"; help += " --help Show this message.\n"; System.out.print(help); Loading Loading @@ -666,8 +670,9 @@ public class EKnife { int occurrence = 1; File graphFile; GraphFormat graphFormat; Class<? extends SlicingAlgorithm> algClass = OnePassConstrainedAlgorithm.class; boolean intraproceduralAlgorithm = false; boolean constrainedAlgorithm = true; Class<? extends SlicingAlgorithm> algClass; void setGraphFile(File graphFile) { if (graphFile.getName().endsWith(".dot")) Loading @@ -684,6 +689,9 @@ public class EKnife { void completeData() { if (file == null && inputPath != null && new File(inputPath).isFile()) file = new File(inputPath).getName(); if (intraproceduralAlgorithm) algClass = constrainedAlgorithm ? OnePassConstrainedAlgorithm.class : AdaptedStandardAlgorithm.class; else algClass = constrainedAlgorithm ? ConstrainedAlgorithm.class : StandardAlgorithm.class; } boolean isValid() { Loading Loading
e-Knife/src/main/java/eknife/EKnife.java +11 −3 Original line number Diff line number Diff line Loading @@ -163,7 +163,10 @@ public class EKnife { kArgs.setGraphFile(new File(args[argIndex + 1])); break; case "--ignore-constraints": kArgs.algClass = AdaptedStandardAlgorithm.class; kArgs.constrainedAlgorithm = false; break; case "--intraprocedural": kArgs.intraproceduralAlgorithm = true; break; } } Loading @@ -185,6 +188,7 @@ public class EKnife { help += " -G,--print-graph <file.dot> Exports the graph as a dot file\n"; help += " -G,--print-graph <file.pdf> Exports the graph as a PDF file\n"; help += " --ignore-constraints Generates constraints but ignores when slicing\n"; help += " --intraprocedural Makes the slice intraprocedural, the algorithm will not traverse function bounds\n"; help += " --help Show this message.\n"; System.out.print(help); Loading Loading @@ -666,8 +670,9 @@ public class EKnife { int occurrence = 1; File graphFile; GraphFormat graphFormat; Class<? extends SlicingAlgorithm> algClass = OnePassConstrainedAlgorithm.class; boolean intraproceduralAlgorithm = false; boolean constrainedAlgorithm = true; Class<? extends SlicingAlgorithm> algClass; void setGraphFile(File graphFile) { if (graphFile.getName().endsWith(".dot")) Loading @@ -684,6 +689,9 @@ public class EKnife { void completeData() { if (file == null && inputPath != null && new File(inputPath).isFile()) file = new File(inputPath).getName(); if (intraproceduralAlgorithm) algClass = constrainedAlgorithm ? OnePassConstrainedAlgorithm.class : AdaptedStandardAlgorithm.class; else algClass = constrainedAlgorithm ? ConstrainedAlgorithm.class : StandardAlgorithm.class; } boolean isValid() { Loading