"src/git@mist.dsic.upv.es:program-slicing/SDG.git" did not exist on "1a40875c3602a734a7a6c7d5f630a29afa89e28a"
Newer
Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
package tfm.visitors;
import com.github.javaparser.ast.expr.Expression;
import com.github.javaparser.ast.stmt.ExpressionStmt;
import tfm.graphs.PDGGraph;
import tfm.nodes.PDGNode;
import tfm.scopes.Scope;
import tfm.scopes.ScopeHolder;
import tfm.scopes.VariableScope;
import tfm.variables.VariableExtractor;
public class LoopDataVisitor extends PDGVisitor {
Scope<PDGNode> firstDeclarationScope;
public LoopDataVisitor(PDGGraph graph, ScopeHolder<PDGNode> scopeHolder) {
super(graph, scopeHolder);
}
@Override
public void visit(ExpressionStmt expressionStmt, ScopeHolder<PDGNode> scope) {
// new VariableExtractor()
// .setOnVariableDefinitionListener(variable -> {
// if (firstDeclarationScope != null) {
//
// }
// }).setOnVariableUseListener(variable -> {
// expressionScope.addVariableUse(variable, expressionNode);
//
// Scope<PDGNode> searchScope = scope.isVariableDefined(variable) ? scope : globalScope;
//
// searchScope.getLastDefinitions(variable)
// .forEach(variableDefinition -> graph.addDataDependencyArc(
// variableDefinition.getNode(),
// expressionNode,
// variable
// ));
// })
// .visit(expression);
}
}