Just to complete for the future users
To successfuly run a single test example (for example DeMorgan):
- Edit the test_capi.c file by removing all the following example functions and leave the demorgan() only
- display_version()
- simple_example()
- find_model_example1()
- find_model_example2()
- prove_example1()
- prove_example2()
- push_pop_example1()
- quantifier_example1()
- array_example1()
- array_example2()
- array_example3()
- tuple_example1()
- bitvector_example1()
- bitvector_example2()
- eval_example1()
- two_contexts_example1()
- error_code_example1()
- error_code_example2()
- parser_example1()
- parser_example2()
- parser_example3()
- parser_example4()
- parser_example5()
- ite_example()
- simplifier_example()
- traverse_term_example()
- Edit the main function to be the following:
int main()
{
demorgan();
return 0;
}
- Save as a .c file anywhere on your system
- Copy the build.cmd file and z3.dll into the directory of your newly created .c file
- Edit build.cmd I found that full path is better as I can easily move the build.cmd to another location for another project and just change the file name (here my file name is test.c).
Ex:
cl /I "D:\Program Files\Microsoft Research\Z3-1.3.6\include" "D:\Program Files\Microsoft Research\Z3-1.3.6\bin\z3.lib" test.c
- Run the compiler by running 'build' from the Visual Studio command line
- Run the .exe file it creates
- The output is the following:
D:\Program Files\Microsoft Research\Z3-1.3.6\mytests>test.exe
DeMorgan
DeMorgan is valid
D:\Program Files\Microsoft Research\Z3-1.3.6\mytests>
Enjoy
Ewa