Skip to content

Commit

Permalink
Merge from my post-smtcomp branch. Includes:
Browse files Browse the repository at this point in the history
Dumping infrastructure.  Can dump preprocessed queries and clauses.  Can
also dump queries (for testing with another solver) to see if any conflicts
are missed, T-propagations are missed, all lemmas are T-valid, etc.  For a
full list of options see --dump=help.

CUDD building much cleaner.

Documentation and assertion fixes.

Printer improvements, printing of commands in language-defined way, etc.

Typechecker stuff in expr package now autogenerated, no need to manually
edit the expr package when adding a new theory.

CVC3 compatibility layer (builds as libcompat).

SWIG detection and language binding support (infrastructure).

Support for some Z3 extended commands (like datatypes) in SMT-LIBv2 mode
(when not in compliance mode).

Copyright and file headers regenerated.
  • Loading branch information
mdeters committed Sep 2, 2011
1 parent 74770f1 commit 1d18e5e
Show file tree
Hide file tree
Showing 344 changed files with 23,839 additions and 4,031 deletions.
9 changes: 0 additions & 9 deletions INSTALL

This file was deleted.

24 changes: 18 additions & 6 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ SUBDIRS = src test contrib

.PHONY: units systemtests regress regress0 regress1 regress2 regress3
systemtests regress regress0 regress1 regress2 regress3: all
(cd test && $(MAKE) $(AM_MAKEFLAGS) $@) || exit 1
+(cd test && $(MAKE) $(AM_MAKEFLAGS) $@) || exit 1
units: all
(cd test && $(MAKE) $(AM_MAKEFLAGS) $@) || exit 1
+(cd test && $(MAKE) $(AM_MAKEFLAGS) $@) || exit 1

LCOV = lcov
GENHTML = genhtml
Expand All @@ -29,7 +29,7 @@ if COVERAGE_ENABLED
# work...)
lcov: all
$(LCOV) -z -d .
$(MAKE) check -C test/unit
+$(MAKE) check -C test/unit
$(LCOV) -c -d . -t cvc4_units -o cvc4-coverage-full.info
$(LCOV) -o cvc4-coverage.info -r cvc4-coverage-full.info $(LCOV_EXCLUDES)
mkdir -p "@top_srcdir@/html"
Expand All @@ -40,7 +40,7 @@ lcov: all

lcov-all: all
$(LCOV) -z -d .
$(MAKE) check -C test
+$(MAKE) check -C test
$(LCOV) -c -d . -t cvc4_units -o cvc4-coverage-full.info
$(LCOV) -o cvc4-coverage.info -r cvc4-coverage-full.info $(LCOV_EXCLUDES)
mkdir -p "@top_srcdir@/html"
Expand All @@ -53,7 +53,7 @@ lcov-all: all
# modules/test-types; unfortunately lcov 1.8 directory paths
# are broken(?) or at least different than 1.7
lcov18: all
@for testtype in public black white; do \
+@for testtype in public black white; do \
echo; echo "=== Collecting coverage data from $$testtype unit tests ==="; \
echo $(LCOV) -z -d .; \
$(LCOV) -z -d . || exit 1; \
Expand Down Expand Up @@ -90,6 +90,18 @@ EXTRA_DIST = \
Makefile.subdir \
config/build-type \
config/mkbuilddir \
config/doxygen.cfg
config/doxygen.cfg \
doc/cvc4.1.in \
doc/cvc4.5.in \
doc/libcvc4.3.in \
doc/libcvc4parser.3.in \
doc/libcvc4compat.3.in
man_MANS = \
doc/cvc4.1 \
doc/cvc4.5 \
doc/libcvc4.3 \
doc/libcvc4parser.3 \
doc/libcvc4compat.3

dist-hook:
cp -p "$(srcdir)/Makefile" "$(distdir)/Makefile"
33 changes: 23 additions & 10 deletions Makefile.builds.in
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ libdir = @libdir@
abs_builddir = @abs_builddir@
distdir = @PACKAGE@-@VERSION@

# Are we building the libcvc4compat library ?
CVC4_BUILD_LIBCOMPAT = @CVC4_BUILD_LIBCOMPAT@

# Are we building static/dynamic libraries/binaries? One or the other can be
# on, or both.
BUILDING_STATIC = @BUILDING_STATIC@
Expand All @@ -41,7 +44,7 @@ STATIC_BINARY = @STATIC_BINARY@
_default_build_: all
all:
# build the current build profile
(cd $(CURRENT_BUILD) && $(MAKE) $@)
+(cd $(CURRENT_BUILD) && $(MAKE) $@)
# set up builds/$(CURRENT_BUILD)/...prefix.../bin
# and builds/$(CURRENT_BUILD)/...prefix.../lib
$(mkinstalldirs) "$(CURRENT_BUILD)$(bindir)" "$(CURRENT_BUILD)$(libdir)"
Expand All @@ -53,6 +56,12 @@ all:
$(CURRENT_BUILD)/libtool --mode=install install -v \
$(CURRENT_BUILD)/src/parser/libcvc4parser.la \
"$(abs_builddir)$(libdir)"
ifeq ($(CVC4_BUILD_LIBCOMPAT),yes)
# install libcvc4compat
$(CURRENT_BUILD)/libtool --mode=install install -v \
$(CURRENT_BUILD)/src/compat/libcvc4compat.la \
"$(abs_builddir)$(libdir)"
endif
ifeq ($(BUILDING_SHARED)$(STATIC_BINARY),10)
# if we're building shared libs and the binary is not static, relink
# the handling with empty $relink_command is a hack for Mac OS
Expand Down Expand Up @@ -85,6 +94,10 @@ endif
$(CURRENT_BUILD)/libtool --mode=install install -v $(CURRENT_BUILD)/src/libcvc4.la "`pwd`$(libdir)"
# install libcvc4parser
$(CURRENT_BUILD)/libtool --mode=install install -v $(CURRENT_BUILD)/src/parser/libcvc4parser.la "`pwd`$(libdir)"
ifeq ($(CVC4_BUILD_LIBCOMPAT),yes)
# install libcvc4compat
$(CURRENT_BUILD)/libtool --mode=install install -v $(CURRENT_BUILD)/src/compat/libcvc4compat.la "`pwd`$(libdir)"
endif
ifeq ($(BUILDING_SHARED)$(STATIC_BINARY),10)
# if we're building shared libs and the binary is not static, relink
# the handling with empty $relink_command is a hack for Mac OS
Expand All @@ -109,31 +122,31 @@ endif
test -e lib || ln -sfv ".$(libdir)" lib
test -e bin || ln -sfv ".$(bindir)" bin

check test units regress: all
(cd $(CURRENT_BUILD)/test && $(MAKE) $@)
check test units systemtests regress: all
+(cd $(CURRENT_BUILD)/test && $(MAKE) $@)
units%:
(cd $(CURRENT_BUILD)/test && $(MAKE) units TEST_PREFIX=$(subst units:,,$@))
+(cd $(CURRENT_BUILD)/test && $(MAKE) units TEST_PREFIX=$(subst units:,,$@))
regress%: all
(cd $(CURRENT_BUILD)/test && $(MAKE) $@)
+(cd $(CURRENT_BUILD)/test && $(MAKE) $@)

dist:
(cd $(CURRENT_BUILD) && $(MAKE) $@)
+(cd $(CURRENT_BUILD) && $(MAKE) $@)
$(install_sh) \
$(CURRENT_BUILD)/$(distdir).tar.gz \
"`pwd`"

TAGS tags:
(cd $(CURRENT_BUILD) && $(MAKE) $@)
+(cd $(CURRENT_BUILD) && $(MAKE) $@)
ln -sf $(CURRENT_BUILD)/TAGS .

.PHONY: TAGS tags

.PHONY: doc-builds doc-prereq
doc-builds: doc-prereq
(cd $(CURRENT_BUILD) && $(MAKE) doxygen-doc)
+(cd $(CURRENT_BUILD) && $(MAKE) doxygen-doc)
doc-prereq:
(cd $(CURRENT_BUILD) && for dir in `find . -name Makefile | xargs grep -l BUILT_SOURCES`; do (cd `dirname "$$dir"`; (cat Makefile; echo 'doc-prereq: $$(BUILT_SOURCES)') | make -f- doc-prereq); done)
+(cd $(CURRENT_BUILD) && for dir in `find . -name Makefile | xargs grep -l BUILT_SOURCES`; do (cd `dirname "$$dir"`; (cat Makefile; echo 'doc-prereq: $$(BUILT_SOURCES)') | $(MAKE) -f- doc-prereq); done)

# any other target than the default doesn't do the extra stuff above
%:
(cd $(CURRENT_BUILD) && $(MAKE) $@)
+(cd $(CURRENT_BUILD) && $(MAKE) $@)
41 changes: 29 additions & 12 deletions README
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
This is a prerelease version of CVC4; distribution is restricted.
This is a prerelease version of CVC4.

For a suggestion of editing CVC4 code with emacs, see README.emacs.
*** Quick-start instructions

To build, you'll need reasonably new automake, autoconf, and libtool
installed (see below). Execute,
Expand Down Expand Up @@ -33,19 +33,32 @@ Optional: CLN v1.3 (Class Library for Numbers)
Optional: CUDD v2.4.2 (Colorado University Decision Diagram package)
Optional: GNU Readline library (for an improved interactive experience)

CUDD, if desired, must be installed in a special manner. The default
distribution from vlsi.colorado.edu doesn't build shared objects,
and names things that make it difficult to compose software
dependences (e.g. a "libutil" is distributed). So we packaged our
own version of cudd that changes only its build process, making it
play nicely with libtool and packaging all the various cudd libraries
into just a few. This version must be used for cvc4, and is available
from the CVC4 apt repository by dropping the following line into your
/etc/apt/sources.list:
CUDD, if desired, must be installed delicately. The CVC4 configure
script attempts to auto-detect the locations and names of CUDD headers
and libraries the way that the Fedora RPMs install them, the way that
our NYU-provided Debian packages install them, and the way they exist
when you download and build the CUDD sources directly. If you install
from Fedora RPMs or our Debian packages (remember, you need the C++
development package for CVC4), the process should be completely
automatic, since the libraries and headers are installed in a standard
location. If you download the sources yourself, you need to build
them in a special way. Fortunately, the "contrib/build-cudd-with-libtool.sh"
script in the CVC4 source tree does exactly what you need: it patches
the CUDD makefiles to use libtool, builds the libtool libraries, then
reverses the patch to leave the makefiles as they were. Once you
run this script on an unpacked CUDD 2.4.2 source distribution, then
CVC4's configure script should pick up the libraries if you provide
--with-cudd-dir=/PATH/TO/CUDD/SOURCES.

If you want to force linking to CUDD, provide --with-cudd to the
configure script; this makes it a hard requirement rather than an
optional add-on.

The NYU-provided Debian packaging of CUDD 2.4.2 is here:

deb http://goedel.cims.nyu.edu/cvc4-builds/debian unstable/

The debian source package "cudd", available from the same repository,
The Debian source package "cudd", available from the same repository,
includes a diff of all changes made to cudd makefiles.

*** Build dependencies
Expand All @@ -58,3 +71,7 @@ Autoconf v2.61
Libtool v2.2
ANTLR3 v3.2

*** Emacs mode

For a suggestion of editing CVC4 code with emacs, see README.emacs.

4 changes: 2 additions & 2 deletions autogen.sh
Original file line number Diff line number Diff line change
Expand Up @@ -287,9 +287,9 @@ if [ "x$AUTOCONF_OPTIONS" = "x" ] ; then
AUTOCONF_OPTIONS="-f"
fi
if [ "x$AUTOMAKE_OPTIONS" = "x" ] ; then
AUTOMAKE_OPTIONS="-a -c -f"
AUTOMAKE_OPTIONS="-a -c -f -Wno-portability"
fi
ALT_AUTOMAKE_OPTIONS="-a -c"
ALT_AUTOMAKE_OPTIONS="-a -c -Wno-portability"
if [ "x$LIBTOOLIZE_OPTIONS" = "x" ] ; then
LIBTOOLIZE_OPTIONS="--automake -c -f"
fi
Expand Down
102 changes: 102 additions & 0 deletions config/bindings.m4
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
# CVC4_SUPPORTED_BINDINGS
# -----------------------
# Supported language bindings for CVC4.
AC_DEFUN([CVC4_SUPPORTED_BINDINGS],
[java,csharp,perl,php,python,ruby,tcl,ocaml])

# CVC4_CHECK_BINDINGS(DEFAULT_BINDINGS_LIST)
# ------------------------------------------
# Check for user language binding preferences, and what is possible
# to build on the build host.
AC_DEFUN([CVC4_CHECK_BINDINGS], [
dnl Check for SWIG (for building language bindings)
noswig=no
m4_foreach(lang,[CVC4_SUPPORTED_BINDINGS],
[[cvc4_build_]]lang[[_bindings=no
]])
AC_ARG_VAR(SWIG, [SWIG binary (used to generate language bindings)])
AC_ARG_WITH([swig],
[AS_HELP_STRING([--with-swig=BINARY], [path to swig binary])],
[if test "$withval" = no; then noswig=yes; else SWIG="$withval"; fi])
AC_ARG_ENABLE([language-bindings],
[AS_HELP_STRING([--enable-language-bindings=][CVC4_SUPPORTED_BINDINGS], [specify language bindings to build])],
[cvc4_check_for_bindings=no; if test "$enableval" = no; then try_bindings=; else try_bindings="$enableval"; fi],
[cvc4_check_for_bindings=yes; try_bindings=])
CVC4_LANGUAGE_BINDINGS=
if test "$noswig" = yes; then
AC_MSG_WARN([use of swig disabled by user.])
SWIG=
if test "$cvc4_check_for_bindings" = no -a -n "$try_bindings"; then
AC_MSG_ERROR([language bindings requested by user, but swig disabled.])
fi
else
if test -z "$SWIG"; then
AC_CHECK_PROGS(SWIG, swig, swig, [])
else
AC_CHECK_PROG(SWIG, "$SWIG", "$SWIG", [])
fi
if test -z "$SWIG"; then
AC_MSG_WARN([language bindings disabled, swig not found.])
if test "$cvc4_check_for_bindings" = no -a -n "$try_bindings"; then
AC_MSG_ERROR([language bindings requested by user, but swig disabled.])
fi
else
AC_MSG_CHECKING([for requested user language bindings])
if test "$cvc4_check_for_bindings" = yes; then
try_bindings='$1'
else
try_bindings=$(echo "$try_bindings" | sed 's/,/ /g')
fi
AC_MSG_RESULT([$try_bindings])
JAVA_INCLUDES=
for binding in $try_bindings; do
binding_error=no
AC_MSG_CHECKING([for availability of $binding binding])
case "$binding" in
c++) AC_MSG_RESULT([C++ is built by default]);;
java)
JAVA_INCLUDES="-I/usr/lib/jvm/java-6-sun-1.6.0.26/include -I/usr/lib/jvm/java-6-sun-1.6.0.26/include/linux"
cvc4_build_java_binding=yes
AC_MSG_RESULT([Java support will be built]);;
csharp)
binding_error=yes
AC_MSG_RESULT([$binding not supported yet]);;
perl)
binding_error=yes
AC_MSG_RESULT([$binding not supported yet]);;
php)
binding_error=yes
AC_MSG_RESULT([$binding not supported yet]);;
python)
binding_error=yes
AC_MSG_RESULT([$binding not supported yet]);;
ruby)
binding_error=yes
AC_MSG_RESULT([$binding not supported yet]);;
tcl)
binding_error=yes
AC_MSG_RESULT([$binding not supported yet]);;
ocaml)
binding_error=yes
AC_MSG_RESULT([$binding not supported yet]);;
*) AC_MSG_RESULT([unknown binding]); binding_error=yes;;
esac
if test "$binding_error" = yes -a "$cvc4_check_for_bindings" = no; then
AC_MSG_ERROR([Language binding \`$binding' requested by user, but it cannot be built.])
fi
CVC4_LANGUAGE_BINDINGS="${CVC4_LANGUAGE_BINDINGS:+$CVC4_LANGUAGE_BINDINGS }$binding"
done
fi
fi
m4_foreach([lang], [CVC4_SUPPORTED_BINDINGS],
[AM_CONDITIONAL([CVC4_LANGUAGE_BINDING_]m4_toupper(lang), [test "$cvc4_build_]lang[_bindings" = yes])
])dnl
AC_SUBST(SWIG)
AC_SUBST(JAVA_INCLUDES)
AC_SUBST(CVC4_LANGUAGE_BINDINGS)
])# CVC4_CHECK_BINDINGS
Loading

0 comments on commit 1d18e5e

Please sign in to comment.