3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-06 09:34:08 +00:00

Integrated structured branch into unstable branch (the official 'working in progress' branch)

Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
This commit is contained in:
Leonardo de Moura 2012-10-24 13:19:19 -07:00
commit 3da69a4f1b
1502 changed files with 2524 additions and 5113 deletions

View file

@ -1,383 +0,0 @@
SHELL=/bin/sh
SED=sed
AWK=awk
DOS2UNIX=@D2U@
@SET_MAKE@
##### Configuration #####
CXX=@CXX@
CPPFLAGS_CORE=@CPPFLAGS@ -I lib -fopenmp -msse -msse2 -mfpmath=sse
CXXFLAGS_CORE=@CXXFLAGS@
ifeq ($(MODE),)
Z3_BUILD_MODE=external
else
Z3_BUILD_MODE=$(MODE)
endif
LIBS=@LIBS@
## -lrt is for timer_create and timer_settime
LDFLAGS=@LDFLAGS@ -lpthread -fopenmp
LDFLAGS_EXTRA=
PREFIX=@prefix@
HAS_PYTHON=@HAS_PYTHON@
PYTHON_PACKAGE_DIR=@PYTHON_PACKAGE_DIR@
PYTHON=@PYTHON@
#########################
Z3=z3
TEST_CAPI=test_capi
TEST=test
BIN_DIR=bin/$(Z3_BUILD_MODE)
OBJ_DIR=obj/$(Z3_BUILD_MODE)
SED_OBJ_DIR=obj\/$(Z3_BUILD_MODE)
OBJ_TEST_DIR=obj-test/$(Z3_BUILD_MODE)
SED_OBJ_TEST_DIR=obj-test\/$(Z3_BUILD_MODE)
MAJ=$(shell grep 'Z3_MAJOR_VERSION' lib/version.h | cut -d ' ' -f 4)
MIN=$(shell grep 'Z3_MINOR_VERSION' lib/version.h | cut -d ' ' -f 4)
Z3_VERSION=$(MAJ).$(MIN)
PLATFORM=@PLATFORM@
ifeq ($(Z3_BUILD_MODE),release)
CPPFLAGS=$(CPPFLAGS_CORE) -DNDEBUG
CXXFLAGS=-O3 -fomit-frame-pointer $(CXXFLAGS_CORE)
else
ifeq ($(Z3_BUILD_MODE),smtcomp07)
CPPFLAGS=$(CPPFLAGS_CORE) -DNDEBUG -DSMTCOMP
CXXFLAGS=-O3 -fomit-frame-pointer $(CXXFLAGS_CORE)
# doesn't work on cygwin
LDFLAGS_EXTRA=@STATIC_FLAGS@
else
ifeq ($(Z3_BUILD_MODE),external)
CPPFLAGS=$(CPPFLAGS_CORE) -DNDEBUG -D_EXTERNAL_RELEASE
CXXFLAGS=-O3 -fomit-frame-pointer $(CXXFLAGS_CORE)
# doesn't work on cygwin
LDFLAGS_EXTRA=@STATIC_FLAGS@
else
ifeq ($(Z3_BUILD_MODE),debug)
CPPFLAGS=$(CPPFLAGS_CORE) -DZ3DEBUG -D_TRACE
CXXFLAGS=-g -Wall $(CXXFLAGS_CORE)
else
ifeq ($(Z3_BUILD_MODE),debugopt)
CPPFLAGS=$(CPPFLAGS_CORE) -DNDEBUG -DZ3DEBUG -D_TRACE
CXXFLAGS=-g -O1 $(CXXFLAGS_CORE)
else
ifeq ($(Z3_BUILD_MODE),trace)
CPPFLAGS=$(CPPFLAGS_CORE) -DNDEBUG -D_TRACE
CXXFLAGS=-g -O1 $(CXXFLAGS_CORE)
else
ifeq ($(Z3_BUILD_MODE),profile)
CPPFLAGS=$(CPPFLAGS_CORE) -DNDEBUG
CXXFLAGS=-g -pg -O2 $(CXXFLAGS_CORE)
LDFLAGS_EXTRA=-pg
else
ifeq ($(Z3_BUILD_MODE),gcov)
CPPFLAGS=$(CPPFLAGS_CORE) -DNDEBUG
CXXFLAGS=-g -fprofile-arcs -ftest-coverage -O2 $(CXXFLAGS_CORE)
LDFLAGS_EXTRA=-fprofile-arcs -ftest-coverage
else
ifeq ($(Z3_BUILD_MODE),external_parallel)
CPPFLAGS=$(CPPFLAGS_CORE) -DNDEBUG -D_EXTERNAL_RELEASE -D_Z3_BUILD_PARALLEL_SMT
CXXFLAGS=-O3 -fomit-frame-pointer $(CXXFLAGS_CORE)
# doesn't work on cygwin
LDFLAGS_EXTRA=@STATIC_FLAGS@
else
ifeq ($(Z3_BUILD_MODE),debug_parallel)
CPPFLAGS=$(CPPFLAGS_CORE) -DZ3DEBUG -D_TRACE -D_Z3_BUILD_PARALLEL_SMT
CXXFLAGS=-g -Wall $(CXXFLAGS_CORE)
else
$(error INVALID BUILD MODE = $(Z3_BUILD_MODE))
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
LIBFLAGS=@SLIBFLAGS@
################################
#
# Extract the source files from
# the MSVC++ project files.
#
# lib.vcproj ===> lib.srcs
# shell.vcproj ===> shell.srcs
#
################################
main: $(BIN_DIR)/$(Z3)
lib.srcs: lib/lib.vcxproj
@echo Making 'lib.srcs'...
@cp $< lib0.srcs
@chmod +rw lib0.srcs
@$(DOS2UNIX) lib0.srcs
@$(AWK) '/cpp\"/{ print $$0 }' lib0.srcs > lib1.srcs
@$(SED) 's|\"||g;s|<ClCompile||g;s|/>||g;s|Include=|lib/|g' lib1.srcs > lib2.srcs
@$(AWK) 'BEGIN { printf ("LIB_SRCS= "); } { printf($$1 " ") } END { print ""; }' lib2.srcs > $@
@rm -f lib0.srcs
@rm -f lib1.srcs
@rm -f lib2.srcs
shell.srcs: shell/shell.vcxproj
@echo Making 'shell.srcs'...
@cp $< shell0.srcs
@chmod +rw shell0.srcs
@$(DOS2UNIX) shell0.srcs
@$(AWK) '/cpp\"/{ print $$0 }' shell0.srcs > shell1.srcs
@$(SED) 's|\"||g;s|<ClCompile||g;s|/>||g;s|Include=|shell/|g' shell1.srcs > shell2.srcs
@$(AWK) 'BEGIN { printf ("SHELL_SRCS= "); } { printf($$1 " ") } END { print ""; }' shell2.srcs > $@
@rm -f shell0.srcs
@rm -f shell1.srcs
@rm -f shell2.srcs
test.srcs: test/test.vcxproj
@echo Making 'test.srcs'...
@cp $< test0.srcs
@chmod +rw test0.srcs
@$(DOS2UNIX) test0.srcs
@$(AWK) '/cpp\"/{ print $$0 }' test0.srcs > test1.srcs
@$(SED) 's|\"||g;s|<ClCompile||g;s|/>||g;s|Include=|test/|g' test1.srcs > test2.srcs
@$(AWK) 'BEGIN { printf ("TEST_SRCS= "); } { printf($$1 " ") } END { print ""; }' test2.srcs > $@
@rm -f test0.srcs
@rm -f test1.srcs
@rm -f test2.srcs
include lib.srcs
include shell.srcs
include test.srcs
LIB_SRCS+=@EXTRA_LIB_SRCS@
LIB_OBJS=$(LIB_SRCS:lib/%.cpp=$(OBJ_DIR)/%.o)
SHELL_OBJS=$(SHELL_SRCS:shell/%.cpp=$(OBJ_DIR)/%.o)
OBJS=$(LIB_OBJS) $(SHELL_OBJS)
TEST_CAPI_OBJS=$(OBJ_DIR)/test_capi.o $(LIB_OBJS)
TEST_OBJS=$(TEST_SRCS:test/%.cpp=$(OBJ_TEST_DIR)/%.o)
$(BIN_DIR)/$(Z3): $(OBJ_DIR) $(BIN_DIR) $(OBJS)
@mkdir -p $(BIN_DIR)
$(CXX) -o $(BIN_DIR)/$(Z3) $(OBJS) $(LDFLAGS) $(LDFLAGS_EXTRA) $(LIBS)
$(BIN_DIR)/$(TEST): $(OBJ_DIR) $(BIN_DIR) $(LIB_OBJS) $(TEST_OBJS)
@mkdir -p $(BIN_DIR)
$(CXX) -o $(BIN_DIR)/$(TEST) $(LIB_OBJS) $(TEST_OBJS) $(LDFLAGS) $(LDFLAGS_EXTRA) $(LIBS)
$(BIN_DIR)/$(TEST_CAPI): $(OBJ_DIR) $(BIN_DIR) $(TEST_CAPI_OBJS)
@mkdir -p $(BIN_DIR)
$(CXX) -o $(BIN_DIR)/$(TEST_CAPI) $(TEST_CAPI_OBJS) $(LDFLAGS) $(LDFLAGS_EXTRA) $(LIBS)
$(BIN_DIR)/lib$(Z3).@SO_EXT@: $(OBJ_DIR) $(BIN_DIR) $(LIB_OBJS)
@mkdir -p $(BIN_DIR)
$(CXX) -o $(BIN_DIR)/lib$(Z3).@SO_EXT@ $(LIB_OBJS) $(LIBFLAGS) $(LIBS) @COMP_VERSIONS@
$(BIN_DIR)/lib$(Z3).a: $(OBJ_DIR) $(BIN_DIR) $(LIB_OBJS)
@mkdir -p $(BIN_DIR)
ar -cvr $(BIN_DIR)/lib$(Z3).a $(LIB_OBJS)
$(BIN_DIR):
mkdir -p $(BIN_DIR)
$(OBJ_DIR):
mkdir -p $(OBJ_DIR)
$(OBJ_TEST_DIR):
mkdir -p $(OBJ_TEST_DIR)
smtcomp07: $(BIN_DIR)/$(Z3)
rm -r -f z3
mkdir z3
cp $(BIN_DIR)/$(Z3) z3/run
strip z3/run
cp doc/MAGIC_NUMBER z3/
cp doc/README-SMTCOMP07 z3/README
cp doc/NOTICES-SMTCOMP07 z3/NOTICES
cp doc/z3.pdf z3/
tar -czf z3.tar.gz z3
test_capi: $(BIN_DIR)/$(TEST_CAPI)
@SO_EXT@: $(BIN_DIR)/lib$(Z3).@SO_EXT@
a: $(BIN_DIR)/lib$(Z3).a
test: $(BIN_DIR)/$(TEST)
################################
#
# Grobner
#
################################
lib/grobner_main.cpp: test/igrobner.cpp
cp test/igrobner.cpp lib/grobner_main.cpp
chmod +rw lib/grobner_main.cpp
$(OBJ_DIR)/grobner_main.o: lib/grobner_main.cpp
@mkdir -p $(OBJ_DIR)
$(CXX) $(CPPFLAGS) $(CXXFLAGS) -DGB_APP -c -o $@ $<
################################
#
# .cpp ===> .o
#
################################
$(OBJ_DIR)/%.o : lib/%.cpp
@mkdir -p $(OBJ_DIR)
$(CXX) $(CPPFLAGS) $(CXXFLAGS) -c -o $@ $<
$(OBJ_TEST_DIR)/%.o : test/%.cpp
@mkdir -p $(OBJ_TEST_DIR)
$(CXX) $(CPPFLAGS) $(CXXFLAGS) -c -o $@ $<
$(OBJ_DIR)/%.o : shell/%.cpp
@mkdir -p $(OBJ_DIR)
$(CXX) $(CPPFLAGS) $(CXXFLAGS) -c -o $@ $<
$(OBJ_DIR)/%.o : test_capi/%.c
@mkdir -p $(OBJ_DIR)
$(CXX) $(CPPFLAGS) $(CXXFLAGS) -I ../lib -c -o $@ $<
################################
#
# Dependency files
#
# .cpp ===> .d
#
################################
$(OBJ_DIR)/%.d: lib/%.cpp
@echo Making dependency file \'$@\' ...
@mkdir -p $(OBJ_DIR)
@$(SHELL) -ec '$(CXX) -MM $(CPPFLAGS) $< | $(SED) '\''s/\($*\)\.o[ :]*/$(SED_OBJ_DIR)\/\1.o $(SED_OBJ_DIR)\/\1.d : /g'\'' > $@; [ -s $@ ] || rm -f $@'
$(OBJ_DIR)/%.d: shell/%.cpp
@echo Making dependency file \'$@\' ...
@mkdir -p $(OBJ_DIR)
@$(SHELL) -ec '$(CXX) -MM $(CPPFLAGS) $< | $(SED) '\''s/\($*\)\.o[ :]*/$(SED_OBJ_DIR)\/\1.o $(SED_OBJ_DIR)\/\1.d : /g'\'' > $@; [ -s $@ ] || rm -f $@'
$(OBJ_TEST_DIR)/%.d: test/%.cpp
@echo Making dependency file \'$@\' ...
@mkdir -p $(OBJ_TEST_DIR)
@$(SHELL) -ec '$(CXX) -MM $(CPPFLAGS) $< | $(SED) '\''s/\($*\)\.o[ :]*/$(SED_OBJ_TEST_DIR)\/\1.o $(SED_OBJ_TEST_DIR)\/\1.d : /g'\'' > $@; [ -s $@ ] || rm -f $@'
include $(LIB_SRCS:lib/%.cpp=$(OBJ_DIR)/%.d)
include $(SHELL_SRCS:shell/%.cpp=$(OBJ_DIR)/%.d)
include $(TEST_SRCS:test/%.cpp=$(OBJ_TEST_DIR)/%.d)
################################
#
# Cleanup
#
################################
.PHONY: clean
clean:
rm -f $(BIN_DIR)/$(Z3)
rm -f $(OBJ_DIR)/*
rm -f lib.srcs
rm -f shell.srcs
find . -name '*.bb' -exec rm -f '{}' ';'
find . -name '*.bbg' -exec rm -f '{}' ';'
find . -name '*.da' -exec rm -f '{}' ';'
find . -name '*.gcov' -exec rm -f '{}' ';'
find . -name 'cachegrind*' -exec rm -f '{}' ';'
find . -name 'a.out' -exec rm -f '{}' ';'
find . -name 'a.exe' -exec rm -f '{}' ';'
find . -name 'core' -exec rm -f '{}' ';'
################################
#
# Support
#
################################
Makefile: Makefile.in config.status
./config.status
make
config.status: configure
./config.status --recheck
################################
#
# checkgmake
#
################################
.PHONY: checkgmake
checkgmake:
@ ./gmaketest --make=$(MAKE) || \
(echo "Z3 needs GNU-Make to be built"; exit 1)
################################
#
# installation/uninstallation
#
################################
install: $(BIN_DIR)/$(Z3) $(BIN_DIR)/lib$(Z3).@SO_EXT@ $(BIN_DIR)/lib$(Z3).a
@mkdir -p $(PREFIX)/bin
@mkdir -p $(PREFIX)/lib
@mkdir -p $(PREFIX)/include
@cp $(BIN_DIR)/$(Z3) $(PREFIX)/bin
@cp $(BIN_DIR)/lib$(Z3).@SO_EXT@ $(PREFIX)/lib
@cp $(BIN_DIR)/lib$(Z3).a $(PREFIX)/lib
@cp lib/z3_api.h $(PREFIX)/include
@cp lib/z3.h $(PREFIX)/include
@cp lib/z3_v1.h $(PREFIX)/include
@cp lib/z3_macros.h $(PREFIX)/include
@cp lib/z3_internal.h $(PREFIX)/include
@cp lib/z3_internal_types.h $(PREFIX)/include
@cp lib/z3_poly.h $(PREFIX)/include
@cp c++/z3++.h $(PREFIX)/include
uninstall:
@rm -f $(PREFIX)/bin/$(Z3)
@rm -f $(PREFIX)/lib/lib$(Z3).@SO_EXT@
@rm -f $(PREFIX)/lib/lib$(Z3).a
@rm -f $(PREFIX)/include/z3_api.h
@rm -f $(PREFIX)/include/z3.h
@rm -f $(PREFIX)/include/z3_v1.h
@rm -f $(PREFIX)/include/z3_macros.h
@rm -f $(PREFIX)/include/z3++.h
@rm -f $(PREFIX)/include/z3_internal.h
@rm -f $(PREFIX)/include/z3_internal_types.h
@rm -f $(PREFIX)/include/z3_poly.h
install-z3py: $(BIN_DIR)/lib$(Z3).@SO_EXT@
@if test $(HAS_PYTHON) -eq 0; then echo "Python is not available in your system."; exit 1; fi
@echo "Installing Python bindings at $(PYTHON_PACKAGE_DIR)."
@$(PYTHON) python/example.py > /dev/null
@cp python/z3.pyc $(PYTHON_PACKAGE_DIR)
@cp python/z3core.pyc $(PYTHON_PACKAGE_DIR)
@cp python/z3types.pyc $(PYTHON_PACKAGE_DIR)
@cp python/z3consts.pyc $(PYTHON_PACKAGE_DIR)
@cp python/z3tactics.pyc $(PYTHON_PACKAGE_DIR)
@cp python/z3printer.pyc $(PYTHON_PACKAGE_DIR)
@cp python/z3poly.pyc $(PYTHON_PACKAGE_DIR)
@cp $(BIN_DIR)/lib$(Z3).@SO_EXT@ $(PYTHON_PACKAGE_DIR)
@if python python/z3test.py; then echo "Z3Py was successfully installed."; else echo "Failed to execute Z3Py regressions..."; exit 1; fi
uninstall-z3py:
@if test $(HAS_PYTHON) -eq 0; then echo "Python is not available in your system."; exit 1; fi
@echo "Uninstalling Python bindings from $(PYTHON_PACKAGE_DIR)."
@rm -f $(PYTHON_PACKAGE_DIR)/z3.pyc
@rm -f $(PYTHON_PACKAGE_DIR)/z3core.pyc
@rm -f $(PYTHON_PACKAGE_DIR)/z3types.pyc
@rm -f $(PYTHON_PACKAGE_DIR)/z3consts.pyc
@rm -f $(PYTHON_PACKAGE_DIR)/z3tactics.pyc
@rm -f $(PYTHON_PACKAGE_DIR)/z3printer.pyc
@rm -f $(PYTHON_PACKAGE_DIR)/z3poly.pyc
@rm -f $(PYTHON_PACKAGE_DIR)/$(BIN_DIR)/lib$(Z3).@SO_EXT@

51
README
View file

@ -1,38 +1,35 @@
Z3 is a theorem prover from Microsoft Research.
Z3 is licensed under MSR-LA (Microsoft Research License Agreement).
See http://z3.codeplex.com/license for more information about this license.
Z3 can be built using Visual Studio Command Prompt, Visual Studio and make/gcc.
Z3 can be built using Visual Studio Command Prompt and make/g++.
1) Building Z3 on Windows using Visual Studio Command Prompt
- Open a Visual Studio Command Prompt, then execute one of the following commands to build the desired component.
a) If you a source distribution that comes with pre-generated 'build' directory,
then go to step c)
b) Execute
python scripts/mk_make.py
c) Execute
cd build
nmake
- For building all components, execute
msbuild z3-prover.sln /p:configuration=external
All components will be located at \external
2) Building Z3 using make/g++ and Python
Execute:
- For building all components (64-bit), execute
msbuild z3-prover.sln /p:configuration=external /p:platform=x64
All components will be located at \x64\external
- For building all components (in debug mode), execute
msbuild z3-prover.sln
All components will be located at \Debug
2) Building Z3 using g++/make
Your machine must also have the following commands to be able to build Z3:
autoconf, sed, awk, dos2unix commands
autoconf
./configure
make
sudo make install
autconf
./configure
python scripts/mk_make.py
cd build
make
sudo make install
It will install z3 executable at /usr/local/bin, libraries at /usr/local/lib, and include files at /usr/local/include.
Use the following commands to install in a different prefix (e.g., /usr).
autoconf
./configure --prefix=/usr
python scripts/mk_make.py
cd build
make
sudo make install
@ -40,15 +37,3 @@ To uninstall Z3, use
sudo make uninstall
To install Z3 Python bindings, use
sudo make install-python
To uninstall Z3 Python bindings, use
sudo make uninstall-python
Remark: the Z3 makefile imports the source file list from Visual Studio project files.
To add new source files to the Z3 core, you must include them at: lib/lib.vcxproj

205
configure.ac Normal file
View file

@ -0,0 +1,205 @@
AC_INIT([z3], [4.2])
###################
#
# Testing python
#
###################
AC_ARG_WITH(python,
[AS_HELP_STRING([--with-python=PYTHON_PATH],
[specify the location of the python 2.x executable.])])
PYTHON="python"
if test "x$with_python" != x; then
PYTHON="$with_python"
fi
AC_SUBST(PYTHON)
cat > tst_python.py <<EOF
from sys import version
if version >= "3":
exit(1)
exit(0)
EOF
if $PYTHON tst_python.py; then
HAS_PYTHON="1"
HAS_PYTHON_MSG="yes"
cat > get_py_dir.py << EOF
import distutils.sysconfig
print distutils.sysconfig.get_python_lib()
EOF
if $PYTHON get_py_dir.py > dir.txt; then
PYTHON_PACKAGE_DIR=`cat dir.txt`
else
HAS_PYTHON="0"
HAS_PYTHON_MSG="no"
fi
rm -f dir.txt
rm -f get_py_dir.py
else
HAS_PYTHON="0"
HAS_PYTHON_MSG="no"
fi
AC_SUBST(PYTHON_PACKAGE_DIR)
AC_SUBST(HAS_PYTHON)
rm -f tst_python.py
###################
#
# Configuring bignum package
#
###################
# Select big num package
ARITH="internal"
AC_ARG_WITH([gmp], [AS_HELP_STRING([--with-gmp], [Use GMP for multi-precision naturals (default=no)])], [use_gmp=yes], [use_gmp=no])
AS_IF([test "$use_gmp" = "yes"],[
ARITH="gmp"
CPPFLAGS="$CPPFLAGS -D_MP_GMP"
],[
CPPFLAGS="$CPPFLAGS -D_MP_INTERNAL"
])
AC_SUBST(EXTRA_LIB_SRCS)
if test "$ARITH" = "gmp"; then
AC_CHECK_LIB(gmp, __gmpz_init, ,
[AC_MSG_ERROR([GNU MP not found, see http://gmplib.org/])])
AC_CHECK_HEADER([gmp.h], GMP='gmp', AC_MSG_ERROR([GMP include file not found]))
AC_SUBST(LIBS)
echo $CPPFLAGS
fi
###################
#
# Basic configuration
#
###################
# Sets CXX
AC_PROG_CXX(g++)
AC_PROG_MAKE_SET
AC_LANG_CPLUSPLUS
# Sets GREP
AC_PROG_GREP
# Sets SED
AC_PROG_SED
# Sets OPENMP_CFLAGS
AC_OPENMP
AR=ar
AC_SUBST(AR)
###################
#
# Platform characteristics
#
###################
host_os=`uname -s`
AS_IF([test "$host_os" = "Darwin"], [
PLATFORM=osx
SO_EXT=dylib
SLIBFLAGS="-dynamiclib -fopenmp"
COMP_VERSIONS="-compatibility_version \$(Z3_VERSION) -current_version \$(Z3_VERSION)"
STATIC_FLAGS=
], [test "$host_os" = "Linux"], [
PLATFORM=linux
SO_EXT=so
SLIBFLAGS="-shared -fopenmp"
COMP_VERSIONS=
STATIC_FLAGS=-static
], [test "${host_os:0:6}" = "CYGWIN"], [
PLATFORM=win
SO_EXT=dll
LDFLAGS=
SLIBFLAGS="-shared -fopenmp"
COMP_VERSIONS=
STATIC_FLAGS=-static
CXXFLAGS+=" -D_CYGWIN"
],
[
AC_MSG_ERROR([Unknown host platform: $host_os])
])
###################
#
# Checking if 32 or 64 bits
#
###################
AC_CHECK_SIZEOF(int *)
if test $ac_cv_sizeof_int_p -eq 8; then
dnl In 64-bit systems we have to compile using -fPIC
CXXFLAGS="-fPIC"
CPPFLAGS="$CPPFLAGS -D_AMD64_"
dnl Only enable use of thread local storage for 64-bit Linux. It is disabled for OSX and 32-bit Linux
if test $PLATFORM = "linux"; then
CPPFLAGS="$CPPFLAGS -D_USE_THREAD_LOCAL"
fi
EXTRA_LIBS=""
IS_X64="yes"
else
CXXFLAGS=""
IS_X64="no"
fi
###################
#
# Generating configuration
#
###################
AC_OUTPUT(scripts/config-debug.mk scripts/config-release.mk)
###################
#
# Checking how to build Z3
#
###################
if test "$HAS_PYTHON" = "0"; then
if test -d build/Makefile; then
# Python is not installed, but Makefile was pre generated
# Just copy configuration and terminate
cp scripts/config-release.mk build/config.mk
cat <<EOF
Z3 was configured with success.
Host platform: $PLATFORM
Arithmetic: $ARITH
Python Support: $HAS_PYTHON_MSG
Python: $PYTHON
Prefix: $prefix
64-bit: $IS_X64
Type 'cd build; make' to compile Z3.
Type 'sudo make install' to install Z3.
Type 'sudo make install-z3py' to install Z3 Python (Z3Py) bindings.
EOF
else
AC_MSG_ERROR([Pre generated Makefiles were not detected. You need python to generate the Z3 Makefiles.\nPlease download python at http://python.org])
fi
else
# Python is available, give user the option to generate the make files wherever they want
cat <<EOF
Z3 was configured with success.
Host platform: $PLATFORM
Arithmetic: $ARITH
Python Support: $HAS_PYTHON_MSG
Python: $PYTHON
Prefix: $prefix
64-bit: $IS_X64
Type 'python scripts/mk_make.py' to generate Makefiles in the subdirectory 'build'.
Type 'cd build; make' to make Z3.
Type 'sudo make install' to install Z3.
Type 'sudo make install-z3py' to install Z3 Python (Z3Py) bindings.
EOF
fi

View file

@ -1,78 +0,0 @@
The assertion_set class is essentially a set of formulas.
The assertion_set copy() method is constant time. They use persistent
arrays for "sharing" common parts.
The goal is to provide functors (strategies) that apply transformations to these sets.
Examples of transformations are:
- simplification
- gaussian elimination
- CNF, NNF, OCNF transformation
- bit-blasting
- abstraction
- grobner basis computation
- completion
- term rewriting
- bound propagation
- contextal simplification
- if-then-else lifting
- quantifier elimination
- etc
A functor/strategy is essentially updating an assertion set. It may
also provide a model_converter to convert a model for the resultant
assertion_set into a model for the original assertion_set. See
gaussian_elim.cpp for an example of model_converter. A functor may
return a vector of assertion sets. It may also return a
proof_converter for converting proofs for the resultant assertion
set(s) into a proof for the original assertion_set. The
functor/strategy user is responsible for "plumbing" the
model_converter(s) and proof_converter(s). In the future we may have
tacticals for combining these functors/strategies. This is not needed
now.
The idea is to provide assertion_set_solvers. They are essentially end-game
strategies. The abstract API for them is defined at assertion_set_solver.h.
Currently, the only assertion_set_solver is based on smt_context.h.
The next one will be based on a pure SAT solver. I also have plans for
one based on linear programming.
The main goals of the new design are:
- increase modularity.
- expose assertion_set abstraction to external users.
- expose these functor/strategies to external users.
- allow us to combine problem specific solvers in a modular way.
- everything can be interrupted.
- some actions may be resumed.
- clean parallel_z3 implementation.
- support non-satisfiability preserving transformations.
the basic idea is:
* if the transformation is an over-approximation,
then the model_converter must throw an exception if it
can't convert the model into a model for the original assertion_set.
* if the transformation is an under-approximation,
then the proof_converter must throw an exception if it
can't convert the proof(s) into a proof for the original assertion_set.
I don't expect us to provide extensive support for proofs.
So, under-approximations will never really be used to show that
an assertion_set is unsatisfiable.
Another goal is to a solver object that is essentially invoking an
external solver (process). I expect the external solver (in most cases) to be
Z3 itself. The main advantages are: the main process is safe from crashes,
and we can even invoke solvers in remote machines.
The new functor/strategy design is not meant for incremental solving.
We may still have solvers that are incremental such as smt_context.h.
Additional remarks:
Failures and interruptions are reported using exceptions.
Each functor must provide a cancel() method that can be invoked to
interrupt it. A resume() method is optional. It is a must have if the
functor/strategy may be too time consuming. Each functor may have its
own set of parameters. See rewriter_params.h for an example. The
parameters may have options such as m_max_memory for blocking the
executiong of the functor. Each functor should have a cleanup()
method that must reclaim (almost) all memory consumed by the functor.

File diff suppressed because it is too large Load diff

View file

@ -1,115 +0,0 @@
/*++
Copyright (c) 2008 Microsoft Corporation
Module Name:
lockless_queue.h
Abstract:
A queue that doesn't require locking, as long as only
one thread pushes and another thread pops.
Author:
Christoph Wintersteiger (t-cwinte) 2008-12-26
Revision History:
--*/
#ifndef _LOCKLESS_QUEUE_H_
#define _LOCKLESS_QUEUE_H_
#include <new>
#include "debug.h"
template<typename T>
class lockless_queue {
protected:
unsigned m_head;
unsigned m_tail;
unsigned m_size;
T *m_items;
public:
typedef T value_type;
lockless_queue(unsigned size=4096) :
m_head(0),
m_tail(0),
m_size(size),
m_items(0) {
if(m_size>0) {
m_items = alloc_vect<T>(m_size);
SASSERT(m_items!=0);
}
}
lockless_queue(const lockless_queue &other) {
m_items = 0;
m_size = m_head = m_tail = 0;
this->operator=(other);
}
~lockless_queue() {
if(m_items) {
dealloc_vect(m_items, m_size);
m_items=0;
}
}
inline bool push(const T& elem) {
volatile unsigned head = m_head;
if(((head+1)%m_size) == m_tail)
return false; // queue is full.
m_items[head++] = elem;
head %= m_size;
m_head = head;
return true;
}
inline bool pop() {
volatile unsigned tail = m_tail;
if(tail == m_head)
return false; // queue is empty.
tail = (tail+1) % m_size;
m_tail = tail;
return true;
}
inline T& back() const {
SASSERT(!empty());
return m_items[m_tail];
}
inline bool empty() const {
return (m_tail == m_head);
}
inline bool full() const {
return (m_tail == ((m_head+1)%m_size));
}
lockless_queue& operator=(const lockless_queue &other) {
if(m_size!=other.m_size) {
if(m_items) dealloc_vect(m_items, m_size);
m_items = alloc_vect<T>(other.m_size);
m_size = other.m_size;
}
for(size_t cur = other.m_tail; cur!=other.m_head; cur = (cur+1)%m_size)
m_items[cur] = other.m_items[cur];
m_tail = other.m_tail;
m_head = other.m_head;
return *this;
}
};
#endif

View file

@ -1,76 +0,0 @@
/*++
Copyright (c) 2011 Microsoft Corporation
Module Name:
model_evaluator_params.cpp
Abstract:
New parameter setting support for rewriter.
Author:
Leonardo (leonardo) 2011-04-22
Notes:
--*/
#include"model_evaluator_params.h"
model_evaluator_params::model_evaluator_params() {
reset();
}
void model_evaluator_params::reset() {
m_model_completion = false;
m_cache = true;
m_max_steps = UINT_MAX;
m_max_memory = UINT_MAX;
}
#define PARAM(name) param_names.push_back(name)
void model_evaluator_params::get_params(svector<char const *> & param_names) const {
PARAM(":model-completion");
PARAM(":cache");
PARAM(":max-steps");
PARAM(":max-memory");
}
#define DESCR(NAME, DR) if (strcmp(name, NAME) == 0) return DR
char const * model_evaluator_params::get_param_descr(char const * name) const {
DESCR(":model-completion", "(default: false) assigns an interpretation to symbols that are not intepreted by the model.");
DESCR(":cache", "(default: true) cache intermediate results.");
DESCR(":max-steps", "(default: infty) maximum number of steps.");
DESCR(":max-memory", "(default: infty) maximum amount of memory in megabytes.");
return 0;
}
#define RBOOL(NAME) if (strcmp(name, NAME) == 0) return CPK_BOOL
#define RUINT(NAME) if (strcmp(name, NAME) == 0) return CPK_UINT
param_kind model_evaluator_params::get_param_kind(char const * name) const {
RBOOL(":model-completion");
RBOOL(":cache");
RUINT(":max-steps");
RUINT(":max-memory");
return CPK_INVALID;
}
#define SET(NAME, FIELD) if (strcmp(name, NAME) == 0) { FIELD = value; return true; }
bool model_evaluator_params::set_bool_param(char const * name, bool value) {
SET(":model-completion", m_model_completion);
SET(":cache", m_cache);
return false;
}
bool model_evaluator_params::set_uint_param(char const * name, unsigned value) {
SET(":max-steps", m_max_steps);
SET(":max-memory", m_max_memory);
return false;
}

View file

@ -1,42 +0,0 @@
/*++
Copyright (c) 2006 Microsoft Corporation
Module Name:
value.cpp
Abstract:
<abstract>
Author:
Leonardo de Moura (leonardo) 2007-08-17.
Revision History:
--*/
#include"value.h"
void bool_value::display(std::ostream & out) const {
out << (m_value ? "true" : "false");
}
unsigned bool_value::hash() const {
return m_value ? 1 : 0;
}
bool bool_value::operator==(const value & other) const {
const bool_value * o = dynamic_cast<const bool_value*>(&other);
return o && m_value == o->m_value;
}
basic_factory::basic_factory(ast_manager & m):
value_factory(symbol("basic"), m),
m_bool(m) {
m_bool = m.mk_type(m.get_basic_family_id(), BOOL_SORT);
m_true = alloc(bool_value, true, m_bool.get());
m_false = alloc(bool_value, false, m_bool.get());
}

View file

@ -1,162 +0,0 @@
/*++
Copyright (c) 2006 Microsoft Corporation
Module Name:
value.h
Abstract:
Abstract class used to represent values in a model.
Author:
Leonardo de Moura (leonardo) 2007-08-14.
Revision History:
--*/
#ifndef _VALUE_H_
#define _VALUE_H_
#include"core_model.h"
#include"ast.h"
#include"ref.h"
class model;
class value {
partition_id m_partition_id;
unsigned m_ref_count;
type_ast * m_type;
friend class model;
void set_partition_id(partition_id id) {
m_partition_id = id;
}
public:
value(type_ast * ty):
m_partition_id(null_partition_id),
m_ref_count(0),
m_type(ty) {
}
virtual ~value() {}
void inc_ref() { m_ref_count ++; }
void dec_ref() {
SASSERT(m_ref_count > 0);
m_ref_count--;
if (m_ref_count == 0) {
dealloc(this);
}
}
partition_id get_partition_id() { return m_partition_id; }
type_ast * get_type() const { return m_type; }
virtual void display(std::ostream & out) const = 0;
virtual unsigned hash() const = 0;
virtual bool operator==(const value & other) const = 0;
virtual void infer_types(ast_vector<type_ast> & result) { /* default: do nothing */ }
virtual void collect_used_partitions(svector<bool> & result) { /* default: do nothing */ }
};
inline std::ostream & operator<<(std::ostream & target, const value & v) {
v.display(target);
return target;
}
class value_factory {
family_id m_fid;
public:
value_factory(symbol fname, ast_manager & m):
m_fid(m.get_family_id(fname)) {
}
virtual ~value_factory() {}
// Return some value of the given type
virtual value * get_some_value(type_ast * ty) = 0;
// Return two distinct values of the given type
virtual bool get_some_values(type_ast * ty, ref<value> & v1, ref<value> & v2) = 0;
// Return a fresh value of the given type
virtual value * get_fresh_value(type_ast * ty) = 0;
virtual value * update_value(value * source, const svector<partition_id> & pid2pid) {
return source;
}
family_id get_family_id() const { return m_fid; }
};
class bool_value : public value {
friend class basic_factory;
bool m_value;
bool_value(bool v, type_ast * ty):
value(ty),
m_value(v) {
}
public:
bool get_value() const {
return m_value;
}
virtual void display(std::ostream & out) const;
virtual unsigned hash() const;
virtual bool operator==(const value & other) const;
};
class basic_factory : public value_factory {
ast_ref<type_ast> m_bool;
ref<bool_value> m_true;
ref<bool_value> m_false;
public:
basic_factory(ast_manager & m);
virtual ~basic_factory() {}
bool_value * get_true() const {
return m_true.get();
}
bool_value * get_false() const {
return m_false.get();
}
// Return some value of the given type
virtual value * get_some_value(type_ast * ty) {
return get_false();
}
// Return two distinct values of the given type
virtual bool get_some_values(type_ast * ty, ref<value> & v1, ref<value> & v2) {
v1 = get_false();
v2 = get_true();
return true;
}
// Return a fresh value of the given type
virtual value * get_fresh_value(type_ast * ty) {
// it is not possible to create new fresh values...
return 0;
}
};
#endif /* _VALUE_H_ */

View file

@ -0,0 +1,14 @@
CXX=@CXX@
CXXFLAGS=@CPPFLAGS@ @CXXFLAGS@ -c -g -Wall -fopenmp -msse -msse2 -mfpmath=sse -fPIC
CXX_OUT_FLAG=-o
OBJ_EXT=.o
LIB_EXT=.a
AR=@AR@
AR_FLAGS=rcs
AR_OUTFLAG=
EXE_EXT=
LINK=@CXX@
LINK_FLAGS=-lpthread -fopenmp
LINK_OUT_FLAG=-o

View file

@ -0,0 +1,14 @@
CXX=@CXX@
CXXFLAGS=@CPPFLAGS@ @CXXFLAGS@ -c -O3 -fomit-frame-pointer -Wall -fopenmp -msse -msse2 -mfpmath=sse -fPIC
CXX_OUT_FLAG=-o
OBJ_EXT=.o
LIB_EXT=.a
AR=@AR@
AR_FLAGS=rcs
AR_OUTFLAG=
EXE_EXT=
LINK=@CXX@
LINK_FLAGS=-lpthread -fopenmp
LINK_OUT_FLAG=-o

View file

@ -0,0 +1,15 @@
CXX=cl
CXXFLAGS=/c /ZI /nologo /W3 /WX- /Od /Oy- /D "WIN32" /D "_DEBUG" /D "Z3DEBUG" /D "_CONSOLE" /D "_TRACE" /D "_WINDOWS" /Gm /EHsc /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /openmp /Gd /analyze-
CXX_OUT_FLAG=/Fo
OBJ_EXT=.obj
LIB_EXT=.lib
AR=lib
AR_FLAGS=/nologo
AR_OUTFLAG=/OUT:
EXE_EXT=.exe
LINK=cl
LINK_FLAGS=/nologo /MDd
LINK_EXTRA_FLAGS=/link /DEBUG /MACHINE:X86 /SUBSYSTEM:CONSOLE /INCREMENTAL:NO /STACK:"8388608" /OPT:REF /OPT:ICF /TLBID:1 /DYNAMICBASE /NXCOMPAT
LINK_OUT_FLAG=/Fe

View file

@ -0,0 +1,15 @@
CXX=cl
CXXFLAGS=/nologo /c /W3 /WX- /O2 /Oy- /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_WINDOWS" /D "ASYNC_COMMANDS" /Gm- /EHsc /GS /fp:precise /Zc:wchar_t /Zc:forScope /openmp /Gd /analyze-
CXX_OUT_FLAG=/Fo
OBJ_EXT=.obj
LIB_EXT=.lib
AR=lib
AR_FLAGS=/nologo
AR_OUTFLAG=/OUT:
EXE_EXT=.exe
LINK=cl
LINK_FLAGS=/nologo /MD
LINK_EXTRA_FLAGS=/link /MACHINE:X86 /SUBSYSTEM:CONSOLE /INCREMENTAL:NO /STACK:"8388608" /OPT:REF /OPT:ICF /TLBID:1 /DYNAMICBASE /NXCOMPAT
LINK_OUT_FLAG=/Fe

12
scripts/mk_exception.py Normal file
View file

@ -0,0 +1,12 @@
############################################
# Copyright (c) 2012 Microsoft Corporation
#
# Author: Leonardo de Moura (leonardo)
############################################
class MKException(Exception):
def __init__(self, value):
self.value = value
def __str__(self):
return repr(self.value)

85
scripts/mk_make.py Normal file
View file

@ -0,0 +1,85 @@
############################################
# Copyright (c) 2012 Microsoft Corporation
#
# Scripts for generating Makefiles and Visual
# Studio project files.
#
# Author: Leonardo de Moura (leonardo)
############################################
from mk_util import *
parse_options()
# set_build_dir('build')
# set_src_dir('src')
# set_modes(['Debug', 'Release'])
# set_platforms(['Win32', 'x64'])
# set_vs_options('WIN32;_WINDOWS;ASYNC_COMMANDS',
# 'Z3DEBUG;_TRACE;_DEBUG',
# 'NDEBUG;_EXTERNAL_RELEASE')
add_lib('util', [])
add_lib('polynomial', ['util'], 'math/polynomial')
add_lib('sat', ['util'])
# nlsat only reuses the file sat_types.h from sat
add_lib('nlsat', ['polynomial', 'sat'])
add_lib('subpaving', ['util'], 'math/subpaving')
add_lib('ast', ['util', 'polynomial'])
add_lib('rewriter', ['ast', 'polynomial'], 'ast/rewriter')
# array_property is only used in test exe
add_lib('array_property', ['ast', 'rewriter'], 'ast/array_property')
# Simplifier module will be deleted in the future.
# It has been replaced with rewriter module.
add_lib('simplifier', ['rewriter'], 'ast/simplifier')
# Model module should not depend on simplifier module.
# We must replace all occurrences of simplifier with rewriter.
add_lib('model', ['rewriter', 'simplifier'])
add_lib('tactic', ['ast', 'model'])
# Old (non-modular) parameter framework. It has been subsumed by util\params.h.
# However, it is still used by many old components.
add_lib('old_params', ['model', 'simplifier'])
add_lib('cmd_context', ['tactic', 'rewriter', 'model', 'old_params', 'simplifier'])
# Assertion set is the old tactic framework used in Z3 3.x. It will be deleted as soon as we finish the porting old
# code to the new tactic framework.
add_lib('assertion_set', ['cmd_context'])
add_lib('substitution', ['ast'], 'ast/substitution')
add_lib('normal_forms', ['tactic', 'assertion_set'])
add_lib('pattern', ['normal_forms'], 'ast/pattern')
add_lib('spc', ['simplifier', 'substitution', 'old_params', 'pattern'])
add_lib('parser_util', ['ast'])
add_lib('smt2parser', ['cmd_context', 'parser_util'])
add_lib('macros', ['simplifier', 'old_params'], 'ast/macros')
add_lib('grobner', ['ast'], 'math/grobner')
add_lib('euclid', ['util'], 'math/euclid')
add_lib('proof_checker', ['rewriter', 'spc'], 'ast/proof_checker')
add_lib('bit_blaster', ['rewriter', 'simplifier', 'old_params', 'tactic', 'assertion_set'], 'tactic/bit_blaster')
add_lib('smt', ['assertion_set', 'bit_blaster', 'macros', 'normal_forms', 'cmd_context',
'substitution', 'grobner', 'euclid', 'proof_checker', 'pattern', 'parser_util'])
add_lib('user_plugin', ['smt'], 'smt/user_plugin')
add_lib('core_tactics', ['tactic', 'normal_forms'], 'tactic/core_tactics')
add_lib('sat_tactic', ['tactic', 'sat'], 'tactic/sat_tactic')
add_lib('sat_strategy', ['assertion_set', 'sat_tactic'], 'assertion_set/sat_strategy')
add_lib('arith_tactics', ['core_tactics', 'assertion_set', 'sat', 'sat_strategy'], 'tactic/arith_tactics')
add_lib('nlsat_tactic', ['nlsat', 'sat_tactic', 'arith_tactics'], 'tactic/nlsat_tactic')
add_lib('subpaving_tactic', ['core_tactics', 'subpaving'], 'math/subpaving/tactic')
add_lib('bv_tactics', ['tactic', 'bit_blaster'], 'tactic/bv_tactics')
add_lib('fuzzing', ['ast'], 'test/fuzzing')
add_lib('fpa', ['core_tactics', 'bv_tactics', 'sat_tactic'], 'tactic/fpa')
add_lib('smt_tactic', ['smt'], 'smt/tactic')
add_lib('extra_cmds', ['cmd_context', 'subpaving_tactic', 'arith_tactics'], 'cmd_context/extra_cmds')
add_lib('sls_tactic', ['tactic', 'normal_forms', 'core_tactics', 'bv_tactics'], 'tactic/sls_tactic')
add_lib('aig', ['cmd_context', 'assertion_set'], 'tactic/aig')
# TODO: split muz_qe into muz, qe. Perhaps, we should also consider breaking muz into muz and pdr.
add_lib('muz_qe', ['smt', 'sat', 'smt2parser'])
add_lib('smtlogic_tactics', ['arith_tactics', 'bv_tactics', 'nlsat_tactic', 'smt_tactic', 'aig', 'muz_qe'], 'tactic/smtlogic_tactics')
# TODO: rewrite ufbv_strategy as a tactic and move to smtlogic_tactics.
add_lib('ufbv_tactic', ['normal_forms', 'core_tactics', 'macros', 'smt_tactic', 'rewriter'], 'tactic/ufbv_tactic')
add_lib('portfolio', ['smtlogic_tactics', 'ufbv_tactic', 'fpa', 'aig', 'muz_qe', 'sls_tactic', 'subpaving_tactic'], 'tactic/portfolio')
# TODO: delete SMT 1.0 frontend
add_lib('api', ['portfolio', 'user_plugin'])
add_exe('shell', ['api', 'sat', 'extra_cmds'], exe_name='z3')
add_exe('test', ['api', 'fuzzing', 'array_property'], exe_name='test-z3')
# mk_vs_solution()
mk_makefile()

370
scripts/mk_util.py Normal file
View file

@ -0,0 +1,370 @@
############################################
# Copyright (c) 2012 Microsoft Corporation
#
# Auxiliary scripts for generating Makefiles
# and Visual Studio project files.
#
# Author: Leonardo de Moura (leonardo)
############################################
import os
import glob
import sets
import re
import getopt
import sys
import shutil
from mk_exception import *
BUILD_DIR='build'
REV_BUILD_DIR='..'
SRC_DIR='src'
IS_WINDOW=False
VERBOSE=False
DEBUG_MODE=False
SHOW_CPPS = True
VS_X64 = False
LIB_KIND = 0
EXE_KIND = 1
if os.name == 'nt':
IS_WINDOW=True
# Visual Studio already displays the files being compiled
SHOW_CPPS=False
def display_help():
print "mk_make.py: Z3 Makefile generator\n"
print "This script generates the Makefile for the Z3 theorem prover."
print "It must be executed from the Z3 root directory."
print "\nOptions:"
print " -h, --help display this message"
print " -v, --verbose be verbose"
print " -b <sudir>, --build=<subdir> subdirectory where Z3 will be built (default: build)."
print " -d, --debug compile Z3 in debug mode."
print " -x, --x64 create 64 binary when using Visual Studio."
exit(0)
# Parse configuration option for mk_make script
def parse_options():
global VERBOSE, DEBUG_MODE, IS_WINDOW, VS_X64
options, remainder = getopt.gnu_getopt(sys.argv[1:], 'b:dvxh', ['build=',
'debug',
'verbose',
'x64',
'help'
])
for opt, arg in options:
if opt in ('-b', '--build'):
if arg == 'src':
raise MKException('The src directory should not be used to host the Makefile')
set_build_dir(arg)
elif opt in ('-v', '--verbose'):
VERBOSE = True
elif opt in ('-d', '--debug'):
DEBUG_MODE = True
elif opt in ('-x', '--x64'):
if not IS_WINDOW:
raise MKException('x64 compilation mode can only be specified when using Visual Studio')
VS_X64 = True
elif opt in ('-h', '--help'):
display_help()
else:
raise MKException("Invalid command line option '%s'" % opt)
# Return a list containing a file names included using '#include' in
# the given C/C++ file named fname.
def extract_c_includes(fname):
result = []
# We look for well behaved #include directives
std_inc_pat = re.compile("[ \t]*#include[ \t]*\"(.*)\"[ \t]*")
system_inc_pat = re.compile("[ \t]*#include[ \t]*\<.*\>[ \t]*")
# We should generate and error for any occurrence of #include that does not match the previous pattern.
non_std_inc_pat = re.compile(".*#include.*")
f = open(fname, 'r')
linenum = 1
for line in f:
m1 = std_inc_pat.match(line)
if m1:
result.append(m1.group(1))
elif not system_inc_pat.match(line) and non_std_inc_pat.match(line):
raise MKException("Invalid #include directive at '%s':%s" % (fname, line))
linenum = linenum + 1
return result
# Given a path dir1/subdir2/subdir3 returns ../../..
def reverse_path(p):
l = p.split('/')
n = len(l)
r = '..'
for i in range(1, n):
r = '%s/%s' % (r, '..')
return r
def mk_dir(d):
if not os.path.exists(d):
os.makedirs(d)
def set_build_dir(d):
global BUILD_DIR, REV_BUILD_DIR
BUILD_DIR = d
REV_BUILD_DIR = reverse_path(d)
_UNIQ_ID = 0
def mk_fresh_name(prefix):
global _UNIQ_ID
r = '%s_%s' % (prefix, _UNIQ_ID)
_UNIQ_ID = _UNIQ_ID + 1
return r
_Id = 0
_Components = []
_ComponentNames = sets.Set()
_Name2Component = {}
_Processed_Headers = sets.Set()
def get_cpp_files(path):
return filter(lambda f: f.endswith('.cpp'), os.listdir(path))
def find_all_deps(name, deps):
new_deps = []
for dep in deps:
if dep in _ComponentNames:
if not (dep in new_deps):
new_deps.append(dep)
for dep_dep in _Name2Component[dep].deps:
if not (dep_dep in new_deps):
new_deps.append(dep_dep)
else:
raise MKException("Unknown component '%s' at '%s'." % (dep, name))
return new_deps
class Component:
def __init__(self, name, kind, path, deps):
global BUILD_DIR, SRC_DIR, REV_BUILD_DIR
if name in _ComponentNames:
raise MKException("Component '%s' was already defined." % name)
if path == None:
path = name
self.kind = kind
self.name = name
self.path = path
self.deps = find_all_deps(name, deps)
self.build_dir = path
self.src_dir = '%s/%s' % (SRC_DIR, path)
self.to_src_dir = '%s/%s' % (REV_BUILD_DIR, self.src_dir)
# Find fname in the include paths for the given component.
# ownerfile is only used for creating error messages.
# That is, we were looking for fname when processing ownerfile
def find_file(self, fname, ownerfile):
global _Name2Component
full_fname = '%s/%s' % (self.src_dir, fname)
if os.path.exists(full_fname):
return self
for dep in self.deps:
c_dep = _Name2Component[dep]
full_fname = '%s/%s' % (c_dep.src_dir, fname)
if os.path.exists(full_fname):
return c_dep
raise MKException("Failed to find include file '%s' for '%s' when processing '%s'." % (fname, ownerfile, self.name))
# Display all dependencies of file basename located in the given component directory.
# The result is displayed at out
def add_cpp_h_deps(self, out, basename):
includes = extract_c_includes('%s/%s' % (self.src_dir, basename))
out.write('%s/%s' % (self.to_src_dir, basename))
for include in includes:
owner = self.find_file(include, basename)
out.write(' %s/%s.node' % (owner.build_dir, include))
# Add a rule for each #include directive in the file basename located at the current component.
def add_rule_for_each_include(self, out, basename):
fullname = '%s/%s' % (self.src_dir, basename)
includes = extract_c_includes(fullname)
for include in includes:
owner = self.find_file(include, fullname)
owner.add_h_rule(out, include)
# Display a Makefile rule for an include file located in the given component directory.
# 'include' is something of the form: ast.h, polynomial.h
# The rule displayed at out is of the form
# ast/ast_pp.h.node : ../src/util/ast_pp.h util/util.h.node ast/ast.h.node
# @echo "done" > ast/ast_pp.h.node
def add_h_rule(self, out, include):
include_src_path = '%s/%s' % (self.to_src_dir, include)
if include_src_path in _Processed_Headers:
return
_Processed_Headers.add(include_src_path)
self.add_rule_for_each_include(out, include)
include_node = '%s/%s.node' % (self.build_dir, include)
out.write('%s: ' % include_node)
self.add_cpp_h_deps(out, include)
out.write('\n')
out.write('\t@echo done > %s\n' % include_node)
def add_cpp_rules(self, out, include_defs, cppfile):
self.add_rule_for_each_include(out, cppfile)
objfile = '%s/%s$(OBJ_EXT)' % (self.build_dir, os.path.splitext(cppfile)[0])
srcfile = '%s/%s' % (self.to_src_dir, cppfile)
out.write('%s: ' % objfile)
self.add_cpp_h_deps(out, cppfile)
out.write('\n')
if SHOW_CPPS:
out.write('\t@echo %s/%s\n' % (self.src_dir, cppfile))
out.write('\t@$(CXX) $(CXXFLAGS) $(%s) $(CXX_OUT_FLAG)%s %s\n' % (include_defs, objfile, srcfile))
def mk_makefile(self, out):
include_defs = mk_fresh_name('includes')
out.write('%s =' % include_defs)
for dep in self.deps:
out.write(' -I%s' % _Name2Component[dep].to_src_dir)
out.write('\n')
mk_dir('%s/%s' % (BUILD_DIR, self.build_dir))
for cppfile in get_cpp_files(self.src_dir):
self.add_cpp_rules(out, include_defs, cppfile)
# Return true if the component should be included in the all: rule
def main_component(self):
return False
class LibComponent(Component):
def __init__(self, name, path, deps):
Component.__init__(self, name, LIB_KIND, path, deps)
def mk_makefile(self, out):
Component.mk_makefile(self, out)
# generate rule for lib
objs = []
for cppfile in get_cpp_files(self.src_dir):
objfile = '%s/%s$(OBJ_EXT)' % (self.build_dir, os.path.splitext(cppfile)[0])
objs.append(objfile)
libfile = '%s/%s$(LIB_EXT)' % (self.build_dir, self.name)
out.write('%s:' % libfile)
for obj in objs:
out.write(' ')
out.write(obj)
out.write('\n')
out.write('\t@$(AR) $(AR_FLAGS) $(AR_OUTFLAG)%s' % libfile)
for obj in objs:
out.write(' ')
out.write(obj)
out.write('\n')
out.write('%s: %s\n\n' % (self.name, libfile))
# Auxiliary function for sort_components
def comp_components(c1, c2):
id1 = _Name2Component[c1].id
id2 = _Name2Component[c2].id
return id2 - id1
# Sort components based on (reverse) definition time
def sort_components(cnames):
return sorted(cnames, cmp=comp_components)
class ExeComponent(Component):
def __init__(self, name, exe_name, path, deps):
Component.__init__(self, name, EXE_KIND, path, deps)
if exe_name == None:
exe_name = name
self.exe_name = exe_name
def mk_makefile(self, out):
global _Name2Component
Component.mk_makefile(self, out)
# generate rule for exe
exefile = '%s$(EXE_EXT)' % self.exe_name
out.write('%s:' % exefile)
deps = sort_components(self.deps)
objs = []
for cppfile in get_cpp_files(self.src_dir):
objfile = '%s/%s$(OBJ_EXT)' % (self.build_dir, os.path.splitext(cppfile)[0])
objs.append(objfile)
for obj in objs:
out.write(' ')
out.write(obj)
for dep in deps:
c_dep = _Name2Component[dep]
out.write(' %s/%s$(LIB_EXT)' % (c_dep.build_dir, c_dep.name))
out.write('\n')
out.write('\t$(LINK) $(LINK_OUT_FLAG)%s $(LINK_FLAGS)' % exefile)
for obj in objs:
out.write(' ')
out.write(obj)
for dep in deps:
c_dep = _Name2Component[dep]
out.write(' %s/%s$(LIB_EXT)' % (c_dep.build_dir, c_dep.name))
out.write(' $(LINK_EXTRA_FLAGS)\n')
out.write('%s: %s\n\n' % (self.name, exefile))
# All executables are included in the all: rule
def main_component(self):
return True
def reg_component(name, c):
global _Id, _Components, _ComponentNames, _Name2Component
c.id = _Id
_Id = _Id + 1
_Components.append(c)
_ComponentNames.add(name)
_Name2Component[name] = c
if VERBOSE:
print "Processed '%s'" % name
def add_lib(name, deps=[], path=None):
c = LibComponent(name, path, deps)
reg_component(name, c)
def add_exe(name, deps=[], path=None, exe_name=None):
c = ExeComponent(name, exe_name, path, deps)
reg_component(name, c)
# Copy configuration correct file to BUILD_DIR
def cp_config_mk():
if IS_WINDOW:
if VS_X64:
# TODO
return
else:
if DEBUG_MODE:
shutil.copyfile('scripts/config-vs-debug.mk', '%s/config.mk' % BUILD_DIR)
else:
shutil.copyfile('scripts/config-vs-release.mk', '%s/config.mk' % BUILD_DIR)
else:
if DEBUG_MODE:
shutil.copyfile('scripts/config-debug.mk', '%s/config.mk' % BUILD_DIR)
else:
shutil.copyfile('scripts/config-release.mk', '%s/config.mk' % BUILD_DIR)
# Generate the Z3 makefile
def mk_makefile():
mk_dir(BUILD_DIR)
cp_config_mk()
if VERBOSE:
print "Writing %s/Makefile" % BUILD_DIR
out = open('%s/Makefile' % BUILD_DIR, 'w')
out.write('# Automatically generated file. Generator: scripts/mk_make.py\n')
out.write('include config.mk\n')
# Generate :all rule
out.write('all:')
for c in _Components:
if c.main_component:
out.write(' %s' % c.name)
out.write('\n\n')
# Generate components
for c in _Components:
c.mk_makefile(out)
# Finalize
if VERBOSE:
print "Makefile was successfully generated."
if DEBUG_MODE:
print " compilation mode: Debug"
else:
print " compilation mode: Release"
print "Type 'cd %s; make' to build Z3" % BUILD_DIR

308
scripts/mk_util_old.py Normal file
View file

@ -0,0 +1,308 @@
############################################
# Copyright (c) 2012 Microsoft Corporation
#
# Auxiliary scripts for generating Makefiles
# and Visual Studio project files.
#
# Author: Leonardo de Moura (leonardo)
############################################
import os
import glob
BUILD_DIR='build'
SRC_DIR='src'
MODES=[]
PLATFORMS=[]
class MKException(Exception):
def __init__(self, value):
self.value = value
def __str__(self):
return repr(self.value)
def set_build_dir(d):
global BUILD_DIR
BUILD_DIR = d
mk_dir(BUILD_DIR)
def set_src_dir(d):
global SRC_DIR
SRC_DIR = d
def set_modes(l):
global MODES
MODES=l
def set_platforms(l):
global PLATFORMS
PLATFORMS=l
VS_COMMON_OPTIONS='WIN32'
VS_DBG_OPTIONS='_DEBUG'
VS_RELEASE_OPTIONS='NDEBUG'
GUI = 0
Name2GUI = {}
def mk_gui_str(id):
return '4D2F40D8-E5F9-473B-B548-%012d' % id
MODULES = []
HEADERS = []
LIBS = []
EXES = []
DEPS = {}
def set_vs_options(common, dbg, release):
global VS_COMMON_OPTIONS, VS_DBG_OPTIONS, VS_RELEASE_OPTIONS
VS_COMMON_OPTIONS = common
VS_DBG_OPTIONS = dbg
VS_RELEASE_OPTIONS = release
def is_debug(mode):
return mode == 'Debug'
def is_x64(platform):
return platform == 'x64'
def mk_dir(d):
if not os.path.exists(d):
os.makedirs(d)
def module_src_dir(name):
return '%s%s%s' % (SRC_DIR, os.sep, name)
def module_build_dir(name):
return '%s%s%s' % (BUILD_DIR, os.sep, name)
LIB_KIND = 0
EXE_KIND = 1
def get_extension(kind):
if kind == LIB_KIND:
return 'lib'
elif kind == EXE_KIND:
return 'exe'
else:
raise MKException('unknown kind %s' % kind)
def vs_header(f):
f.write(
'<?xml version="1.0" encoding="utf-8"?>\n'
'<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\n')
def vs_project_configurations(f, name):
global GUI, Name2GUI
f.write(' <ItemGroup Label="ProjectConfigurations">\n')
for mode in MODES:
for platform in PLATFORMS:
f.write(' <ProjectConfiguration Include="%s|%s">\n' % (mode, platform))
f.write(' <Configuration>%s</Configuration>\n' % mode)
f.write(' <Platform>%s</Platform>\n' % platform)
f.write(' </ProjectConfiguration>\n')
f.write(' </ItemGroup>\n')
f.write(' <PropertyGroup Label="Globals">\n')
f.write(' <ProjectGuid>{%s}</ProjectGuid>\n' % mk_gui_str(GUI))
f.write(' <ProjectName>%s</ProjectName>\n' % name)
f.write(' <Keyword>Win32Proj</Keyword>\n')
f.write(' </PropertyGroup>\n')
f.write(' <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />\n')
Name2GUI[name] = GUI
GUI = GUI + 1
def vs_configurations(f, name, kind):
for mode in MODES:
for platform in PLATFORMS:
f.write(' <PropertyGroup Condition="\'$(Configuration)|$(Platform)\'==\'%s|%s\'" Label="Configuration">\n' % (mode, platform))
if kind == LIB_KIND:
f.write(' <ConfigurationType>StaticLibrary</ConfigurationType>\n')
elif kind == EXE_KIND:
f.write(' <ConfigurationType>Application</ConfigurationType>\n')
else:
raise MKException("unknown kind %s" % kind)
f.write(' <CharacterSet>Unicode</CharacterSet>\n')
f.write(' <UseOfMfc>false</UseOfMfc>\n')
f.write(' </PropertyGroup>\n')
f.write(' <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />\n')
f.write(' <ImportGroup Label="ExtensionSettings">\n')
f.write(' </ImportGroup>\n')
f.write(' <ImportGroup Label="PropertySheets">\n')
f.write(' <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists(\'$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props\')" Label="LocalAppDataPlatform" /> </ImportGroup>\n')
f.write(' <PropertyGroup Label="UserMacros" />\n')
f.write(' <PropertyGroup>\n')
for mode in MODES:
for platform in PLATFORMS:
if is_x64(platform):
f.write(' <OutDir Condition="\'$(Configuration)|$(Platform)\'==\'%s|%s\'">$(SolutionDir)$(Platform)\$(Configuration)\</OutDir>\n' %
(mode, platform))
else:
f.write(' <OutDir Condition="\'$(Configuration)|$(Platform)\'==\'%s|%s\'">$(SolutionDir)$(Configuration)\</OutDir>\n' % (mode, platform))
for mode in MODES:
for platform in PLATFORMS:
f.write(' <TargetName Condition="\'$(Configuration)|$(Platform)\'==\'%s|%s\'">%s</TargetName>\n' % (mode, platform, name))
f.write(' <TargetExt Condition="\'$(Configuration)|$(Platform)\'==\'%s|%s\'">.%s</TargetExt>\n' % (mode, platform, get_extension(kind)))
f.write(' </PropertyGroup>\n')
def vs_compilation_options(f, name, deps, kind):
for mode in MODES:
for platform in PLATFORMS:
f.write(' <ItemDefinitionGroup Condition="\'$(Configuration)|$(Platform)\'==\'%s|%s\'">\n' % (mode, platform))
if is_x64(platform):
f.write(' <Midl>\n')
f.write(' <TargetEnvironment>X64</TargetEnvironment>\n')
f.write(' </Midl>\n')
f.write(' <ClCompile>\n')
if is_debug(mode):
f.write(' <Optimization>Disabled</Optimization>\n')
else:
f.write(' <Optimization>Full</Optimization>\n')
options = VS_COMMON_OPTIONS
if is_debug(mode):
options = "%s;%s" % (options, VS_DBG_OPTIONS)
else:
options = "%s;%s" % (options, VS_RELEASE_OPTIONS)
if is_x64(platform):
options = "%s;_AMD64_" % options
f.write(' <PreprocessorDefinitions>%s;%%(PreprocessorDefinitions)</PreprocessorDefinitions>\n' % options)
if is_debug(mode):
f.write(' <MinimalRebuild>true</MinimalRebuild>\n')
f.write(' <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>\n')
f.write(' <WarningLevel>Level3</WarningLevel>\n')
f.write(' <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>\n')
f.write(' <OpenMPSupport>true</OpenMPSupport>\n')
f.write(' <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>\n')
f.write(' <AdditionalIncludeDirectories>')
f.write('..\..\src\%s' % name)
for dep in deps:
f.write(';..\..\src\%s' % dep)
f.write('</AdditionalIncludeDirectories>\n')
f.write(' </ClCompile>\n')
f.write(' <Link>\n')
f.write(' <OutputFile>$(OutDir)%s.%s</OutputFile>\n' % (name, get_extension(kind)))
f.write(' <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>\n')
if is_x64(platform):
f.write(' <TargetMachine>MachineX64</TargetMachine>\n')
else:
f.write(' <TargetMachine>MachineX86</TargetMachine>\n')
if kind == EXE_KIND:
f.write('<AdditionalDependencies>kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib')
for dep in deps:
f.write(';$(OutDir)%s.lib' % dep)
# if is_x64(platform):
# f.write(';..\%s\%s\%s\%s.lib' % (dep, platform, mode, dep))
# else:
# f.write(';..\%s\%s\%s.lib' % (dep, mode, dep))
f.write(';%(AdditionalDependencies)</AdditionalDependencies>\n')
f.write(' </Link>\n')
f.write(' </ItemDefinitionGroup>\n')
def add_vs_cpps(f, name):
f.write(' <ItemGroup>\n')
srcs = module_src_dir(name)
for cppfile in glob.glob(os.path.join(srcs, '*.cpp')):
f.write(' <ClCompile Include="..%s..%s%s" />\n' % (os.sep, os.sep, cppfile))
f.write(' </ItemGroup>\n')
def vs_footer(f):
f.write(
' <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />\n'
' <ImportGroup Label="ExtensionTargets">\n'
' </ImportGroup>\n'
'</Project>\n')
def check_new_component(name):
if (name in HEADERS) or (name in LIBS) or (name in EXES):
raise MKException("Component '%s' was already defined" % name)
# Add a directory containing only .h files
def add_header(name):
check_new_component(name)
HEADERS.append(name)
def find_all_deps(name, deps):
new_deps = []
for dep in deps:
if dep in LIBS:
if not (dep in new_deps):
new_deps.append(dep)
for dep_dep in DEPS[dep]:
if not (dep_dep in new_deps):
new_deps.append(dep_dep)
elif dep in HEADERS:
if not (dep in new_deps):
new_deps.append(dep)
else:
raise MKException("Unknown component '%s' at '%s'." % (dep, name))
return new_deps
def add_component(name, deps, kind):
check_new_component(name)
if kind == LIB_KIND:
LIBS.append(name)
elif kind == EXE_KIND:
EXES.append(name)
else:
raise MKException("unknown kind %s" % kind)
MODULES.append(name)
deps = find_all_deps(name, deps)
DEPS[name] = deps
print "Dependencies for '%s': %s" % (name, deps)
module_dir = module_build_dir(name)
mk_dir(module_dir)
vs_proj = open('%s%s%s.vcxproj' % (module_dir, os.sep, name), 'w')
vs_header(vs_proj)
vs_project_configurations(vs_proj, name)
vs_configurations(vs_proj, name, kind)
vs_compilation_options(vs_proj, name, deps, kind)
add_vs_cpps(vs_proj, name)
vs_footer(vs_proj)
def add_lib(name, deps):
add_component(name, deps, LIB_KIND)
def add_exe(name, deps):
add_component(name, deps, EXE_KIND)
def is_lib(name):
# Add DLL dependency
return name in LIBS
def mk_vs_solution():
sln = open('%s%sz3.sln' % (BUILD_DIR, os.sep), 'w')
sln.write('\n')
sln.write("Microsoft Visual Studio Solution File, Format Version 11.00\n")
sln.write("# Visual Studio 2010\n")
for module in MODULES:
gui = Name2GUI[module]
deps = DEPS[module]
sln.write('Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "%s", "%s%s%s.vcxproj", "{%s}"\n' %
(module, module, os.sep, module, mk_gui_str(gui)))
if len(deps) > 0:
sln.write(' ProjectSection(ProjectDependencies) = postProject\n')
for dep in deps:
if is_lib(dep):
i = Name2GUI[dep]
sln.write(' {%s} = {%s}\n' % (mk_gui_str(i), mk_gui_str(i)))
sln.write(' EndProjectSection\n')
sln.write('EndProject\n')
sln.write('Global\n')
sln.write('GlobalSection(SolutionConfigurationPlatforms) = preSolution\n')
for mode in MODES:
for platform in PLATFORMS:
sln.write(' %s|%s = %s|%s\n' % (mode, platform, mode, platform))
sln.write('EndGlobalSection\n')
sln.write('GlobalSection(ProjectConfigurationPlatforms) = postSolution\n')
for module in MODULES:
gui = Name2GUI[module]
for mode in MODES:
for platform in PLATFORMS:
sln.write(' {%s}.%s|%s.ActiveCfg = %s|%s\n' % (mk_gui_str(gui), mode, platform, mode, platform))
sln.write(' {%s}.%s|%s.Build.0 = %s|%s\n' % (mk_gui_str(gui), mode, platform, mode, platform))
sln.write('EndGlobalSection\n')
print "Visual Solution was generated."

View file

@ -1,102 +0,0 @@
// Microsoft Visual C++ generated resource script.
//
#include "resource.h"
#define APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
//
// Generated from the TEXTINCLUDE 2 resource.
//
#include "afxres.h"
/////////////////////////////////////////////////////////////////////////////
#undef APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
// English (U.S.) resources
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
#ifdef _WIN32
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
#pragma code_page(1252)
#endif //_WIN32
#ifdef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// TEXTINCLUDE
//
1 TEXTINCLUDE
BEGIN
"resource.h\0"
END
2 TEXTINCLUDE
BEGIN
"#include ""afxres.h""\r\n"
"\0"
END
3 TEXTINCLUDE
BEGIN
"\r\n"
"\0"
END
#endif // APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// Version
//
VS_VERSION_INFO VERSIONINFO
FILEVERSION 4,2,0,0
PRODUCTVERSION 4,2,0,0
FILEFLAGSMASK 0x17L
#ifdef _DEBUG
FILEFLAGS 0x1L
#else
FILEFLAGS 0x0L
#endif
FILEOS 0x4L
FILETYPE 0x1L
FILESUBTYPE 0x0L
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "040904b0"
BEGIN
VALUE "CompanyName", "Microsoft"
VALUE "FileDescription", "Z3 shell"
VALUE "FileVersion" "4,2,0,0"
VALUE "InternalName", "Z3 shell"
VALUE "LegalCopyright", "(c) Microsoft Corporation. All rights reserved."
VALUE "OriginalFilename", "z3.exe"
VALUE "ProductName", "Z3"
VALUE "ProductVersion", "4,2,0,0"
END
END
BLOCK "VarFileInfo"
BEGIN
VALUE "Translation", 0x409, 1200
END
END
#endif // English (U.S.) resources
/////////////////////////////////////////////////////////////////////////////
#ifndef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// Generated from the TEXTINCLUDE 3 resource.
//
/////////////////////////////////////////////////////////////////////////////
#endif // not APSTUDIO_INVOKED

View file

@ -1,641 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="commercial|Win32">
<Configuration>commercial</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="commercial|x64">
<Configuration>commercial</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="debug_opt|Win32">
<Configuration>debug_opt</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="debug_opt|x64">
<Configuration>debug_opt</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="external|Win32">
<Configuration>external</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="external|x64">
<Configuration>external</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="release_mt|Win32">
<Configuration>release_mt</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="release_mt|x64">
<Configuration>release_mt</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Trace|Win32">
<Configuration>Trace</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Trace|x64">
<Configuration>Trace</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{BF547582-F16D-4BE5-B9AB-8B6A9364B447}</ProjectGuid>
<RootNamespace>shell</RootNamespace>
<Keyword>Win32Proj</Keyword>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='external|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
<WholeProgramOptimization>true</WholeProgramOptimization>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='commercial|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
<WholeProgramOptimization>true</WholeProgramOptimization>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='release_mt|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
<WholeProgramOptimization>true</WholeProgramOptimization>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='debug_opt|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
<WholeProgramOptimization>true</WholeProgramOptimization>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Trace|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
<WholeProgramOptimization>true</WholeProgramOptimization>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
<WholeProgramOptimization>true</WholeProgramOptimization>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='external|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
<WholeProgramOptimization>true</WholeProgramOptimization>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='commercial|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
<WholeProgramOptimization>true</WholeProgramOptimization>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='release_mt|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='debug_opt|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
<WholeProgramOptimization>true</WholeProgramOptimization>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Trace|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
<WholeProgramOptimization>true</WholeProgramOptimization>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
<WholeProgramOptimization>true</WholeProgramOptimization>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='external|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='commercial|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='release_mt|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='debug_opt|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Trace|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='external|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='commercial|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='release_mt|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='debug_opt|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Trace|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
<_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)$(Configuration)\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Configuration)\</IntDir>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(SolutionDir)$(Platform)\$(Configuration)\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</IntDir>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)$(Configuration)\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Configuration)\</IntDir>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(SolutionDir)$(Platform)\$(Configuration)\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</IntDir>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Trace|Win32'">$(SolutionDir)$(Configuration)\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Trace|Win32'">$(Configuration)\</IntDir>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Trace|Win32'">false</LinkIncremental>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Trace|x64'">$(SolutionDir)$(Platform)\$(Configuration)\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Trace|x64'">$(Platform)\$(Configuration)\</IntDir>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Trace|x64'">false</LinkIncremental>
<OutDir Condition="'$(Configuration)|$(Platform)'=='debug_opt|Win32'">$(SolutionDir)$(Configuration)\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='debug_opt|Win32'">$(Configuration)\</IntDir>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='debug_opt|Win32'">false</LinkIncremental>
<OutDir Condition="'$(Configuration)|$(Platform)'=='debug_opt|x64'">$(SolutionDir)$(Platform)\$(Configuration)\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='debug_opt|x64'">$(Platform)\$(Configuration)\</IntDir>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='debug_opt|x64'">false</LinkIncremental>
<OutDir Condition="'$(Configuration)|$(Platform)'=='release_mt|Win32'">$(SolutionDir)$(Configuration)\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='release_mt|Win32'">$(Configuration)\</IntDir>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='release_mt|Win32'">false</LinkIncremental>
<OutDir Condition="'$(Configuration)|$(Platform)'=='external|Win32'">$(SolutionDir)$(Configuration)\</OutDir>
<OutDir Condition="'$(Configuration)|$(Platform)'=='commercial|Win32'">$(SolutionDir)$(Configuration)\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='external|Win32'">$(Configuration)\</IntDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='commercial|Win32'">$(Configuration)\</IntDir>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='external|Win32'">false</LinkIncremental>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='commercial|Win32'">false</LinkIncremental>
<OutDir Condition="'$(Configuration)|$(Platform)'=='external|x64'">$(SolutionDir)$(Platform)\$(Configuration)\</OutDir>
<OutDir Condition="'$(Configuration)|$(Platform)'=='commercial|x64'">$(SolutionDir)$(Platform)\$(Configuration)\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='external|x64'">$(Platform)\$(Configuration)\</IntDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='commercial|x64'">$(Platform)\$(Configuration)\</IntDir>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='external|x64'">false</LinkIncremental>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='commercial|x64'">false</LinkIncremental>
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='debug_opt|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='debug_opt|Win32'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='debug_opt|Win32'" />
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='debug_opt|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='debug_opt|x64'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='debug_opt|x64'" />
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='external|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='commercial|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='external|Win32'" />
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='commercial|Win32'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='external|Win32'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='commercial|Win32'" />
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='external|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='commercial|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='external|x64'" />
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='commercial|x64'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='external|x64'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='commercial|x64'" />
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='release_mt|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='release_mt|Win32'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='release_mt|Win32'" />
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='release_mt|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='release_mt|x64'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='release_mt|x64'" />
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Trace|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Trace|Win32'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Trace|Win32'" />
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Trace|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Trace|x64'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Trace|x64'" />
<TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">z3</TargetName>
<TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">z3</TargetName>
<TargetName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">z3</TargetName>
<TargetName Condition="'$(Configuration)|$(Platform)'=='debug_opt|x64'">z3</TargetName>
<TargetName Condition="'$(Configuration)|$(Platform)'=='external|x64'">z3</TargetName>
<TargetName Condition="'$(Configuration)|$(Platform)'=='commercial|x64'">z3</TargetName>
<TargetName Condition="'$(Configuration)|$(Platform)'=='release_mt|x64'">z3</TargetName>
<TargetName Condition="'$(Configuration)|$(Platform)'=='Trace|x64'">z3</TargetName>
<TargetName Condition="'$(Configuration)|$(Platform)'=='debug_opt|Win32'">z3</TargetName>
<TargetName Condition="'$(Configuration)|$(Platform)'=='external|Win32'">z3</TargetName>
<TargetName Condition="'$(Configuration)|$(Platform)'=='commercial|Win32'">z3</TargetName>
<TargetName Condition="'$(Configuration)|$(Platform)'=='release_mt|Win32'">z3</TargetName>
<TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">z3</TargetName>
<TargetName Condition="'$(Configuration)|$(Platform)'=='Trace|Win32'">z3</TargetName>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>..\lib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_DEBUG;Z3DEBUG;_CONSOLE;_TRACE;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>true</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
<OpenMPSupport>true</OpenMPSupport>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
</ClCompile>
<Link>
<AdditionalDependencies>psapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>$(OutDir)z3.exe</OutputFile>
<DelayLoadDLLs>%(DelayLoadDLLs)</DelayLoadDLLs>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Console</SubSystem>
<StackReserveSize>8388608</StackReserveSize>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention>
</DataExecutionPrevention>
<TargetMachine>MachineX86</TargetMachine>
<ImportLibrary>$(OutDir)z3shell.lib</ImportLibrary>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<Midl>
<TargetEnvironment>X64</TargetEnvironment>
</Midl>
<ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>..\lib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;Z3DEBUG;_DEBUG;_CONSOLE;_TRACE;_WINDOWS;_AMD64_;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>true</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
</ClCompile>
<Link>
<AdditionalDependencies>psapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>$(OutDir)z3.exe</OutputFile>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Console</SubSystem>
<StackReserveSize>8388608</StackReserveSize>
<TargetMachine>MachineX64</TargetMachine>
<ImportLibrary>$(OutDir)z3shell.lib</ImportLibrary>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<WholeProgramOptimization>false</WholeProgramOptimization>
<AdditionalIncludeDirectories>..\lib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;_WINDOWS;ASYNC_COMMANDS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<OpenMPSupport>true</OpenMPSupport>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
</ClCompile>
<Link>
<AdditionalDependencies>psapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>$(OutDir)z3.exe</OutputFile>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Console</SubSystem>
<StackReserveSize>33554432</StackReserveSize>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention>
</DataExecutionPrevention>
<TargetMachine>MachineX86</TargetMachine>
<ImportLibrary>$(OutDir)z3shell.lib</ImportLibrary>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<Midl>
<TargetEnvironment>X64</TargetEnvironment>
</Midl>
<ClCompile>
<WholeProgramOptimization>false</WholeProgramOptimization>
<AdditionalIncludeDirectories>..\lib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;_WINDOWS;_AMD64_;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
</ClCompile>
<Link>
<AdditionalDependencies>psapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>$(OutDir)z3.exe</OutputFile>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Console</SubSystem>
<StackReserveSize>8388608</StackReserveSize>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<TargetMachine>MachineX64</TargetMachine>
<ImportLibrary>$(OutDir)z3shell.lib</ImportLibrary>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Trace|Win32'">
<ClCompile>
<WholeProgramOptimization>false</WholeProgramOptimization>
<AdditionalIncludeDirectories>..\lib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;_WINDOWS;_TRACE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
</ClCompile>
<Link>
<AdditionalDependencies>psapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>$(OutDir)z3.exe</OutputFile>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Console</SubSystem>
<StackReserveSize>8388608</StackReserveSize>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention>
</DataExecutionPrevention>
<TargetMachine>MachineX86</TargetMachine>
<ImportLibrary>$(OutDir)z3shell.lib</ImportLibrary>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Trace|x64'">
<Midl>
<TargetEnvironment>X64</TargetEnvironment>
</Midl>
<ClCompile>
<AdditionalIncludeDirectories>..\lib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;_WINDOWS;_TRACE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
</ClCompile>
<Link>
<AdditionalDependencies>psapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>$(OutDir)z3.exe</OutputFile>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Console</SubSystem>
<StackReserveSize>8388608</StackReserveSize>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<TargetMachine>MachineX64</TargetMachine>
<ImportLibrary>$(OutDir)z3shell.lib</ImportLibrary>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='debug_opt|Win32'">
<ClCompile>
<WholeProgramOptimization>false</WholeProgramOptimization>
<AdditionalIncludeDirectories>..\lib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;Z3DEBUG;NDEBUG;_CONSOLE;_WINDOWS;_TRACE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
</ClCompile>
<Link>
<AdditionalDependencies>psapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>$(OutDir)z3.exe</OutputFile>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Console</SubSystem>
<StackReserveSize>8388608</StackReserveSize>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention>
</DataExecutionPrevention>
<TargetMachine>MachineX86</TargetMachine>
<ImportLibrary>$(OutDir)z3shell.lib</ImportLibrary>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='debug_opt|x64'">
<Midl>
<TargetEnvironment>X64</TargetEnvironment>
</Midl>
<ClCompile>
<AdditionalIncludeDirectories>..\lib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;Z3DEBUG;_CONSOLE;_WINDOWS;_DEBUG;_TRACE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
</ClCompile>
<Link>
<AdditionalDependencies>psapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>$(OutDir)z3.exe</OutputFile>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Console</SubSystem>
<StackReserveSize>8388608</StackReserveSize>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<TargetMachine>MachineX64</TargetMachine>
<ImportLibrary>$(OutDir)z3shell.lib</ImportLibrary>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='release_mt|Win32'">
<ClCompile>
<WholeProgramOptimization>false</WholeProgramOptimization>
<AdditionalIncludeDirectories>..\lib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
</ClCompile>
<Link>
<AdditionalDependencies>psapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>$(OutDir)z3.exe</OutputFile>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Console</SubSystem>
<StackReserveSize>8388608</StackReserveSize>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention>
</DataExecutionPrevention>
<TargetMachine>MachineX86</TargetMachine>
<ImportLibrary>$(OutDir)z3shell.lib</ImportLibrary>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='external|Win32'">
<ClCompile>
<WholeProgramOptimization>false</WholeProgramOptimization>
<AdditionalIncludeDirectories>..\lib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;_WINDOWS;_EXTERNAL_RELEASE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
</ClCompile>
<Link>
<AdditionalDependencies>psapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>$(OutDir)z3.exe</OutputFile>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Console</SubSystem>
<StackReserveSize>8388608</StackReserveSize>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention>
</DataExecutionPrevention>
<TargetMachine>MachineX86</TargetMachine>
<ImportLibrary>$(OutDir)z3shell.lib</ImportLibrary>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='commercial|Win32'">
<ClCompile>
<WholeProgramOptimization>false</WholeProgramOptimization>
<AdditionalIncludeDirectories>..\lib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;_WINDOWS;_Z3_COMMERCIAL;_EXTERNAL_RELEASE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
</ClCompile>
<Link>
<AdditionalDependencies>psapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>$(OutDir)z3.exe</OutputFile>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Console</SubSystem>
<StackReserveSize>8388608</StackReserveSize>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention>
</DataExecutionPrevention>
<TargetMachine>MachineX86</TargetMachine>
<ImportLibrary>$(OutDir)z3shell.lib</ImportLibrary>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='external|x64'">
<Midl>
<TargetEnvironment>X64</TargetEnvironment>
</Midl>
<ClCompile>
<WholeProgramOptimization>false</WholeProgramOptimization>
<AdditionalIncludeDirectories>..\lib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_AMD64_;WIN32;NDEBUG;_CONSOLE;_WINDOWS;_EXTERNAL_RELEASE;_AMD64_;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
</ClCompile>
<Link>
<AdditionalDependencies>psapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>$(OutDir)z3.exe</OutputFile>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Console</SubSystem>
<StackReserveSize>8388608</StackReserveSize>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<TargetMachine>MachineX64</TargetMachine>
<ImportLibrary>$(OutDir)z3shell.lib</ImportLibrary>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='commercial|x64'">
<Midl>
<TargetEnvironment>X64</TargetEnvironment>
</Midl>
<ClCompile>
<WholeProgramOptimization>false</WholeProgramOptimization>
<AdditionalIncludeDirectories>..\lib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;NDEBUG;_Z3_COMMERCIAL;_EXTERNAL_RELEASE;_CONSOLE;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
</ClCompile>
<Link>
<AdditionalDependencies>psapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>$(OutDir)z3.exe</OutputFile>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Console</SubSystem>
<StackReserveSize>8388608</StackReserveSize>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<TargetMachine>MachineX64</TargetMachine>
<ImportLibrary>$(OutDir)z3shell.lib</ImportLibrary>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="datalog_frontend.cpp" />
<ClCompile Include="dimacs_frontend.cpp" />
<ClCompile Include="main.cpp" />
<ClCompile Include="smtlib_frontend.cpp" />
<ClCompile Include="z3_log_frontend.cpp" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="datalog_frontend.h" />
<ClInclude Include="resource.h" />
<ClInclude Include="simple_sat.h" />
<ClInclude Include="simtlib_frontend.h" />
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="shell.rc" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\lib\lib.vcxproj">
<Project>{4a7e5a93-19d8-4382-8950-fb2edec7a76e}</Project>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
</ProjectReference>
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>

View file

@ -26,6 +26,7 @@ Revision History:
#include"api_log_macros.h"
#include"api_util.h"
#include"install_tactics.h"
#include"reg_decl_plugins.h"
namespace api {
@ -60,7 +61,7 @@ namespace api {
}
context::add_plugins::add_plugins(ast_manager & m) {
m.register_decl_plugins();
reg_decl_plugins(m);
}
// ------------------------

View file

@ -29,6 +29,7 @@ Revision History:
#include"cancel_eh.h"
#include"scoped_timer.h"
#include"smt_strategic_solver.h"
#include"default_solver.h"
extern "C" {

View file

@ -23,8 +23,9 @@ Notes:
#include"ast.h"
#include"map.h"
#include"front_end_params.h"
#include"pattern_inference.h"
class expr_pattern_match {
class expr_pattern_match : public pattern_database {
enum instr_kind {
BACKTRACK,
@ -132,8 +133,8 @@ class expr_pattern_match {
public:
expr_pattern_match(ast_manager & manager);
~expr_pattern_match();
bool match_quantifier(quantifier* qf, app_ref_vector& patterns, unsigned& weight);
void initialize(char const * database);
virtual bool match_quantifier(quantifier * qf, app_ref_vector & patterns, unsigned & weight);
virtual void initialize(char const * database);
void display(std::ostream& out) const;
private:

View file

@ -26,7 +26,6 @@ Revision History:
#include"spc_prover.h"
#include"model.h"
#include"model_v2_pp.h"
#include"expr2dot.h"
#include"solver.h"
#include"smt_strategic_solver.h"
#include"cmd_context.h"

View file

@ -45,11 +45,8 @@ Revision History:
#include"well_sorted.h"
#include "str_hashtable.h"
#include "front_end_params.h"
#include "z3_private.h"
#include "stopwatch.h"
#include "dl_rule.h"
// private method defined in z3.cpp:
front_end_params& Z3_API Z3_get_parameters(__in Z3_context c);
front_end_params& Z3_API Z3_get_parameters(Z3_context c);
class id_param_info {
symbol m_string;

Some files were not shown because too many files have changed in this diff Show more