-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathParams.java
More file actions
108 lines (95 loc) · 2.81 KB
/
Params.java
File metadata and controls
108 lines (95 loc) · 2.81 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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
/**
* This file was automatically generated from Params.cs
* w/ further modifications by:
* @author Christoph M. Wintersteiger (cwinter)
**/
package com.microsoft.z3;
/**
* A ParameterSet represents a configuration in the form of Symbol/value pairs.
**/
public class Params extends Z3Object
{
/**
* Adds a parameter setting.
**/
public void add(Symbol name, boolean value) throws Z3Exception
{
Native.paramsSetBool(getContext().nCtx(), getNativeObject(),
name.getNativeObject(), (value) ? true : false);
}
/**
* Adds a parameter setting.
**/
public void add(Symbol name, double value) throws Z3Exception
{
Native.paramsSetDouble(getContext().nCtx(), getNativeObject(),
name.getNativeObject(), value);
}
/**
* Adds a parameter setting.
**/
public void add(Symbol name, Symbol value) throws Z3Exception
{
Native.paramsSetSymbol(getContext().nCtx(), getNativeObject(),
name.getNativeObject(), value.getNativeObject());
}
/**
* Adds a parameter setting.
**/
public void add(String name, boolean value) throws Z3Exception
{
Native.paramsSetBool(getContext().nCtx(), getNativeObject(),
getContext().mkSymbol(name).getNativeObject(), value);
}
/**
* Adds a parameter setting.
**/
public void add(String name, int value) throws Z3Exception
{
Native.paramsSetUint(getContext().nCtx(), getNativeObject(), getContext()
.mkSymbol(name).getNativeObject(), value);
}
/**
* Adds a parameter setting.
**/
public void add(String name, double value) throws Z3Exception
{
Native.paramsSetDouble(getContext().nCtx(), getNativeObject(), getContext()
.mkSymbol(name).getNativeObject(), value);
}
/**
* Adds a parameter setting.
**/
public void add(String name, Symbol value) throws Z3Exception
{
Native.paramsSetSymbol(getContext().nCtx(), getNativeObject(), getContext()
.mkSymbol(name).getNativeObject(), value.getNativeObject());
}
/**
* A string representation of the parameter set.
**/
public String toString()
{
try
{
return Native.paramsToString(getContext().nCtx(), getNativeObject());
} catch (Z3Exception e)
{
return "Z3Exception: " + e.getMessage();
}
}
Params(Context ctx) throws Z3Exception
{
super(ctx, Native.mkParams(ctx.nCtx()));
}
void incRef(long o) throws Z3Exception
{
getContext().params_DRQ().incAndClear(getContext(), o);
super.incRef(o);
}
void decRef(long o) throws Z3Exception
{
getContext().params_DRQ().add(o);
super.decRef(o);
}
}