1 19 20 package edu.umd.cs.findbugs.ba; 21 22 31 public abstract class BackwardDataflowAnalysis<Fact> extends AbstractDataflowAnalysis<Fact> { 32 private ReverseDepthFirstSearch rdfs; 33 private DepthFirstSearch dfs; 34 35 public BackwardDataflowAnalysis(ReverseDepthFirstSearch rdfs, DepthFirstSearch dfs) { 36 if (rdfs == null || dfs == null) throw new IllegalArgumentException (); 37 this.rdfs = rdfs; 38 this.dfs = dfs; 39 } 40 41 protected ReverseDepthFirstSearch getReverseDepthFirstSearch() { 42 return rdfs; 43 } 44 45 public boolean isForwards() { 46 return false; 47 } 48 49 public BlockOrder getBlockOrder(CFG cfg) { 50 return new ReverseDFSOrder(cfg, rdfs, dfs); 51 } 52 } 53 54 | Popular Tags |