在 Z3 的 C++ 中设置漂亮的打印机线宽 API
Set pretty printer line width in Z3's C++ API
我正在尝试使用 C++ API 更改 Z3 漂亮打印机使用的线宽。我发现 z3/src/ast/pp_params.pyg
中有一个名为 max_width
的标志,但我不知道如何设置它。
它是设置max_width和max_ribbon的组合。
示例:
</p>
<p>包括"z3++.h"</p>
<p>void main() {
z3::set_param("pp.max_width", 1000);
z3::set_param("pp.max_ribbon", 1000);
z3::context ctx;
z3::expr x = ctx.bv_const("x", 10);
z3::expr fml = x & x;
fml = fml & fml;
fml = fml & fml;
fml = fml & fml;
fml = fml & fml;
fml = fml & fml;
fml = fml & fml;
fml = fml & fml;
fml = fml & fml;
fml = fml & fml;
fml = fml & fml;
fml = fml & fml;
std::cout << fml << "\n";
}</p>
<p>
我正在尝试使用 C++ API 更改 Z3 漂亮打印机使用的线宽。我发现 z3/src/ast/pp_params.pyg
中有一个名为 max_width
的标志,但我不知道如何设置它。
它是设置max_width和max_ribbon的组合。
示例:
</p>
<p>包括"z3++.h"</p>
<p>void main() {
z3::set_param("pp.max_width", 1000);
z3::set_param("pp.max_ribbon", 1000);
z3::context ctx;
z3::expr x = ctx.bv_const("x", 10);
z3::expr fml = x & x;
fml = fml & fml;
fml = fml & fml;
fml = fml & fml;
fml = fml & fml;
fml = fml & fml;
fml = fml & fml;
fml = fml & fml;
fml = fml & fml;
fml = fml & fml;
fml = fml & fml;
fml = fml & fml;
std::cout << fml << "\n";
}</p>
<p>