if test -z "${enable_muzzle+set}" ; then enable_muzzle=no ; fi
;;
debug) # unoptimized, debug symbols, assertions, tracing, dumping
- CVC4CPPFLAGS=-DCVC4_DEBUG
+ CVC4CPPFLAGS='-DCVC4_DEBUG'
CVC4CXXFLAGS='-fno-inline'
CVC4CFLAGS='-fno-inline'
CVC4LDFLAGS=
[AC_MSG_RESULT([yes])])
AC_LANG_POP([C++])
+# Check whether "long" and "int64_t" are distinct types w.r.t. overloading.
+# Even if they have the same size, they can be distinct, and some platforms
+# can have problems with ambiguous function calls when auto-converting
+# int64_t to long, and others will complain if you overload a function
+# that takes an int64_t with one that takes a long (giving a redefinition
+# error). So we have to keep both happy. Probably the same underlying
+# issue as the hash specialization above, but let's check separately
+# for flexibility.
+AC_MSG_CHECKING([for the relationship between long and int64_t])
+AC_LANG_PUSH([C++])
+AC_COMPILE_IFELSE([AC_LANG_SOURCE([
+#include <stdint.h>
+void foo(long);
+void foo(int64_t);])],
+ [AC_MSG_RESULT([no relationship detected]); CVC4_NEED_INT64_T_OVERLOADS=1],
+ [AC_MSG_RESULT([typedef or similar]); CVC4_NEED_INT64_T_OVERLOADS=0])
+AC_LANG_POP([C++])
+AC_SUBST([CVC4_NEED_INT64_T_OVERLOADS])
+
# Check for ANTLR runantlr script (defined in config/antlr.m4)
AC_PROG_ANTLR
module_global_definitions \
template \
; do
+ echo -n .
eval text="\${text//\\\$\\{$var\\}/\${$var}}"
done
error="$(echo "$text" | grep '.*\${[^}]*}.*' | head -n 1)"
) >"$output.tmp"
+ echo -n .
if diff -q "$output" "$output.tmp" &>/dev/null; then
rm -f "$output.tmp"
else
mv -f "$output.tmp" "$output"
+ echo
echo "regenerated $output"
fi
}
common_manpage_smt_documentation \
remaining_manpage_smt_documentation \
; do
+ echo -n .
eval text="\${text//\\\$\\{$var\\}/\${$var}}"
done
error="$(echo "$text" | grep '.*\${[^}]*}.*' | head -n 1)"
) >"$output.tmp"
-diff -q "$output" "$output.tmp" &>/dev/null || (mv -f "$output.tmp" "$output" && echo "regenerated $output")
+echo -n .
+diff -q "$output" "$output.tmp" &>/dev/null || (mv -f "$output.tmp" "$output" && echo && echo "regenerated $output")
rm -f "$output.tmp"
done
+echo
** Major contributors: none
** Minor contributors (to current version): dejan, cconway, mdeters
** This file is part of the CVC4 prototype.
- ** Copyright (c) 2009, 2010 The Analysis of Computer Systems Group (ACSys)
+ ** Copyright (c) 2009-2012 The Analysis of Computer Systems Group (ACSys)
** Courant Institute of Mathematical Sciences
** New York University
** See the file COPYING in the top-level source directory for licensing
** information.\endverbatim
**
- ** \brief A multiprecision integer constant
+ ** \brief A multi-precision integer constant
**
- ** A multiprecision integer constant.
+ ** A multi-precision integer constant.
**/
-// this is used to avoid a public header dependence on cvc4autoconfig.h
+// these gestures are used to avoid a public header dependence on cvc4autoconfig.h
+
+#if @CVC4_NEED_INT64_T_OVERLOADS@
+# define CVC4_NEED_INT64_T_OVERLOADS
+#endif
+
#if /* use CLN */ @CVC4_USE_CLN_IMP@
# define CVC4_CLN_IMP
#endif /* @CVC4_USE_CLN_IMP@ */
Integer( signed long int z) : d_value(z) {}
Integer(unsigned long int z) : d_value(z) {}
- ~Integer() {}
+#ifdef CVC4_NEED_INT64_T_OVERLOADS
+ Integer( int64_t z) : d_value(static_cast<long>(z)) {}
+ Integer(uint64_t z) : d_value(static_cast<unsigned long>(z)) {}
+#endif /* CVC4_NEED_INT64_T_OVERLOADS */
+ ~Integer() {}
Integer& operator=(const Integer& x){
if(this == &x) return *this;
Integer( signed long int z) : d_value(z) {}
Integer(unsigned long int z) : d_value(z) {}
- ~Integer() {}
+#ifdef CVC4_NEED_INT64_T_OVERLOADS
+ Integer( int64_t z) : d_value(static_cast<long>(z)) {}
+ Integer(uint64_t z) : d_value(static_cast<unsigned long>(z)) {}
+#endif /* CVC4_NEED_INT64_T_OVERLOADS */
+ ~Integer() {}
Integer& operator=(const Integer& x){
if(this == &x) return *this;
** Major contributors: none
** Minor contributors (to current version): dejan, mdeters, cconway
** This file is part of the CVC4 prototype.
- ** Copyright (c) 2009, 2010 The Analysis of Computer Systems Group (ACSys)
+ ** Copyright (c) 2009-2012 The Analysis of Computer Systems Group (ACSys)
** Courant Institute of Mathematical Sciences
** New York University
** See the file COPYING in the top-level source directory for licensing
** A multi-precision rational constant.
**/
-// this is used to avoid a public header dependence on cvc4autoconfig.h
+// these gestures are used to avoid a public header dependence on cvc4autoconfig.h
+
+#if @CVC4_NEED_INT64_T_OVERLOADS@
+# define CVC4_NEED_INT64_T_OVERLOADS
+#endif
+
#if /* use CLN */ @CVC4_USE_CLN_IMP@
# define CVC4_CLN_IMP
#endif /* @CVC4_USE_CLN_IMP@ */
Rational(signed long int n) : d_value(n) { }
Rational(unsigned long int n) : d_value(n) { }
+#ifdef CVC4_NEED_INT64_T_OVERLOADS
+ Rational(int64_t n) : d_value(static_cast<long>(n)) { }
+ Rational(uint64_t n) : d_value(static_cast<unsigned long>(n)) { }
+#endif /* CVC4_NEED_INT64_T_OVERLOADS */
+
/**
* Constructs a canonical Rational from a numerator and denominator.
*/
d_value /= d;
}
+#ifdef CVC4_NEED_INT64_T_OVERLOADS
+ Rational(int64_t n, int64_t d) : d_value(static_cast<long>(n)) {
+ d_value /= static_cast<long>(d);
+ }
+ Rational(uint64_t n, uint64_t d) : d_value(static_cast<unsigned long>(n)) {
+ d_value /= static_cast<unsigned long>(d);
+ }
+#endif /* CVC4_NEED_INT64_T_OVERLOADS */
+
Rational(const Integer& n, const Integer& d) :
d_value(n.get_cl_I())
{
d_value.canonicalize();
}
+#ifdef CVC4_NEED_INT64_T_OVERLOADS
+ Rational(int64_t n) : d_value(static_cast<long>(n), 1) {
+ d_value.canonicalize();
+ }
+ Rational(uint64_t n) : d_value(static_cast<unsigned long>(n), 1) {
+ d_value.canonicalize();
+ }
+#endif /* CVC4_NEED_INT64_T_OVERLOADS */
+
/**
* Constructs a canonical Rational from a numerator and denominator.
*/
d_value.canonicalize();
}
+#ifdef CVC4_NEED_INT64_T_OVERLOADS
+ Rational(int64_t n, int64_t d) : d_value(static_cast<long>(n), static_cast<long>(d)) {
+ d_value.canonicalize();
+ }
+ Rational(uint64_t n, uint64_t d) : d_value(static_cast<unsigned long>(n), static_cast<unsigned long>(d)) {
+ d_value.canonicalize();
+ }
+#endif /* CVC4_NEED_INT64_T_OVERLOADS */
+
Rational(const Integer& n, const Integer& d) :
d_value(n.get_mpz(), d.get_mpz())
{