Z3 4.3.1 C-API parse_smtlib2_string: Where to get declarations from?

后端 未结 1 1007
野性不改
野性不改 2021-01-25 10:53

unfortunately I do not have enough reputation to comment answers of other questions. So I have to start a new question.

Essentially I have the same problem as described

相关标签:
1条回答
  • 2021-01-25 11:34

    You can walk the sub-expressions to collect the auxiliary sort and function declarations. The following extended example contains code that parses SMTLIB2 and it has to traverse returned expressions for collecting sort and function declarations. You can browse it here

    It uses the C++ API. The function collect_decls traverses the expression and collects uninterepreted sorts and functions (this function assumes there are no user-defined algebraic data-types and does not attempt to extract those).

    0 讨论(0)
提交回复
热议问题