// Set the options for the theoryOf
if(!options::theoryOfMode.wasSetByUser()) {
if(d_logic.isSharingEnabled() && !d_logic.isTheoryEnabled(THEORY_BV)) {
- Theory::setTheoryOfMode(THEORY_OF_TERM_BASED);
- } else {
- Theory::setTheoryOfMode(THEORY_OF_TYPE_BASED);
+ Trace("smt") << "setting theoryof-mode to term-based" << endl;
+ options::theoryOfMode.set(THEORY_OF_TERM_BASED);
}
- } else {
- Theory::setTheoryOfMode(options::theoryOfMode());
}
// by default, symmetry breaker is on only for QF_UF
module THEORY "theory/options.h" Theory layer
-expert-option theoryOfMode --theoryof-mode=MODE CVC4::theory::TheoryOfMode :handler CVC4::theory::stringToTheoryOfMode :handler-include "theory/options_handlers.h" :default CVC4::theory::THEORY_OF_TYPE_BASED :include "theory/theoryof_mode.h"
- mode for theoryof
+expert-option theoryOfMode theoryof-mode --theoryof-mode=MODE CVC4::theory::TheoryOfMode :handler CVC4::theory::stringToTheoryOfMode :handler-include "theory/options_handlers.h" :default CVC4::theory::THEORY_OF_TYPE_BASED :include "theory/theoryof_mode.h" :read-write
+ mode for Theory::theoryof()
option - use-theory --use-theory=NAME argument :handler CVC4::theory::useTheory :handler-include "theory/options_handlers.h"
use alternate theory implementation NAME (--use-theory=help for a list)
/** Default value for the uninterpreted sorts is the UF theory */
TheoryId Theory::s_uninterpretedSortOwner = THEORY_UF;
-/** By default, we use the type based theoryOf */
-TheoryOfMode Theory::s_theoryOfMode = THEORY_OF_TYPE_BASED;
-
std::ostream& operator<<(std::ostream& os, Theory::Effort level){
switch(level){
case Theory::EFFORT_STANDARD:
#include "theory/substitutions.h"
#include "theory/output_channel.h"
#include "theory/logic_info.h"
+#include "theory/options.h"
#include "theory/theoryof_mode.h"
#include "context/context.h"
#include "context/cdlist.h"
void printFacts(std::ostream& os) const;
void debugPrintFacts() const;
- /** Mode of the theoryOf operation */
- static TheoryOfMode s_theoryOfMode;
-
public:
/**
* Returns the ID of the theory responsible for the given node.
*/
static inline TheoryId theoryOf(TNode node) {
- return theoryOf(s_theoryOfMode, node);
- }
-
- /** Set the theoryOf mode */
- static void setTheoryOfMode(TheoryOfMode mode) {
- s_theoryOfMode = mode;
+ return theoryOf(options::theoryOfMode(), node);
}
/**
}
/**
- * Set the owner of the uninterpreted sort.
+ * Get the owner of the uninterpreted sort.
*/
static TheoryId getUninterpretedSortOwner() {
return s_uninterpretedSortOwner;
** Option selection for theoryOf() operation.
**/
-#pragma once
-
#include "cvc4_public.h"
+#pragma once
+
namespace CVC4 {
namespace theory {
THEORY_OF_TERM_BASED
};/* enum TheoryOfMode */
+inline std::ostream& operator<<(std::ostream& out, TheoryOfMode m) throw() CVC4_PUBLIC;
+
+inline std::ostream& operator<<(std::ostream& out, TheoryOfMode m) throw() {
+ switch(m) {
+ case THEORY_OF_TYPE_BASED: return out << "THEORY_OF_TYPE_BASED";
+ case THEORY_OF_TERM_BASED: return out << "THEORY_OF_TERM_BASED";
+ default: return out << "TheoryOfMode!UNKNOWN";
+ }
+
+ Unreachable();
+}
+
}/* CVC4::theory namespace */
}/* CVC4 namespace */