summaryrefslogtreecommitdiff
path: root/src/util/result.h
diff options
context:
space:
mode:
authorMorgan Deters <mdeters@gmail.com>2012-06-08 21:21:42 +0000
committerMorgan Deters <mdeters@gmail.com>2012-06-08 21:21:42 +0000
commit58372a2ad23298810ae886a16db3c57f9df251af (patch)
tree7dd58f171e5b972f883a106f404aba989065c179 /src/util/result.h
parentf1b4a985be64e08b1a440b1eaf75d3f8e2105d01 (diff)
Extend Printer infrastructure also to the "Result" class, meaning that different output languages can write "sat", "unsat", etc., in different ways. No output is changed by this commit, but the flexibility is added that Francois wanted at today's meeting.
Diffstat (limited to 'src/util/result.h')
-rw-r--r--src/util/result.h13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/util/result.h b/src/util/result.h
index ac52ee382..f0cf3f20e 100644
--- a/src/util/result.h
+++ b/src/util/result.h
@@ -55,6 +55,12 @@ public:
VALIDITY_UNKNOWN = 2
};
+ enum Type {
+ TYPE_SAT,
+ TYPE_VALIDITY,
+ TYPE_NONE
+ };
+
enum UnknownExplanation {
REQUIRES_FULL_CHECK,
INCOMPLETE,
@@ -71,11 +77,9 @@ public:
private:
enum Sat d_sat;
enum Validity d_validity;
- enum { TYPE_SAT, TYPE_VALIDITY, TYPE_NONE } d_which;
+ enum Type d_which;
enum UnknownExplanation d_unknownExplanation;
- friend std::ostream& CVC4::operator<<(std::ostream& out, const Result& r);
-
public:
Result() :
d_sat(SAT_UNKNOWN),
@@ -126,6 +130,9 @@ public:
bool isUnknown() const {
return isSat() == SAT_UNKNOWN && isValid() == VALIDITY_UNKNOWN;
}
+ Type getType() const {
+ return d_which;
+ }
bool isNull() const {
return d_which == TYPE_NONE;
}
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback