3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-06 17:44:08 +00:00

add C++ bindings for sequence operations

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
Nikolaj Bjorner 2024-05-09 20:20:05 -07:00
parent c7529d0b25
commit b120745078

View file

@ -2497,6 +2497,34 @@ namespace z3 {
return expr(ctx, r);
}
inline expr map(expr const& f, expr const& list) {
context& ctx = f.ctx();
Z3_ast r = Z3_mk_seq_map(ctx, f, list);
ctx.check_error();
return expr(ctx, r);
}
inline expr mapi(expr const& f, expr const& i, expr const& list) {
context& ctx = f.ctx();
Z3_ast r = Z3_mk_seq_mapi(ctx, f, i, list);
ctx.check_error();
return expr(ctx, r);
}
inline expr foldl(expr const& f, expr const& a, expr const& list) {
context& ctx = f.ctx();
Z3_ast r = Z3_mk_seq_foldl(ctx, f, a, list);
ctx.check_error();
return expr(ctx, r);
}
inline expr foldli(expr const& f, expr const& i, expr const& a, expr const& list) {
context& ctx = f.ctx();
Z3_ast r = Z3_mk_seq_foldli(ctx, f, i, a, list);
ctx.check_error();
return expr(ctx, r);
}
inline expr mk_or(expr_vector const& args) {
array<Z3_ast> _args(args);
Z3_ast r = Z3_mk_or(args.ctx(), _args.size(), _args.ptr());