3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-06 17:44:08 +00:00
z3/ml
Leonardo de Moura bcca613cb2 Added ml component
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2012-10-02 12:44:06 -07:00
..
add_error_checking.sed Added ml component 2012-10-02 12:44:06 -07:00
add_error_checking.V3.sed Added ml component 2012-10-02 12:44:06 -07:00
build.cmd Added ml component 2012-10-02 12:44:06 -07:00
build.sed Added ml component 2012-10-02 12:44:06 -07:00
clean.cmd Added ml component 2012-10-02 12:44:06 -07:00
cleantmp.cmd Added ml component 2012-10-02 12:44:06 -07:00
compile_mlapi.cmd Added ml component 2012-10-02 12:44:06 -07:00
diff.exe Added ml component 2012-10-02 12:44:06 -07:00
error_handling.idl Added ml component 2012-10-02 12:44:06 -07:00
generate_mlapi.cmd Added ml component 2012-10-02 12:44:06 -07:00
import.cmd Added ml component 2012-10-02 12:44:06 -07:00
mlx_get_app_args.idl Added ml component 2012-10-02 12:44:06 -07:00
mlx_get_array_sort.idl Added ml component 2012-10-02 12:44:06 -07:00
mlx_get_datatype_sort.idl Added ml component 2012-10-02 12:44:06 -07:00
mlx_get_domains.idl Added ml component 2012-10-02 12:44:06 -07:00
mlx_get_error_msg.idl Added ml component 2012-10-02 12:44:06 -07:00
mlx_get_pattern_terms.idl Added ml component 2012-10-02 12:44:06 -07:00
mlx_get_tuple_sort.idl Added ml component 2012-10-02 12:44:06 -07:00
mlx_mk_context_x.idl Added ml component 2012-10-02 12:44:06 -07:00
mlx_mk_datatypes.idl Added ml component 2012-10-02 12:44:06 -07:00
mlx_mk_numeral.idl Added ml component 2012-10-02 12:44:06 -07:00
mlx_mk_sort.idl Added ml component 2012-10-02 12:44:06 -07:00
mlx_mk_symbol.idl Added ml component 2012-10-02 12:44:06 -07:00
mlx_model.idl Added ml component 2012-10-02 12:44:06 -07:00
mlx_numeral_refine.idl Added ml component 2012-10-02 12:44:06 -07:00
mlx_parse_smtlib.idl Added ml component 2012-10-02 12:44:06 -07:00
mlx_sort_refine.idl Added ml component 2012-10-02 12:44:06 -07:00
mlx_statistics.idl Added ml component 2012-10-02 12:44:06 -07:00
mlx_symbol_refine.idl Added ml component 2012-10-02 12:44:06 -07:00
mlx_term_refine.idl Added ml component 2012-10-02 12:44:06 -07:00
msbuild.proj Added ml component 2012-10-02 12:44:06 -07:00
queen.ml Added ml component 2012-10-02 12:44:06 -07:00
queen.regress.err Added ml component 2012-10-02 12:44:06 -07:00
queen.regress.out Added ml component 2012-10-02 12:44:06 -07:00
readme.txt Added ml component 2012-10-02 12:44:06 -07:00
regress.cmd Added ml component 2012-10-02 12:44:06 -07:00
sed.exe Added ml component 2012-10-02 12:44:06 -07:00
test_capi.regress.err Added ml component 2012-10-02 12:44:06 -07:00
test_capi.regress.out Added ml component 2012-10-02 12:44:06 -07:00
test_mlapi.cmd Added ml component 2012-10-02 12:44:06 -07:00
test_mlapi.ml Added ml component 2012-10-02 12:44:06 -07:00
test_mlapi.regress.err Added ml component 2012-10-02 12:44:06 -07:00
test_mlapi.regress.out Added ml component 2012-10-02 12:44:06 -07:00
test_mlapiV3.ml Added ml component 2012-10-02 12:44:06 -07:00
test_mlapiV3.regress.err Added ml component 2012-10-02 12:44:06 -07:00
test_mlapiV3.regress.out Added ml component 2012-10-02 12:44:06 -07:00
test_theory.ml Added ml component 2012-10-02 12:44:06 -07:00
update-ml-doc.cmd Added ml component 2012-10-02 12:44:06 -07:00
x3.ml Added ml component 2012-10-02 12:44:06 -07:00
x3V3.ml Added ml component 2012-10-02 12:44:06 -07:00
x3V3.mli Added ml component 2012-10-02 12:44:06 -07:00
z3.idl Added ml component 2012-10-02 12:44:06 -07:00
z3.ml Added ml component 2012-10-02 12:44:06 -07:00
z3.mli Added ml component 2012-10-02 12:44:06 -07:00
z3.proj Added ml component 2012-10-02 12:44:06 -07:00
z3_stubs.c Added ml component 2012-10-02 12:44:06 -07:00
z3_theory_stubs.c Added ml component 2012-10-02 12:44:06 -07:00

Z3 - JakobL@2011-12-20

==============================================================================

What:

Z3 is a high-performance theorem prover being developed at Microsoft
Research by Nikolaj Bjørner (NBjorner) and Leonardo de Moura
(Leonardo).

This folder contains the Z3 ML module used by the SLAM verification
engine.  The Z3 ML module provides a complete ML interface to the Z3
x86 native library.

==============================================================================

Multiple source depots:

This folder is hosted in two separate source depots:
* SDT (sdport=BGIT-SDTVMDEPOT:5010): //depot/src/z3_2/ml/
* SLAM (SDPort=BGIT-SDSLAM:7021): //depot/src/main/slam/engine/slam2/z3/

Goal is to have identical contents in both source depots.  Reason for
hosting in SDT source depot: to allow for testing of the Z3 ML module
'close' to Z3.  Reason for maintaining in SLAM source depot: to allow
for building SLAM without access to SDT.

Discrepancy between usage and files in the two source depots are in
the following marked with [SDT] or [SLAM].

==============================================================================

How to use the Z3 ML Module:

* doc\index.html: Reference documentation of the ML interface. Notice:
  This is generated during build and hence first available afterwards.

* z3.mli: Provides the actual Z3 ML Signature, generated at build
  time.  The Reference documentation is built from this file.

* test_mlapi.ml: Sample program that demonstrate how to use the Z3 ML library.

* queen.ml: Sample program that demonstrate how to use the Z3 ML library.

* import\z3.exe: Z3 shell: Useful for trying out queries. ([SDT]: in
  %SDTROOT%\release_mt\z3.exe)

==============================================================================

Building and linking:

Z3 ML is used as any other ML library.

Prerequisites:

* [SLAM]: Just a standard 'SDV Build Environment'.

* [SDT]: NB. Make sure to use an x86 build window.

1. Install OCaml:
  * Install from: \\sdv-fs.ntdev.corp.microsoft.com\software\3rdParty\ocaml-3.07pl2-win-msvc.exe 
    Or from z3_2\tools
  * Install to: C:\ocaml 

2. Install CamlIDL:
  * Install from: \\sdv-fs.ntdev.corp.microsoft.com\software\Installers\camlidl-1.04-2.exe 
    Or from z3_2\tools
  * Install to: C:\ocaml 

3. Build z3.sln's configuration 'release_mt':
  cd %SDTROOT%\src\z3_2
  msbuild /target:lib /p:configuration=release_mt
  msbuild /target:shell /p:configuration=release_mt

To build and run regressions:
* [SLAM]: mb
* [SDT]: build

To clean:
* [SLAM]: mc
* [SDT]: clean

To link with your favorite app:
* [SLAM]: Reference z3.proj from your msbuild.proj file:
  <Import Project="$(SLAMSRC)\slam\engine\slam2\z3\z3.proj" />

* [SDT]: Link the Z3 ML library as well as supporting libraries:
  ocamlopt -ccopt "/MT /nologo /DWIN32" ole32.lib %OCAMLLIB%\libcamlidl.lib -I %SDTROOT%\src\z3_2\ml %SDTROOT%\src\z3_2\ml\z3.cmxa -o queen.exe queen.ml
==============================================================================

Files:

* readme.txt: This file
* build.cmd: Build script [SDT]: invoke directly; [SLAM]: invoked automatically
* clean.cmd: [SDT]: Script for cleaning; [SLAM]: use mc for cleaning
* regress.cmd: Script for updating regressions.  Not for regular users.
* build.sed, update-ml-doc.cmd: Supporting scripts for building.
* diff.exe.exe: Supporting tool for building.  Obtained from [SLAM] from //depot/src/main/tools/Win32/UnxUtils.zip.
* sed.exe: Supporting tool for building.  Obtained from http://sed.sourceforge.net/ -> "super sed v3.59 for Windows by Paolo Bonzini" -> sed-3.59.zip -> sed-3.59.exe. See http://www.pement.org/sed/ for a good overview of sed for Windows.
* msbuild.proj: [SLAM only]: Used by mb and mc
* z3.proj: [SLAM only]: Project file for consumers of the Z3 module
* import.cmd: [SLAM only]: Script to import files from SDT.
* z3.idl,z3_api.idl: Interface definition files, z3_api.idl is autogenerated during build.
* z3.h: Supporting header file for z3.idl
* x3.{mli,ml}: Module X3 contains Z3 ML specific extensions.  Do not use directly, included in Z3 during build.
* queen.ml:  Z3 ML test program.
* test_mlapi.ml: Z3 ML test program.
* z3_theory_stubs.c and test_theory.ml: Theory plugin and test.

*.regress.*: Regression files, used by build.

[SLAM only]:
* import\z3lib.lib: Z3 C library.
* import\msbig_rational.lib: Supporting C library.
* import\test_capi.c: Z3 C test program.
* import\{z3.h,z3_api.h,z3_macros.h}: Z3 C header files.
* import\{mldoc_footer.html,tabs.css,test_mlapi_header.html,z3.png,z3_ml.css,z3_mlapi_header.html}: Files for automated documentation generation.

==============================================================================

Import from MSR:

Certain files are imported from MSR.  See above list for details as
well as import.cmd script.  To determine the version of z3.exe you are
using, a bit of investigate work will lead you to exact build:

Run import\z3.exe -version. This will generate:
  Version (major minor build revision): 0 1 0 0
Or:
  Version (major minor build revision): 0 1 10828 7

The first example indicate a private drop imported with something like
'import.cmd J:\SD\other\sdt1\src\z3_2'.  The second example indicate
drop 10828 from risebuild imported with something like 'import.cmd
\\risebuild\drops\z32\2.0.51220.7'.   

TODO: Update following: Look at
http://pexbuild3/ccnet/ViewFarmReport.aspx -> View All Builds ->
10828.  This will give you the SD change number.  Voila!

==============================================================================

Known issues:
*  warning LNK4099: This message is shown when linking.  Please ignore.