Fixes #5541. Fixes #5607.
}
SolverEngineScope smts(this);
finishInit();
+ // check whether incremental is enabled, where separation logic is not
+ // supported.
+ if (d_env->getOptions().base.incrementalSolving)
+ {
+ throw RecoverableModalException(
+ "Separation logic not supported in incremental mode");
+ }
TheoryEngine* te = getTheoryEngine();
te->declareSepHeap(locT, dataT);
}
TEST_F(TestApiBlackSolver, declareSepHeap)
{
d_solver.setLogic("ALL");
+ d_solver.setOption("incremental", "false");
Sort integer = d_solver.getIntegerSort();
ASSERT_NO_THROW(d_solver.declareSepHeap(integer, integer));
// cannot declare separation logic heap more than once
@Test void declareSepHeap() throws CVC5ApiException
{
d_solver.setLogic("ALL");
+ d_solver.setOption("incremental", "false");
Sort integer = d_solver.getIntegerSort();
assertDoesNotThrow(() -> d_solver.declareSepHeap(integer, integer));
// cannot declare separation logic heap more than once
def test_declare_sep_heap(solver):
solver.setLogic("ALL")
+ solver.setOption("incremental", "false")
integer = solver.getIntegerSort()
solver.declareSepHeap(integer, integer)
# cannot declare separation logic heap more than once
with pytest.raises(RuntimeError):
solver.declarePool("i", nullSort, [])
-
-def test_declare_sep_heap(solver):
- solver.setLogic("ALL")
- integer = solver.getIntegerSort()
- solver.declareSepHeap(integer, integer)
- # cannot declare separation logic heap more than once
- with pytest.raises(RuntimeError):
- solver.declareSepHeap(integer, integer)
-
-
def test_define_fun_global(solver):
bSort = solver.getBooleanSort()