-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathParamDescrs.java
More file actions
91 lines (79 loc) · 2.18 KB
/
ParamDescrs.java
File metadata and controls
91 lines (79 loc) · 2.18 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
/**
* This file was automatically generated from ParamDescrs.cs
* w/ further modifications by:
* @author Christoph M. Wintersteiger (cwinter)
**/
package com.microsoft.z3;
import com.microsoft.z3.enumerations.Z3_param_kind;
/**
* A ParamDescrs describes a set of parameters.
**/
public class ParamDescrs extends Z3Object
{
/**
* validate a set of parameters.
**/
public void validate(Params p) throws Z3Exception
{
Native.paramsValidate(getContext().nCtx(), p.getNativeObject(),
getNativeObject());
}
/**
* Retrieve kind of parameter.
**/
public Z3_param_kind getKind(Symbol name) throws Z3Exception
{
return Z3_param_kind.fromInt(Native.paramDescrsGetKind(
getContext().nCtx(), getNativeObject(), name.getNativeObject()));
}
/**
* Retrieve all names of parameters.
*
* @throws Z3Exception
**/
public Symbol[] getNames() throws Z3Exception
{
int sz = Native.paramDescrsSize(getContext().nCtx(), getNativeObject());
Symbol[] names = new Symbol[sz];
for (int i = 0; i < sz; ++i)
{
names[i] = Symbol.create(getContext(), Native.paramDescrsGetName(
getContext().nCtx(), getNativeObject(), i));
}
return names;
}
/**
* The size of the ParamDescrs.
**/
public int size() throws Z3Exception
{
return Native.paramDescrsSize(getContext().nCtx(), getNativeObject());
}
/**
* Retrieves a string representation of the ParamDescrs.
**/
public String toString()
{
try
{
return Native.paramDescrsToString(getContext().nCtx(), getNativeObject());
} catch (Z3Exception e)
{
return "Z3Exception: " + e.getMessage();
}
}
ParamDescrs(Context ctx, long obj) throws Z3Exception
{
super(ctx, obj);
}
void incRef(long o) throws Z3Exception
{
getContext().paramDescrs_DRQ().incAndClear(getContext(), o);
super.incRef(o);
}
void decRef(long o) throws Z3Exception
{
getContext().paramDescrs_DRQ().add(o);
super.decRef(o);
}
}