Combining nonlinear Real with linear Int

前端 未结 1 1806
无人及你
无人及你 2020-12-07 05:37

I\'ve read the posts about nonlinear arithmetic and uninterpreted functions. I\'m still very new to SMT world, so apologies if I\'m not using the right vocabulary or this is

1条回答
  •  独厮守ぢ
    2020-12-07 06:18

    Since you are mixing real and integer sorts, I think you'll need to use check-sat-using. From How does Z3 handle non-linear integer arithmetic?:

    "the nonlinear real arithmetic (NLSat) solver is not used by default for nonlinear integer problems. It is usually very ineffective on integer problems. Nonetheless, we can force Z3 to use NLSat even for integer problems."

    You're forcing Z3 to use the nonlinear real arithmetic solver on the integer constraints with the (check-sat-using qfnra-nlsat). Here's also how to do it in Python with z3py: z3 fails with this system of equations

    I imagine at some point in the future (although devs can confirm) you will not have to do this, but the last I heard (see e.g., mixing reals and bit-vectors and Using Z3Py online to prove that n^5 <= 5 ^n for n >= 5), the nonlinear real arithmetic solver tactic is not fully integrated with the other solvers yet.

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