diff options
Diffstat (limited to 'src/util')
-rw-r--r-- | src/util/Assert.h | 4 | ||||
-rw-r--r-- | src/util/Makefile.am | 3 | ||||
-rw-r--r-- | src/util/array.h | 31 | ||||
-rw-r--r-- | src/util/bitvector.h | 4 | ||||
-rw-r--r-- | src/util/triple.h | 42 |
5 files changed, 79 insertions, 5 deletions
diff --git a/src/util/Assert.h b/src/util/Assert.h index 5333817aa..0809257bf 100644 --- a/src/util/Assert.h +++ b/src/util/Assert.h @@ -211,9 +211,9 @@ extern __thread CVC4_PUBLIC const char* s_debugAssertionFailure; << "An assertion failed during stack unwinding:" << std::endl \ << AssertionException(#cond, __PRETTY_FUNCTION__, __FILE__, __LINE__, ## msg) << std::endl \ << "===========================================" << std::endl; \ - if(s_debugAssertionFailure != NULL) { \ + if(s_debugAssertionFailure != NULL) { \ Warning() << "The propagating exception is:" << std::endl \ - << s_debugAssertionFailure << std::endl \ + << s_debugAssertionFailure << std::endl \ << "===========================================" << std::endl; \ s_debugAssertionFailure = NULL; \ } \ diff --git a/src/util/Makefile.am b/src/util/Makefile.am index 0f6fb5929..e92954340 100644 --- a/src/util/Makefile.am +++ b/src/util/Makefile.am @@ -32,4 +32,5 @@ libutil_la_SOURCES = \ gmp_util.h \ sexpr.h \ stats.h \ - stats.cpp + stats.cpp \ + triple.h diff --git a/src/util/array.h b/src/util/array.h new file mode 100644 index 000000000..274421249 --- /dev/null +++ b/src/util/array.h @@ -0,0 +1,31 @@ +/********************* */ +/*! \file array.h + ** \verbatim + ** Original author: mdeters + ** Major contributors: none + ** Minor contributors (to current version): none + ** This file is part of the CVC4 prototype. + ** Copyright (c) 2009, 2010 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 Array types. + ** + ** Array types. + **/ + +#include "cvc4_public.h" + +#ifndef __CVC4__ARRAY_H_ +#define __CVC4__ARRAY_H_ + +#include <iostream> +#include "util/Assert.h" + +// we get ArrayType right now by #including type.h. +// array.h is still useful for the auto-generated kinds #includes. +#include "expr/type.h" + +#endif /* __CVC4__ARRAY_H_ */ diff --git a/src/util/bitvector.h b/src/util/bitvector.h index 746d9aaaf..0febfddfd 100644 --- a/src/util/bitvector.h +++ b/src/util/bitvector.h @@ -17,6 +17,8 @@ ** \todo document this file **/ +#include "cvc4_public.h" + #ifndef __CVC4__BITVECTOR_H_ #define __CVC4__BITVECTOR_H_ @@ -25,8 +27,6 @@ #include "util/gmp_util.h" #include "util/integer.h" -using namespace std; - namespace CVC4 { class BitVector { diff --git a/src/util/triple.h b/src/util/triple.h new file mode 100644 index 000000000..50bf30c4a --- /dev/null +++ b/src/util/triple.h @@ -0,0 +1,42 @@ +/********************* */ +/*! \file triple.h + ** \verbatim + ** Original author: mdeters + ** Major contributors: none + ** Minor contributors (to current version): none + ** This file is part of the CVC4 prototype. + ** Copyright (c) 2009, 2010 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 Similar to std::pair<>, for triples + ** + ** Similar to std::pair<>, for triples. + **/ + +#include "cvc4_private.h" + +#ifndef __CVC4__TRIPLE_H +#define __CVC4__TRIPLE_H + +namespace CVC4 { + +template <class T1, class T2, class T3> +class triple { +public: + T1 first; + T2 second; + T3 third; +}; + +template <class T1, class T2, class T3> +inline triple<T1, T2, T3> +make_triple(const T1& t1, const T2& t2, const T3& t3) { + return triple<T1, T2, T3>(t1, t2, t3); +} + +}/* CVC4 namespace */ + +#endif /* __CVC4__TRIPLE_H */ |