|
47 | 47 | import org.sosy_lab.java_smt.api.ProverEnvironment; |
48 | 48 | import org.sosy_lab.java_smt.api.QuantifiedFormulaManager; |
49 | 49 | import org.sosy_lab.java_smt.api.RationalFormulaManager; |
| 50 | +import org.sosy_lab.java_smt.api.SLFormulaManager; |
50 | 51 | import org.sosy_lab.java_smt.api.SolverContext; |
51 | 52 | import org.sosy_lab.java_smt.api.SolverContext.ProverOptions; |
52 | 53 | import org.sosy_lab.java_smt.api.SolverException; |
@@ -104,6 +105,7 @@ public abstract class SolverBasedTest0 { |
104 | 105 | protected @Nullable FloatingPointFormulaManager fpmgr; |
105 | 106 | protected @Nullable StringFormulaManager smgr; |
106 | 107 | protected @Nullable EnumerationFormulaManager emgr; |
| 108 | + protected @Nullable SLFormulaManager slmgr; |
107 | 109 | protected ShutdownManager shutdownManager = ShutdownManager.create(); |
108 | 110 |
|
109 | 111 | protected ShutdownNotifier shutdownNotifierToUse() { |
@@ -192,6 +194,11 @@ public final void initSolver() throws InvalidConfigurationException { |
192 | 194 | } catch (UnsupportedOperationException e) { |
193 | 195 | emgr = null; |
194 | 196 | } |
| 197 | + try { |
| 198 | + slmgr = mgr.getSLFormulaManager(); |
| 199 | + } catch (UnsupportedOperationException e) { |
| 200 | + slmgr = null; |
| 201 | + } |
195 | 202 | } |
196 | 203 |
|
197 | 204 | @After |
@@ -306,6 +313,13 @@ protected final void requireEnumeration() { |
306 | 313 | .isNotNull(); |
307 | 314 | } |
308 | 315 |
|
| 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 | + |
309 | 323 | /** Skip test if the solver does not support optimization. */ |
310 | 324 | protected final void requireOptimization() { |
311 | 325 | try { |
|
0 commit comments