Skip to content

Commit 9bf39bb

Browse files
committed
Tests: provide separation logic as slmgr for tests.
Actually, there were never any tests for separation logic, and nobody notices that is can not be used in current state.
1 parent 1a14e3a commit 9bf39bb

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

src/org/sosy_lab/java_smt/test/SolverBasedTest0.java

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@
4747
import org.sosy_lab.java_smt.api.ProverEnvironment;
4848
import org.sosy_lab.java_smt.api.QuantifiedFormulaManager;
4949
import org.sosy_lab.java_smt.api.RationalFormulaManager;
50+
import org.sosy_lab.java_smt.api.SLFormulaManager;
5051
import org.sosy_lab.java_smt.api.SolverContext;
5152
import org.sosy_lab.java_smt.api.SolverContext.ProverOptions;
5253
import org.sosy_lab.java_smt.api.SolverException;
@@ -104,6 +105,7 @@ public abstract class SolverBasedTest0 {
104105
protected @Nullable FloatingPointFormulaManager fpmgr;
105106
protected @Nullable StringFormulaManager smgr;
106107
protected @Nullable EnumerationFormulaManager emgr;
108+
protected @Nullable SLFormulaManager slmgr;
107109
protected ShutdownManager shutdownManager = ShutdownManager.create();
108110

109111
protected ShutdownNotifier shutdownNotifierToUse() {
@@ -192,6 +194,11 @@ public final void initSolver() throws InvalidConfigurationException {
192194
} catch (UnsupportedOperationException e) {
193195
emgr = null;
194196
}
197+
try {
198+
slmgr = mgr.getSLFormulaManager();
199+
} catch (UnsupportedOperationException e) {
200+
slmgr = null;
201+
}
195202
}
196203

197204
@After
@@ -306,6 +313,13 @@ protected final void requireEnumeration() {
306313
.isNotNull();
307314
}
308315

316+
protected final void requireSeparationLogic() {
317+
assume()
318+
.withMessage("Solver %s does not support the theory of separation logic", solverToUse())
319+
.that(slmgr)
320+
.isNotNull();
321+
}
322+
309323
/** Skip test if the solver does not support optimization. */
310324
protected final void requireOptimization() {
311325
try {

0 commit comments

Comments
 (0)