The parameters of the function declaration
()
| 145 | * The parameters of the function declaration |
| 146 | **/ |
| 147 | public Parameter[] getParameters() |
| 148 | { |
| 149 | |
| 150 | int num = getNumParameters(); |
| 151 | Parameter[] res = new Parameter[num]; |
| 152 | for (int i = 0; i < num; i++) |
| 153 | { |
| 154 | Z3_parameter_kind k = Z3_parameter_kind.fromInt(Native |
| 155 | .getDeclParameterKind(getContext().nCtx(), getNativeObject(), i)); |
| 156 | switch (k) |
| 157 | { |
| 158 | case Z3_PARAMETER_INT: |
| 159 | res[i] = new Parameter(k, Native.getDeclIntParameter(getContext() |
| 160 | .nCtx(), getNativeObject(), i)); |
| 161 | break; |
| 162 | case Z3_PARAMETER_DOUBLE: |
| 163 | res[i] = new Parameter(k, Native.getDeclDoubleParameter( |
| 164 | getContext().nCtx(), getNativeObject(), i)); |
| 165 | break; |
| 166 | case Z3_PARAMETER_SYMBOL: |
| 167 | res[i] = new Parameter(k, Symbol.create(getContext(), Native |
| 168 | .getDeclSymbolParameter(getContext().nCtx(), |
| 169 | getNativeObject(), i))); |
| 170 | break; |
| 171 | case Z3_PARAMETER_SORT: |
| 172 | res[i] = new Parameter(k, Sort.create(getContext(), Native |
| 173 | .getDeclSortParameter(getContext().nCtx(), getNativeObject(), |
| 174 | i))); |
| 175 | break; |
| 176 | case Z3_PARAMETER_AST: |
| 177 | res[i] = new Parameter(k, new AST(getContext(), |
| 178 | Native.getDeclAstParameter(getContext().nCtx(), |
| 179 | getNativeObject(), i))); |
| 180 | break; |
| 181 | case Z3_PARAMETER_FUNC_DECL: |
| 182 | res[i] = new Parameter(k, new FuncDecl<>(getContext(), |
| 183 | Native.getDeclFuncDeclParameter(getContext().nCtx(), |
| 184 | getNativeObject(), i))); |
| 185 | break; |
| 186 | case Z3_PARAMETER_RATIONAL: |
| 187 | res[i] = new Parameter(k, Native.getDeclRationalParameter( |
| 188 | getContext().nCtx(), getNativeObject(), i)); |
| 189 | break; |
| 190 | default: |
| 191 | throw new Z3Exception( |
| 192 | "Unknown function declaration parameter kind encountered"); |
| 193 | } |
| 194 | } |
| 195 | return res; |
| 196 | } |
| 197 | |
| 198 | /** |
| 199 | * Function declarations can have Parameters associated with them. |
nothing calls this directly
no test coverage detected