void enqueue(ProgramPoint pp, ProgramState programState) { int nbOfExecution = programState.numberOfTimeVisited(pp); if (nbOfExecution > MAX_EXEC_PROGRAM_POINT) { return; } ProgramState ps = programState.visitedPoint(pp, nbOfExecution + 1); ExplodedGraph.Node cachedNode = explodedGraph.node(pp, ps); cachedNode.addParent(node, null); if (cachedNode.isNew()) { workList.addFirst(cachedNode); } }
void enqueue(ProgramPoint pp, ProgramState programState) { int nbOfExecution = programState.numberOfTimeVisited(pp); if (nbOfExecution > MAX_EXEC_PROGRAM_POINT) { return; } ProgramState ps = programState.visitedPoint(pp, nbOfExecution + 1); ExplodedGraph.Node cachedNode = explodedGraph.node(pp, ps); cachedNode.addParent(node, null); if (cachedNode.isNew()) { workList.addFirst(cachedNode); } }
public void enqueue(ExplodedGraph.ProgramPoint programPoint, ProgramState programState, boolean exitPath) { int nbOfExecution = programState.numberOfTimeVisited(programPoint); if (nbOfExecution > MAX_EXEC_PROGRAM_POINT) { debugPrint(programState); return; } checkExplodedGraphTooBig(programState); ExplodedGraph.Node cachedNode = explodedGraph.getNode(programPoint, programState.visitedPoint(programPoint, nbOfExecution + 1)); if (!cachedNode.isNew && exitPath == cachedNode.exitPath) { // has been enqueued earlier return; } cachedNode.exitPath = exitPath; workList.addFirst(cachedNode); }
public void enqueue(ProgramPoint newProgramPoint, ProgramState programState, boolean exitPath, @Nullable MethodYield methodYield) { ProgramPoint programPoint = newProgramPoint; int nbOfExecution = programState.numberOfTimeVisited(programPoint); if (nbOfExecution > MAX_EXEC_PROGRAM_POINT) { if (isRestartingForEachLoop(programPoint)) { // reached the max number of visit by program point, so take the false branch with current program state programPoint = new ProgramPoint(((CFG.Block) programPoint.block).falseBlock()); } else { debugPrint(programPoint); return; } } checkExplodedGraphTooBig(programState); ProgramState ps = programState.visitedPoint(programPoint, nbOfExecution + 1); ExplodedGraph.Node cachedNode = explodedGraph.node(programPoint, ps); if (!cachedNode.isNew() && exitPath == cachedNode.exitPath) { // has been enqueued earlier cachedNode.addParent(node, methodYield); return; } cachedNode.exitPath = exitPath; cachedNode.addParent(node, methodYield); workList.addFirst(cachedNode); }
public void enqueue(ProgramPoint newProgramPoint, ProgramState programState, boolean exitPath, @Nullable MethodYield methodYield) { ProgramPoint programPoint = newProgramPoint; int nbOfExecution = programState.numberOfTimeVisited(programPoint); if (nbOfExecution > MAX_EXEC_PROGRAM_POINT) { if (isRestartingForEachLoop(programPoint)) { // reached the max number of visit by program point, so take the false branch with current program state programPoint = new ProgramPoint(((CFG.Block) programPoint.block).falseBlock()); } else { debugPrint(programPoint); return; } } checkExplodedGraphTooBig(programState); ProgramState ps = programState.visitedPoint(programPoint, nbOfExecution + 1); ExplodedGraph.Node cachedNode = explodedGraph.node(programPoint, ps); if (!cachedNode.isNew() && exitPath == cachedNode.exitPath) { // has been enqueued earlier cachedNode.addParent(node, methodYield); return; } cachedNode.exitPath = exitPath; cachedNode.addParent(node, methodYield); workList.addFirst(cachedNode); }