Are C++ parameters :logic and :timeout deprecated in Z3 unstable branch?

时光怂恿深爱的人放手 提交于 2019-12-25 09:09:14

问题


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?


回答1:


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)



来源:https://stackoverflow.com/questions/28156204/are-c-parameters-logic-and-timeout-deprecated-in-z3-unstable-branch

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!