41 readonly
public string Key;
53 public bool IsUInt {
get {
return m_is_uint; } }
57 public bool IsDouble {
get {
return m_is_double; } }
68 return m_uint.ToString();
70 return m_double.ToString();
72 throw new Z3Exception(
"Unknown statistical entry type");
85 readonly
private bool m_is_uint =
false;
86 readonly
private bool m_is_double =
false;
87 readonly
private uint m_uint = 0;
88 readonly
private double m_double = 0.0;
89 internal Entry(
string k, uint v)
95 internal Entry(
string k,
double v)
109 return Native.Z3_stats_to_string(
Context.nCtx, NativeObject);
117 get {
return Native.Z3_stats_size(
Context.nCtx, NativeObject); }
127 return NativeEntries(
Context.nCtx, NativeObject);
133 uint n = Native.Z3_stats_size(ctx, stats);
134 Entry[] res =
new Entry[n];
135 for (uint i = 0; i < n; i++)
138 string k = Native.Z3_stats_get_key(ctx, stats, i);
139 if (Native.Z3_stats_is_uint(ctx, stats, i) != 0)
140 e =
new Entry(k, Native.Z3_stats_get_uint_value(ctx, stats, i));
141 else if (Native.Z3_stats_is_double(ctx, stats, i) != 0)
142 e =
new Entry(k, Native.Z3_stats_get_double_value(ctx, stats, i));
159 string[] res =
new string[n];
160 for (uint i = 0; i < n; i++)
161 res[i] = Native.Z3_stats_get_key(
Context.nCtx, NativeObject, i);
176 for (uint i = 0; i < n; i++)
177 if (es[i].Key == key)
187 Debug.Assert(ctx !=
null);
190 internal override void IncRef(IntPtr o)
192 Native.Z3_stats_inc_ref(
Context.nCtx, o);
195 internal override void DecRef(IntPtr o)
199 if (
Context.nCtx != IntPtr.Zero)
200 Native.Z3_stats_dec_ref(
Context.nCtx, o);
The main interaction with Z3 happens via the Context.
Statistical data is organized into pairs of [Key, Entry], where every Entry is either a DoubleEntry o...
double DoubleValue
The double-value of the entry.
uint UIntValue
The uint-value of the entry.
bool IsDouble
True if the entry is double-valued.
bool IsUInt
True if the entry is uint-valued.
override string ToString()
The string representation of the Entry.
string Value
The string representation of the entry's value.