public SetDomain <T> Join(SetDomain <T> that, bool widening, out bool weaker) { if (this.set == that.set) { weaker = false; return(this); } if (IsBottom) { weaker = !that.IsBottom; return(that); } if (that.IsBottom || IsTop) { weaker = false; return(this); } if (that.IsTop) { weaker = !IsTop; return(that); } IImmutableSet <T> join = this.set.Intersect(that.set); weaker = join.Count < this.set.Count; return(new SetDomain <T> (join)); }
public SetDomain <T> Join(SetDomain <T> that) { SetDomain <T> result; if (this.TryTrivialJoin(that, out result)) { return(result); } return(new SetDomain <T> (set.Intersect(that.set))); }
public SetDomain <T> Meet(SetDomain <T> that) { SetDomain <T> result; if (this.TryTrivialMeet(that, out result)) { return(result); } return(new SetDomain <T> (set.Union(that.set))); }
public bool LessEqual(SetDomain <T> that) { if (IsBottom) { return(true); } if (that.IsBottom) { return(false); } return(that.set.IsContainedIn(this.set)); }
public SetDomain <T> Meet(SetDomain <T> that) { if (this.set == that.set || IsBottom || that.IsTop) { return(this); } if (that.IsBottom || IsTop) { return(that); } return(new SetDomain <T> (this.set.Union(that.set))); }
public SetDomain <T> Widen(SetDomain <T> that) { //no widening - finite lattice return(Join(that)); }