Esempio n. 1
0
        public static bool SlowEquals(this IPGTerminalSet @this, IPGTerminalSet other)
        {
            Debug.Assert(@this != null);
            if (other == null)
            {
                return(false);
            }
            bool e = @this.ContainsEverything;

            if (e == other.ContainsEverything && @this.ContainsEOF == other.ContainsEOF)
            {
                if (e)
                {
                    return(true);
                }
                var sub1 = @this.Subtract(other);
                if (sub1 == null || !sub1.IsEmptySet)
                {
                    return(false);
                }
                var sub2 = other.Subtract(@this);
                return(sub2 != null && sub2.IsEmptySet);
            }
            return(false);
        }
Esempio n. 2
0
		public virtual IPGTerminalSet Optimize(IPGTerminalSet set, IPGTerminalSet dontcare) { return set.Subtract(dontcare); }
Esempio n. 3
0
        public static bool IsSubsetOf(this IPGTerminalSet @this, IPGTerminalSet other)
        {
            var tmp = @this.Subtract(other);

            return(tmp.IsEmptySet);
        }
Esempio n. 4
0
 public virtual IPGTerminalSet Optimize(IPGTerminalSet set, IPGTerminalSet dontcare)
 {
     return(set.Subtract(dontcare));
 }