void () { mapSupportPoints = new HashMap<>(); calcReachabilitySuppPoints(EdgeType.REGULAR); iterateReachability((node, mapSets) -> { Integer nodeid = node.id; FastFixedSet<Integer> setReachability = mapSets.get(nodeid); List<FastFixedSet<Integer>> lstPredSets = new ArrayList<>(); for (StatEdge prededge : node.getPredecessorEdges(EdgeType.REGULAR)) { FastFixedSet<Integer> setPred = mapSets.get(prededge.getSource().id); if (setPred == null) { setPred = mapSupportPoints.get(prededge.getSource().id); } // setPred cannot be empty as it is a reachability set lstPredSets.add(setPred); } for (Integer id : setReachability) { FastFixedSet<Integer> setReachabilityCopy = setReachability.getCopy(); FastFixedSet<Integer> setIntersection = factory.spawnEmptySet(); boolean isIntersectionInitialized = false; for (FastFixedSet<Integer> predset : lstPredSets) { if (predset.contains(id)) { if (!isIntersectionInitialized) { setIntersection.union(predset); isIntersectionInitialized = true; } else { setIntersection.intersection(predset); } } } if (nodeid != id.intValue()) { setIntersection.add(nodeid); } else { setIntersection.remove(nodeid); } setReachabilityCopy.complement(setIntersection); mapExtPostdominators.get(id).complement(setReachabilityCopy); } return false; }, EdgeType.REGULAR); // exception handlers cannot be postdominator nodes // TODO: replace with a standard set? FastFixedSet<Integer> setHandlers = factory.spawnEmptySet(); boolean handlerfound = false; for (Statement stat : statement.getStats()) { if (stat.getPredecessorEdges(EdgeType.DIRECT_ALL).isEmpty() && !stat.getPredecessorEdges(EdgeType.EXCEPTION).isEmpty()) { // exception handler setHandlers.add(stat.id); handlerfound = true; } } if (handlerfound) { for (FastFixedSet<Integer> set : mapExtPostdominators.values()) { set.complement(setHandlers); } } }