diff options
Diffstat (limited to 'src/theory/quantifiers/relevant_domain.cpp')
-rw-r--r-- | src/theory/quantifiers/relevant_domain.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/theory/quantifiers/relevant_domain.cpp b/src/theory/quantifiers/relevant_domain.cpp index fbd1f05a6..6248e9722 100644 --- a/src/theory/quantifiers/relevant_domain.cpp +++ b/src/theory/quantifiers/relevant_domain.cpp @@ -207,6 +207,7 @@ void RelevantDomain::computeRelevantDomainOpCh( RDomain * rf, Node n ) { Node q = d_qe->getTermUtil()->getInstConstAttr( n ); //merge the RDomains unsigned id = n.getAttribute(InstVarNumAttribute()); + Assert(q[0][id].getType() == n.getType()); Trace("rel-dom-debug") << n << " is variable # " << id << " for " << q; Trace("rel-dom-debug") << " with body : " << d_qe->getTermUtil()->getInstConstantBody( q ) << std::endl; RDomain * rq = getRDomain( q, id ); @@ -225,9 +226,14 @@ void RelevantDomain::computeRelevantDomainLit( Node q, bool hasPol, bool pol, No d_rel_dom_lit[hasPol][pol][n].d_merge = false; int varCount = 0; int varCh = -1; + TermUtil* tu = d_qe->getTermUtil(); for( unsigned i=0; i<n.getNumChildren(); i++ ){ if( n[i].getKind()==INST_CONSTANT ){ - d_rel_dom_lit[hasPol][pol][n].d_rd[i] = getRDomain( q, n[i].getAttribute(InstVarNumAttribute()), false ); + // must get the quantified formula this belongs to, which may be + // different from q + Node qi = tu->getInstConstAttr(n[i]); + unsigned id = n[i].getAttribute(InstVarNumAttribute()); + d_rel_dom_lit[hasPol][pol][n].d_rd[i] = getRDomain(qi, id, false); varCount++; varCh = i; }else{ |