protected override ReducedCartesianAbstractDomain <StripeWithIntervals <BoxedExpression, IDecodeMetaData <Local, Parameter, Method, Field, Property, Type, Attribute, Assembly> >, LinearEqualitiesEnvironment <BoxedExpression> > Factory(StripeWithIntervals <BoxedExpression, IDecodeMetaData <Local, Parameter, Method, Field, Property, Type, Attribute, Assembly> > left, LinearEqualitiesEnvironment <BoxedExpression> right) { StripeWithIntervalsForUnsafeCode l; if (left is StripeWithIntervalsForUnsafeCode) { l = (StripeWithIntervalsForUnsafeCode)left; } else { l = new StripeWithIntervalsForUnsafeCode((IntervalsForUnsafeCode)left.Left, (StripeForUnsafeCode)left.Right, this.decoder, this.context, this.mdDecoder); } LinearEqualitiesForUnsafeCode r; if (right is LinearEqualitiesForUnsafeCode) { r = (LinearEqualitiesForUnsafeCode)right; } else { r = new LinearEqualitiesForUnsafeCode(right, this.decoder, this.context, this.mdDecoder); } StripeIntervalsKarrForUnsafeCode result = new StripeIntervalsKarrForUnsafeCode(l, r, decoder, encoder, context, this.mdDecoder); foreach (BoxedExpression exp in this.nullPointers) { result.nullPointers.Add(exp); } return(result); }
/// <summary> /// It dispatches the join operator to the improved version in order to manage pointers that are null in one of the two branches /// </summary> public StripeIntervalsKarrForUnsafeCode Join(StripeIntervalsKarrForUnsafeCode prevState, APC pc) { StripeWithIntervalsForUnsafeCode thisState_Left = this.Left as StripeWithIntervalsForUnsafeCode; StripeWithIntervalsForUnsafeCode prevState_Left = prevState.Left as StripeWithIntervalsForUnsafeCode; LinearEqualitiesForUnsafeCode thisState_Right = this.Right as LinearEqualitiesForUnsafeCode; LinearEqualitiesForUnsafeCode prevState_Right = prevState.Right as LinearEqualitiesForUnsafeCode; Debug.Assert(thisState_Left != null & thisState_Right != null & prevState_Left != null & prevState_Right != null); // thisState_Right = PropagateConstants(thisState_Left.Left, thisState_Right); StripeWithIntervalsForUnsafeCode joinLeftPart = (StripeWithIntervalsForUnsafeCode)thisState_Left.Join(prevState_Left, pc); LinearEqualitiesForUnsafeCode joinRightPart = (LinearEqualitiesForUnsafeCode)thisState_Right.Join(prevState_Right, this.nullPointers.Union(prevState.nullPointers), pc); nullPointers = new Set <BoxedExpression>(); return((StripeIntervalsKarrForUnsafeCode)prevState.Reduce(joinLeftPart, joinRightPart)); }