summaryrefslogtreecommitdiff
path: root/test/unit
diff options
context:
space:
mode:
authorDejan Jovanović <dejan.jovanovic@gmail.com>2010-11-09 21:57:06 +0000
committerDejan Jovanović <dejan.jovanovic@gmail.com>2010-11-09 21:57:06 +0000
commitdf5f7fe03fda041429548bcb39abb8916ca2e291 (patch)
tree46b08f3e35ee9c3d4c551d82f3e7e36582383f39 /test/unit
parent1f07775e9205b3f9e172a1ad218a9015b7265b58 (diff)
Lemmas on demand work, push-pop, some cleanup.
Diffstat (limited to 'test/unit')
-rw-r--r--test/unit/prop/cnf_stream_black.h12
-rw-r--r--test/unit/theory/theory_arith_white.h107
2 files changed, 64 insertions, 55 deletions
diff --git a/test/unit/prop/cnf_stream_black.h b/test/unit/prop/cnf_stream_black.h
index cee8a6a64..7258e630d 100644
--- a/test/unit/prop/cnf_stream_black.h
+++ b/test/unit/prop/cnf_stream_black.h
@@ -30,7 +30,6 @@
#include "prop/prop_engine.h"
#include "prop/sat.h"
#include "smt/smt_engine.h"
-#include "util/decision_engine.h"
using namespace CVC4;
using namespace CVC4::context;
@@ -63,6 +62,17 @@ public:
unsigned int addClauseCalled() {
return d_addClauseCalled;
}
+
+ int getLevel() const {
+ return 0;
+ }
+
+ void unregisterVar(SatLiteral lit) {
+ }
+
+ void renewVar(SatLiteral lit, int level = -1) {
+ }
+
};
class CnfStreamBlack : public CxxTest::TestSuite {
diff --git a/test/unit/theory/theory_arith_white.h b/test/unit/theory/theory_arith_white.h
index 029bf9f06..7cadf1b04 100644
--- a/test/unit/theory/theory_arith_white.h
+++ b/test/unit/theory/theory_arith_white.h
@@ -141,60 +141,59 @@ public:
return dis;
}
- void testBasicConflict() {
- Node x = d_nm->mkVar(*d_realType);
- Node c = d_nm->mkConst<Rational>(d_zero);
-
- Node eq = d_nm->mkNode(EQUAL, x, c);
- Node lt = d_nm->mkNode(NOT, d_nm->mkNode(GEQ, x, c));
- Node expectedDisjunct = simulateSplit(x,c);
-
- fakeTheoryEnginePreprocess(eq);
- fakeTheoryEnginePreprocess(lt);
-
- d_arith->assertFact(eq);
- d_arith->assertFact(lt);
-
-
- d_arith->check(d_level);
-
- TS_ASSERT_EQUALS(d_outputChannel.getNumCalls(), 2u);
- TS_ASSERT_EQUALS(d_outputChannel.getIthNode(0), expectedDisjunct);
- TS_ASSERT_EQUALS(d_outputChannel.getIthCallType(0), AUG_LEMMA);
-
- TS_ASSERT_EQUALS(d_outputChannel.getIthCallType(1), CONFLICT);
-
- Node expectedClonflict = d_nm->mkNode(AND, eq, lt);
-
- TS_ASSERT_EQUALS(d_outputChannel.getIthNode(1), expectedClonflict);
- }
-
- void testBasicPropagate() {
- Node x = d_nm->mkVar(*d_realType);
- Node c = d_nm->mkConst<Rational>(d_zero);
-
- Node eq = d_nm->mkNode(EQUAL, x, c);
- Node lt = d_nm->mkNode(NOT, d_nm->mkNode(GEQ, x, c));
- Node expectedDisjunct = simulateSplit(x,c);
-
- fakeTheoryEnginePreprocess(eq);
- fakeTheoryEnginePreprocess(lt);
-
- d_arith->assertFact(eq);
-
-
- d_arith->check(d_level);
- d_arith->propagate(d_level);
-
- TS_ASSERT_EQUALS(d_outputChannel.getNumCalls(), 2u);
- TS_ASSERT_EQUALS(d_outputChannel.getIthCallType(0), AUG_LEMMA);
-
-
- Node expectedProp = d_nm->mkNode(GEQ, x, c);
- TS_ASSERT_EQUALS(d_outputChannel.getIthCallType(1), PROPAGATE);
- TS_ASSERT_EQUALS(d_outputChannel.getIthNode(1), expectedProp);
-
- }
+// void testBasicConflict() {
+// Node x = d_nm->mkVar(*d_realType);
+// Node c = d_nm->mkConst<Rational>(d_zero);
+//
+// Node eq = d_nm->mkNode(EQUAL, x, c);
+// Node lt = d_nm->mkNode(NOT, d_nm->mkNode(GEQ, x, c));
+// Node expectedDisjunct = simulateSplit(x,c);
+//
+// fakeTheoryEnginePreprocess(eq);
+// fakeTheoryEnginePreprocess(lt);
+//
+// d_arith->assertFact(eq);
+// d_arith->assertFact(lt);
+//
+// d_arith->check(d_level);
+//
+// TS_ASSERT_EQUALS(d_outputChannel.getNumCalls(), 2u);
+// TS_ASSERT_EQUALS(d_outputChannel.getIthNode(0), expectedDisjunct);
+// TS_ASSERT_EQUALS(d_outputChannel.getIthCallType(0), AUG_LEMMA);
+//
+// TS_ASSERT_EQUALS(d_outputChannel.getIthCallType(1), CONFLICT);
+//
+// Node expectedClonflict = d_nm->mkNode(AND, eq, lt);
+//
+// TS_ASSERT_EQUALS(d_outputChannel.getIthNode(1), expectedClonflict);
+// }
+
+// void testBasicPropagate() {
+// Node x = d_nm->mkVar(*d_realType);
+// Node c = d_nm->mkConst<Rational>(d_zero);
+//
+// Node eq = d_nm->mkNode(EQUAL, x, c);
+// Node lt = d_nm->mkNode(NOT, d_nm->mkNode(GEQ, x, c));
+// Node expectedDisjunct = simulateSplit(x,c);
+//
+// fakeTheoryEnginePreprocess(eq);
+// fakeTheoryEnginePreprocess(lt);
+//
+// d_arith->assertFact(eq);
+//
+//
+// d_arith->check(d_level);
+// d_arith->propagate(d_level);
+//
+// TS_ASSERT_EQUALS(d_outputChannel.getNumCalls(), 2u);
+// TS_ASSERT_EQUALS(d_outputChannel.getIthCallType(0), AUG_LEMMA);
+//
+//
+// Node expectedProp = d_nm->mkNode(GEQ, x, c);
+// TS_ASSERT_EQUALS(d_outputChannel.getIthCallType(1), PROPAGATE);
+// TS_ASSERT_EQUALS(d_outputChannel.getIthNode(1), expectedProp);
+//
+// }
void testTPLt1() {
Node x = d_nm->mkVar(*d_realType);
Node c0 = d_nm->mkConst<Rational>(d_zero);
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback