summaryrefslogtreecommitdiff
path: root/test/unit/expr/attribute_white.h
diff options
context:
space:
mode:
Diffstat (limited to 'test/unit/expr/attribute_white.h')
-rw-r--r--test/unit/expr/attribute_white.h98
1 files changed, 48 insertions, 50 deletions
diff --git a/test/unit/expr/attribute_white.h b/test/unit/expr/attribute_white.h
index a121029f3..3dbee87eb 100644
--- a/test/unit/expr/attribute_white.h
+++ b/test/unit/expr/attribute_white.h
@@ -26,6 +26,7 @@
#include "expr/node_manager.h"
#include "expr/attribute.h"
#include "expr/node.h"
+#include "theory/theory.h"
#include "theory/theory_engine.h"
#include "theory/uf/theory_uf.h"
#include "util/Assert.h"
@@ -108,17 +109,11 @@ public:
//TS_ASSERT_LESS_THAN(theory::uf::ECAttr::s_id, lastId);
lastId = attr::LastAttributeId<bool, false>::s_id;
- TS_ASSERT_LESS_THAN(theory::Theory::PreRegisteredAttr::s_id, lastId);
TS_ASSERT_LESS_THAN(TestFlag1::s_id, lastId);
TS_ASSERT_LESS_THAN(TestFlag2::s_id, lastId);
TS_ASSERT_LESS_THAN(TestFlag3::s_id, lastId);
TS_ASSERT_LESS_THAN(TestFlag4::s_id, lastId);
TS_ASSERT_LESS_THAN(TestFlag5::s_id, lastId);
- TS_ASSERT_DIFFERS(theory::Theory::PreRegisteredAttr::s_id, TestFlag1::s_id);
- TS_ASSERT_DIFFERS(theory::Theory::PreRegisteredAttr::s_id, TestFlag2::s_id);
- TS_ASSERT_DIFFERS(theory::Theory::PreRegisteredAttr::s_id, TestFlag3::s_id);
- TS_ASSERT_DIFFERS(theory::Theory::PreRegisteredAttr::s_id, TestFlag4::s_id);
- TS_ASSERT_DIFFERS(theory::Theory::PreRegisteredAttr::s_id, TestFlag5::s_id);
TS_ASSERT_DIFFERS(TestFlag1::s_id, TestFlag2::s_id);
TS_ASSERT_DIFFERS(TestFlag1::s_id, TestFlag3::s_id);
TS_ASSERT_DIFFERS(TestFlag1::s_id, TestFlag4::s_id);
@@ -131,12 +126,15 @@ public:
TS_ASSERT_DIFFERS(TestFlag4::s_id, TestFlag5::s_id);
lastId = attr::LastAttributeId<bool, true>::s_id;
-// TS_ASSERT_LESS_THAN(TheoryEngine::RegisteredAttr::s_id, lastId);
+ TS_ASSERT_LESS_THAN(theory::Asserted::s_id, lastId);
TS_ASSERT_LESS_THAN(TestFlag1cd::s_id, lastId);
TS_ASSERT_LESS_THAN(TestFlag2cd::s_id, lastId);
-// TS_ASSERT_DIFFERS(TheoryEngine::RegisteredAttr::s_id, TestFlag1cd::s_id);
-// TS_ASSERT_DIFFERS(TheoryEngine::RegisteredAttr::s_id, TestFlag2cd::s_id);
+ TS_ASSERT_DIFFERS(theory::Asserted::s_id, TestFlag1cd::s_id);
+ TS_ASSERT_DIFFERS(theory::Asserted::s_id, TestFlag2cd::s_id);
TS_ASSERT_DIFFERS(TestFlag1cd::s_id, TestFlag2cd::s_id);
+ cout << "A: " << theory::Asserted::s_id << endl;
+ cout << "1: " << TestFlag1cd::s_id << endl;
+ cout << "2: " << TestFlag2cd::s_id << endl;
lastId = attr::LastAttributeId<Node, false>::s_id;
// TS_ASSERT_LESS_THAN(theory::PreRewriteCache::s_id, lastId);
@@ -156,27 +154,27 @@ public:
}
void testCDAttributes() {
- //Debug.on("boolattr");
+ //Debug.on("cdboolattr");
Node a = d_nm->mkVar(*d_booleanType);
Node b = d_nm->mkVar(*d_booleanType);
Node c = d_nm->mkVar(*d_booleanType);
- Debug("boolattr", "get flag 1 on a (should be F)\n");
+ Debug("cdboolattr", "get flag 1 on a (should be F)\n");
TS_ASSERT(! a.getAttribute(TestFlag1cd()));
- Debug("boolattr", "get flag 1 on b (should be F)\n");
+ Debug("cdboolattr", "get flag 1 on b (should be F)\n");
TS_ASSERT(! b.getAttribute(TestFlag1cd()));
- Debug("boolattr", "get flag 1 on c (should be F)\n");
+ Debug("cdboolattr", "get flag 1 on c (should be F)\n");
TS_ASSERT(! c.getAttribute(TestFlag1cd()));
d_ctxt->push(); // level 1
// test that all boolean flags are FALSE to start
- Debug("boolattr", "get flag 1 on a (should be F)\n");
+ Debug("cdboolattr", "get flag 1 on a (should be F)\n");
TS_ASSERT(! a.getAttribute(TestFlag1cd()));
- Debug("boolattr", "get flag 1 on b (should be F)\n");
+ Debug("cdboolattr", "get flag 1 on b (should be F)\n");
TS_ASSERT(! b.getAttribute(TestFlag1cd()));
- Debug("boolattr", "get flag 1 on c (should be F)\n");
+ Debug("cdboolattr", "get flag 1 on c (should be F)\n");
TS_ASSERT(! c.getAttribute(TestFlag1cd()));
// test that they all HAVE the boolean attributes
@@ -186,96 +184,96 @@ public:
// test two-arg version of hasAttribute()
bool bb = false;
- Debug("boolattr", "get flag 1 on a (should be F)\n");
+ Debug("cdboolattr", "get flag 1 on a (should be F)\n");
TS_ASSERT(a.getAttribute(TestFlag1cd(), bb));
TS_ASSERT(! bb);
- Debug("boolattr", "get flag 1 on b (should be F)\n");
+ Debug("cdboolattr", "get flag 1 on b (should be F)\n");
TS_ASSERT(b.getAttribute(TestFlag1cd(), bb));
TS_ASSERT(! bb);
- Debug("boolattr", "get flag 1 on c (should be F)\n");
+ Debug("cdboolattr", "get flag 1 on c (should be F)\n");
TS_ASSERT(c.getAttribute(TestFlag1cd(), bb));
TS_ASSERT(! bb);
// setting boolean flags
- Debug("boolattr", "set flag 1 on a to T\n");
+ Debug("cdboolattr", "set flag 1 on a to T\n");
a.setAttribute(TestFlag1cd(), true);
- Debug("boolattr", "set flag 1 on b to F\n");
+ Debug("cdboolattr", "set flag 1 on b to F\n");
b.setAttribute(TestFlag1cd(), false);
- Debug("boolattr", "set flag 1 on c to F\n");
+ Debug("cdboolattr", "set flag 1 on c to F\n");
c.setAttribute(TestFlag1cd(), false);
- Debug("boolattr", "get flag 1 on a (should be T)\n");
+ Debug("cdbootattr", "get flag 1 on a (should be T)\n");
TS_ASSERT(a.getAttribute(TestFlag1cd()));
- Debug("boolattr", "get flag 1 on b (should be F)\n");
+ Debug("cdbootattr", "get flag 1 on b (should be F)\n");
TS_ASSERT(! b.getAttribute(TestFlag1cd()));
- Debug("boolattr", "get flag 1 on c (should be F)\n");
+ Debug("cdbootattr", "get flag 1 on c (should be F)\n");
TS_ASSERT(! c.getAttribute(TestFlag1cd()));
d_ctxt->push(); // level 2
- Debug("boolattr", "get flag 1 on a (should be T)\n");
+ Debug("cdbootattr", "get flag 1 on a (should be T)\n");
TS_ASSERT(a.getAttribute(TestFlag1cd()));
- Debug("boolattr", "get flag 1 on b (should be F)\n");
+ Debug("cdbootattr", "get flag 1 on b (should be F)\n");
TS_ASSERT(! b.getAttribute(TestFlag1cd()));
- Debug("boolattr", "get flag 1 on c (should be F)\n");
+ Debug("cdbootattr", "get flag 1 on c (should be F)\n");
TS_ASSERT(! c.getAttribute(TestFlag1cd()));
- Debug("boolattr", "set flag 1 on a to F\n");
+ Debug("cdbootattr", "set flag 1 on a to F\n");
a.setAttribute(TestFlag1cd(), false);
- Debug("boolattr", "set flag 1 on b to T\n");
+ Debug("cdbootattr", "set flag 1 on b to T\n");
b.setAttribute(TestFlag1cd(), true);
- Debug("boolattr", "get flag 1 on a (should be F)\n");
+ Debug("cdbootattr", "get flag 1 on a (should be F)\n");
TS_ASSERT(! a.getAttribute(TestFlag1cd()));
- Debug("boolattr", "get flag 1 on b (should be T)\n");
+ Debug("cdbootattr", "get flag 1 on b (should be T)\n");
TS_ASSERT(b.getAttribute(TestFlag1cd()));
- Debug("boolattr", "get flag 1 on c (should be F)\n");
+ Debug("cdbootattr", "get flag 1 on c (should be F)\n");
TS_ASSERT(! c.getAttribute(TestFlag1cd()));
d_ctxt->push(); // level 3
- Debug("boolattr", "get flag 1 on a (should be F)\n");
+ Debug("cdbootattr", "get flag 1 on a (should be F)\n");
TS_ASSERT(! a.getAttribute(TestFlag1cd()));
- Debug("boolattr", "get flag 1 on b (should be T)\n");
+ Debug("cdbootattr", "get flag 1 on b (should be T)\n");
TS_ASSERT(b.getAttribute(TestFlag1cd()));
- Debug("boolattr", "get flag 1 on c (should be F)\n");
+ Debug("cdbootattr", "get flag 1 on c (should be F)\n");
TS_ASSERT(! c.getAttribute(TestFlag1cd()));
- Debug("boolattr", "set flag 1 on c to T\n");
+ Debug("cdbootattr", "set flag 1 on c to T\n");
c.setAttribute(TestFlag1cd(), true);
- Debug("boolattr", "get flag 1 on a (should be F)\n");
+ Debug("cdbootattr", "get flag 1 on a (should be F)\n");
TS_ASSERT(! a.getAttribute(TestFlag1cd()));
- Debug("boolattr", "get flag 1 on b (should be T)\n");
+ Debug("cdbootattr", "get flag 1 on b (should be T)\n");
TS_ASSERT(b.getAttribute(TestFlag1cd()));
- Debug("boolattr", "get flag 1 on c (should be T)\n");
+ Debug("cdbootattr", "get flag 1 on c (should be T)\n");
TS_ASSERT(c.getAttribute(TestFlag1cd()));
d_ctxt->pop(); // level 2
- Debug("boolattr", "get flag 1 on a (should be F)\n");
+ Debug("cdbootattr", "get flag 1 on a (should be F)\n");
TS_ASSERT(! a.getAttribute(TestFlag1cd()));
- Debug("boolattr", "get flag 1 on b (should be T)\n");
+ Debug("cdbootattr", "get flag 1 on b (should be T)\n");
TS_ASSERT(b.getAttribute(TestFlag1cd()));
- Debug("boolattr", "get flag 1 on c (should be F)\n");
+ Debug("cdbootattr", "get flag 1 on c (should be F)\n");
TS_ASSERT(! c.getAttribute(TestFlag1cd()));
d_ctxt->pop(); // level 1
- Debug("boolattr", "get flag 1 on a (should be T)\n");
+ Debug("cdbootattr", "get flag 1 on a (should be T)\n");
TS_ASSERT(a.getAttribute(TestFlag1cd()));
- Debug("boolattr", "get flag 1 on b (should be F)\n");
+ Debug("cdbootattr", "get flag 1 on b (should be F)\n");
TS_ASSERT(! b.getAttribute(TestFlag1cd()));
- Debug("boolattr", "get flag 1 on c (should be F)\n");
+ Debug("cdbootattr", "get flag 1 on c (should be F)\n");
TS_ASSERT(! c.getAttribute(TestFlag1cd()));
d_ctxt->pop(); // level 0
- Debug("boolattr", "get flag 1 on a (should be F)\n");
+ Debug("cdbootattr", "get flag 1 on a (should be F)\n");
TS_ASSERT(! a.getAttribute(TestFlag1cd()));
- Debug("boolattr", "get flag 1 on b (should be F)\n");
+ Debug("cdbootattr", "get flag 1 on b (should be F)\n");
TS_ASSERT(! b.getAttribute(TestFlag1cd()));
- Debug("boolattr", "get flag 1 on c (should be F)\n");
+ Debug("cdbootattr", "get flag 1 on c (should be F)\n");
TS_ASSERT(! c.getAttribute(TestFlag1cd()));
#ifdef CVC4_ASSERTIONS
@@ -284,7 +282,7 @@ public:
}
void testAttributes() {
- //Debug.on("boolattr");
+ //Debug.on("bootattr");
Node a = d_nm->mkVar(*d_booleanType);
Node b = d_nm->mkVar(*d_booleanType);
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback