diff options
Diffstat (limited to 'src/theory/theory_engine.cpp')
-rw-r--r-- | src/theory/theory_engine.cpp | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/src/theory/theory_engine.cpp b/src/theory/theory_engine.cpp index 706149d86..3a155b9ad 100644 --- a/src/theory/theory_engine.cpp +++ b/src/theory/theory_engine.cpp @@ -1116,6 +1116,42 @@ bool TheoryEngine::propagate(TNode literal, theory::TheoryId theory) { const LogicInfo& TheoryEngine::getLogicInfo() const { return d_logicInfo; } +bool TheoryEngine::getSepHeapTypes(TypeNode& locType, TypeNode& dataType) const +{ + if (d_sepLocType.isNull()) + { + return false; + } + locType = d_sepLocType; + dataType = d_sepDataType; + return true; +} + +void TheoryEngine::declareSepHeap(TypeNode locT, TypeNode dataT) +{ + Theory* tsep = theoryOf(THEORY_SEP); + if (tsep == nullptr) + { + Assert(false) << "TheoryEngine::declareSepHeap called without the " + "separation logic theory enabled"; + return; + } + + // Definition of the statement that is to be run by every theory +#ifdef CVC4_FOR_EACH_THEORY_STATEMENT +#undef CVC4_FOR_EACH_THEORY_STATEMENT +#endif +#define CVC4_FOR_EACH_THEORY_STATEMENT(THEORY) \ + theoryOf(THEORY)->declareSepHeap(locT, dataT); + + // notify each theory using the statement above + CVC4_FOR_EACH_THEORY; + + // remember the types we have set + d_sepLocType = locT; + d_sepDataType = dataT; +} + theory::EqualityStatus TheoryEngine::getEqualityStatus(TNode a, TNode b) { Assert(a.getType().isComparableTo(b.getType())); return d_sharedSolver->getEqualityStatus(a, b); |