HashMap<ICFGNode<N>, IResult<LE>> labeledResultsBefore = new HashMap<ICFGNode<N>, IResult<LE>>();
HashMap<ICFGNode<N>, IResult<LE>> labeledResultsAfter = new HashMap<ICFGNode<N>, IResult<LE>>();
HashMap<N, Set<ICFGNode<N>>> nodeMap = new HashMap<N, Set<ICFGNode<N>>>();
// 0. Verify and Collect required data: direction, lattice, CFG
AnalysisDirection direction;
IControlFlowGraph<N> cfg;
OP ops;
LE entry;
direction = getAnalysisDirection();
assert direction != null : "Cannot perform dataflow analysis without a direction";
ops = getLatticeOperations();
assert ops != null : "Cannot perform analysis without lattice operations";
entry = getEntryValue();
if(entry == null)
// always check this one since not sure when this would fail subsequently
throw new NullPointerException("Cannot perform dataflow analysis without entry analysis information");
cfg = getControlFlowGraph();
assert cfg != null : "Cannot perform dataflow analysis without a CFG";
// Populate fields about the current analysis
boolean isForward = direction.equals(AnalysisDirection.FORWARD_ANALYSIS);
Map<ICFGNode<N>, IResult<LE>> resultsBeforeAnalyzing;
Map<ICFGNode<N>, IResult<LE>> resultsAfterAnalyzing;
// make result mappings relative to analysis direction
// will use results[Before|After]Analyzing throughout the algorithm
if (isForward) {