@Override public byte evaluate(PointsToSetVariable lhs, PointsToSetVariable rhs) { if (PropagationCallGraphBuilder.DEBUG_ASSIGN) { String S = "EVAL Assign " + lhs.getPointerKey() + ' ' + rhs.getPointerKey(); S = S + "\nEVAL " + lhs + ' ' + rhs; System.err.println(S); } boolean changed = lhs.addAll(rhs); if (PropagationCallGraphBuilder.DEBUG_ASSIGN) { System.err.println("RESULT " + lhs + (changed ? " (changed)" : "")); } return changed ? CHANGED : NOT_CHANGED; }
@Override public byte evaluate(PointsToSetVariable lhs, PointsToSetVariable rhs) { if (PropagationCallGraphBuilder.DEBUG_ASSIGN) { String S = "EVAL Assign " + lhs.getPointerKey() + ' ' + rhs.getPointerKey(); S = S + "\nEVAL " + lhs + ' ' + rhs; System.err.println(S); } boolean changed = lhs.addAll(rhs); if (PropagationCallGraphBuilder.DEBUG_ASSIGN) { System.err.println("RESULT " + lhs + (changed ? " (changed)" : "")); } return changed ? CHANGED : NOT_CHANGED; }
@Override public boolean addInverseFiltered(PropagationSystem system, PointsToSetVariable L, PointsToSetVariable R) { IntSet f = system.getInstanceKeysForClass(concreteType); // SJF: this is horribly inefficient. we really don't want to do // diffs in here. TODO: fix it. probably keep not(f) cached and // use addAllInIntersection return (f == null) ? L.addAll(R) : L.addAll(IntSetUtil.diff(R.getValue(), f)); }
@Override public boolean addInverseFiltered(PropagationSystem system, PointsToSetVariable L, PointsToSetVariable R) { IntSet f = bits(system); // SJF: this is horribly inefficient. we really don't want to do // diffs in here. TODO: fix it. probably keep not(f) cached and // use addAllInIntersection return (f == null) ? L.addAll(R) : L.addAll(IntSetUtil.diff(R.getValue(), f)); }
@Override public boolean addInverseFiltered(PropagationSystem system, PointsToSetVariable L, PointsToSetVariable R) { IntSet f = system.getInstanceKeysForClass(concreteType); // SJF: this is horribly inefficient. we really don't want to do // diffs in here. TODO: fix it. probably keep not(f) cached and // use addAllInIntersection return (f == null) ? L.addAll(R) : L.addAll(IntSetUtil.diff(R.getValue(), f)); }
@Override public boolean addInverseFiltered(PropagationSystem system, PointsToSetVariable L, PointsToSetVariable R) { IntSet f = bits(system); // SJF: this is horribly inefficient. we really don't want to do // diffs in here. TODO: fix it. probably keep not(f) cached and // use addAllInIntersection return (f == null) ? L.addAll(R) : L.addAll(IntSetUtil.diff(R.getValue(), f)); }
@Override public boolean addInverseFiltered(PropagationSystem system, PointsToSetVariable L, PointsToSetVariable R) { int idx = system.findOrCreateIndexForInstanceKey(concreteType); if (!R.contains(idx) || L.contains(idx)) { return L.addAll(R); } else { MutableIntSet copy = IntSetUtil.makeMutableCopy(R.getValue()); copy.remove(idx); return L.addAll(copy); } }
@Override public boolean addInverseFiltered(PropagationSystem system, PointsToSetVariable L, PointsToSetVariable R) { int idx = system.findOrCreateIndexForInstanceKey(concreteType); if (!R.contains(idx) || L.contains(idx)) { return L.addAll(R); } else { MutableIntSet copy = IntSetUtil.makeMutableCopy(R.getValue()); copy.remove(idx); return L.addAll(copy); } }