summaryrefslogtreecommitdiff
path: root/src/theory/theory.cpp
diff options
context:
space:
mode:
authorClark Barrett <barrett@cs.nyu.edu>2013-09-24 16:56:06 -0700
committerClark Barrett <barrett@cs.nyu.edu>2013-09-24 16:56:06 -0700
commitccd1ca4c32e8a3eac8b18911a7b2d32b55203707 (patch)
treecf98ac89e90d4cbeae888886e54f9e833ee3b836 /src/theory/theory.cpp
parent6dc529e6b1d4816e37b106a539592452027e22ac (diff)
Reduce compiler dependencies on substitutions.h,
Some new functionality in substitutions.h/cpp
Diffstat (limited to 'src/theory/theory.cpp')
-rw-r--r--src/theory/theory.cpp23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/theory/theory.cpp b/src/theory/theory.cpp
index a1a835170..9a23d5518 100644
--- a/src/theory/theory.cpp
+++ b/src/theory/theory.cpp
@@ -17,6 +17,7 @@
#include "theory/theory.h"
#include "util/cvc4_assert.h"
#include "theory/quantifiers_engine.h"
+#include "theory/substitutions.h"
#include <vector>
@@ -206,5 +207,27 @@ void Theory::computeRelevantTerms(set<Node>& termSet)
}
+Theory::PPAssertStatus Theory::ppAssert(TNode in, SubstitutionMap& outSubstitutions)
+{
+ if (in.getKind() == kind::EQUAL) {
+ if (in[0].isVar() && !in[1].hasSubterm(in[0])) {
+ outSubstitutions.addSubstitution(in[0], in[1]);
+ return PP_ASSERT_STATUS_SOLVED;
+ }
+ if (in[1].isVar() && !in[0].hasSubterm(in[1])) {
+ outSubstitutions.addSubstitution(in[1], in[0]);
+ return PP_ASSERT_STATUS_SOLVED;
+ }
+ if (in[0].isConst() && in[1].isConst()) {
+ if (in[0] != in[1]) {
+ return PP_ASSERT_STATUS_CONFLICT;
+ }
+ }
+ }
+
+ return PP_ASSERT_STATUS_UNSOLVED;
+}
+
+
}/* CVC4::theory namespace */
}/* CVC4 namespace */
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback