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); }
public bool Equals(FlatDomain <T> that) { if (!this.IsNormal()) { return(state == that.state); } return(that.IsNormal() && Value.Equals(that.Value)); }
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); }
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; }
public bool LessEqual(FlatDomain <T> that) { bool result; if (this.TryTrivialLessEqual(that, out result)) { return(result); } return(Value.Equals(that.Value)); }
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); }
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); }
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; }
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; }
public FlatDomain <T> Widen(FlatDomain <T> that) { // no widening - it's finite lattice return(Join(that)); }