summaryrefslogtreecommitdiff
path: root/src/theory/logic_info.h
diff options
context:
space:
mode:
authorMorgan Deters <mdeters@gmail.com>2012-08-16 22:41:07 +0000
committerMorgan Deters <mdeters@gmail.com>2012-08-16 22:41:07 +0000
commit958b0b56aad79df431376344420106115ab23778 (patch)
tree803931308136c01077f67c3a6092920c045ebf8d /src/theory/logic_info.h
parent7b624d5052e196eb7d465a1979263fa1e3376f65 (diff)
The SmtEngine now ensures that setLogicInternal() is called even if there is no explicit setLogic(). This is important for the CVC language, where the parser doesn't ensure that setLogic() is called, and for API uses. setLogicInternal() should be called in order to properly set up heuristics, even if the logic is just ALL_SUPPORTED.
This means that the CVC language can now take advantage of statistics. Also added the ability to set the logic from CVC presentation language via (e.g.) OPTION "logic" "QF_UFLIA"; Disabled the justification decision heuristic for ALL_SUPPORTED, as it interferes with incrementality. Kshitij may have a fix (I warned him about this commit).
Diffstat (limited to 'src/theory/logic_info.h')
-rw-r--r--src/theory/logic_info.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/theory/logic_info.h b/src/theory/logic_info.h
index 7fa6e157f..36b71e931 100644
--- a/src/theory/logic_info.h
+++ b/src/theory/logic_info.h
@@ -108,6 +108,7 @@ public:
Assert(d_locked, "This LogicInfo isn't locked yet, and cannot be queried");
return d_sharingTheories > 1;
}
+
/** Is the given theory module active in this logic? */
bool isTheoryEnabled(theory::TheoryId theory) const {
Assert(d_locked, "This LogicInfo isn't locked yet, and cannot be queried");
@@ -120,6 +121,22 @@ public:
return isTheoryEnabled(theory::THEORY_QUANTIFIERS) || isTheoryEnabled(theory::THEORY_REWRITERULES);
}
+ /** Is this the all-inclusive logic? */
+ bool hasEverything() const {
+ Assert(d_locked, "This LogicInfo isn't locked yet, and cannot be queried");
+ LogicInfo everything;
+ everything.lock();
+ return *this == everything;
+ }
+
+ /** Is this the all-exclusive logic? (Here, that means propositional logic) */
+ bool hasNothing() const {
+ Assert(d_locked, "This LogicInfo isn't locked yet, and cannot be queried");
+ LogicInfo nothing("");
+ nothing.lock();
+ return *this == nothing;
+ }
+
/**
* Is this a pure logic (only one "true" background theory). Quantifiers
* can exist in such logics though; to test for quantifier-free purity,
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback