mirror of
https://github.com/Z3Prover/z3
synced 2025-04-23 17:15:31 +00:00
ML API and example compilation.
Signed-off-by: Christoph M. Wintersteiger <cwinter@microsoft.com>
This commit is contained in:
parent
e7e85dc7b4
commit
c001da6188
5 changed files with 39 additions and 34 deletions
|
@ -5,10 +5,10 @@ To build the example execute
|
|||
make examples
|
||||
in the build directory.
|
||||
|
||||
It will create MLExample in the build directory,
|
||||
which can be run on Windows via
|
||||
ocaml -I . MLExample
|
||||
It will create ml_example in the build directory,
|
||||
which can be run in the build directory via
|
||||
LD_LIBRARY_PATH=. ./ml_example
|
||||
or
|
||||
LD_LIBRARY_PATH=. ./ml_example.byte
|
||||
for the byte-code version.
|
||||
|
||||
On Linux and FreeBSD, we must use
|
||||
??
|
||||
|
||||
|
|
14
examples/ml/ml_example.ml
Normal file
14
examples/ml/ml_example.ml
Normal file
|
@ -0,0 +1,14 @@
|
|||
(*
|
||||
Copyright (C) 2012 Microsoft Corporation
|
||||
Author: CM Wintersteiger (cwinter) 2012-12-17
|
||||
*)
|
||||
|
||||
open Z3
|
||||
|
||||
let _ = ignore(Log.open_ "z3.log") ;
|
||||
let cfg = Some [("model", "true"); ("proof", "false")] in
|
||||
let ctx = (new context cfg) in
|
||||
Printf.printf "Disposing...\n";
|
||||
ctx#dispose ;
|
||||
Printf.printf "Exiting.\n";
|
||||
;;
|
|
@ -1,12 +0,0 @@
|
|||
(*
|
||||
Copyright (C) 2012 Microsoft Corporation
|
||||
Author: CM Wintersteiger (cwinter) 2012-12-17
|
||||
*)
|
||||
|
||||
open Z3
|
||||
|
||||
let _ = ignore(Log.open_ "z3.log") ;
|
||||
let cfg = Some [("model", "true"); ("proof", "false")] in
|
||||
let ctx = (new context cfg) in
|
||||
ctx#dispose
|
||||
;;
|
Loading…
Add table
Add a link
Reference in a new issue