private void refineRelevantPredicatesComputer(List<ARGState> pPath, ARGReachedSet pReached) { UnmodifiableReachedSet reached = pReached.asReachedSet(); Precision oldPrecision = reached.getPrecision(reached.getLastState()); PredicatePrecision oldPredicatePrecision = Precisions.extractPrecisionByType(oldPrecision, PredicatePrecision.class); BlockPartitioning partitioning = predicateCpa.getPartitioning(); Deque<Block> openBlocks = new ArrayDeque<>(); openBlocks.push(partitioning.getMainBlock()); for (ARGState pathElement : pPath) { CFANode currentNode = AbstractStates.extractLocation(pathElement); Integer currentNodeInstance = getPredicateState(pathElement).getAbstractionLocationsOnPath().get(currentNode); if (partitioning.isCallNode(currentNode)) { openBlocks.push(partitioning.getBlockForCallNode(currentNode)); } Collection<AbstractionPredicate> localPreds = oldPredicatePrecision.getPredicates(currentNode, currentNodeInstance); for (Block block : openBlocks) { for (AbstractionPredicate pred : localPreds) { relevantPredicatesComputer.considerPredicateAsRelevant(block, pred); } } while (openBlocks.peek().isReturnNode(currentNode)) { openBlocks.pop(); } } }
@Override public boolean alwaysReturnsFalse() { return super.alwaysReturnsFalse() && partitioning.getBlocks().isEmpty(); }
/** @see {@link BlockOperator#isBlockEnd} */ @Override public boolean isBlockEnd(CFANode succLoc, CFANode predLoc, CFAEdge edge, PathFormula pPf) { return super.isBlockEnd(succLoc, predLoc, edge, pPf) || partitioning.isCallNode(succLoc) || partitioning.isReturnNode(succLoc); }