mirror of
https://github.com/Z3Prover/z3
synced 2025-06-19 12:23:38 +00:00
use conventions from Context
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
c812d1e890
commit
5f79a977fb
1 changed files with 23 additions and 6 deletions
|
@ -41,7 +41,8 @@ namespace Microsoft.Z3
|
||||||
/// expressions.
|
/// expressions.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
||||||
public class NativeContext {
|
public class NativeContext
|
||||||
|
{
|
||||||
|
|
||||||
#region Arithmetic
|
#region Arithmetic
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -112,8 +113,24 @@ namespace Microsoft.Z3
|
||||||
Debug.Assert(noPatterns == null || noPatterns.All(np => np != IntPtr.Zero));
|
Debug.Assert(noPatterns == null || noPatterns.All(np => np != IntPtr.Zero));
|
||||||
uint numPatterns = patterns == null ? 0 : (uint)patterns.Length;
|
uint numPatterns = patterns == null ? 0 : (uint)patterns.Length;
|
||||||
uint numNoPatterns = noPatterns == null ? 0 : (uint)noPatterns.Length;
|
uint numNoPatterns = noPatterns == null ? 0 : (uint)noPatterns.Length;
|
||||||
Z3_symbol[] _names = Symbol.ArrayToNative(names);
|
if (noPatterns == null && quantifierID == null && skolemID == null)
|
||||||
return Native.Z3_mk_quantifier_ex(nCtx, (byte)(is_forall ? 1 : 0), weight, quantifierID.NativeObject, skolemID.NativeObject, numPatterns, patterns, numNoPatterns, noPatterns, (uint)sorts.Length, sorts, _names, body);
|
{
|
||||||
|
return Native.Z3_mk_quantifier(nCtx, (byte)(is_forall ? 1 : 0), weight,
|
||||||
|
numPatterns, patterns,
|
||||||
|
(uint)sorts.Length, sorts,
|
||||||
|
Symbol.ArrayToNative(names),
|
||||||
|
body);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return Native.Z3_mk_quantifier_ex(nCtx, (byte)(is_forall ? 1 : 0), weight,
|
||||||
|
AST.GetNativeObject(quantifierID), AST.GetNativeObject(skolemID),
|
||||||
|
numPatterns, patterns,
|
||||||
|
numNoPatterns, noPatterns,
|
||||||
|
(uint)sorts.Length, sorts,
|
||||||
|
Symbol.ArrayToNative(names),
|
||||||
|
body);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue