diff options
author | bd-912 <bdunahu@colostate.edu> | 2024-04-20 13:23:01 -0600 |
---|---|---|
committer | bd-912 <bdunahu@colostate.edu> | 2024-04-20 13:23:01 -0600 |
commit | b320d02e1dbfa255ac0c919e37f89aa0108edaa5 (patch) | |
tree | 2c9660327a0b944cf2779ae45b9c1de825d9a9c5 /vaporize/library/ControlFlowGraph.java | |
parent | c5ec4e0c84e5199d5a5ad418a0480749fcf17bab (diff) |
Implement partial reachable tracking in CFG
Diffstat (limited to 'vaporize/library/ControlFlowGraph.java')
-rw-r--r-- | vaporize/library/ControlFlowGraph.java | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/vaporize/library/ControlFlowGraph.java b/vaporize/library/ControlFlowGraph.java index 2a8caef..1e24dd6 100644 --- a/vaporize/library/ControlFlowGraph.java +++ b/vaporize/library/ControlFlowGraph.java @@ -44,7 +44,7 @@ public class ControlFlowGraph { } if (ret == null) - MinimalLogger.severe(String.format("Could not find a node matching %s", + MinimalLogger.severe(String.format("Could not find the next node for %s", a.toString())); return ret; @@ -58,6 +58,8 @@ public class ControlFlowGraph { protected String addEdge(CFGNode source, CFGNode dest) { /** * Iff the CFGNodes are different, construct an edge between them. + * All variables reaching the parent also reach the children. + * * Returns a string capable of being manipulated by graphviz. */ String ret = ""; @@ -70,6 +72,8 @@ public class ControlFlowGraph { source.addDest(dest); dest.addSource(source); + + dest.getReaching().addAll(source.getReaching()); ret += ";"; } else { MinimalLogger.info(String.format("Skipping duplicate edge for %d", |