From: Tim King Date: Mon, 8 Mar 2010 21:29:50 +0000 (+0000) Subject: Improved output for theory uf X-Git-Tag: cvc5-1.0.0~9200 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=1596c6b8205ca706f56c0e544bd49ba7cfab6e51;p=cvc5.git Improved output for theory uf --- 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);