コード例 #1
0
        public FlatDomain <T> Join(FlatDomain <T> that, bool widening, out bool weaker)
        {
            if (IsTop || that.IsBottom)
            {
                weaker = false;
                return(this);
            }
            if (that.IsTop)
            {
                weaker = !IsTop;
                return(that);
            }
            if (IsBottom)
            {
                weaker = !that.IsBottom;
                return(that);
            }
            if (Value.Equals(that.Value))
            {
                weaker = false;
                return(that);
            }

            weaker = true;
            return(TopValue);
        }
コード例 #2
0
        public bool Equals(FlatDomain <T> that)
        {
            if (!this.IsNormal())
            {
                return(state == that.state);
            }

            return(that.IsNormal() && Value.Equals(that.Value));
        }
コード例 #3
0
ファイル: FlatDomain.cs プロジェクト: raj581/Marvin
		public bool LessEqual (FlatDomain<T> that)
		{
			if (that.IsTop || IsBottom)
				return true;
			if (IsTop || that.IsBottom)
				return false;

			//less equal means equality of values
			return this.Concrete.Equals (that.Concrete);
		}
コード例 #4
0
ファイル: FlatDomain.cs プロジェクト: raj581/Marvin
		public FlatDomain<T> Meet (FlatDomain<T> that)
		{
			if (IsTop || that.IsBottom)
				return that;
			if (that.IsTop || IsBottom)
				return this;
			if (this.Concrete.Equals (that.Concrete))
				return that;

			return BottomValue;
		}
コード例 #5
0
        public bool LessEqual(FlatDomain <T> that)
        {
            bool result;

            if (this.TryTrivialLessEqual(that, out result))
            {
                return(result);
            }

            return(Value.Equals(that.Value));
        }
コード例 #6
0
        public FlatDomain <T> Meet(FlatDomain <T> that)
        {
            FlatDomain <T> result;

            if (this.TryTrivialMeet(that, out result))
            {
                return(result);
            }

            return(Value.Equals(that.Value) ? this : BottomValue);
        }
コード例 #7
0
        public FlatDomain <T> Join(FlatDomain <T> that)
        {
            FlatDomain <T> result;

            if (this.TryTrivialJoin(that, out result))
            {
                return(result);
            }

            // this and that must be normal here
            return(Value.Equals(that.Value) ? this : TopValue);
        }
コード例 #8
0
ファイル: FlatDomain.cs プロジェクト: raj581/Marvin
		public bool Equals (FlatDomain<T> that)
		{
			if (!this.IsNormal)
				return this._kind == that._kind;

			if (!that.IsNormal)
				return false;

			if (this.Concrete.Equals (that.Concrete))
				return true;

			return false;
		}
コード例 #9
0
ファイル: FlatDomain.cs プロジェクト: raj581/Marvin
		public FlatDomain<T> Join (FlatDomain<T> that, bool widening, out bool weaker)
		{
			if (IsTop || that.IsBottom) {
				weaker = false;
				return this;
			}
			if (that.IsTop) {
				weaker = !IsTop;
				return that;
			}
			if (IsBottom) {
				weaker = !that.IsBottom;
				return that;
			}
			if (this.Concrete.Equals (that.Concrete)) {
				weaker = false;
				return that;
			}

			weaker = true;
			return TopValue;
		}
コード例 #10
0
        public FlatDomain <T> Widen(FlatDomain <T> that)
        {
            // no widening - it's finite lattice

            return(Join(that));
        }