summaryrefslogtreecommitdiff
path: root/src/util/result.h
diff options
context:
space:
mode:
authorMorgan Deters <mdeters@gmail.com>2012-09-28 17:29:01 +0000
committerMorgan Deters <mdeters@gmail.com>2012-09-28 17:29:01 +0000
commit65f720aac2d497c6e829d9c76638073a10060e7d (patch)
tree357035797e31f96a37dce30cb97ddb0aaf8f3bb7 /src/util/result.h
parentc0c351a89871e0a6881668fa1a8d87349ab8af8e (diff)
Public interface review items:
* Internal uses of CheckArgument changed to AssertArgument/AlwaysAssertArgument() * Make util/Assert.h cvc4_private instead of public, so AssertionException and friends are now internal-only * CheckArgument() throws non-AssertionException * things outside the core library (parsers, driver) use regular C-style assert, or a public exception type. * auto-generated documentation for Smt options and internal options Also, a small fix to SMT-LIBv1 QF_ABV and QF_AUFBV definitions, which were nonstandard.
Diffstat (limited to 'src/util/result.h')
-rw-r--r--src/util/result.h14
1 files changed, 4 insertions, 10 deletions
diff --git a/src/util/result.h b/src/util/result.h
index f0cf3f20e..0894007bc 100644
--- a/src/util/result.h
+++ b/src/util/result.h
@@ -24,16 +24,10 @@
#include <iostream>
#include <string>
-#include "util/Assert.h"
+#include "util/exception.h"
namespace CVC4 {
-// TODO: either templatize Result on its Kind (Sat/Validity) or subclass.
-// TODO: INVALID/SAT provide models, etc?---perhaps just by linking back
-// into the SmtEngine that produced the Result?
-// TODO: make unconstructible except by SmtEngine? That would ensure that
-// any Result in the system is bona fide.
-
class Result;
std::ostream& operator<<(std::ostream& out, const Result& r) CVC4_PUBLIC;
@@ -137,9 +131,9 @@ public:
return d_which == TYPE_NONE;
}
enum UnknownExplanation whyUnknown() const {
- AlwaysAssert( isUnknown(),
- "This result is not unknown, so the reason for "
- "being unknown cannot be inquired of it" );
+ CheckArgument( isUnknown(), this,
+ "This result is not unknown, so the reason for "
+ "being unknown cannot be inquired of it" );
return d_unknownExplanation;
}
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback