public abstract class SolverBasedTest0 extends Object
To run the tests using all available solvers, add the following code to your class:
@Parameters(name="{0}")
public static List <Object[]> getAllSolvers() {
return allSolversAsParameters();
}
@Parameter(0)
public Solvers solver;
@Override
protected Solvers solverToUse() {
return solver;
}
assertThatFormula(BooleanFormula) can be used to easily write assertions about formulas
using Truth.
Test that rely on a theory that not all solvers support should call one of the require
methods at the beginning.
| Modifier and Type | Field and Description |
|---|---|
protected @Nullable ArrayFormulaManager |
amgr |
protected BooleanFormulaManager |
bmgr |
protected @Nullable BitvectorFormulaManager |
bvmgr |
protected Configuration |
config |
protected SolverContext |
context |
protected SolverContextFactory |
factory |
protected UFManager |
fmgr |
protected @Nullable FloatingPointFormulaManager |
fpmgr |
protected IntegerFormulaManager |
imgr |
protected LogManager |
logger |
protected FormulaManager |
mgr |
protected @Nullable QuantifiedFormulaManager |
qmgr |
protected @Nullable RationalFormulaManager |
rmgr |
protected ShutdownManager |
shutdownManager |
| Constructor and Description |
|---|
SolverBasedTest0() |
| Modifier and Type | Method and Description |
|---|---|
protected ProverEnvironmentSubject |
assertThatEnvironment(BasicProverEnvironment<?> prover)
Use this for checking assertions about ProverEnvironments with Truth:
assertThatEnvironment(stack).is...(). |
protected BooleanFormulaSubject |
assertThatFormula(BooleanFormula formula)
Use this for checking assertions about BooleanFormulas with Truth:
assertThatFormula(formula).is...(). |
void |
closeSolver() |
protected ConfigurationBuilder |
createTestConfigBuilder() |
void |
initSolver() |
protected void |
requireArrays()
Skip test if the solver does not support arrays.
|
protected void |
requireBitvectors()
Skip test if the solver does not support bitvectors.
|
protected void |
requireFalse(String failureMessage)
Deprecated.
|
protected void |
requireFloats() |
protected void |
requireInterpolation() |
protected void |
requireOptimization()
Skip test if the solver does not support optimization.
|
protected void |
requireQuantifiers()
Skip test if the solver does not support quantifiers.
|
protected void |
requireRationals()
Skip test if the solver does not support rationals.
|
protected ShutdownNotifier |
shutdownNotifierToUse() |
protected SolverContextFactory.Solvers |
solverToUse()
Return the solver to use in this test.
|
protected Configuration config
protected final LogManager logger
protected SolverContextFactory factory
protected SolverContext context
protected FormulaManager mgr
protected BooleanFormulaManager bmgr
protected UFManager fmgr
protected IntegerFormulaManager imgr
protected @Nullable RationalFormulaManager rmgr
protected @Nullable BitvectorFormulaManager bvmgr
protected @Nullable QuantifiedFormulaManager qmgr
protected @Nullable ArrayFormulaManager amgr
protected @Nullable FloatingPointFormulaManager fpmgr
protected ShutdownManager shutdownManager
protected ShutdownNotifier shutdownNotifierToUse()
protected SolverContextFactory.Solvers solverToUse()
protected ConfigurationBuilder createTestConfigBuilder()
public final void initSolver()
throws InvalidConfigurationException
InvalidConfigurationExceptionpublic final void closeSolver()
protected final void requireRationals()
protected final void requireBitvectors()
protected final void requireQuantifiers()
protected final void requireArrays()
protected final void requireFloats()
protected final void requireOptimization()
protected final void requireInterpolation()
@Deprecated protected final void requireFalse(String failureMessage)
protected final BooleanFormulaSubject assertThatFormula(BooleanFormula formula)
assertThatFormula(formula).is...().protected final ProverEnvironmentSubject assertThatEnvironment(BasicProverEnvironment<?> prover)
assertThatEnvironment(stack).is...().
For new code, we suggest using ProverEnvironmentSubject.assertThat(BasicProverEnvironment) with a static import.