From b320d02e1dbfa255ac0c919e37f89aa0108edaa5 Mon Sep 17 00:00:00 2001 From: bd-912 Date: Sat, 20 Apr 2024 13:23:01 -0600 Subject: Implement partial reachable tracking in CFG --- vaporize/library/ControlFlowGraph.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'vaporize/library/ControlFlowGraph.java') 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", -- cgit v1.2.3