mirror of
https://github.com/Z3Prover/z3
synced 2025-04-06 17:44:08 +00:00
fix #6746, fix type errors in java bindings
This commit is contained in:
parent
82667bd86b
commit
81068981aa
|
@ -765,7 +765,7 @@ def mk_java(java_src, java_dir, package_name):
|
|||
java_wrapper.write(line)
|
||||
for name, result, params in _dotnet_decls:
|
||||
java_wrapper.write('DLL_VIS JNIEXPORT %s JNICALL Java_%s_Native_INTERNAL%s(JNIEnv * jenv, jclass cls' % (type2javaw(result), pkg_str, java_method_name(name)))
|
||||
i = 0
|
||||
i = 0
|
||||
for param in params:
|
||||
java_wrapper.write(', ')
|
||||
java_wrapper.write('%s a%d' % (param2javaw(param), i))
|
||||
|
|
|
@ -203,7 +203,7 @@ DLL_VIS JNIEXPORT void JNICALL Java_com_microsoft_z3_Native_propagateRegisterDec
|
|||
Z3_solver_propagate_decide((Z3_context)ctx, (Z3_solver)solver, decide_eh);
|
||||
}
|
||||
|
||||
DLL_VIS JNIEXPORT void JNICALL Java_com_microsoft_z3_Native_propagateConflict(JNIEnv * jenv, jclass cls, jobject jobj, jlong ctx, jlong solver, jlong javainfo, jlong num_fixed, jlongArray fixed, jlong num_eqs, jlongArray eq_lhs, jlongArray eq_rhs, jlong conseq) {
|
||||
DLL_VIS JNIEXPORT void JNICALL Java_com_microsoft_z3_Native_propagateConflict(JNIEnv * jenv, jclass cls, jobject jobj, jlong ctx, jlong solver, jlong javainfo, long num_fixed, jlongArray fixed, long num_eqs, jlongArray eq_lhs, jlongArray eq_rhs, jlong conseq) {
|
||||
JavaInfo *info = (JavaInfo*)javainfo;
|
||||
GETLONGAELEMS(Z3_ast, fixed, _fixed);
|
||||
GETLONGAELEMS(Z3_ast, eq_lhs, _eq_lhs);
|
||||
|
@ -226,7 +226,7 @@ DLL_VIS JNIEXPORT void JNICALL Java_com_microsoft_z3_Native_propagateAdd(JNIEnv
|
|||
}
|
||||
}
|
||||
|
||||
DLL_VIS JNIEXPORT bool JNICALL Java_com_microsoft_z3_Native_propagateNextSplit(JNIEnv * jenv, jclass cls, jobject jobj, jlong ctx, jlong solver, jlong javainfo, long e, long idx, int phase) {
|
||||
DLL_VIS JNIEXPORT bool JNICALL Java_com_microsoft_z3_Native_propagateNextSplit(JNIEnv * jenv, jclass cls, jobject jobj, jlong ctx, jlong solver, jlong javainfo, jlong e, long idx, int phase) {
|
||||
JavaInfo *info = (JavaInfo*)javainfo;
|
||||
Z3_solver_callback cb = info->cb;
|
||||
return Z3_solver_next_split((Z3_context)ctx, cb, (Z3_ast)e, idx, Z3_lbool(phase));
|
||||
|
|
|
@ -508,11 +508,12 @@ public:
|
|||
m_owner.m_func_decls.contains(s);
|
||||
}
|
||||
format_ns::format * pp_sort(sort * s) override {
|
||||
auto * f = m_owner.pp(s);
|
||||
auto * f = m_owner.try_pp(s);
|
||||
if (f)
|
||||
return f;
|
||||
return smt2_pp_environment::pp_sort(s);
|
||||
}
|
||||
|
||||
format_ns::format * pp_fdecl(func_decl * f, unsigned & len) override {
|
||||
symbol s = f->get_name();
|
||||
func_decls fs;
|
||||
|
@ -2264,6 +2265,10 @@ bool cmd_context::is_model_available(model_ref& md) const {
|
|||
}
|
||||
|
||||
format_ns::format * cmd_context::pp(sort * s) const {
|
||||
return get_pp_env().pp_sort(s);
|
||||
}
|
||||
|
||||
format_ns::format* cmd_context::try_pp(sort* s) const {
|
||||
TRACE("cmd_context", tout << "pp(sort * s), s: " << mk_pp(s, m()) << "\n";);
|
||||
return pm().pp(get_pp_env(), s);
|
||||
}
|
||||
|
|
|
@ -538,6 +538,7 @@ public:
|
|||
}
|
||||
|
||||
format_ns::format * pp(sort * s) const;
|
||||
format_ns::format* try_pp(sort* s) const;
|
||||
void pp(sort * s, format_ns::format_ref & r) const override { r = pp(s); }
|
||||
void pp(func_decl * f, format_ns::format_ref & r) const override;
|
||||
void pp(expr * n, unsigned num_vars, char const * var_prefix, format_ns::format_ref & r, sbuffer<symbol> & var_names) const override;
|
||||
|
|
Loading…
Reference in a new issue