public void newSideEffect(UnaryOperator<PointsToSetVariable> op, PointerKey arg0) { if (arg0 == null) { throw new IllegalArgumentException("null arg0"); } if (DEBUG) { System.err.println("add constraint D: " + op + ' ' + arg0); } assert !pointsToMap.isUnified(arg0); PointsToSetVariable v1 = findOrCreatePointsToSet(arg0); newStatement(null, op, v1, true, true); }
public void newSideEffect(UnaryOperator<PointsToSetVariable> op, PointerKey arg0) { if (arg0 == null) { throw new IllegalArgumentException("null arg0"); } if (DEBUG) { System.err.println("add constraint D: " + op + ' ' + arg0); } assert !pointsToMap.isUnified(arg0); PointsToSetVariable v1 = findOrCreatePointsToSet(arg0); newStatement(null, op, v1, true, true); }
public void newSideEffect(AbstractOperator<PointsToSetVariable> op, PointerKey[] arg0) { if (arg0 == null) { throw new IllegalArgumentException("null arg0"); } if (DEBUG) { System.err.println("add constraint D: " + op + ' ' + Arrays.toString(arg0)); } PointsToSetVariable[] vs = new PointsToSetVariable[ arg0.length ]; for(int i = 0; i < arg0.length; i++) { assert !pointsToMap.isUnified(arg0[i]); vs[i] = findOrCreatePointsToSet(arg0[i]); } newStatement(null, op, vs, true, true); }
public void newSideEffect(AbstractOperator<PointsToSetVariable> op, PointerKey[] arg0) { if (arg0 == null) { throw new IllegalArgumentException("null arg0"); } if (DEBUG) { System.err.println("add constraint D: " + op + ' ' + Arrays.toString(arg0)); } PointsToSetVariable[] vs = new PointsToSetVariable[ arg0.length ]; for(int i = 0; i < arg0.length; i++) { assert !pointsToMap.isUnified(arg0[i]); vs[i] = findOrCreatePointsToSet(arg0[i]); } newStatement(null, op, vs, true, true); }
public boolean newConstraint(PointerKey lhs, AbstractOperator<PointsToSetVariable> op, PointerKey rhs) { if (lhs == null) { throw new IllegalArgumentException("lhs null"); } if (op == null) { throw new IllegalArgumentException("op null"); } if (rhs == null) { throw new IllegalArgumentException("rhs null"); } if (DEBUG) { System.err.println("Add constraint A: " + lhs + ' ' + op + ' ' + rhs); } assert !pointsToMap.isUnified(lhs); assert !pointsToMap.isUnified(rhs); PointsToSetVariable L = findOrCreatePointsToSet(lhs); PointsToSetVariable R = findOrCreatePointsToSet(rhs); return newStatement(L, op, new PointsToSetVariable[] { R }, true, true); }
public boolean newConstraint(PointerKey lhs, AbstractOperator<PointsToSetVariable> op, PointerKey rhs) { if (lhs == null) { throw new IllegalArgumentException("lhs null"); } if (op == null) { throw new IllegalArgumentException("op null"); } if (rhs == null) { throw new IllegalArgumentException("rhs null"); } if (DEBUG) { System.err.println("Add constraint A: " + lhs + ' ' + op + ' ' + rhs); } assert !pointsToMap.isUnified(lhs); assert !pointsToMap.isUnified(rhs); PointsToSetVariable L = findOrCreatePointsToSet(lhs); PointsToSetVariable R = findOrCreatePointsToSet(rhs); return newStatement(L, op, new PointsToSetVariable[] { R }, true, true); }
/** * replace all occurences of p on the lhs of a statement with pRef * * @param as a statement that defs p */ private void replaceLHS(PointsToSetVariable pRef, PointsToSetVariable p, AbstractStatement<PointsToSetVariable, AbstractOperator<PointsToSetVariable>> as) { assert as.getLHS() == p; if (as instanceof UnaryStatement) { newStatement(pRef, (UnaryOperator<PointsToSetVariable>) as.getOperator(), (PointsToSetVariable) ((UnaryStatement) as) .getRightHandSide(), false, false); } else { newStatement(pRef, as.getOperator(), as.getRHS(), false, false); } flowGraph.removeStatement(as); }
/** * replace all occurences of p on the lhs of a statement with pRef * * @param as a statement that defs p */ private void replaceLHS(PointsToSetVariable pRef, PointsToSetVariable p, AbstractStatement<PointsToSetVariable, AbstractOperator<PointsToSetVariable>> as) { assert as.getLHS() == p; if (as instanceof UnaryStatement) { newStatement(pRef, (UnaryOperator<PointsToSetVariable>) as.getOperator(), (PointsToSetVariable) ((UnaryStatement) as) .getRightHandSide(), false, false); } else { newStatement(pRef, as.getOperator(), as.getRHS(), false, false); } flowGraph.removeStatement(as); }
public boolean newConstraint(PointerKey lhs, AbstractOperator<PointsToSetVariable> op, PointerKey rhs1, PointerKey rhs2) { if (lhs == null) { throw new IllegalArgumentException("null lhs"); } if (op == null) { throw new IllegalArgumentException("null op"); } if (rhs1 == null) { throw new IllegalArgumentException("null rhs1"); } if (rhs2 == null) { throw new IllegalArgumentException("null rhs2"); } if (DEBUG) { System.err.println("Add constraint A: " + lhs + ' ' + op + ' ' + rhs1 + ", " + rhs2); } assert !pointsToMap.isUnified(lhs); assert !pointsToMap.isUnified(rhs1); assert !pointsToMap.isUnified(rhs2); PointsToSetVariable L = findOrCreatePointsToSet(lhs); PointsToSetVariable R1 = findOrCreatePointsToSet(rhs1); PointsToSetVariable R2 = findOrCreatePointsToSet(rhs2); return newStatement(L, op, R1, R2, true, true); }
public boolean newConstraint(PointerKey lhs, AbstractOperator<PointsToSetVariable> op, PointerKey rhs1, PointerKey rhs2) { if (lhs == null) { throw new IllegalArgumentException("null lhs"); } if (op == null) { throw new IllegalArgumentException("null op"); } if (rhs1 == null) { throw new IllegalArgumentException("null rhs1"); } if (rhs2 == null) { throw new IllegalArgumentException("null rhs2"); } if (DEBUG) { System.err.println("Add constraint A: " + lhs + ' ' + op + ' ' + rhs1 + ", " + rhs2); } assert !pointsToMap.isUnified(lhs); assert !pointsToMap.isUnified(rhs1); assert !pointsToMap.isUnified(rhs2); PointsToSetVariable L = findOrCreatePointsToSet(lhs); PointsToSetVariable R1 = findOrCreatePointsToSet(rhs1); PointsToSetVariable R2 = findOrCreatePointsToSet(rhs2); return newStatement(L, op, R1, R2, true, true); }
public void newSideEffect(AbstractOperator<PointsToSetVariable> op, PointerKey arg0, PointerKey arg1) { if (DEBUG) { System.err.println("add constraint D: " + op + ' ' + arg0); } assert !pointsToMap.isUnified(arg0); assert !pointsToMap.isUnified(arg1); PointsToSetVariable v1 = findOrCreatePointsToSet(arg0); PointsToSetVariable v2 = findOrCreatePointsToSet(arg1); newStatement(null, op, v1, v2, true, true); }
public void newSideEffect(AbstractOperator<PointsToSetVariable> op, PointerKey arg0, PointerKey arg1) { if (DEBUG) { System.err.println("add constraint D: " + op + ' ' + arg0); } assert !pointsToMap.isUnified(arg0); assert !pointsToMap.isUnified(arg1); PointsToSetVariable v1 = findOrCreatePointsToSet(arg0); PointsToSetVariable v2 = findOrCreatePointsToSet(arg1); newStatement(null, op, v1, v2, true, true); }
/** * replace all occurrences of p on the rhs of a statement with pRef * * @param as a statement that uses p in it's right-hand side */ private void replaceRHS(PointsToSetVariable pRef, PointsToSetVariable p, AbstractStatement<PointsToSetVariable, AbstractOperator<PointsToSetVariable>> as) { if (as instanceof UnaryStatement) { assert ((UnaryStatement) as).getRightHandSide() == p; newStatement(as.getLHS(), (UnaryOperator<PointsToSetVariable>) as.getOperator(), pRef, false, false); } else { IVariable[] rhs = as.getRHS(); PointsToSetVariable[] newRHS = new PointsToSetVariable[rhs.length]; for (int i = 0; i < rhs.length; i++) { if (rhs[i].equals(p)) { newRHS[i] = pRef; } else { newRHS[i] = (PointsToSetVariable) rhs[i]; } } newStatement(as.getLHS(), as.getOperator(), newRHS, false, false); } flowGraph.removeStatement(as); }
/** * replace all occurrences of p on the rhs of a statement with pRef * * @param as a statement that uses p in it's right-hand side */ private void replaceRHS(PointsToSetVariable pRef, PointsToSetVariable p, AbstractStatement<PointsToSetVariable, AbstractOperator<PointsToSetVariable>> as) { if (as instanceof UnaryStatement) { assert ((UnaryStatement) as).getRightHandSide() == p; newStatement(as.getLHS(), (UnaryOperator<PointsToSetVariable>) as.getOperator(), pRef, false, false); } else { IVariable[] rhs = as.getRHS(); PointsToSetVariable[] newRHS = new PointsToSetVariable[rhs.length]; for (int i = 0; i < rhs.length; i++) { if (rhs[i].equals(p)) { newRHS[i] = pRef; } else { newRHS[i] = (PointsToSetVariable) rhs[i]; } } newStatement(as.getLHS(), as.getOperator(), newRHS, false, false); } flowGraph.removeStatement(as); }
return newStatement(L, op, R, true, true);
return newStatement(L, op, R, true, true);