summaryrefslogtreecommitdiff
path: root/src/theory/logic_info.h
diff options
context:
space:
mode:
authorMorgan Deters <mdeters@cs.nyu.edu>2013-05-28 13:29:59 -0400
committerMorgan Deters <mdeters@cs.nyu.edu>2013-05-28 16:30:14 -0400
commit735bf7daa07b016aa7964cabdcef27a918d4a96a (patch)
tree2b322d405693ceea219b70ddcf3dc3e14e47b283 /src/theory/logic_info.h
parent7709fff002e3345bd727eaef2677e28830efb84d (diff)
Standardize SMT-LIBv2 set of logics to use LogicInfo.
Previously, SMT-LIB logics were treated specially, as in SMT-LIB v1.2. This led to inconsistencies---such as nonstandard logics like "QF_LIRA" being accepted in set-logic but not providing the "Real" sort. Now, the LogicInfo is used and queried, so nonstandard logics should work fine and declare the correct symbols. SMT-LIB v1.2, unfortunately, can't take advantage of this fully since symbols like "Array" have substantially different meanings in different logics.
Diffstat (limited to 'src/theory/logic_info.h')
-rw-r--r--src/theory/logic_info.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/theory/logic_info.h b/src/theory/logic_info.h
index c7b5c58f9..2448898c0 100644
--- a/src/theory/logic_info.h
+++ b/src/theory/logic_info.h
@@ -155,21 +155,25 @@ public:
/** Are integers in this logic? */
bool areIntegersUsed() const {
CheckArgument(d_locked, *this, "This LogicInfo isn't locked yet, and cannot be queried");
+ CheckArgument(isTheoryEnabled(theory::THEORY_ARITH), *this, "Arithmetic not used in this LogicInfo; cannot ask whether integers are used");
return d_integers;
}
/** Are reals in this logic? */
bool areRealsUsed() const {
CheckArgument(d_locked, *this, "This LogicInfo isn't locked yet, and cannot be queried");
+ CheckArgument(isTheoryEnabled(theory::THEORY_ARITH), *this, "Arithmetic not used in this LogicInfo; cannot ask whether reals are used");
return d_reals;
}
/** Does this logic only linear arithmetic? */
bool isLinear() const {
CheckArgument(d_locked, *this, "This LogicInfo isn't locked yet, and cannot be queried");
+ CheckArgument(isTheoryEnabled(theory::THEORY_ARITH), *this, "Arithmetic not used in this LogicInfo; cannot ask whether it's linear");
return d_linear || d_differenceLogic;
}
/** Does this logic only permit difference reasoning? (implies linear) */
bool isDifferenceLogic() const {
CheckArgument(d_locked, *this, "This LogicInfo isn't locked yet, and cannot be queried");
+ CheckArgument(isTheoryEnabled(theory::THEORY_ARITH), *this, "Arithmetic not used in this LogicInfo; cannot ask whether it's difference logic");
return d_differenceLogic;
}
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback