21 #ifndef __CVC4__LOGIC_INFO_H 22 #define __CVC4__LOGIC_INFO_H 46 mutable std::string d_logicString;
47 std::vector<bool> d_theories;
48 size_t d_sharingTheories;
54 bool d_differenceLogic;
55 bool d_cardinalityConstraints;
103 std::string getLogicString()
const;
107 CheckArgument(d_locked, *
this,
"This LogicInfo isn't locked yet, and cannot be queried");
108 return d_sharingTheories > 1;
113 CheckArgument(d_locked, *
this,
"This LogicInfo isn't locked yet, and cannot be queried");
114 return d_theories[theory];
119 CheckArgument(d_locked, *
this,
"This LogicInfo isn't locked yet, and cannot be queried");
125 CheckArgument(d_locked, *
this,
"This LogicInfo isn't locked yet, and cannot be queried");
128 return *
this == everything;
133 CheckArgument(d_locked, *
this,
"This LogicInfo isn't locked yet, and cannot be queried");
136 return *
this == nothing;
145 CheckArgument(d_locked, *
this,
"This LogicInfo isn't locked yet, and cannot be queried");
148 return isTheoryEnabled(theory) && !isSharingEnabled() &&
149 ( !isTrueTheory(theory) || d_sharingTheories == 1 ) &&
150 ( isTrueTheory(theory) || d_sharingTheories == 0 );
157 CheckArgument(d_locked, *
this,
"This LogicInfo isn't locked yet, and cannot be queried");
163 CheckArgument(d_locked, *
this,
"This LogicInfo isn't locked yet, and cannot be queried");
169 CheckArgument(d_locked, *
this,
"This LogicInfo isn't locked yet, and cannot be queried");
171 return d_linear || d_differenceLogic;
175 CheckArgument(d_locked, *
this,
"This LogicInfo isn't locked yet, and cannot be queried");
177 return d_differenceLogic;
181 CheckArgument(d_locked, *
this,
"This LogicInfo isn't locked yet, and cannot be queried");
182 return d_cardinalityConstraints;
198 void enableEverything();
204 void disableEverything();
234 void enableIntegers();
236 void disableIntegers();
242 void arithOnlyDifference();
244 void arithOnlyLinear();
246 void arithNonLinear();
251 void lock() { d_locked =
true; }
261 CheckArgument(isLocked() && other.
isLocked(), *
this,
"This LogicInfo isn't locked yet, and cannot be queried");
263 if(d_theories[
id] != other.d_theories[
id]) {
267 CheckArgument(d_sharingTheories == other.d_sharingTheories, *
this,
"LogicInfo internal inconsistency");
270 d_integers == other.d_integers &&
271 d_reals == other.d_reals &&
272 d_linear == other.d_linear &&
273 d_differenceLogic == other.d_differenceLogic;
280 return !(*
this == other);
284 return *
this >= other && *
this != other;
288 return *
this <= other && *
this != other;
292 CheckArgument(isLocked() && other.
isLocked(), *
this,
"This LogicInfo isn't locked yet, and cannot be queried");
294 if(d_theories[
id] && !other.d_theories[
id]) {
298 CheckArgument(d_sharingTheories <= other.d_sharingTheories, *
this,
"LogicInfo internal inconsistency");
301 (!d_integers || other.d_integers) &&
302 (!d_reals || other.d_reals) &&
303 (d_linear || !other.d_linear) &&
304 (d_differenceLogic || !other.d_differenceLogic);
311 CheckArgument(isLocked() && other.
isLocked(), *
this,
"This LogicInfo isn't locked yet, and cannot be queried");
313 if(!d_theories[
id] && other.d_theories[
id]) {
317 CheckArgument(d_sharingTheories >= other.d_sharingTheories, *
this,
"LogicInfo internal inconsistency");
320 (d_integers || !other.d_integers) &&
321 (d_reals || !other.d_reals) &&
322 (!d_linear || other.d_linear) &&
323 (!d_differenceLogic || other.d_differenceLogic);
331 return *this <= other || *this >= other;
bool operator!=(const LogicInfo &other) const
Are these two LogicInfos disequal?
bool operator==(const LogicInfo &other) const
Are these two LogicInfos equal?
A LogicInfo instance describes a collection of theory modules and some basic configuration about them...
void lock()
Lock this LogicInfo, disabling further mutation and allowing queries.
void CheckArgument(bool cond, const T &arg, const char *fmt,...)
bool operator>=(const LogicInfo &other) const
Is this LogicInfo "greater than or equal" the other?
bool operator>(const LogicInfo &other) const
Is this LogicInfo "greater than" (does it contain everything and more) the other? ...
bool areRealsUsed() const
Are reals in this logic?
const TheoryId THEORY_FIRST
void enableQuantifiers()
Quantifiers are a special case, since two theory modules handle them.
bool isQuantified() const
Is this a quantified logic?
bool isPure(theory::TheoryId theory) const
Is this a pure logic (only one "true" background theory).
bool hasNothing() const
Is this the all-exclusive logic? (Here, that means propositional logic)
std::ostream & operator<<(std::ostream &out, TypeConstant typeConstant)
bool isSharingEnabled() const
Is sharing enabled for this logic?
bool hasCardinalityConstraints() const
Does this logic allow cardinality constraints?
Macros that should be defined everywhere during the building of the libraries and driver binary...
bool isComparableTo(const LogicInfo &other) const
Are two LogicInfos comparable? That is, is one of <= or > true?
bool isLocked() const
Check whether this LogicInfo is locked, disallowing further mutation.
void disableQuantifiers()
Quantifiers are a special case, since two theory modules handle them.
bool isDifferenceLogic() const
Does this logic only permit difference reasoning? (implies linear)
bool isLinear() const
Does this logic only linear arithmetic?
struct CVC4::options::out__option_t out
bool areIntegersUsed() const
Are integers in this logic?
bool operator<=(const LogicInfo &other) const
Is this LogicInfo "less than or equal" the other?
bool isTheoryEnabled(theory::TheoryId theory) const
Is the given theory module active in this logic?
bool hasEverything() const
Is this the all-inclusive logic?
bool operator<(const LogicInfo &other) const
Is this LogicInfo "less than" (does it contain strictly less) the other?