mirror of
https://github.com/Z3Prover/z3
synced 2025-04-06 01:24:08 +00:00
[Julia bindings] Changes for libcxxwrap 0.7 (#4184)
* First steps toward adding Julia bindings * Simplifications * Streamlining * Friends of tactic and probe * Add missing functions * Update azure-pipelines.yml for Azure Pipelines * Update azure-pipelines.yml for Azure Pipelines * Update azure-pipelines.yml for Azure Pipelines * Update azure-pipelines.yml for Azure Pipelines * Changes for CxxWrap v0.9.0 * Wrap enumeration and tuple sort * Wrap z3::fixedpoint * Wrap z3::optimize * Wrap missing functions * Fix aux types * Add some missing functions * Revert "Update azure-pipelines.yml for Azure Pipelines" This reverts commit5aab9f9240
. * Revert "Update azure-pipelines.yml for Azure Pipelines" This reverts commitcfccd7ca2c
. * Revert "Update azure-pipelines.yml for Azure Pipelines" This reverts commitf24740c595
. * Revert "Update azure-pipelines.yml for Azure Pipelines" This reverts commit592499eaa0
. * Checkout current version of pipeline * Build Julia bindings on macOS * Extract components of algebraic number * Add type to C API function name * Remove blank line * Typo in doc * Return Z3_ast_vector containing coefficients * Update Julia bindings
This commit is contained in:
parent
6088da5159
commit
269522127b
|
@ -182,7 +182,7 @@ jobs:
|
|||
- script: brew install ninja
|
||||
- script: brew cask install julia
|
||||
- script: |
|
||||
julia -e "using Pkg; Pkg.add(PackageSpec(name=\"libcxxwrap_julia_jll\", version=\"0.6.6\"))"
|
||||
julia -e "using Pkg; Pkg.add(PackageSpec(name=\"libcxxwrap_julia_jll\", version=\"0.7.0\"))"
|
||||
JlCxxDir=$(julia -e "using libcxxwrap_julia_jll; println(joinpath(dirname(libcxxwrap_julia_jll.libcxxwrap_julia_path), \"cmake\", \"JlCxx\"))")
|
||||
set -e
|
||||
mkdir build
|
||||
|
|
|
@ -97,8 +97,8 @@ JLCXX_MODULE define_julia_module(jlcxx::Module &m)
|
|||
|
||||
TYPE_OBJ(config)
|
||||
.method("set", static_cast<void (config::*)(char const *, char const *)>(&config::set))
|
||||
.method("set", [](config &a, char const *b, const jlcxx::StrictlyTypedNumber<bool> &c) { return a.set(b, c.value); })
|
||||
.method("set", [](config &a, char const *b, const jlcxx::StrictlyTypedNumber<int> &c) { return a.set(b, c.value); });
|
||||
.method("set", static_cast<void (config::*)(char const *, bool)>(&config::set))
|
||||
.method("set", static_cast<void (config::*)(char const *, int)>(&config::set));
|
||||
|
||||
// -------------------------------------------------------------------------
|
||||
|
||||
|
@ -377,8 +377,8 @@ JLCXX_MODULE define_julia_module(jlcxx::Module &m)
|
|||
.method("set", static_cast<void (solver::*)(char const *, double)>(&solver::set))
|
||||
.method("set", static_cast<void (solver::*)(char const *, symbol const &)>(&solver::set))
|
||||
.method("set", static_cast<void (solver::*)(char const *, char const *)>(&solver::set))
|
||||
.method("set", [](solver &a, char const *b, const jlcxx::StrictlyTypedNumber<bool> &c) { return a.set(b, c.value); })
|
||||
.method("set", [](solver &a, char const *b, const jlcxx::StrictlyTypedNumber<unsigned> &c) { return a.set(b, c.value); })
|
||||
.method("set", static_cast<void (solver::*)(char const *, bool)>(&solver::set))
|
||||
.method("set", static_cast<void (solver::*)(char const *, unsigned)>(&solver::set))
|
||||
.MM(solver, push)
|
||||
.MM(solver, pop)
|
||||
.MM(solver, reset)
|
||||
|
@ -475,8 +475,8 @@ JLCXX_MODULE define_julia_module(jlcxx::Module &m)
|
|||
|
||||
TYPE_OBJ(params)
|
||||
.constructor<context &>()
|
||||
.method("set", [](params &a, char const *b, const jlcxx::StrictlyTypedNumber<bool> &c) { return a.set(b, c.value); })
|
||||
.method("set", [](params &a, char const *b, const jlcxx::StrictlyTypedNumber<unsigned> &c) { return a.set(b, c.value); })
|
||||
.method("set", static_cast<void (params::*)(char const *, bool)>(¶ms::set))
|
||||
.method("set", static_cast<void (params::*)(char const *, unsigned)>(¶ms::set))
|
||||
.method("set", static_cast<void (params::*)(char const *, double)>(¶ms::set))
|
||||
.method("set", static_cast<void (params::*)(char const *, symbol const &)>(¶ms::set))
|
||||
.method("set", static_cast<void (params::*)(char const *, char const *)>(¶ms::set))
|
||||
|
@ -591,9 +591,9 @@ JLCXX_MODULE define_julia_module(jlcxx::Module &m)
|
|||
|
||||
// -------------------------------------------------------------------------
|
||||
|
||||
m.method("set_param", [](char const *a, const jlcxx::StrictlyTypedNumber<bool> &b) { return set_param(a, b.value); });
|
||||
m.method("set_param", [](char const *a, const jlcxx::StrictlyTypedNumber<int> &b) { return set_param(a, b.value); });
|
||||
m.method("set_param", static_cast<void (*)(char const * param, char const * value)>(&set_param));
|
||||
m.method("set_param", static_cast<void (*)(char const *, bool)>(&set_param));
|
||||
m.method("set_param", static_cast<void (*)(char const *, int)>(&set_param));
|
||||
m.method("set_param", static_cast<void (*)(char const *, char const *)>(&set_param));
|
||||
m.method("reset_params", &reset_params);
|
||||
|
||||
// -------------------------------------------------------------------------
|
||||
|
@ -601,8 +601,8 @@ JLCXX_MODULE define_julia_module(jlcxx::Module &m)
|
|||
TYPE_OBJ(context)
|
||||
.constructor<config &>()
|
||||
.method("set", static_cast<void (context::*)(char const *, char const *)>(&context::set))
|
||||
.method("set", [](context &a, char const *b, const jlcxx::StrictlyTypedNumber<bool> &c) { return a.set(b, c.value); })
|
||||
.method("set", [](context &a, char const *b, const jlcxx::StrictlyTypedNumber<int> &c) { return a.set(b, c.value); })
|
||||
.method("set", static_cast<void (context::*)(char const *, bool)>(&context::set))
|
||||
.method("set", static_cast<void (context::*)(char const *, int)>(&context::set))
|
||||
//
|
||||
.MM(context, interrupt)
|
||||
//
|
||||
|
@ -681,23 +681,23 @@ JLCXX_MODULE define_julia_module(jlcxx::Module &m)
|
|||
//
|
||||
.MM(context, bool_val)
|
||||
//
|
||||
.method("int_val", [](context &a, const jlcxx::StrictlyTypedNumber<int> &b) { return a.int_val(b.value); })
|
||||
.method("int_val", [](context &a, const jlcxx::StrictlyTypedNumber<unsigned> &b) { return a.int_val(b.value); })
|
||||
.method("int_val", [](context &a, const jlcxx::StrictlyTypedNumber<int64_t> &b) { return a.int_val(b.value); })
|
||||
.method("int_val", [](context &a, const jlcxx::StrictlyTypedNumber<uint64_t> &b) { return a.int_val(b.value); })
|
||||
.method("int_val", [](context &a, const jlcxx::StrictlyTypedNumber<int> b) { return a.int_val(b.value); })
|
||||
.method("int_val", [](context &a, const jlcxx::StrictlyTypedNumber<unsigned> b) { return a.int_val(b.value); })
|
||||
.method("int_val", [](context &a, const jlcxx::StrictlyTypedNumber<int64_t> b) { return a.int_val(b.value); })
|
||||
.method("int_val", [](context &a, const jlcxx::StrictlyTypedNumber<uint64_t> b) { return a.int_val(b.value); })
|
||||
.method("int_val", static_cast<expr (context::*)(char const *)>(&context::int_val))
|
||||
//
|
||||
.method("real_val", [](context &a, const jlcxx::StrictlyTypedNumber<int> &b) { return a.real_val(b.value); })
|
||||
.method("real_val", [](context &a, const jlcxx::StrictlyTypedNumber<unsigned> &b) { return a.real_val(b.value); })
|
||||
.method("real_val", [](context &a, const jlcxx::StrictlyTypedNumber<int64_t> &b) { return a.real_val(b.value); })
|
||||
.method("real_val", [](context &a, const jlcxx::StrictlyTypedNumber<uint64_t> &b) { return a.real_val(b.value); })
|
||||
.method("real_val", [](context &a, const jlcxx::StrictlyTypedNumber<int> b) { return a.real_val(b.value); })
|
||||
.method("real_val", [](context &a, const jlcxx::StrictlyTypedNumber<unsigned> b) { return a.real_val(b.value); })
|
||||
.method("real_val", [](context &a, const jlcxx::StrictlyTypedNumber<int64_t> b) { return a.real_val(b.value); })
|
||||
.method("real_val", [](context &a, const jlcxx::StrictlyTypedNumber<uint64_t> b) { return a.real_val(b.value); })
|
||||
.method("real_val", static_cast<expr (context::*)(int, int)>(&context::real_val))
|
||||
.method("real_val", static_cast<expr (context::*)(char const *)>(&context::real_val))
|
||||
//
|
||||
.method("bv_val", [](context &a, const jlcxx::StrictlyTypedNumber<int> &b, const jlcxx::StrictlyTypedNumber<unsigned> &c) { return a.bv_val(b.value, c.value); })
|
||||
.method("bv_val", [](context &a, const jlcxx::StrictlyTypedNumber<unsigned> &b, const jlcxx::StrictlyTypedNumber<unsigned> &c) { return a.bv_val(b.value, c.value); })
|
||||
.method("bv_val", [](context &a, const jlcxx::StrictlyTypedNumber<int64_t> &b, const jlcxx::StrictlyTypedNumber<unsigned> &c) { return a.bv_val(b.value, c.value); })
|
||||
.method("bv_val", [](context &a, const jlcxx::StrictlyTypedNumber<uint64_t> &b, const jlcxx::StrictlyTypedNumber<unsigned> &c) { return a.bv_val(b.value, c.value); })
|
||||
.method("bv_val", [](context &a, const jlcxx::StrictlyTypedNumber<int> b, unsigned c) { return a.bv_val(b.value, c); })
|
||||
.method("bv_val", [](context &a, const jlcxx::StrictlyTypedNumber<unsigned> b, unsigned c) { return a.bv_val(b.value, c); })
|
||||
.method("bv_val", [](context &a, const jlcxx::StrictlyTypedNumber<int64_t> b, unsigned c) { return a.bv_val(b.value, c); })
|
||||
.method("bv_val", [](context &a, const jlcxx::StrictlyTypedNumber<uint64_t> b, unsigned c) { return a.bv_val(b.value, c); })
|
||||
.method("bv_val", static_cast<expr (context::*)(char const *, unsigned)>(&context::bv_val))
|
||||
.method("bv_val", static_cast<expr (context::*)(unsigned, bool const *)>(&context::bv_val))
|
||||
//
|
||||
|
|
Loading…
Reference in a new issue