From 1596c6b8205ca706f56c0e544bd49ba7cfab6e51 Mon Sep 17 00:00:00 2001 From: Tim King Date: Mon, 8 Mar 2010 21:29:50 +0000 Subject: [PATCH] Improved output for theory uf --- src/theory/uf/theory_uf.cpp | 39 +++++++++++++++++++++++++++--- test/unit/theory/theory_uf_white.h | 4 --- 2 files changed, 35 insertions(+), 8 deletions(-) diff --git a/src/theory/uf/theory_uf.cpp b/src/theory/uf/theory_uf.cpp index b4597c7c7..111f06fe9 100644 --- a/src/theory/uf/theory_uf.cpp +++ b/src/theory/uf/theory_uf.cpp @@ -38,14 +38,20 @@ TheoryUF::TheoryUF(Context* c, OutputChannel& out) : TheoryUF::~TheoryUF(){} void TheoryUF::preRegisterTerm(TNode n){ + Debug("uf") << "uf: begin preRegisterTerm(" << n << ")" << std::endl; + Debug("uf") << "uf: end preRegisterTerm(" << n << ")" << std::endl; } void TheoryUF::registerTerm(TNode n){ + Debug("uf") << "uf: begin registerTerm(" << n << ")" << std::endl; + n.printAst(Debug("uf")); + + d_registered.push_back(n); -#ifdef CVC4_DEBUG - n.printAst(Warning()); -#endif /* CVC4_DEBUG */ + + + ECData* ecN; @@ -132,6 +138,7 @@ void TheoryUF::registerTerm(TNode n){ ecChild->addPredecessor(n, d_context); } } + Debug("uf") << "uf: end registerTerm(" << n << ")" << std::endl; } @@ -238,20 +245,41 @@ void TheoryUF::merge(){ if(ecX == ecY) continue; + Debug("uf") << "merging equivalence classes for " << std::endl; + Debug("uf") << "left equivalence class :"; + (ecX->getRep()).printAst(Debug("uf")); + Debug("uf") << "right equivalence class :"; + (ecY->getRep()).printAst(Debug("uf")); + + ccUnion(ecX, ecY); } } Node TheoryUF::constructConflict(TNode diseq){ + Debug("uf") << "uf: begin constructConflict()" << std::endl; + NodeBuilder<> nb(kind::AND); nb << diseq; for(unsigned i=0; imkNode(kind::AND, f1_x_neq_x, - f5_x_eq_f5_x, f3_x_eq_x, f5_x_eq_x ); - d_euf->assertFact( f5_x_eq_f5_x ); - d_euf->assertFact( f3_x_eq_x ); d_euf->assertFact( f1_x_neq_x ); d_euf->check(d_level); -- 2.30.2