コード例 #1
0
        public StripeIntervalsKarr <Variable, Expression, MetaDataDecoder> TestTrueEqual(Expression /*!*/ exp1, Expression /*!*/ exp2)
        {
            StripeWithIntervals <Variable, Expression, MetaDataDecoder> resultLeft  = (StripeWithIntervals <Variable, Expression, MetaDataDecoder>)Left.TestTrueEqual(exp1, exp2);
            LinearEqualitiesEnvironment <Variable, Expression>          resultRight = (LinearEqualitiesEnvironment <Variable, Expression>)Right.TestTrueEqual(exp1, exp2);

            return((StripeIntervalsKarr <Variable, Expression, MetaDataDecoder>)Factory(resultLeft, resultRight));
        }
コード例 #2
0
        public IAbstractDomainForEnvironments <Variable, Expression> TestFalse(Expression guard)
        {
            StripeWithIntervals <Variable, Expression, MetaDataDecoder> resultLeft  = (StripeWithIntervals <Variable, Expression, MetaDataDecoder>)Left.TestFalse(guard);
            LinearEqualitiesEnvironment <Variable, Expression>          resultRight = (LinearEqualitiesEnvironment <Variable, Expression>)Right.TestFalse(guard);

            return((IAbstractDomainForEnvironments <Variable, Expression>)Factory(resultLeft, resultRight));
        }
コード例 #3
0
        public INumericalAbstractDomain <Variable, Expression> TestTrueGeqZero(Expression /*!*/ exp)
        {
            StripeWithIntervals <Variable, Expression, MetaDataDecoder> resultLeft  = (StripeWithIntervals <Variable, Expression, MetaDataDecoder>)Left.TestTrueGeqZero(exp);
            LinearEqualitiesEnvironment <Variable, Expression>          resultRight = (LinearEqualitiesEnvironment <Variable, Expression>)Right.TestTrueGeqZero(exp);

            return((INumericalAbstractDomain <Variable, Expression>)Factory(resultLeft, resultRight));
        }
コード例 #4
0
        public INumericalAbstractDomain <Variable, Expression> RemoveRedundanciesWith(INumericalAbstractDomain <Variable, Expression> oracle)
        {
            IntervalEnvironment <Variable, Expression> resultLeft = (IntervalEnvironment <Variable, Expression>) this.Left.RemoveRedundanciesWith(oracle);
            StripeWithIntervals <Variable, Expression, MetaDataDecoder> resultRight = (StripeWithIntervals <Variable, Expression, MetaDataDecoder>) this.Right.RemoveRedundanciesWith(oracle);

            return((INumericalAbstractDomain <Variable, Expression>)Factory(resultLeft, resultRight));
        }
コード例 #5
0
        public virtual IAbstractDomainForEnvironments <Variable, Expression> TestFalse(Expression guard)
        {
            IntervalEnvironment <Variable, Expression> resultLeft = this.Left.TestFalse(guard);
            StripeWithIntervals <Variable, Expression, MetaDataDecoder> resultRight = (StripeWithIntervals <Variable, Expression, MetaDataDecoder>) this.Right.TestFalse(guard);

            return((IAbstractDomainForEnvironments <Variable, Expression>)Factory(resultLeft, resultRight));
        }
コード例 #6
0
        public INumericalAbstractDomain <Variable, Expression> TestTrueEqual(Expression /*!*/ exp1, Expression /*!*/ exp2)
        {
            IntervalEnvironment <Variable, Expression> resultLeft = this.Left.TestTrueEqual(exp1, exp2);
            StripeWithIntervals <Variable, Expression, MetaDataDecoder> resultRight = (StripeWithIntervals <Variable, Expression, MetaDataDecoder>) this.Right.TestTrueEqual(exp1, exp2);

            return((INumericalAbstractDomain <Variable, Expression>)Factory(resultLeft, resultRight));
        }
コード例 #7
0
        Reduce(StripeWithIntervals <Variable, Expression, MetaDataDecoder> left, LinearEqualitiesEnvironment <Variable, Expression> right)
        {
            // We want to propagate this information as the join for Stripes and Lineq is very smart, but the one for intervals is not
            foreach (var constant in right.ConstantValues())
            {
                left.AssignInterval(constant.One, Interval.For(constant.Two));
            }

            return(this.Factory(left, right));
        }
コード例 #8
0
        public FlatAbstractDomain <bool> /*!*/ CheckIfLessThan(Expression /*!*/ e1, Expression /*!*/ e2)
        {
            FlatAbstractDomain <bool> /*!*/ checkLeft  = this.Left.CheckIfLessThan(e1, e2);
            FlatAbstractDomain <bool> /*!*/ checkRight = this.Right.CheckIfLessThan(e1, e2 /*, this.Left*/);
            FlatAbstractDomain <bool>       result     = checkLeft.Meet(checkRight);

            if (result.Equals(result.Top))
            { //If we do not arrive to check the condition, we try to refine the information in the stripe domain with the state of Interval domain and also internally
                StripeWithIntervals <Variable, Expression, MetaDataDecoder> refined = this.Right /*.Refine(this.Left).RefineInternally()*/;
                checkRight = refined.CheckIfLessThan(e1, e2 /*, this.Left*/);
                result     = checkLeft.Meet(checkRight);
            }
            return(result);
        }
コード例 #9
0
        /// <summary>
        /// The pairwise widening
        /// </summary>
        public override IAbstractDomain Widening(IAbstractDomain prev)
        {
            if (this.IsBottom)
            {
                return(prev);
            }
            if (prev.IsBottom)
            {
                return(this);
            }

            Debug.Assert(prev is StripeIntervalsKarr <Variable, Expression, MetaDataDecoder>, "Wrong type of the domain for the widening...");
            StripeIntervalsKarr <Variable, Expression, MetaDataDecoder> asIntWSUB = (StripeIntervalsKarr <Variable, Expression, MetaDataDecoder>)prev;

            StripeWithIntervals <Variable, Expression, MetaDataDecoder> widenLeft  = (StripeWithIntervals <Variable, Expression, MetaDataDecoder>) this.Left.Widening(asIntWSUB.Left);
            LinearEqualitiesEnvironment <Variable, Expression>          widenRight = (LinearEqualitiesEnvironment <Variable, Expression>) this.Right.Widening(asIntWSUB.Right);

            StripeIntervalsKarr <Variable, Expression, MetaDataDecoder> result = (StripeIntervalsKarr <Variable, Expression, MetaDataDecoder>) this.Factory(widenLeft, widenRight);

            return(result);
        }
コード例 #10
0
 Factory(StripeWithIntervals <Variable, Expression, MetaDataDecoder> left, LinearEqualitiesEnvironment <Variable, Expression> right)
 {
     return(new StripeIntervalsKarr <Variable, Expression, MetaDataDecoder>(left, right, this.Decoder, this.Encoder, this.Log));
 }
コード例 #11
0
 public StripeIntervalsKarr(StripeWithIntervals <Variable, Expression, MetaDataDecoder> /*!*/ left, LinearEqualitiesEnvironment <Variable, Expression> /*!*/ right, IExpressionDecoder <Variable, Expression> decoder, IExpressionEncoder <Variable, Expression> encoder, Logger Log)
     : base(left, right, Log)
 {
     this.decoder = decoder;
     this.encoder = encoder;
 }
コード例 #12
0
 Reduce(IntervalEnvironment <Variable, Expression> left, StripeWithIntervals <Variable, Expression, MetaDataDecoder> right)
 {
     return(this.Factory(left, right));
 }
コード例 #13
0
 Factory(IntervalEnvironment <Variable, Expression> left, StripeWithIntervals <Variable, Expression, MetaDataDecoder> right)
 {
     return(new StripeWithIntervals <Variable, Expression, MetaDataDecoder>(left, right, this.decoder, this.Log));
 }
コード例 #14
0
 public StripeWithIntervals(IntervalEnvironment <Variable, Expression> /*!*/ left, StripeWithIntervals <Variable, Expression, MetaDataDecoder> /*!*/ right, IExpressionDecoder <Variable, Expression> decoder, Logger Log)
     : base(left, right, Log)
 {
     this.decoder = decoder;
 }