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;
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;
193 void enableEverything();
199 void disableEverything();
231 void enableIntegers();
233 void disableIntegers();
239 void arithOnlyDifference();
241 void arithOnlyLinear();
243 void arithNonLinear();
248 void lock() { d_locked =
true; }
258 CheckArgument(isLocked() && other.
isLocked(), *
this,
"This LogicInfo isn't locked yet, and cannot be queried");
260 if(d_theories[
id] != other.d_theories[
id]) {
264 CheckArgument(d_sharingTheories == other.d_sharingTheories, *
this,
"LogicInfo internal inconsistency");
267 d_integers == other.d_integers &&
268 d_reals == other.d_reals &&
269 d_linear == other.d_linear &&
270 d_differenceLogic == other.d_differenceLogic;
277 return !(*
this == other);
281 return *
this >= other && *
this != other;
285 return *
this <= other && *
this != other;
289 CheckArgument(isLocked() && other.
isLocked(), *
this,
"This LogicInfo isn't locked yet, and cannot be queried");
291 if(d_theories[
id] && !other.d_theories[
id]) {
295 CheckArgument(d_sharingTheories <= other.d_sharingTheories, *
this,
"LogicInfo internal inconsistency");
298 (!d_integers || other.d_integers) &&
299 (!d_reals || other.d_reals) &&
300 (d_linear || !other.d_linear) &&
301 (d_differenceLogic || !other.d_differenceLogic);
308 CheckArgument(isLocked() && other.
isLocked(), *
this,
"This LogicInfo isn't locked yet, and cannot be queried");
310 if(!d_theories[
id] && other.d_theories[
id]) {
314 CheckArgument(d_sharingTheories >= other.d_sharingTheories, *
this,
"LogicInfo internal inconsistency");
317 (d_integers || !other.d_integers) &&
318 (d_reals || !other.d_reals) &&
319 (!d_linear || other.d_linear) &&
320 (!d_differenceLogic || other.d_differenceLogic);
328 return *this <= other || *this >= other;
bool hasNothing() const
Is this the all-exclusive logic? (Here, that means propositional logic)
bool areIntegersUsed() const
Are integers in this logic?
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.
bool isLinear() const
Does this logic only linear arithmetic?
bool operator>(const LogicInfo &other) const
Is this LogicInfo "greater than" (does it contain everything and more) the other? ...
void CheckArgument(bool cond, const T &arg, const char *fmt,...)
std::ostream & operator<<(std::ostream &out, const Result &r)
const TheoryId THEORY_FIRST
bool isQuantified() const
Is this a quantified logic?
void enableQuantifiers()
Quantifiers are a special case, since two theory modules handle them.
bool operator<(const LogicInfo &other) const
Is this LogicInfo "less than" (does it contain strictly less) the other?
This is CVC4 release version For build and installation please see the INSTALL file included with this distribution This first official release of CVC4 is the result of more than three years of efforts by researchers at New York University and The University of Iowa The project leaders are Clark please refer to the AUTHORS file in the source distribution CVC4 is a tool for determining the satisfiability of a first order formula modulo a first order CVC CVC3 but does not directly incorporate code from any previous version CVC4 is intended to be an open and extensible SMT engine It can be used as a stand alone tool or as a library It has been designed to increase the performance and reduce the memory overhead of its predecessors It is written entirely in C and is released under a free software see the INSTALL file that comes with this distribution We recommend that you visit our CVC4 tutorials online please write to the cvc users cs nyu edu mailing list *if you need to report a bug with CVC4
bool operator<=(const LogicInfo &other) const
Is this LogicInfo "less than or equal" the other?
This is CVC4 release version For build and installation please see the INSTALL file included with this distribution This first official release of CVC4 is the result of more than three years of efforts by researchers at New York University and The University of Iowa The project leaders are Clark please refer to the AUTHORS file in the source distribution CVC4 is a tool for determining the satisfiability of a first order formula modulo a first order theory(or a combination of such theories).It is the fourth in the Cooperating Validity Checker family of tools(CVC
bool operator!=(const LogicInfo &other) const
Are these two LogicInfos disequal?
bool operator>=(const LogicInfo &other) const
Is this LogicInfo "greater than or equal" the other?
Macros that should be defined everywhere during the building of the libraries and driver binary...
bool isSharingEnabled() const
Is sharing enabled for this logic?
bool hasEverything() const
Is this the all-inclusive logic?
bool isPure(theory::TheoryId theory) const
Is this a pure logic (only one "true" background theory).
bool isDifferenceLogic() const
Does this logic only permit difference reasoning? (implies linear)
void disableQuantifiers()
Quantifiers are a special case, since two theory modules handle them.
struct CVC4::options::out__option_t out
bool isComparableTo(const LogicInfo &other) const
Are two LogicInfos comparable? That is, is one of <= or > true?
bool areRealsUsed() const
Are reals in this logic?
bool isTheoryEnabled(theory::TheoryId theory) const
Is the given theory module active in this logic?
bool isLocked() const
Check whether this LogicInfo is locked, disallowing further mutation.