public static string ToStringDec(Tv[] a) { (ulong?value, Tv misc) = ToUlong(); if (value != null) { return(value.ToString() + "d"); } return(misc.ToString()); #region LocalMethod (ulong?Value, Tv Misc) ToUlong() { ulong result = 0; for (int i = 0; i < Math.Min(a.Length, 64); ++i) { switch (a[i]) { case Tv.ONE: result |= 1UL << i; break; case Tv.ZERO: break; default: return(Value : null, Misc : a[i]); } } return(Value : result, Misc : Tv.UNKNOWN); } #endregion }
public void Remove_History() { ISet <string> keep = new HashSet <string>(); foreach (var v in this._tools.StateConfig.GetFlagOn()) { using (BoolExpr expr = this.Create(v)) { keep.Add(expr.ToString()); } } foreach (var v in this._tools.StateConfig.GetRegOn()) { using (BitVecExpr expr = this.Create(v)) { keep.Add(expr.ToString()); } } if (this._tools.StateConfig.mem) { using (ArrayExpr expr = Tools.Create_Mem_Key(this.HeadKey, this._ctx)) { keep.Add(expr.ToString()); } } this.Compress(keep); }