3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-13 20:38:43 +00:00

More ML API

Signed-off-by: Christoph M. Wintersteiger <cwinter@microsoft.com>
This commit is contained in:
Christoph M. Wintersteiger 2012-12-19 17:26:28 +00:00
parent f7b3529f01
commit f614f6824e

View file

@ -1,27 +1,27 @@
(*
Copyright (C) 2012 Microsoft Corporation
Author: CM Wintersteiger (cwinter) 2012-12-17
*)
*)
open Z3enums
open Z3native
module Log =
struct
struct
let m_is_open = false
(* CMW: "open" seems to be an invalid function name*)
(* CMW: "open" seems to be an invalid function name*)
let open_ fn = int2lbool(open_log fn) == L_TRUE
let close = (close_log)
let append s = (append_log s)
end
end
class virtual idisposable =
object
object
method virtual dispose : unit
end
end
class context settings =
object (self)
object (self)
inherit idisposable
val mutable m_n_ctx : Z3native.z3_context option = None
val mutable m_refCount : int = 0
@ -50,10 +50,10 @@ class context settings =
method sub_one_ctx_obj = m_refCount <- m_refCount - 1
method add_one_ctx_obj = m_refCount <- m_refCount + 1
end
end
class virtual z3object ctx_init obj_init =
object (self)
object (self)
inherit idisposable
val mutable m_ctx : context option = ctx_init
val mutable m_n_obj : Z3native.ptr option = obj_init
@ -103,7 +103,7 @@ class virtual z3object ctx_init obj_init =
method get_context = m_ctx
(*
(*
method array_to_native a =
let f e = e#get_native_object in
(Array.map f a)
@ -112,7 +112,7 @@ class virtual z3object ctx_init obj_init =
match a with
| Some(x) -> (Array.length x)
| None -> 0
*)
*)
end
end