3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-08-27 21:48:56 +00:00

fix ml build breakd #1659, #1660

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
Nikolaj Bjorner 2018-05-29 07:37:27 -07:00
parent da0239d200
commit 6dc9c3a587
2 changed files with 1 additions and 98 deletions

View file

@ -1654,7 +1654,6 @@ struct
mk_list f n
let get_subgoal (x:apply_result) (i:int) = Z3native.apply_result_get_subgoal (gc x) x i
let convert_model (x:apply_result) (i:int) (m:Model.model) = Z3native.apply_result_convert_model (gc x) x i m
let to_string (x:apply_result) = Z3native.apply_result_to_string (gc x) x
end
@ -1995,52 +1994,6 @@ struct
cs sort_names sorts cd decl_names decls
end
module Interpolation =
struct
let mk_interpolant = Z3native.mk_interpolant
let mk_interpolation_context (settings:(string * string) list) =
let cfg = Z3native.mk_config () in
let f e = Z3native.set_param_value cfg (fst e) (snd e) in
List.iter f settings;
let res = Z3native.mk_interpolation_context cfg in
Z3native.del_config cfg;
Z3native.set_ast_print_mode res (int_of_ast_print_mode PRINT_SMTLIB2_COMPLIANT);
Z3native.set_internal_error_handler res;
res
let get_interpolant (ctx:context) (pf:expr) (pat:expr) (p:Params.params) =
let av = Z3native.get_interpolant ctx pf pat p in
AST.ASTVector.to_expr_list av
let compute_interpolant (ctx:context) (pat:expr) (p:Params.params) =
let (r, interp, model) = Z3native.compute_interpolant ctx pat p in
let res = lbool_of_int r in
match res with
| L_TRUE -> (res, None, Some model)
| L_FALSE -> (res, Some (AST.ASTVector.to_expr_list interp), None)
| _ -> (res, None, None)
let get_interpolation_profile = Z3native.interpolation_profile
let read_interpolation_problem (ctx:context) (filename:string) =
let (r, num, cnsts, parents, error, num_theory, theory) =
Z3native.read_interpolation_problem ctx filename
in
match r with
| 0 -> raise (Error "Interpolation problem could not be read.")
| _ -> (cnsts, parents, theory)
let check_interpolant (ctx:context) (num:int) (cnsts:Expr.expr list) (parents:int list) (interps:Expr.expr list) (num_theory:int) (theory:Expr.expr list) =
let (r, str) = Z3native.check_interpolant ctx num cnsts parents interps num_theory theory in
match (lbool_of_int r) with
| L_UNDEF -> raise (Error "Interpolant could not be verified.")
| L_FALSE -> raise (Error "Interpolant could not be verified.")
| _ -> ()
let write_interpolation_problem (ctx:context) (num:int) (cnsts:Expr.expr list) (parents:int list) (filename:string) (num_theory:int) (theory:Expr.expr list) =
Z3native.write_interpolation_problem ctx num cnsts parents filename num_theory theory
end
let set_global_param = Z3native.global_param_set