48 IntPtr constructor = IntPtr.Zero;
49 IntPtr tester = IntPtr.Zero;
50 IntPtr[] accessors =
new IntPtr[n];
51 Native.Z3_query_constructor(
Context.nCtx, NativeObject, n, ref constructor, ref tester, accessors);
63 IntPtr constructor = IntPtr.Zero;
64 IntPtr tester = IntPtr.Zero;
65 IntPtr[] accessors =
new IntPtr[n];
66 Native.Z3_query_constructor(
Context.nCtx, NativeObject, n, ref constructor, ref tester, accessors);
78 IntPtr constructor = IntPtr.Zero;
79 IntPtr tester = IntPtr.Zero;
80 IntPtr[] accessors =
new IntPtr[n];
81 Native.Z3_query_constructor(
Context.nCtx, NativeObject, n, ref constructor, ref tester, accessors);
83 for (uint i = 0; i < n; i++)
94 if (
Context.nCtx != IntPtr.Zero) {
97 if (
Context.nCtx != IntPtr.Zero)
98 Native.Z3_del_constructor(
Context.nCtx, NativeObject);
106 internal Constructor(
Context ctx, Symbol name, Symbol recognizer, Symbol[] fieldNames,
107 Sort[] sorts, uint[] sortRefs)
110 Debug.Assert(ctx !=
null);
111 Debug.Assert(name !=
null);
112 Debug.Assert(recognizer !=
null);
114 n = AST.ArrayLength(fieldNames);
116 if (n != AST.ArrayLength(sorts))
117 throw new Z3Exception(
"Number of field names does not match number of sorts");
118 if (sortRefs !=
null && sortRefs.Length != n)
119 throw new Z3Exception(
"Number of field names does not match number of sort refs");
121 if (sortRefs ==
null) sortRefs =
new uint[n];
123 NativeObject = Native.Z3_mk_constructor(ctx.nCtx, name.NativeObject, recognizer.NativeObject,
125 Symbol.ArrayToNative(fieldNames),
126 Sort.ArrayToNative(sorts),
The main interaction with Z3 happens via the Context.