cvc4-1.4
|
A LogicInfo instance describes a collection of theory modules and some basic configuration about them. More...
#include <logic_info.h>
Public Member Functions | |
LogicInfo () | |
Constructs a LogicInfo for the most general logic (quantifiers, all background theory modules, ...). | |
LogicInfo (std::string logicString) throw (IllegalArgumentException) | |
Construct a LogicInfo from an SMT-LIB-like logic string. | |
LogicInfo (const char *logicString) throw (IllegalArgumentException) | |
Construct a LogicInfo from an SMT-LIB-like logic string. | |
std::string | getLogicString () const |
Get an SMT-LIB-like logic string. | |
bool | isSharingEnabled () const |
Is sharing enabled for this logic? | |
bool | isTheoryEnabled (theory::TheoryId theory) const |
Is the given theory module active in this logic? | |
bool | isQuantified () const |
Is this a quantified logic? | |
bool | hasEverything () const |
Is this the all-inclusive logic? | |
bool | hasNothing () const |
Is this the all-exclusive logic? (Here, that means propositional logic) | |
bool | isPure (theory::TheoryId theory) const |
Is this a pure logic (only one "true" background theory). | |
bool | areIntegersUsed () const |
Are integers in this logic? | |
bool | areRealsUsed () const |
Are reals in this logic? | |
bool | isLinear () const |
Does this logic only linear arithmetic? | |
bool | isDifferenceLogic () const |
Does this logic only permit difference reasoning? (implies linear) | |
bool | hasCardinalityConstraints () const |
Does this logic allow cardinality constraints? | |
void | setLogicString (std::string logicString) throw (IllegalArgumentException) |
Initialize the LogicInfo with an SMT-LIB-like logic string. | |
void | enableEverything () |
Enable all functionality. | |
void | disableEverything () |
Disable all functionality. | |
void | enableTheory (theory::TheoryId theory) |
Enable the given theory module. | |
void | disableTheory (theory::TheoryId theory) |
Disable the given theory module. | |
void | enableQuantifiers () |
Quantifiers are a special case, since two theory modules handle them. | |
void | disableQuantifiers () |
Quantifiers are a special case, since two theory modules handle them. | |
void | enableIntegers () |
Enable the use of integers in this logic. | |
void | disableIntegers () |
Disable the use of integers in this logic. | |
void | enableReals () |
Enable the use of reals in this logic. | |
void | disableReals () |
Disable the use of reals in this logic. | |
void | arithOnlyDifference () |
Only permit difference arithmetic in this logic. | |
void | arithOnlyLinear () |
Only permit linear arithmetic in this logic. | |
void | arithNonLinear () |
Permit nonlinear arithmetic in this logic. | |
void | lock () |
Lock this LogicInfo, disabling further mutation and allowing queries. | |
bool | isLocked () const |
Check whether this LogicInfo is locked, disallowing further mutation. | |
LogicInfo | getUnlockedCopy () const |
Get a copy of this LogicInfo that is identical, but unlocked. | |
bool | operator== (const LogicInfo &other) const |
Are these two LogicInfos equal? | |
bool | operator!= (const LogicInfo &other) const |
Are these two LogicInfos disequal? | |
bool | operator> (const LogicInfo &other) const |
Is this LogicInfo "greater than" (does it contain everything and more) the other? | |
bool | operator< (const LogicInfo &other) const |
Is this LogicInfo "less than" (does it contain strictly less) the other? | |
bool | operator<= (const LogicInfo &other) const |
Is this LogicInfo "less than or equal" the other? | |
bool | operator>= (const LogicInfo &other) const |
Is this LogicInfo "greater than or equal" the other? | |
bool | isComparableTo (const LogicInfo &other) const |
Are two LogicInfos comparable? That is, is one of <= or > true? | |
A LogicInfo instance describes a collection of theory modules and some basic configuration about them.
Conceptually, it provides a background context for all operations in CVC4. Typically, when CVC4's SmtEngine is created, it is issued a setLogic() command indicating features of the assertions and queries to follow—for example, whether quantifiers are used, whether integers or reals (or both) will be used, etc.
Most places in CVC4 will only ever need to access a const reference to an instance of this class. Such an instance is generally set by the SmtEngine when setLogic() is called. However, mutating member functions are also provided by this class so that it can be used as a more general mechanism (e.g., for communicating to the SmtEngine which theories should be used, rather than having to provide an SMT-LIB string).
Definition at line 45 of file logic_info.h.
CVC4::LogicInfo::LogicInfo | ( | ) |
Constructs a LogicInfo for the most general logic (quantifiers, all background theory modules, ...).
CVC4::LogicInfo::LogicInfo | ( | std::string | logicString | ) | ||
throw | ( | IllegalArgumentException ) |
Construct a LogicInfo from an SMT-LIB-like logic string.
Throws an IllegalArgumentException if the logic string cannot be interpreted.
CVC4::LogicInfo::LogicInfo | ( | const char * | logicString | ) | ||
throw | ( | IllegalArgumentException ) |
Construct a LogicInfo from an SMT-LIB-like logic string.
Throws an IllegalArgumentException if the logic string cannot be interpreted.
|
inline |
Are integers in this logic?
Definition at line 156 of file logic_info.h.
References CVC4::CheckArgument().
|
inline |
Are reals in this logic?
Definition at line 162 of file logic_info.h.
References CVC4::CheckArgument().
void CVC4::LogicInfo::arithNonLinear | ( | ) |
Permit nonlinear arithmetic in this logic.
void CVC4::LogicInfo::arithOnlyDifference | ( | ) |
Only permit difference arithmetic in this logic.
void CVC4::LogicInfo::arithOnlyLinear | ( | ) |
Only permit linear arithmetic in this logic.
void CVC4::LogicInfo::disableEverything | ( | ) |
Disable all functionality.
The result will be a LogicInfo with the BUILTIN and BOOLEAN theories enabled only ("QF_SAT").
void CVC4::LogicInfo::disableIntegers | ( | ) |
Disable the use of integers in this logic.
|
inline |
Quantifiers are a special case, since two theory modules handle them.
Definition at line 227 of file logic_info.h.
void CVC4::LogicInfo::disableReals | ( | ) |
Disable the use of reals in this logic.
void CVC4::LogicInfo::disableTheory | ( | theory::TheoryId | theory | ) |
Disable the given theory module.
THEORY_BUILTIN and THEORY_BOOL cannot be disabled (and if given here, the request will be silently ignored).
void CVC4::LogicInfo::enableEverything | ( | ) |
Enable all functionality.
All theories, plus quantifiers, will be enabled.
void CVC4::LogicInfo::enableIntegers | ( | ) |
Enable the use of integers in this logic.
|
inline |
Quantifiers are a special case, since two theory modules handle them.
Definition at line 220 of file logic_info.h.
void CVC4::LogicInfo::enableReals | ( | ) |
Enable the use of reals in this logic.
void CVC4::LogicInfo::enableTheory | ( | theory::TheoryId | theory | ) |
Enable the given theory module.
std::string CVC4::LogicInfo::getLogicString | ( | ) | const |
Get an SMT-LIB-like logic string.
These are only guaranteed to be SMT-LIB-compliant if an SMT-LIB-compliant string was used in the constructor and no mutating functions were called.
LogicInfo CVC4::LogicInfo::getUnlockedCopy | ( | ) | const |
Get a copy of this LogicInfo that is identical, but unlocked.
|
inline |
Does this logic allow cardinality constraints?
Definition at line 180 of file logic_info.h.
References CVC4::CheckArgument().
|
inline |
Is this the all-inclusive logic?
Definition at line 124 of file logic_info.h.
References CVC4::CheckArgument(), and lock().
|
inline |
Is this the all-exclusive logic? (Here, that means propositional logic)
Definition at line 132 of file logic_info.h.
References CVC4::CheckArgument(), and lock().
|
inline |
Are two LogicInfos comparable? That is, is one of <= or > true?
Definition at line 330 of file logic_info.h.
|
inline |
Does this logic only permit difference reasoning? (implies linear)
Definition at line 174 of file logic_info.h.
References CVC4::CheckArgument().
|
inline |
Does this logic only linear arithmetic?
Definition at line 168 of file logic_info.h.
References CVC4::CheckArgument().
|
inline |
Check whether this LogicInfo is locked, disallowing further mutation.
Definition at line 253 of file logic_info.h.
Referenced by operator<=(), operator==(), and operator>=().
|
inline |
Is this a pure logic (only one "true" background theory).
Quantifiers can exist in such logics though; to test for quantifier-free purity, use "isPure(theory) && !isQuantified()".
Definition at line 144 of file logic_info.h.
References CVC4::CheckArgument().
|
inline |
Is this a quantified logic?
Definition at line 118 of file logic_info.h.
References CVC4::CheckArgument().
|
inline |
Is sharing enabled for this logic?
Definition at line 106 of file logic_info.h.
References CVC4::CheckArgument().
|
inline |
Is the given theory module active in this logic?
Definition at line 112 of file logic_info.h.
References CVC4::CheckArgument().
Referenced by operator<=(), and operator>=().
|
inline |
Lock this LogicInfo, disabling further mutation and allowing queries.
Definition at line 251 of file logic_info.h.
Referenced by hasEverything(), and hasNothing().
|
inline |
Are these two LogicInfos disequal?
Definition at line 279 of file logic_info.h.
|
inline |
Is this LogicInfo "less than" (does it contain strictly less) the other?
Definition at line 287 of file logic_info.h.
|
inline |
Is this LogicInfo "less than or equal" the other?
Definition at line 291 of file logic_info.h.
References CVC4::CheckArgument(), isLocked(), and isTheoryEnabled().
|
inline |
Are these two LogicInfos equal?
Definition at line 260 of file logic_info.h.
References CVC4::CheckArgument(), and isLocked().
|
inline |
Is this LogicInfo "greater than" (does it contain everything and more) the other?
Definition at line 283 of file logic_info.h.
|
inline |
Is this LogicInfo "greater than or equal" the other?
Definition at line 310 of file logic_info.h.
References CVC4::CheckArgument(), isLocked(), and isTheoryEnabled().
void CVC4::LogicInfo::setLogicString | ( | std::string | logicString | ) | ||
throw | ( | IllegalArgumentException ) |
Initialize the LogicInfo with an SMT-LIB-like logic string.
Throws an IllegalArgumentException if the string can't be interpreted.