3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-15 13:28:47 +00:00

fix java API

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
Nikolaj Bjorner 2018-03-19 18:10:57 -07:00
parent ac2fe879ae
commit b002477d1a

View file

@ -179,32 +179,21 @@ public class InterpolationContext extends Context
public ReadInterpolationProblemResult ReadInterpolationProblem(String filename) public ReadInterpolationProblemResult ReadInterpolationProblem(String filename)
{ {
ReadInterpolationProblemResult res = new ReadInterpolationProblemResult(); ReadInterpolationProblemResult res = new ReadInterpolationProblemResult();
// TBD: update to AstVector based API
Native.UIntArrayPtr n_parents = new Native.UIntArrayPtr(); Native.UIntArrayPtr n_parents = new Native.UIntArrayPtr();
ASTVector _cnsts = new ASTVector(this); ASTVector _cnsts = new ASTVector(this);
ASTVector _theory = new ASTVector(this); ASTVector _theory = new ASTVector(this);
Native.StringPtr n_err_str = new Native.StringPtr(); Native.StringPtr n_err_str = new Native.StringPtr();
res.return_value = Native.readInterpolationProblem(nCtx(), _cnsts, n_parents, filename, n_err_str, _theory); Native.IntPtr n_num = new Native.IntPtr();
res.return_value = Native.readInterpolationProblem(nCtx(), _cnsts.getNativeObject(), n_num,
// Native.IntPtr n_num = new Native.IntPtr(); n_parents, filename, n_err_str, _theory.getNativeObject());
// Native.IntPtr n_num_theory = new Native.IntPtr();
// Native.ObjArrayPtr n_cnsts = new Native.ObjArrayPtr();
//
// int num = n_num.value;
// int num_theory = _theory.n_num_theory.value;
res.error = n_err_str.value; res.error = n_err_str.value;
// res.cnsts = new Expr[num]; res.theory = _theory.ToExprArray();
// res.parents = new int[num]; res.cnsts = _cnsts.ToExprArray();
// theory = new Expr[num_theory]; int num = n_num.value;
// for (int i = 0; i < num; i++) res.parents = new int[num];
// { for (int i = 0; i < num; i++) {
// res.cnsts[i] = Expr.create(this, n_cnsts.value[i]); res.parents[i] = n_parents.value[i];
// res.parents[i] = n_parents.value[i]; }
// }
// for (int i = 0; i < num_theory; i++)
// res.theory[i] = Expr.create(this, n_theory.value[i]);
return res; return res;
} }