mirror of
https://github.com/Z3Prover/z3
synced 2025-12-27 22:46:36 +00:00
Add finite set API support for C# and Java bindings (#8003)
* Initial plan * Add finite set API support for Java and C# Co-authored-by: NikolajBjorner <3085284+NikolajBjorner@users.noreply.github.com> * Add documentation and examples for finite set APIs Co-authored-by: NikolajBjorner <3085284+NikolajBjorner@users.noreply.github.com> * Delete FINITE_SET_API_EXAMPLES.md * Add FiniteSetSort files to CMakeLists.txt build configurations Co-authored-by: NikolajBjorner <3085284+NikolajBjorner@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: NikolajBjorner <3085284+NikolajBjorner@users.noreply.github.com> Co-authored-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
5b92f8fb80
commit
df816cab07
6 changed files with 410 additions and 0 deletions
53
src/api/dotnet/FiniteSetSort.cs
Normal file
53
src/api/dotnet/FiniteSetSort.cs
Normal file
|
|
@ -0,0 +1,53 @@
|
|||
/*++
|
||||
Copyright (c) 2024 Microsoft Corporation
|
||||
|
||||
Module Name:
|
||||
|
||||
FiniteSetSort.cs
|
||||
|
||||
Abstract:
|
||||
|
||||
Z3 Managed API: Finite Set Sorts
|
||||
|
||||
Author:
|
||||
|
||||
GitHub Copilot
|
||||
|
||||
Notes:
|
||||
|
||||
--*/
|
||||
|
||||
using System.Diagnostics;
|
||||
using System;
|
||||
|
||||
namespace Microsoft.Z3
|
||||
{
|
||||
/// <summary>
|
||||
/// Finite set sorts.
|
||||
/// </summary>
|
||||
public class FiniteSetSort : Sort
|
||||
{
|
||||
#region Internal
|
||||
internal FiniteSetSort(Context ctx, IntPtr obj)
|
||||
: base(ctx, obj)
|
||||
{
|
||||
Debug.Assert(ctx != null);
|
||||
}
|
||||
|
||||
internal FiniteSetSort(Context ctx, Sort elemSort)
|
||||
: base(ctx, Native.Z3_mk_finite_set_sort(ctx.nCtx, elemSort.NativeObject))
|
||||
{
|
||||
Debug.Assert(ctx != null);
|
||||
Debug.Assert(elemSort != null);
|
||||
}
|
||||
#endregion
|
||||
|
||||
/// <summary>
|
||||
/// Get the element sort (basis) of this finite set sort.
|
||||
/// </summary>
|
||||
public Sort Basis
|
||||
{
|
||||
get { return Sort.Create(Context, Native.Z3_get_finite_set_sort_basis(Context.nCtx, NativeObject)); }
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue