简体   繁体   English

具有C ++ API中支持的Z3浮点理论

[英]Has Floating point theory of Z3 supported in C++ API

From RELEASE_NOTES of the latest version of Z3, Z3-4.4.1, it has supported for floating point theory. 从Z3的最新版本Z3-4.4.1的RELEASE_NOTES中,它已支持浮点理论。 And I have tested that in offline way successfully. 我已经成功地离线测试了。 However, in my current project, Z3 needs to be used in C++ API, after reading related document and source code, I haven't find any API function for floating point theory. 但是,在我当前的项目中,需要在C ++ API中使用Z3,在阅读了相关文档和源代码之后,我没有找到用于浮点理论的任何API函数。 Has Floating point theory of Z3 supported in C++ API ? C ++ API是否支持Z3的浮点理论?

Nevertheless, maybe I can write my constraints set to a smt format file, then use Z3 API to parse this file. 不过,也许我可以将约束集写入smt格式的文件,然后使用Z3 API解析此文件。 But, it is my last choose to try. 但是,这是我的最后选择。

The C++ API is essentially a wrapper around the C API for common idioms, eg, to automatize reference counting. C ++ API本质上是C API的通用习语包装,例如,用于自动化引用计数。 The two can and should be used together though. 两者可以并且应该一起使用。 For instance, the C-API example shows how to create a bit-vector signed remainder term (for which there is no C++ function) via a call to the C function Z3_mk_bvsrem . 例如, C-API示例显示了如何通过调用C函数Z3_mk_bvsrem来创建位矢量有符号余数项(没有C ++函数)。 The same trick applies to all floating-point terms; 相同的技巧适用于所有浮点数; just create them via the respective C functions and then save them in a (C++) z3::expr object. 只需通过相应的C函数创建它们,然后将它们保存在(C ++) z3::expr对象中即可。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM