private Map<Location,AbstractState> flattenArtOntoVpcLocations(){
  SetMultimap<Location,AbstractState> vpcSensitiveReached=HashMultimap.create();
  Deque<AbstractState> worklist=new LinkedList<AbstractState>();
  worklist.add(art.getRoot());
  Set<AbstractState> visited=new HashSet<AbstractState>();
  visited.add(art.getRoot());
  while (!worklist.isEmpty()) {
    AbstractState headState=worklist.removeFirst();
    if (isVpcStateBot(headState))     continue;
    BasedNumberElement vpcVal=getVPC(headState);
    VpcLocation headVpcLoc=new VpcLocation(vpcVal,(RTLLabel)headState.getLocation());
    vpcSensitiveReached.put(headVpcLoc,headState);
    Set<Pair<CFAEdge,AbstractState>> successors=art.getChildren(headState);
    for (    Pair<CFAEdge,AbstractState> sPair : successors) {
      AbstractState nextState=sPair.getRight();
      if (!visited.contains(nextState)) {
        visited.add(nextState);
        worklist.add(nextState);
      }
    }
  }
  Map<Location,AbstractState> constants=new HashMap<Location,AbstractState>();
  for (  Location l : vpcSensitiveReached.keySet()) {
    constants.put(l,Lattices.joinAll(vpcSensitiveReached.get(l)));
  }
  return constants;
}

private Map < Location , AbstractState > flattenArtOntoVpcLocations ( ) { SetMultimap < Location , AbstractState > vpcSensitiveReached = HashMultimap . create ( ) ; Deque < AbstractState > worklist = new LinkedList < AbstractState > ( ) ; worklist . add ( art . getRoot ( ) ) ; Set < AbstractState > visited = new HashSet < AbstractState > ( ) ; visited . add ( art . getRoot ( ) ) ; while ( ! worklist . isEmpty ( ) ) { AbstractState headState = worklist . removeFirst ( ) ; if ( isVpcStateBot ( headState ) ) continue ; BasedNumberElement vpcVal = getVPC ( headState ) ; VpcLocation headVpcLoc = new VpcLocation ( vpcVal , ( RTLLabel ) headState . getLocation ( ) ) ; vpcSensitiveReached . put ( headVpcLoc , headState ) ; Set < Pair < CFAEdge , AbstractState > > successors = art . getChildren ( headState ) ; for ( Pair < CFAEdge , AbstractState > sPair : successors ) { AbstractState nextState = sPair . getRight ( ) ; if ( ! visited . contains ( nextState ) ) { visited . add ( nextState ) ; worklist . add ( nextState ) ; } } } Map < Location , AbstractState > constants = new HashMap < Location , AbstractState > ( ) ; for ( Location l : vpcSensitiveReached . keySet ( ) ) { constants . put ( l , Lattices . joinAll ( vpcSensitiveReached . get ( l ) ) ) ; } return constants ; }
fold art into a map from vpc locations to sets of abstract states , and then flatten the state sets into single abstract states by joining .
