summaryrefslogtreecommitdiff
path: root/src/api
diff options
context:
space:
mode:
authorAndrew Reynolds <andrew.j.reynolds@gmail.com>2020-10-16 13:32:42 -0500
committerGitHub <noreply@github.com>2020-10-16 13:32:42 -0500
commit7c249b3efdeeb51fd3dfc2571bc529c55880cf5c (patch)
tree220a1c3f2aa53b047c2a52260fce3bd2dce22429 /src/api
parent547df7cd146091674562dfa4812f10bae7765934 (diff)
Refactor SMT-level model object (#5277)
This refactors the SMT-level model object so that it is a wrapper around TheoryModel instead of a base class. This inheritance was unnecessary. Moreover, it removes the virtual base models of the SMT-level model which were based on Expr. Now the interface is more minimal and in terms of Node only. This PR further simplifies a few places in the code that interface with the SmtEngine with things related to models.
Diffstat (limited to 'src/api')
-rw-r--r--src/api/cvc4cpp.cpp16
1 files changed, 1 insertions, 15 deletions
diff --git a/src/api/cvc4cpp.cpp b/src/api/cvc4cpp.cpp
index 0384b573e..2417936a7 100644
--- a/src/api/cvc4cpp.cpp
+++ b/src/api/cvc4cpp.cpp
@@ -5211,13 +5211,6 @@ Term Solver::getSeparationHeap() const
"(try --produce-models)";
CVC4_API_CHECK(d_smtEngine->getSmtMode() != SmtMode::UNSAT)
<< "Cannot get separtion heap term when in unsat mode.";
-
- theory::TheoryModel* m =
- d_smtEngine->getAvailableModel("get separation logic heap and nil");
- Expr heap, nil;
- bool hasHeapModel = m->getHeapModel(heap, nil);
- CVC4_API_CHECK(hasHeapModel)
- << "Failed to obtain heap term from theory model.";
return Term(this, d_smtEngine->getSepHeapExpr());
CVC4_API_SOLVER_TRY_CATCH_END;
}
@@ -5235,14 +5228,7 @@ Term Solver::getSeparationNilTerm() const
"(try --produce-models)";
CVC4_API_CHECK(d_smtEngine->getSmtMode() != SmtMode::UNSAT)
<< "Cannot get separtion nil term when in unsat mode.";
-
- theory::TheoryModel* m =
- d_smtEngine->getAvailableModel("get separation logic heap and nil");
- Expr heap, nil;
- bool hasHeapModel = m->getHeapModel(heap, nil);
- CVC4_API_CHECK(hasHeapModel)
- << "Failed to obtain nil term from theory model.";
- return Term(this, nil);
+ return Term(this, d_smtEngine->getSepNilExpr());
CVC4_API_SOLVER_TRY_CATCH_END;
}
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback