Z3
 
Loading...
Searching...
No Matches
ParamDescrs.java
Go to the documentation of this file.
1
18package com.microsoft.z3;
19
20import com.microsoft.z3.enumerations.Z3_param_kind;
21
22import java.lang.ref.ReferenceQueue;
23
27public class ParamDescrs extends Z3Object {
31 public void validate(Params p)
32 {
33
34 Native.paramsValidate(getContext().nCtx(), p.getNativeObject(),
35 getNativeObject());
36 }
37
42 {
43
44 return Z3_param_kind.fromInt(Native.paramDescrsGetKind(
45 getContext().nCtx(), getNativeObject(), name.getNativeObject()));
46 }
47
52 public String getDocumentation(Symbol name)
53 {
54 return Native.paramDescrsGetDocumentation(getContext().nCtx(), getNativeObject(), name.getNativeObject());
55 }
56
62 public Symbol[] getNames()
63 {
64 int sz = Native.paramDescrsSize(getContext().nCtx(), getNativeObject());
65 Symbol[] names = new Symbol[sz];
66 for (int i = 0; i < sz; ++i)
67 {
68 names[i] = Symbol.create(getContext(), Native.paramDescrsGetName(
69 getContext().nCtx(), getNativeObject(), i));
70 }
71 return names;
72 }
73
77 public int size()
78 {
79 return Native.paramDescrsSize(getContext().nCtx(), getNativeObject());
80 }
81
85 @Override
86 public String toString() {
87 return Native.paramDescrsToString(getContext().nCtx(), getNativeObject());
88 }
89
90 ParamDescrs(Context ctx, long obj)
91 {
92 super(ctx, obj);
93 }
94
95 @Override
96 void incRef() {
97 Native.paramDescrsIncRef(getContext().nCtx(), getNativeObject());
98 }
99
100 @Override
101 void addToReferenceQueue() {
102 getContext().getReferenceQueue().storeReference(this, ParamDescrsRef::new);
103 }
104
105 private static class ParamDescrsRef extends Z3ReferenceQueue.Reference<ParamDescrs> {
106
107 private ParamDescrsRef(ParamDescrs referent, ReferenceQueue<Z3Object> q) {
108 super(referent, q);
109 }
110
111 @Override
112 void decRef(Context ctx, long z3Obj) {
113 Native.paramDescrsDecRef(ctx.nCtx(), z3Obj);
114 }
115 }
116}
String getDocumentation(Symbol name)
Z3_param_kind getKind(Symbol name)
Z3_param_kind
The different kinds of parameters that can be associated with parameter sets. (see Z3_mk_params).
Definition z3_api.h:1305