protected AbstractCFG(IMethod method) { this.method = method; this.catchBlocks = new BitVector(10); }
/** * Return the NOT of a bit string */ public static BitVector not(BitVector s) { BitVector b = new BitVector(s); b.not(); return b; }
/** * Return the NOT of a bit string */ public static BitVector not(BitVector s) { BitVector b = new BitVector(s); b.not(); return b; }
/** * Return a new bit string as the AND of two others. */ public static BitVector andNot(BitVector b1, BitVector b2) { BitVector b = new BitVector(b1); b.andNot(b2); return b; }
/** * Return a new bit string as the AND of two others. */ public static BitVector andNot(BitVector b1, BitVector b2) { BitVector b = new BitVector(b1); b.andNot(b2); return b; }
/** * Return the NOT of a bit string */ public static BitVector not(BitVector s) { BitVector b = new BitVector(s); b.not(); return b; }
/** * */ public static Result perform(final ControlFlowGraph<SSAInstruction, ISSABasicBlock> cfg, final SymbolTable symtab) { return perform(cfg, symtab, new BitVector()); }
/** * Constructor: create an empty set corresponding to a given mapping * * @throws IllegalArgumentException if map is null */ public BitSet(OrdinalSetMapping<T> map) { if (map == null) { throw new IllegalArgumentException("map is null"); } int length = map.getMaximumIndex(); vector = new BitVector(length); this.map = map; }
/** * */ public static Result perform(final ControlFlowGraph<SSAInstruction, ISSABasicBlock> cfg, final SymbolTable symtab) { return perform(cfg, symtab, new BitVector()); }
private static BitVectorVariable newBV() { /* * If we do not initialize BitVectorVariable, with a BitVector, it contains * null, which may crash in combination with {@link BitVectorMinusVector} * used in {@link ExceptionTransferFunction} */ BitVectorVariable result = new BitVectorVariable(); result.addAll(new BitVector()); return result; } }
private static BitVector one() { BitVector b = new BitVector(); b.set(1); return b; }
private static BitVector zero() { BitVector b = new BitVector(); b.set(0); return b; }
public Exception2BitvectorTransformer(Set<TypeReference> exceptions) { createValues(exceptions); for (TypeReference exception : exceptions) { BitVector bv = new BitVector(values.getSize()); bv.set(values.getMappedIndex(exception)); } }
@Override public BitVector getCatchBlocks() { final BitVector bvOrig = orig.getCatchBlocks(); final BitVector bvThis = new BitVector(); for (final T block : this) { bvThis.set(block.getNumber()); } bvThis.and(bvOrig); return bvThis; }
public Exception2BitvectorTransformer(Set<TypeReference> exceptions) { createValues(exceptions); for (TypeReference exception : exceptions) { BitVector bv = new BitVector(values.getSize()); bv.set(values.getMappedIndex(exception)); } }
@Override public BitVector getCatchBlocks() { BitVector original = ir.getControlFlowGraph().getCatchBlocks(); BitVector result = new BitVector(); for (int i = 0; i <= original.max(); i++) { if (original.get(i)) { result.set(i + 1); } } return result; }
@Override public BitVector getCatchBlocks() { BitVector result = new BitVector(); BitVector blocks = cfg.getCatchBlocks(); int i = 0; while ((i = blocks.nextSetBit(i)) != -1) { if (nodes.containsNode(getNode(i))) { result.set(i); } } return result; }
@Override public BitVector getCatchBlocks() { BitVector result = new BitVector(); BitVector blocks = cfg.getCatchBlocks(); int i = 0; while ((i = blocks.nextSetBit(i)) != -1) { if (nodes.containsNode(getNode(i))) { result.set(i); } } return result; }
@Override public BitVector getCatchBlocks() { BitVector original = ir.getControlFlowGraph().getCatchBlocks(); BitVector result = new BitVector(); for (int i = 0; i <= original.max(); i++) { if (original.get(i)) { result.set(i + 1); } } return result; }