Commit 0a5d9d7a authored by Julian Francisco Gutierrez Ostrovsky's avatar Julian Francisco Gutierrez Ostrovsky
Browse files

Intento de logueo total al final

parent 46690471
No related merge requests found
......@@ -42,6 +42,7 @@ public class Launcher {
}
}
results.getAllVariablesStatus();
}
}));
soot.Main.main(args);
......
......@@ -17,6 +17,7 @@ public class DivisionByZeroAnalysis extends ForwardFlowAnalysis<Unit, ZeroAbstra
private HashMap<Unit, Boolean> possibleDivisionByZero = new HashMap<>();
private HashMap<Unit, String> value_logs = new HashMap<>();
private HashMap<String, String> variables_logs = new HashMap<>();
public DivisionByZeroAnalysis(UnitGraph graph) {
super(graph);
......@@ -42,6 +43,7 @@ public class DivisionByZeroAnalysis extends ForwardFlowAnalysis<Unit, ZeroAbstra
}
if(resolvedValue != null){
value_logs.put(unit,resolvedValue.toString());
variables_logs.put(variable.getName(),resolvedValue.toString());
}
// Set in flowed values
out.setValue(variable.getName(), resolvedValue);
......@@ -72,5 +74,13 @@ public class DivisionByZeroAnalysis extends ForwardFlowAnalysis<Unit, ZeroAbstra
public String getValueLogs(Unit unit){
return value_logs.getOrDefault(unit, "No information");
}
public String getAllVariablesStatus(){
String res="";
for (Map.Entry<String, String> entry : variables_logs.entrySet()) {
res=res+" "+entry.getKey()+": "+entry.getValue()+";";
}
return res;
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment