Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Here is what worked for me (Windows 7):</p> <ol> <li>Download and install Ocaml 3.08+ ​</li> <li>Download and install Visual Studio C++ ​</li> <li>Download and extract CamlIDL ​</li> <li>Download and install cygwin, while installing choose the <em>make</em> package as well as your favorite linux editor package in a "Select package" window. ​</li> <li>Open cygwin ​</li> <li>In cygwin go to CamlIDL root directory ​</li> <li>Rename <code>config/Makefile.win32</code> to <code>config/Makefile</code> ​</li> <li>Open <code>config/Makefile</code> with an editor ​</li> <li>Edit <code>BINLIB</code> and <code>OCAMLLIB</code> variables ​​</li> <li>Save and exit the <code>Makefile</code> ​</li> <li>Setup c compiler for cygwin: <a href="https://stackoverflow.com/questions/366928/invoking-cl-exe-msvc-compiler-in-cygwin-shell/3272301#3272301">Invoking cl.exe (MSVC compiler) in Cygwin shell</a> ​</li> <li>Run <code>make all</code> from CamlIDL root directory ​</li> <li>Run <code>make install</code> ​</li> <li>Exit cygwin ​</li> <li>Download and install Z3 ​</li> <li>Download and install FlexDLL: <a href="http://alain.frisch.fr/flexdll.html" rel="nofollow noreferrer">http://alain.frisch.fr/flexdll.html</a> ​</li> <li>Click Start, point to My Computer, right click, point to Properties, point to System Protection, choose Advanced Tab, point to Environment values... ​</li> <li>Add <code>C:\Program Files\flexdll\</code> and <code>C:\Program Files\Microsoft Research\Z3-&lt;version-number&gt;\bin\</code> to the Path variable ​</li> <li>Click Start, point to All Programs, point to Microsoft Visual Studio, point to Visual Studio Tools, and then click Visual Studio Command Prompt. ​</li> <li>In Visual Studio Command Prompt go to <code>C:\Program Files\Microsoft Research\Z3-&lt;version-number&gt;\ocaml</code> ​​</li> <li>Open <code>build.cmd</code> with an editor ​</li> <li>Remove <code>%CD%</code> variable from the last two commands ​</li> <li>Save and close <code>build.cmd</code> ​</li> <li>Run <code>build.cmd</code> ​</li> <li>Copy z3* and libz3.lib files generated by build.cmd from <code>z3/ocaml</code> to <code>%OCAMLLIB%</code> ​</li> <li>Run <code>ocamlmktop -o ocamlz3 z3.cma %OCAMLLIB%\libcamlidl.lib ole32.lib</code> ​</li> <li>Run <code>ocamlz3.exe</code> ​</li> <li>Type <code>#use "../examples/ocaml/test_mlapi.ml";;</code> ​</li> <li><p>Try <code>simple_example();;​</code></p></li> <li><p>The last step should produce a valid output from Z3.</p></li> </ol> <p>​<br> For Debian/Ubuntu:</p> <ol> <li>Install Ocaml 3.09+ ​ 1. <code>sudo apt-get install camlidl​</code></li> <li><code>git clone git://github.com/polazarus/z3-installer.git</code> <em>(from Mickaël Delahaye)</em></li> <li><code>cd z3-installer</code></li> <li><code>make</code> <em># download Z3 AND build the Ocaml library (native and byte)</em></li> <li><code>sudo make install</code> <em># install Z3 binary, DLL and the Ocaml library</em></li> <li><code>sudo cp z3/lib/libz3.so /usr/lib/</code></li> <li><code>cd z3/ocaml</code></li> <li><code>ocamlmktop -o ocamlz3 z3.cma</code></li> <li>.<code>/ocamlz3</code></li> <li>Try the following snippet:</li> </ol> <blockquote> <p><code>let simple_example() =</code> <br> <code></code> <code>begin</code><br> <code></code> <code></code> <code>Printf.printf "\nsimple_example\n";</code><br> <code></code> <code></code> <code>let ctx = Z3.mk_context_x (Array.append [|("MODEL", "true")|] [||]) in</code><br> <code></code> <code></code> <code>Printf.printf "CONTEXT:\n%sEND OF CONTEXT\n" (Z3.context_to_string ctx);</code> <code></code> <code></code> <code>Z3.del_context ctx;</code><br> <code></code> <code>end;;</code><br> <code>simple_example();;​</code></p> </blockquote>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload