diff options
author | ajreynol <andrew.j.reynolds@gmail.com> | 2016-04-09 13:07:11 -0500 |
---|---|---|
committer | ajreynol <andrew.j.reynolds@gmail.com> | 2016-04-09 13:07:11 -0500 |
commit | 67623ee1e6d62b36cb598c28ad9b871b6957a9dd (patch) | |
tree | 3ea7e16b6b1f8e2073ad9265741fa7853b63c0df /src/theory/quantifiers/quant_util.cpp | |
parent | 59b935c1af18ec51efacf87b0e45d9134d3aaa1e (diff) |
Minor refactoring of entailment tests and quantifiers util. Initial draft of instantiation propagator.
Diffstat (limited to 'src/theory/quantifiers/quant_util.cpp')
-rw-r--r-- | src/theory/quantifiers/quant_util.cpp | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/src/theory/quantifiers/quant_util.cpp b/src/theory/quantifiers/quant_util.cpp index 5fbc46954..3b7787a20 100644 --- a/src/theory/quantifiers/quant_util.cpp +++ b/src/theory/quantifiers/quant_util.cpp @@ -23,6 +23,38 @@ using namespace CVC4::kind; using namespace CVC4::context; using namespace CVC4::theory; + +unsigned QuantifiersModule::needsModel( Theory::Effort e ) { + return QuantifiersEngine::QEFFORT_NONE; +} + +eq::EqualityEngine * QuantifiersModule::getEqualityEngine() { + return d_quantEngine->getMasterEqualityEngine(); +} + +bool QuantifiersModule::areEqual( TNode n1, TNode n2 ) { + eq::EqualityEngine * ee = getEqualityEngine(); + return n1==n2 || ( ee->hasTerm( n1 ) && ee->hasTerm( n2 ) && ee->areEqual( n1, n2 ) ); +} + +bool QuantifiersModule::areDisequal( TNode n1, TNode n2 ) { + eq::EqualityEngine * ee = getEqualityEngine(); + return n1!=n2 && ee->hasTerm( n1 ) && ee->hasTerm( n2 ) && ee->areDisequal( n1, n2, false ); +} + +TNode QuantifiersModule::getRepresentative( TNode n ) { + eq::EqualityEngine * ee = getEqualityEngine(); + if( ee->hasTerm( n ) ){ + return ee->getRepresentative( n ); + }else{ + return n; + } +} + +quantifiers::TermDb * QuantifiersModule::getTermDatabase() { + return d_quantEngine->getTermDatabase(); +} + bool QuantArith::getMonomial( Node n, Node& c, Node& v ){ if( n.getKind()==MULT && n.getNumChildren()==2 && n[0].isConst() ){ c = n[0]; |