@@ -50,6 +50,7 @@ abstract class CVC5AbstractProver<T> extends AbstractProverWithAllSat<T> {
5050 protected final Deque <PersistentMap <String , Term >> assertedTerms = new ArrayDeque <>();
5151
5252 // TODO: does CVC5 support separation logic in incremental mode?
53+ // --> No, CVC5 aborts on addConstraint.
5354 protected final boolean incremental ;
5455
5556 protected CVC5AbstractProver (
@@ -84,15 +85,10 @@ protected void setSolverOptions(
8485 throw new AssertionError ("Unexpected exception" , e );
8586 }
8687
87- if (incremental ) {
88- pSolver .setOption ("incremental" , "true" );
89- }
90- if (pOptions .contains (ProverOptions .GENERATE_MODELS )) {
91- pSolver .setOption ("produce-models" , "true" );
92- }
93- if (pOptions .contains (ProverOptions .GENERATE_UNSAT_CORE )) {
94- pSolver .setOption ("produce-unsat-cores" , "true" );
95- }
88+ pSolver .setOption ("incremental" , incremental ? "true" : "false" );
89+ pSolver .setOption ("produce-models" , generateModels ? "true" : "false" );
90+ pSolver .setOption ("produce-unsat-cores" , generateUnsatCores ? "true" : "false" );
91+
9692 pSolver .setOption ("produce-assertions" , "true" );
9793 pSolver .setOption ("dump-models" , "true" );
9894
@@ -105,6 +101,15 @@ protected void setSolverOptions(
105101
106102 // Enable more complete quantifier solving (for more info see CVC5QuantifiedFormulaManager)
107103 pSolver .setOption ("full-saturate-quant" , "true" );
104+
105+ // if no logic is set in CVC5, select the broadest logic available: "ALL"
106+ if (!solver .isLogicSet ()) {
107+ try {
108+ solver .setLogic ("ALL" );
109+ } catch (CVC5ApiException e ) {
110+ throw new AssertionError ("Unexpected exception" , e );
111+ }
112+ }
108113 }
109114
110115 @ Override
0 commit comments