Loading sdg-core/src/main/java/es/upv/mist/slicing/graphs/jsysdg/JSysDG.java +1 −1 Original line number Diff line number Diff line Loading @@ -43,7 +43,7 @@ public class JSysDG extends ESSDG { // See creation strategy at http://kaz2.dsic.upv.es:3000/Fzg46cQvT1GzHQG9hFnP1g#Using-data-flow-in-the-SDG classGraph = createClassGraph(nodeList); buildCFGs(nodeList); // 1 CallGraph callGraph = createCallGraph(nodeList); // 2 CallGraph callGraph = createCallGraph(nodeList, classGraph); // 2 dataFlowAnalysis(callGraph); // 3 buildAndCopyPDGs(); // 4 connectCalls(callGraph); // 5 Loading sdg-core/src/main/java/es/upv/mist/slicing/nodes/VariableVisitor.java +8 −4 Original line number Diff line number Diff line Loading @@ -89,8 +89,6 @@ public class VariableVisitor extends GraphNodeContentVisitor<VariableVisitor.Act @Override public void visit(NameExpr n, Action action) { String prefix = this.getNamePrefix(n); // Add a prefix to the name ("this." or "CLASS.this.") n.setName(new SimpleName(prefix + n.getNameAsString())); acceptAction(n, action); } Loading @@ -117,6 +115,11 @@ public class VariableVisitor extends GraphNodeContentVisitor<VariableVisitor.Act } protected void acceptAction(Expression n, Action action) { if (n instanceof NameExpr) { // Add a prefix to the name ("this." or "CLASS.this.") when "n" is a NameExpr NameExpr en = (NameExpr) n; String prefix = this.getNamePrefix(en); // Add a prefix to the name ("this." or "CLASS.this.") en.setName(new SimpleName(prefix + en.getNameAsString())); } switch (action) { case DECLARATION: declConsumer.accept(graphNode, n); Loading Loading @@ -177,11 +180,12 @@ public class VariableVisitor extends GraphNodeContentVisitor<VariableVisitor.Act @Override public void visit(AssignExpr n, Action action) { // Value is always visited first since uses occur before definitions n.getValue().accept(this, action); // Target will be used if operator is not '=' if (n.getOperator() != AssignExpr.Operator.ASSIGN) n.getTarget().accept(this, action); visitAsDefinition(n.getTarget(), n.getValue(), action); n.getValue().accept(this, action); } @Override Loading Loading
sdg-core/src/main/java/es/upv/mist/slicing/graphs/jsysdg/JSysDG.java +1 −1 Original line number Diff line number Diff line Loading @@ -43,7 +43,7 @@ public class JSysDG extends ESSDG { // See creation strategy at http://kaz2.dsic.upv.es:3000/Fzg46cQvT1GzHQG9hFnP1g#Using-data-flow-in-the-SDG classGraph = createClassGraph(nodeList); buildCFGs(nodeList); // 1 CallGraph callGraph = createCallGraph(nodeList); // 2 CallGraph callGraph = createCallGraph(nodeList, classGraph); // 2 dataFlowAnalysis(callGraph); // 3 buildAndCopyPDGs(); // 4 connectCalls(callGraph); // 5 Loading
sdg-core/src/main/java/es/upv/mist/slicing/nodes/VariableVisitor.java +8 −4 Original line number Diff line number Diff line Loading @@ -89,8 +89,6 @@ public class VariableVisitor extends GraphNodeContentVisitor<VariableVisitor.Act @Override public void visit(NameExpr n, Action action) { String prefix = this.getNamePrefix(n); // Add a prefix to the name ("this." or "CLASS.this.") n.setName(new SimpleName(prefix + n.getNameAsString())); acceptAction(n, action); } Loading @@ -117,6 +115,11 @@ public class VariableVisitor extends GraphNodeContentVisitor<VariableVisitor.Act } protected void acceptAction(Expression n, Action action) { if (n instanceof NameExpr) { // Add a prefix to the name ("this." or "CLASS.this.") when "n" is a NameExpr NameExpr en = (NameExpr) n; String prefix = this.getNamePrefix(en); // Add a prefix to the name ("this." or "CLASS.this.") en.setName(new SimpleName(prefix + en.getNameAsString())); } switch (action) { case DECLARATION: declConsumer.accept(graphNode, n); Loading Loading @@ -177,11 +180,12 @@ public class VariableVisitor extends GraphNodeContentVisitor<VariableVisitor.Act @Override public void visit(AssignExpr n, Action action) { // Value is always visited first since uses occur before definitions n.getValue().accept(this, action); // Target will be used if operator is not '=' if (n.getOperator() != AssignExpr.Operator.ASSIGN) n.getTarget().accept(this, action); visitAsDefinition(n.getTarget(), n.getValue(), action); n.getValue().accept(this, action); } @Override Loading