Z3 |

ArraySort.cs
Go to the documentation of this file.
1/*++
2 Copyright (c) 2012 Microsoft Corporation
3
4 Module Name:
5
6 ArraySort.cs
7
8 Abstract:
9
10 Z3 Managed API: Array Sorts
11
12 Author:
13
14 Christoph Wintersteiger (cwinter) 2012-11-23
15
16 Notes:
17
18--*/
19
20 using System.Diagnostics;
21 using System;
22
23 namespace Microsoft.Z3
24{
28 public class ArraySort : Sort
29 {
33 public Sort Domain
34 {
35 get
36 {
37
38 return Sort.Create(Context, Native.Z3_get_array_sort_domain(Context.nCtx, NativeObject));
39 }
40 }
41
45 public Sort Range
46 {
47 get
48 {
49
50 return Sort.Create(Context, Native.Z3_get_array_sort_range(Context.nCtx, NativeObject));
51 }
52 }
53
54 #region Internal
55 internal ArraySort(Context ctx, IntPtr obj) : base(ctx, obj) { Debug.Assert(ctx != null); }
56 internal ArraySort(Context ctx, Sort domain, Sort range)
57 : base(ctx, Native.Z3_mk_array_sort(ctx.nCtx, domain.NativeObject, range.NativeObject))
58 {
59 Debug.Assert(ctx != null);
60 Debug.Assert(domain != null);
61 Debug.Assert(range != null);
62 }
63 internal ArraySort(Context ctx, Sort[] domain, Sort range)
64 : base(ctx, Native.Z3_mk_array_sort_n(ctx.nCtx, (uint)domain.Length, AST.ArrayToNative(domain), range.NativeObject))
65 {
66 Debug.Assert(ctx != null);
67 Debug.Assert(domain != null);
68 Debug.Assert(range != null);
69 }
70 #endregion
71 };
72
73}
Microsoft.Z3.ArraySort
Array sorts.
Definition: ArraySort.cs:29
Microsoft.Z3.ArraySort.Range
Sort Range
The range of the array sort.
Definition: ArraySort.cs:46
Microsoft.Z3.ArraySort.Domain
Sort Domain
The domain of the array sort.
Definition: ArraySort.cs:34
Microsoft.Z3.Context
The main interaction with Z3 happens via the Context.
Definition: Context.cs:32
Microsoft.Z3.Sort
The Sort class implements type information for ASTs.
Definition: Sort.cs:29
Microsoft.Z3
Definition: AlgebraicNum.cs:27
z3::range
expr range(expr const &lo, expr const &hi)
Definition: z3++.h:3725
z3py.Length
def Length(s)
Definition: z3py.py:10852
Z3_mk_array_sort_n
Z3_sort Z3_API Z3_mk_array_sort_n(Z3_context c, unsigned n, Z3_sort const *domain, Z3_sort range)
Create an array type with N arguments.
Z3_mk_array_sort
Z3_sort Z3_API Z3_mk_array_sort(Z3_context c, Z3_sort domain, Z3_sort range)
Create an array type.