Esempio n. 1
0
        public bool LessEqual(NonRelationalValueAbstraction <Variable, Expression> other)
        {
            Contract.Requires(other != null);

            if (!disInterval.LessEqual(other.Interval))
            {
                return(false);
            }
            Contract.Assert(other.symbolicConditions != null);
            if (!symbolicConditions.LessEqual(other.symbolicConditions))
            {
                return(false);
            }

            // F: Assuming the object invariant for other
            Contract.Assert(other.weaklyRelationalDomains != null);
            Contract.Assume(Contract.ForAll(other.weaklyRelationalDomains, dom => dom != null));
            Contract.Assume(weaklyRelationalDomains.Length == other.weaklyRelationalDomains.Length, "assuming object invariant");
            for (var i = 0; i < weaklyRelationalDomains.Length; i++)
            {
                if (!weaklyRelationalDomains[i].LessEqual(other.weaklyRelationalDomains[i]))
                {
                    return(false);
                }
            }

            return(true);
        }
 public override bool AreEqual(DisInterval left, DisInterval right)
 {
     return(left.IsNormal && right.IsNormal && left.LessEqual(right) && right.LessEqual(left));
 }