Z3
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
ParamDescrs.java
Go to the documentation of this file.
1 
18 package com.microsoft.z3;
19 
21 
25 public class ParamDescrs extends Z3Object
26 {
30  public void validate(Params p)
31  {
32 
33  Native.paramsValidate(getContext().nCtx(), p.getNativeObject(),
34  getNativeObject());
35  }
36 
41  {
42 
43  return Z3_param_kind.fromInt(Native.paramDescrsGetKind(
44  getContext().nCtx(), getNativeObject(), name.getNativeObject()));
45  }
46 
52  public Symbol[] getNames()
53  {
54  int sz = Native.paramDescrsSize(getContext().nCtx(), getNativeObject());
55  Symbol[] names = new Symbol[sz];
56  for (int i = 0; i < sz; ++i)
57  {
58  names[i] = Symbol.create(getContext(), Native.paramDescrsGetName(
59  getContext().nCtx(), getNativeObject(), i));
60  }
61  return names;
62  }
63 
67  public int size()
68  {
69  return Native.paramDescrsSize(getContext().nCtx(), getNativeObject());
70  }
71 
75  public String toString()
76  {
77  try
78  {
79  return Native.paramDescrsToString(getContext().nCtx(), getNativeObject());
80  } catch (Z3Exception e)
81  {
82  return "Z3Exception: " + e.getMessage();
83  }
84  }
85 
86  ParamDescrs(Context ctx, long obj)
87  {
88  super(ctx, obj);
89  }
90 
91  void incRef(long o)
92  {
93  getContext().getParamDescrsDRQ().incAndClear(getContext(), o);
94  super.incRef(o);
95  }
96 
97  void decRef(long o)
98  {
99  getContext().getParamDescrsDRQ().add(o);
100  super.decRef(o);
101  }
102 }
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:1239