const std::string& value) const
{
CVC5_API_TRY_CATCH_BEGIN;
- CVC5_API_CHECK(!d_smtEngine->isFullyInited())
- << "Invalid call to 'setOption', solver is already fully initialized";
+ static constexpr auto mutableOpts = {"diagnostic-output-channel",
+ "print-success",
+ "regular-output-channel",
+ "reproducible-resource-limit",
+ "verbosity"};
+ if (std::find(mutableOpts.begin(), mutableOpts.end(), option)
+ == mutableOpts.end())
+ {
+ CVC5_API_CHECK(!d_smtEngine->isFullyInited())
+ << "Invalid call to 'setOption' for option '" << option
+ << "', solver is already fully initialized";
+ }
//////// all checks before this line
d_smtEngine->setOption(option, value);
////////
regress0/opt-abd-no-use.smt2
regress0/options/ast-and-sexpr.smt2
regress0/options/invalid_dump.smt2
+ regress0/options/set-after-init.smt2
regress0/options/set-and-get-options.smt2
regress0/options/statistics.smt2
regress0/parallel-let.smt2
--- /dev/null
+; EXPECT: 0
+; EXPECT: 1
+; EXPECT: 0
+; EXPECT: 2
+; EXPECT: sat
+; EXPECT: 0
+; EXPECT: (error "Invalid call to 'setOption' for option 'random-seed', solver is already fully initialized")
+; EXIT: 1
+
+(get-option :verbosity)
+(set-option :verbosity 1)
+(get-option :verbosity)
+(set-option :verbosity 0)
+(get-option :random-seed)
+(set-option :random-seed 2)
+(get-option :random-seed)
+
+(set-logic QF_UF)
+(declare-fun x () Bool)
+(assert (or x (not x)))
+(check-sat)
+
+(set-option :verbosity 0)
+(get-option :verbosity)
+(set-option :random-seed 1)
\ No newline at end of file