/** * Try to reduce the one given constraint. * If a constraint produces further constraints reduce those recursively. * @throws InferenceFailureException a compile error has been detected during inference */ public boolean reduceOneConstraint(InferenceContext18 context, ConstraintFormula currentConstraint) throws InferenceFailureException { Object result = currentConstraint.reduce(context); if (result == ReductionResult.FALSE) return false; if (result == ReductionResult.TRUE) return true; if (result == currentConstraint) { // not reduceable throw new IllegalStateException("Failed to reduce constraint formula"); //$NON-NLS-1$ } if (result != null) { if (result instanceof ConstraintFormula) { if (!reduceOneConstraint(context, (ConstraintFormula) result)) return false; } else if (result instanceof ConstraintFormula[]) { ConstraintFormula[] resultArray = (ConstraintFormula[]) result; for (int i = 0; i < resultArray.length; i++) if (!reduceOneConstraint(context, resultArray[i])) return false; } else { addBound((TypeBound)result, context.environment); } } return true; // no FALSE encountered }
/** * Try to reduce the one given constraint. * If a constraint produces further constraints reduce those recursively. * @throws InferenceFailureException a compile error has been detected during inference */ public boolean reduceOneConstraint(InferenceContext18 context, ConstraintFormula currentConstraint) throws InferenceFailureException { Object result = currentConstraint.reduce(context); if (result == ReductionResult.FALSE) return false; if (result == ReductionResult.TRUE) return true; if (result == currentConstraint) { // not reduceable throw new IllegalStateException("Failed to reduce constraint formula"); //$NON-NLS-1$ } if (result != null) { if (result instanceof ConstraintFormula) { if (!reduceOneConstraint(context, (ConstraintFormula) result)) return false; } else if (result instanceof ConstraintFormula[]) { ConstraintFormula[] resultArray = (ConstraintFormula[]) result; for (int i = 0; i < resultArray.length; i++) if (!reduceOneConstraint(context, resultArray[i])) return false; } else { addBound((TypeBound)result, context.environment); } } return true; // no FALSE encountered }
/** * Try to reduce the one given constraint. * If a constraint produces further constraints reduce those recursively. * @throws InferenceFailureException a compile error has been detected during inference */ public boolean reduceOneConstraint(InferenceContext18 context, ConstraintFormula currentConstraint) throws InferenceFailureException { Object result = currentConstraint.reduce(context); if (result == ReductionResult.FALSE) return false; if (result == ReductionResult.TRUE) return true; if (result == currentConstraint) { // not reduceable throw new IllegalStateException("Failed to reduce constraint formula"); //$NON-NLS-1$ } if (result != null) { if (result instanceof ConstraintFormula) { if (!reduceOneConstraint(context, (ConstraintFormula) result)) return false; } else if (result instanceof ConstraintFormula[]) { ConstraintFormula[] resultArray = (ConstraintFormula[]) result; for (int i = 0; i < resultArray.length; i++) if (!reduceOneConstraint(context, resultArray[i])) return false; } else { addBound((TypeBound)result, context.environment); } } return true; // no FALSE encountered }
/** * Try to reduce the one given constraint. * If a constraint produces further constraints reduce those recursively. * @throws InferenceFailureException a compile error has been detected during inference */ public boolean reduceOneConstraint(InferenceContext18 context, ConstraintFormula currentConstraint) throws InferenceFailureException { Object result = currentConstraint.reduce(context); if (result == ReductionResult.FALSE) return false; if (result == ReductionResult.TRUE) return true; if (result == currentConstraint) { // not reduceable throw new IllegalStateException("Failed to reduce constraint formula"); //$NON-NLS-1$ } if (result != null) { if (result instanceof ConstraintFormula) { if (!reduceOneConstraint(context, (ConstraintFormula) result)) return false; } else if (result instanceof ConstraintFormula[]) { ConstraintFormula[] resultArray = (ConstraintFormula[]) result; for (int i = 0; i < resultArray.length; i++) if (!reduceOneConstraint(context, resultArray[i])) return false; } else { addBound((TypeBound)result, context.environment); } } return true; // no FALSE encountered }
/** * Try to reduce the one given constraint. * If a constraint produces further constraints reduce those recursively. * @throws InferenceFailureException a compile error has been detected during inference */ public boolean reduceOneConstraint(InferenceContext18 context, ConstraintFormula currentConstraint) throws InferenceFailureException { Object result = currentConstraint.reduce(context); if (result == ReductionResult.FALSE) return false; if (result == ReductionResult.TRUE) return true; if (result == currentConstraint) { // not reduceable throw new IllegalStateException("Failed to reduce constraint formula"); //$NON-NLS-1$ } if (result != null) { if (result instanceof ConstraintFormula) { if (!reduceOneConstraint(context, (ConstraintFormula) result)) return false; } else if (result instanceof ConstraintFormula[]) { ConstraintFormula[] resultArray = (ConstraintFormula[]) result; for (int i = 0; i < resultArray.length; i++) if (!reduceOneConstraint(context, resultArray[i])) return false; } else { addBound((TypeBound)result, context.environment); } } return true; // no FALSE encountered }
/** * Try to reduce the one given constraint. * If a constraint produces further constraints reduce those recursively. * @throws InferenceFailureException a compile error has been detected during inference */ public boolean reduceOneConstraint(InferenceContext18 context, ConstraintFormula currentConstraint) throws InferenceFailureException { Object result = currentConstraint.reduce(context); if (result == ReductionResult.FALSE) return false; if (result == ReductionResult.TRUE) return true; if (result == currentConstraint) { // not reduceable throw new IllegalStateException("Failed to reduce constraint formula"); //$NON-NLS-1$ } if (result != null) { if (result instanceof ConstraintFormula) { if (!reduceOneConstraint(context, (ConstraintFormula) result)) return false; } else if (result instanceof ConstraintFormula[]) { ConstraintFormula[] resultArray = (ConstraintFormula[]) result; for (int i = 0; i < resultArray.length; i++) if (!reduceOneConstraint(context, resultArray[i])) return false; } else { addBound((TypeBound)result, context.environment); } } return true; // no FALSE encountered }
/** * Try to reduce the one given constraint. * If a constraint produces further constraints reduce those recursively. * @throws InferenceFailureException a compile error has been detected during inference */ public boolean reduceOneConstraint(InferenceContext18 context, ConstraintFormula currentConstraint) throws InferenceFailureException { Object result = currentConstraint.reduce(context); if (result == ReductionResult.FALSE) return false; if (result == ReductionResult.TRUE) return true; if (result == currentConstraint) { // not reduceable throw new IllegalStateException("Failed to reduce constraint formula"); //$NON-NLS-1$ } if (result != null) { if (result instanceof ConstraintFormula) { if (!reduceOneConstraint(context, (ConstraintFormula) result)) return false; } else if (result instanceof ConstraintFormula[]) { ConstraintFormula[] resultArray = (ConstraintFormula[]) result; for (int i = 0; i < resultArray.length; i++) if (!reduceOneConstraint(context, resultArray[i])) return false; } else { addBound((TypeBound)result, context.environment); } } return true; // no FALSE encountered }
/** * Try to reduce the one given constraint. * If a constraint produces further constraints reduce those recursively. * @throws InferenceFailureException a compile error has been detected during inference */ public boolean reduceOneConstraint(InferenceContext18 context, ConstraintFormula currentConstraint) throws InferenceFailureException { Object result = currentConstraint.reduce(context); if (result == ReductionResult.FALSE) return false; if (result == ReductionResult.TRUE) return true; if (result == currentConstraint) { // not reduceable throw new IllegalStateException("Failed to reduce constraint formula"); //$NON-NLS-1$ } if (result != null) { if (result instanceof ConstraintFormula) { if (!reduceOneConstraint(context, (ConstraintFormula) result)) return false; } else if (result instanceof ConstraintFormula[]) { ConstraintFormula[] resultArray = (ConstraintFormula[]) result; for (int i = 0; i < resultArray.length; i++) if (!reduceOneConstraint(context, resultArray[i])) return false; } else { addBound((TypeBound)result, context.environment); } } return true; // no FALSE encountered }