/** * {@code i == blockSize} means we are pointing to terminator block, {@code i == blockSize + 1} is valid if terminator block is branching * @see ExplodedGraphWalker#execute */ private ProgramPoint(CFG.IBlock<?> block, int i) { int blockSize = block.elements().size(); Preconditions.checkState(i < blockSize + 2, "CFG Block has %s elements but PP at %s was requested", blockSize, i); this.block = block; this.i = i; this.hashcode = block.id() * 31 + i; }
/** * {@code i == blockSize} means we are pointing to terminator block, {@code i == blockSize + 1} is valid if terminator block is branching * @see ExplodedGraphWalker#execute */ private ProgramPoint(CFG.IBlock<?> block, int i) { int blockSize = block.elements().size(); Preconditions.checkState(i < blockSize + 2, "CFG Block has %s elements but PP at %s was requested", blockSize, i); this.block = block; this.i = i; this.hashcode = block.id() * 31 + i; }
@Override public String toString() { String tree = ""; if (block instanceof CFG.Block) { List<Tree> elements = ((CFG.Block) block).elements(); if (i < elements.size()) { tree = "" + elements.get(i).kind() + elements.get(i).firstToken().line(); } } return "B" + block.id() + "." + i + " " + tree; }
@Override public String toString() { return "B" + programPoint.block.id() + "." + programPoint.i + ": " + programState; }
@Override public String toString() { return "B" + programPoint.block.id() + "." + programPoint.i + ": " + programState; }
@Override public String toString() { String tree = ""; if (block instanceof CFG.Block) { List<Tree> elements = ((CFG.Block) block).elements(); if (i < elements.size()) { tree = "" + elements.get(i).kind() + elements.get(i).firstToken().line(); } } return "B" + block.id() + "." + i + " " + tree; }