0

For my application code, I used the following settings for z3 params for my solver

   z3::params p(context);
   p.set(":relevancy", static_cast<unsigned>(1));
   p.set(":logic", QF_ABV);
   p.set(":timeout", timeout); 
   solver.set(p);

After updating to latest Z# unstable I got C++ exceptions essentially stating that logic and timeout are not valid parameters. I did not find any equivalent option for logic, so I assume that is being deduced automatically. However, for timeout, there are two options soft_timout and solver2_timeout. I know that solver2_timeout is used for incremental solver (ie. with push/pops), hence I changed the code to use the following parameters.

 z3::params p(context);
 p.set(":relevancy", static_cast<unsigned>(1));
 p.set(":soft_timeout", yices_timeout); 
 solver.set(p)

Is the change correct? How is soft_timeout different from timeout? Is there a documentation for valid "z3::params" maintained somewhere?

Tushar
  • 357
  • 1
  • 14

1 Answers1

2

The documentation for the parameters is obtained by running z3 -p. More information about a particular option is obtained by running z3 -pp:option_name.

The parameter infrastructure has seen major changes in 4.3.2; there are now parameter modules and the soft_timeout resides in the smt module, i.e., the proper name is smt.soft_timeout. There is no setting for the logic, but we can't assume that it will be determined automatically (works only for some of them). Instead, we can now construct Solver objects for a particular logic (in C++ via solver::solver(context & c, char const * logic)), or use one of the predefined SMT tactics (see e.g., the strategies tutorial)

Christoph Wintersteiger
  • 8,234
  • 1
  • 16
  • 30