private void enqueueHappyPath(ProgramPoint programPosition) { programPosition.block.successors().stream() .map(b-> (BytecodeCFG.Block)b) .filter(b -> !b.isCatchBlock()) .forEach(b -> enqueue(new ProgramPoint(b), programState)); }
private void enqueueUncheckedExceptions() { programPosition.block.successors() .stream() .map(BytecodeCFG.Block.class::cast) .filter(this::isUncheckedExceptionCatchBlock) .forEach(b -> enqueue(new ProgramPoint(b), stateWithException(programState, b))); }
private void enqueueHappyPath(ProgramPoint programPosition) { programPosition.block.successors().stream() .map(b-> (BytecodeCFG.Block)b) .filter(b -> !b.isCatchBlock()) .forEach(b -> enqueue(new ProgramPoint(b), programState)); }
if (programPosition.block.successors().isEmpty()) { endOfExecutionPath.add(node); continue;
if (programPosition.block.successors().isEmpty()) { endOfExecutionPath.add(node); continue;
if (otherBlocks.isEmpty()) { CFG.Block methodExit = node.programPoint.block.successors() .stream() .map(b -> (CFG.Block) b)
if (otherBlocks.isEmpty()) { CFG.Block methodExit = node.programPoint.block.successors() .stream() .map(b -> (CFG.Block) b)
private void enqueueExceptionHandlers(Type exceptionType, ProgramState ps) { List<BytecodeCFG.Block> blocksCatchingException = programPosition.block.successors().stream() .map(b -> (BytecodeCFG.Block) b) .filter(BytecodeCFG.Block::isCatchBlock) .filter(b -> isExceptionHandledByBlock(exceptionType, b)) .collect(Collectors.toList()); if (!blocksCatchingException.isEmpty()) { blocksCatchingException.forEach(b -> enqueue(new ProgramPoint(b), ps)); if (isCatchExhaustive(exceptionType, blocksCatchingException)) { return; } } // exception was not handled or was handled only partially, enqueue exit block with exceptional SV Preconditions.checkState(ps.peekValue() instanceof SymbolicValue.ExceptionalSymbolicValue, "Exception shall be on top of the stack"); ps.storeExitValue(); enqueue(new ProgramPoint(exitBlock), ps); }
private void enqueueExceptionHandlers(Type exceptionType, ProgramState ps) { List<BytecodeCFG.Block> blocksCatchingException = programPosition.block.successors().stream() .map(b -> (BytecodeCFG.Block) b) .filter(BytecodeCFG.Block::isCatchBlock) .filter(b -> isExceptionHandledByBlock(exceptionType, b)) .collect(Collectors.toList()); if (!blocksCatchingException.isEmpty()) { blocksCatchingException.forEach(b -> enqueue(new ProgramPoint(b), ps)); if (isCatchExhaustive(exceptionType, blocksCatchingException)) { return; } } // exception was not handled or was handled only partially, enqueue exit block with exceptional SV Preconditions.checkState(ps.peekValue() instanceof SymbolicValue.ExceptionalSymbolicValue, "Exception shall be on top of the stack"); ps.storeExitValue(); enqueue(new ProgramPoint(exitBlock), ps); }
private void enqueueUncheckedExceptions() { programPosition.block.successors() .stream() .map(BytecodeCFG.Block.class::cast) .filter(this::isUncheckedExceptionCatchBlock) .forEach(b -> enqueue(new ProgramPoint(b), stateWithException(programState, b))); }