.PHONY: check units
ifeq ($(srcdir:test/%=test),test)
# under the test/ directory, additional subtargets
-.PHONY: regress0 regress1 regress2 regress3
-check units regress0 regress1 regress2 regress3:
+.PHONY: regress regress0 regress1 regress2 regress3
+check units regress regress0 regress1 regress2 regress3:
@if test -e $(builddir); then \
echo cd $(builddir); \
cd $(builddir); \
endif
# synonyms for "check"
-.PHONY: regress test
-regress test: check
+.PHONY: test
+test: check
} else if(s == "invalid") {
d_which = TYPE_VALIDITY;
d_validity = INVALID;
- } else if(s == "unknown") {
- d_which = TYPE_SAT;
- d_sat = SAT_UNKNOWN;
} else if(s == "incomplete") {
d_which = TYPE_SAT;
d_sat = SAT_UNKNOWN;
d_which = TYPE_SAT;
d_sat = SAT_UNKNOWN;
d_unknownExplanation = MEMOUT;
+ } else if(s.size() >= 7 && s.compare(0, 7, "unknown") == 0) {
+ d_which = TYPE_SAT;
+ d_sat = SAT_UNKNOWN;
} else {
IllegalArgument(s, "expected satisfiability/validity result, "
"instead got `%s'", s.c_str());
}
}
-bool Result::operator==(const Result& r) const {
+bool Result::operator==(const Result& r) const throw() {
if(d_which != r.d_which) {
return false;
}
return false;
}
-Result Result::asSatisfiabilityResult() const {
+Result Result::asSatisfiabilityResult() const throw() {
if(d_which == TYPE_SAT) {
return *this;
}
- Assert(d_which == TYPE_VALIDITY);
-
- switch(d_validity) {
+ if(d_which == TYPE_VALIDITY) {
+ switch(d_validity) {
- case INVALID:
- return Result(SAT);
+ case INVALID:
+ return Result(SAT);
- case VALID:
- return Result(UNSAT);
+ case VALID:
+ return Result(UNSAT);
- case VALIDITY_UNKNOWN:
- return Result(SAT_UNKNOWN, d_unknownExplanation);
+ case VALIDITY_UNKNOWN:
+ return Result(SAT_UNKNOWN, d_unknownExplanation);
- default:
- Unhandled(d_validity);
+ default:
+ Unhandled(d_validity);
+ }
}
+
+ // TYPE_NONE
+ return Result(SAT_UNKNOWN, NO_STATUS);
}
-Result Result::asValidityResult() const {
+Result Result::asValidityResult() const throw() {
if(d_which == TYPE_VALIDITY) {
return *this;
}
- Assert(d_which == TYPE_SAT);
-
- switch(d_sat) {
+ if(d_which == TYPE_SAT) {
+ switch(d_sat) {
- case SAT:
- return Result(INVALID);
+ case SAT:
+ return Result(INVALID);
- case UNSAT:
- return Result(VALID);
+ case UNSAT:
+ return Result(VALID);
- case SAT_UNKNOWN:
- return Result(VALIDITY_UNKNOWN, d_unknownExplanation);
+ case SAT_UNKNOWN:
+ return Result(VALIDITY_UNKNOWN, d_unknownExplanation);
- default:
- Unhandled(d_sat);
+ default:
+ Unhandled(d_sat);
+ }
}
+
+ // TYPE_NONE
+ return Result(VALIDITY_UNKNOWN, NO_STATUS);
}
string Result::toString() const {
case Result::INCOMPLETE: out << "INCOMPLETE"; break;
case Result::TIMEOUT: out << "TIMEOUT"; break;
case Result::MEMOUT: out << "MEMOUT"; break;
+ case Result::NO_STATUS: out << "NO_STATUS"; break;
case Result::OTHER: out << "OTHER"; break;
case Result::UNKNOWN_REASON: out << "UNKNOWN_REASON"; break;
default: Unhandled(e);
INCOMPLETE,
TIMEOUT,
MEMOUT,
+ NO_STATUS,
OTHER,
UNKNOWN_REASON
};
return d_unknownExplanation;
}
- bool operator==(const Result& r) const;
- inline bool operator!=(const Result& r) const;
- Result asSatisfiabilityResult() const;
- Result asValidityResult() const;
+ bool operator==(const Result& r) const throw();
+ inline bool operator!=(const Result& r) const throw();
+ Result asSatisfiabilityResult() const throw();
+ Result asValidityResult() const throw();
std::string toString() const;
};/* class Result */
-inline bool Result::operator!=(const Result& r) const {
+inline bool Result::operator!=(const Result& r) const throw() {
return !(*this == r);
}