Z3
src
api
dotnet
Pattern.cs
Go to the documentation of this file.
1
/*++
2
Copyright (c) 2012 Microsoft Corporation
3
4
Module Name:
5
6
Pattern.cs
7
8
Abstract:
9
10
Z3 Managed API: Patterns
11
12
Author:
13
14
Christoph Wintersteiger (cwinter) 2012-03-16
15
16
Notes:
17
18
--*/
19
20
using
System
;
21
using
System
.Runtime.InteropServices;
22
using
System
.
Diagnostics
.
Contracts
;
23
24
namespace
Microsoft
.Z3
25
{
31
[
ContractVerification
(
true
)]
32
public
class
Pattern
:
AST
33
{
37
public
uint NumTerms
38
{
39
get
{
return
Native.Z3_get_pattern_num_terms(
Context
.nCtx, NativeObject); }
40
}
41
45
public
Expr
[] Terms
46
{
47
get
48
{
49
Contract.Ensures(Contract.Result<
Expr
[]>() != null);
50
51
uint n = NumTerms;
52
Expr
[] res =
new
Expr
[n];
53
for
(uint i = 0; i < n; i++)
54
res[i] =
Expr
.Create(
Context
, Native.Z3_get_pattern(
Context
.nCtx, NativeObject, i));
55
return
res;
56
}
57
}
58
62
public
override
string
ToString
()
63
{
64
return
Native.Z3_pattern_to_string(
Context
.nCtx, NativeObject);
65
}
66
67
#region Internal
68
internal
Pattern
(
Context
ctx, IntPtr obj)
69
: base(ctx, obj)
70
{
71
Contract.Requires(ctx != null);
72
}
73
#endregion
74
}
75
}
System
System.Diagnostics
Microsoft
System.Diagnostics.Contracts.ContractVerification
Definition:
DummyContracts.cs:38
Microsoft.Z3.Expr
Expressions are terms.
Definition:
Expr.cs:29
System.Diagnostics.Contracts
Definition:
DummyContracts.cs:21
Microsoft.Z3.Pattern.ToString
override string ToString()
A string representation of the pattern.
Definition:
Pattern.cs:62
Microsoft.Z3.Pattern
Patterns comprise a list of terms. The list should be non-empty. If the list comprises of more than o...
Definition:
Pattern.cs:32
Microsoft.Z3.Context
The main interaction with Z3 happens via the Context.
Definition:
Context.cs:32
Microsoft.Z3.AST
The abstract syntax tree (AST) class.
Definition:
AST.cs:31
Generated on Sat Nov 12 2016 22:01:04 for Z3 by
1.8.12