mirror of
https://github.com/Z3Prover/z3
synced 2025-12-24 13:06:50 +00:00
* 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>
53 lines
1 KiB
C#
53 lines
1 KiB
C#
/*++
|
|
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)); }
|
|
}
|
|
}
|
|
}
|