/// <summary> /// Must implement the join/widen operation /// </summary> /// <param name="edge"></param> /// <param name="newState"></param> /// <param name="prevState"></param> /// <param name="weaker">should return false if result is less than or equal prevState.</param> /// <param name="widen">true if this is a widen operation. For our INumericalAbstractDomain<Expression>, this makes no difference</param> public INumericalAbstractDomain <BoxedVariable <Variable>, BoxedExpression> Join(Pair <APC, APC> edge, INumericalAbstractDomain <BoxedVariable <Variable>, BoxedExpression> newState, INumericalAbstractDomain <BoxedVariable <Variable>, BoxedExpression> prevState, out bool weaker, bool widen) { INumericalAbstractDomain <BoxedVariable <Variable>, BoxedExpression> result = (INumericalAbstractDomain <BoxedVariable <Variable>, BoxedExpression>)prevState.Join(newState); weaker = !prevState.LessEqual(newState); return(result); }
public bool LessEqual(IAbstractDomain a) { bool r; if (AbstractDomainsHelper.TryTrivialLessEqual(this, a, out r)) { return(r); } INumericalAbstractDomain <Variable, Expression> leftSmashed = SmashTogether(this, true); INumericalAbstractDomain <Variable, Expression> rightSmashed = SmashTogether(a, true); return(leftSmashed.LessEqual(rightSmashed)); }