@Test void test_limited_loop_execution() throws Exception { CheckVerifier.newVerifier() .onFile("src/test/files/se/SeEngineTestCase.java") .withCheck(new SymbolicExecutionVisitor(Collections.emptyList(), new BehaviorCache()) { @Override public void visitNode(Tree tree) { try { MethodTree methodTree = (MethodTree) tree; new ExplodedGraphWalker(this.behaviorCache, (Sema) context.getSemanticModel()).visitMethod(methodTree, methodBehaviorForSymbol(methodTree.symbol())); } catch (ExplodedGraphWalker.MaximumStepsReachedException exception) { fail("loop execution should be limited"); } } }) .withClassPath(SETestUtils.CLASS_PATH) .verifyNoIssues(); }
public MethodBehavior visitMethod(MethodTree tree) { return visitMethod(tree, null); }
ExplodedGraphWalker { public MethodBehavior visitMethod(MethodTree tree) { return visitMethod(tree, null); } }
ExplodedGraphWalker { public MethodBehavior visitMethod(MethodTree tree) { return visitMethod(tree, null); } @VisibleForTesting  ExplodedGraphWalker(BehaviorCache behaviorCache, Sema semanticModel); @VisibleForTesting  ExplodedGraphWalker(BehaviorCache behaviorCache, Sema semanticModel, boolean cleanup); @VisibleForTesting protected  ExplodedGraphWalker(List<SECheck> seChecks, BehaviorCache behaviorCache, Sema semanticModel); }
ExplodedGraphWalker { public MethodBehavior visitMethod(MethodTree tree) { return visitMethod(tree, null); } @VisibleForTesting  ExplodedGraphWalker(BehaviorCache behaviorCache, Sema semanticModel); @VisibleForTesting  ExplodedGraphWalker(BehaviorCache behaviorCache, Sema semanticModel, boolean cleanup); @VisibleForTesting protected  ExplodedGraphWalker(List<SECheck> seChecks, BehaviorCache behaviorCache, Sema semanticModel); MethodBehavior visitMethod(MethodTree tree); MethodBehavior visitMethod(MethodTree tree, @Nullable MethodBehavior methodBehavior); void addExceptionalYield(SymbolicValue target, ProgramState exceptionalState, String exceptionFullyQualifiedName, SECheck check); void clearStack(Tree tree); void enqueue(ProgramPoint programPoint, ProgramState programState); void enqueue(ProgramPoint programPoint, ProgramState programState, @Nullable MethodYield methodYield); void enqueue(ProgramPoint newProgramPoint, ProgramState programState, boolean exitPath); void enqueue(ProgramPoint newProgramPoint, ProgramState programState, boolean exitPath, @Nullable MethodYield methodYield); }
ExplodedGraphWalker { public MethodBehavior visitMethod(MethodTree tree) { return visitMethod(tree, null); } @VisibleForTesting  ExplodedGraphWalker(BehaviorCache behaviorCache, Sema semanticModel); @VisibleForTesting  ExplodedGraphWalker(BehaviorCache behaviorCache, Sema semanticModel, boolean cleanup); @VisibleForTesting protected  ExplodedGraphWalker(List<SECheck> seChecks, BehaviorCache behaviorCache, Sema semanticModel); MethodBehavior visitMethod(MethodTree tree); MethodBehavior visitMethod(MethodTree tree, @Nullable MethodBehavior methodBehavior); void addExceptionalYield(SymbolicValue target, ProgramState exceptionalState, String exceptionFullyQualifiedName, SECheck check); void clearStack(Tree tree); void enqueue(ProgramPoint programPoint, ProgramState programState); void enqueue(ProgramPoint programPoint, ProgramState programState, @Nullable MethodYield methodYield); void enqueue(ProgramPoint newProgramPoint, ProgramState programState, boolean exitPath); void enqueue(ProgramPoint newProgramPoint, ProgramState programState, boolean exitPath, @Nullable MethodYield methodYield); static final int MAX_NESTED_BOOLEAN_STATES; static final MethodMatchers EQUALS_METHODS; }