summaryrefslogtreecommitdiff
path: root/src/expr/uninterpreted_constant.h
diff options
context:
space:
mode:
authorTim King <taking@google.com>2015-12-24 05:38:43 -0500
committerTim King <taking@google.com>2015-12-24 05:38:43 -0500
commita39ad6584c1d61e22e72b53c3838f4f675ed2e19 (patch)
treeed40cb371c41ac285ca2bf41a82254a36134e132 /src/expr/uninterpreted_constant.h
parent87b0fe9ce10d1e5e9ed5a3e7db77f46bf3f68922 (diff)
Miscellaneous fixes
- Splitting the two instances of CheckArgument. The template version is now always defined in base/exception.h and is available in a cvc4_public header. This version has lost its variadic version (due to swig not supporting va_list's). The CPP macro version has been renamed PrettyCheckArgument. (Taking suggestions for a better name.) This is now only defined in base/cvc4_assert.h. Only use this in cvc4_private headers and in .cpp files that can use cvc4_private headers. To use a variadic version of CheckArguments, outside of this scope, you need to duplicate this macro locally. See cvc3_compat.cpp for an example. - Making fitsSignedInt() and fitsUnsignedInt() work more robustly for CLN on 32 bit systems. - Refactoring ArrayStoreAll to avoid potential problems with circular header inclusions. - Changing some headers to use iosfwd when possible.
Diffstat (limited to 'src/expr/uninterpreted_constant.h')
-rw-r--r--src/expr/uninterpreted_constant.h19
1 files changed, 7 insertions, 12 deletions
diff --git a/src/expr/uninterpreted_constant.h b/src/expr/uninterpreted_constant.h
index 13a80a19d..5b2293df6 100644
--- a/src/expr/uninterpreted_constant.h
+++ b/src/expr/uninterpreted_constant.h
@@ -18,26 +18,18 @@
#pragma once
+#include <iosfwd>
+
#include "expr/type.h"
-#include <iostream>
namespace CVC4 {
class CVC4_PUBLIC UninterpretedConstant {
- const Type d_type;
- const Integer d_index;
-
public:
- UninterpretedConstant(Type type, Integer index) throw(IllegalArgumentException) :
- d_type(type),
- d_index(index) {
- //CheckArgument(type.isSort(), type, "uninterpreted constants can only be created for uninterpreted sorts, not `%s'", type.toString().c_str());
- CheckArgument(index >= 0, index, "index >= 0 required for uninterpreted constant index, not `%s'", index.toString().c_str());
- }
+ UninterpretedConstant(Type type, Integer index) throw(IllegalArgumentException);
- ~UninterpretedConstant() throw() {
- }
+ ~UninterpretedConstant() throw() { }
Type getType() const throw() {
return d_type;
@@ -68,6 +60,9 @@ public:
return !(*this < uc);
}
+private:
+ const Type d_type;
+ const Integer d_index;
};/* class UninterpretedConstant */
std::ostream& operator<<(std::ostream& out, const UninterpretedConstant& uc) CVC4_PUBLIC;
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback