mirror of
https://github.com/Z3Prover/z3
synced 2025-04-27 02:45:51 +00:00
Managed API: Refactoring and formatting.
Signed-off-by: Christoph M. Wintersteiger <cwinter@microsoft.com>
This commit is contained in:
parent
edc9dccbcf
commit
7defd469bb
52 changed files with 2006 additions and 1657 deletions
69
src/api/dotnet/ArraySort.cs
Normal file
69
src/api/dotnet/ArraySort.cs
Normal file
|
@ -0,0 +1,69 @@
|
|||
/*++
|
||||
Copyright (c) 2012 Microsoft Corporation
|
||||
|
||||
Module Name:
|
||||
|
||||
ArraySort.cs
|
||||
|
||||
Abstract:
|
||||
|
||||
Z3 Managed API: Array Sorts
|
||||
|
||||
Author:
|
||||
|
||||
Christoph Wintersteiger (cwinter) 2012-11-23
|
||||
|
||||
Notes:
|
||||
|
||||
--*/
|
||||
|
||||
using System;
|
||||
using System.Diagnostics.Contracts;
|
||||
|
||||
namespace Microsoft.Z3
|
||||
{
|
||||
/// <summary>
|
||||
/// Array sorts.
|
||||
/// </summary>
|
||||
[ContractVerification(true)]
|
||||
public class ArraySort : Sort
|
||||
{
|
||||
/// <summary>
|
||||
/// The domain of the array sort.
|
||||
/// </summary>
|
||||
public Sort Domain
|
||||
{
|
||||
get
|
||||
{
|
||||
Contract.Ensures(Contract.Result<Sort>() != null);
|
||||
|
||||
return Sort.Create(Context, Native.Z3_get_array_sort_domain(Context.nCtx, NativeObject));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The range of the array sort.
|
||||
/// </summary>
|
||||
public Sort Range
|
||||
{
|
||||
get
|
||||
{
|
||||
Contract.Ensures(Contract.Result<Sort>() != null);
|
||||
|
||||
return Sort.Create(Context, Native.Z3_get_array_sort_range(Context.nCtx, NativeObject));
|
||||
}
|
||||
}
|
||||
|
||||
#region Internal
|
||||
internal ArraySort(Context ctx, IntPtr obj) : base(ctx, obj) { Contract.Requires(ctx != null); }
|
||||
internal ArraySort(Context ctx, Sort domain, Sort range)
|
||||
: base(ctx, Native.Z3_mk_array_sort(ctx.nCtx, domain.NativeObject, range.NativeObject))
|
||||
{
|
||||
Contract.Requires(ctx != null);
|
||||
Contract.Requires(domain != null);
|
||||
Contract.Requires(range != null);
|
||||
}
|
||||
#endregion
|
||||
};
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue