问题
For this problem: http://rise4fun.com/Z3/YNBG
Z3 produces the model:
sat
((s0 FP!val!0))
I was expecting to see a true number as the model. It's almost as if it's treating FP
as an uninterpreted sort for this case. Is there a way to get Z3 to produce a real number here?
回答1:
Thanks for reporting this. Indeed, there was a bug in the model completion for FPA. The fix is already available in the unstable branch at Codeplex.
Note that == (floating point equal) with NaN is always false, i.e., in this example, any s0
satisfies the formula. Such values are now correctly omitted at all (in get-model) or the model is completed with a NaN (for get-value or generally when model completion is enabled).
来源:https://stackoverflow.com/questions/15737340/z3-fp-logic-produces-unexpected-model