override public bool AddToOctagon(CoreOctagon oct, IMutableSet <int> affectedDimensions) { int j = 2 * this.x + 1; int i = 2 * this.y; affectedDimensions.Add(this.x); affectedDimensions.Add(this.y); if (this.c <= oct.octagon[Matpos2(i, j)]) { oct.octagon[Matpos2(i, j)] = this.c; return(true); } return(false); }
///<summary> /// Add this constraint to the octagon ///</summary> override public bool AddToOctagon(CoreOctagon oct, IMutableSet <int> affectedDimensions) { int j = 2 * this.x + 1; int i = 2 * this.x; affectedDimensions.Add(this.x); try { Rational c = this.c * 2; if (Rational.Min(c, oct.octagon[Matpos2(i, j)]) == c) { oct.octagon[Matpos2(i, j)] = c; return(true); } } catch (ArithmeticExceptionRational) { // We could not add the constraint because of an arithmetic exception return(false); } return(false); }
public bool Add(T item) { if (set.Add(item)) { signal.Fire(new CollectionChange <T>(item.ToOption(), Seq.Empty <T>())); return(true); } else { return(false); } }
///<summary> /// Add this constraint to the octagon ///</summary> override public bool AddToOctagon(CoreOctagon oct, IMutableSet<int> affectedDimensions) { int j = 2 * this.x + 1; int i = 2 * this.x; affectedDimensions.Add(this.x); try { Rational c = this.c * 2; if (Rational.Min(c, oct.octagon[Matpos2(i, j)]) == c) { oct.octagon[Matpos2(i, j)] = c; return true; } } catch (ArithmeticExceptionRational) { // We could not add the constraint because of an arithmetic exception return false; } return false; }
override public bool AddToOctagon(CoreOctagon oct, IMutableSet<int> affectedDimensions) { int j = 2 * this.x + 1; int i = 2 * this.y; affectedDimensions.Add(this.x); affectedDimensions.Add(this.y); if (this.c <= oct.octagon[Matpos2(i, j)]) { oct.octagon[Matpos2(i, j)] = this.c; return true; } return false; }
private void first_dfs_end_visitor(object node) { nodes_in_graph.Add(node); nodes_desc_order.Push(node); }
private void FindReachable(IMutableSet reach, CfgBlock current, NormalFlowBlockNavigator nfnav) { if (reach.Contains(current)) return; reach.Add(current); foreach (CfgBlock next in nfnav.NextNodes(current)) { FindReachable(reach, next, nfnav); } // also follow exceptional path CfgBlock handler = (CfgBlock)this.b2exception_handler[current]; if (handler != null) { FindReachable(reach, handler, nfnav); } }