コード例 #1
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);

            FlatAbstractDomain <bool> result = (FlatAbstractDomain <bool> /*!*/)checkLeft.Meet(checkRight);

            if (result.Equals(result.Top) && !light)
            { //If we do not arrive to check the condition, we try to refine the information in the stripe domain with the state of the Karr domain
                LinearEqualitiesEnvironment <Variable, Expression> karrRefined = this.Right;
                var refined = this.Left.Right;
                if (strong)
                { //If we want to perform a precise but slow analysis, we refine the information for all the variables of the state of the Karr Domain
                    var variables = this.ExtractVariable(e1);
                    variables.AddRange(this.ExtractVariable(e2));

                    //foreach (var e in variables)
                    //  refined = refined.Refine(karrRefined, e);

                    //foreach (var e in karrRefined.Variables)
                    //  refined = refined.Refine(karrRefined, e);
                }
                else
                {//Otherwise we refine only on the variables of the condition
                    var variables = this.ExtractVariable(e1);
                    variables.AddRange(this.ExtractVariable(e2));

                    //foreach (var e in variables)
                    //  refined = refined.Refine(karrRefined, e);
                }
                checkRight = refined.CheckIfLessThan(e1, e2 /*, this.Left.Left*/);
                result     = checkLeft.Meet(checkRight);
            }
            return(result);
        }
コード例 #2
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);
        }