-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve Python bindings #39
Comments
Thanks for the feedback, it's good to see that people are starting to use floats! The expression types in fpTo* were indeed wrong, this is now fixed in unstable. Regarding the naming scheme: "fp" is a general prefix for all floating-point things, avoiding possible clashes with other theories (e.g., fpAdd vs bvAdd vs "+"). The idea was to be mimic the function names defined in the SMT theory FP, in the case of to_fp this is consistent, but indeed a bit unfortunate. |
Thanks for the fix. |
That sounds like a good idea. Does Python support operator overloading of this kind so that expressions are converted automagically? The conversion functions are global because that's the convention that was used for all the other theories (see e.g., ToReal, ToInt, BV2Int), so I'd rather keep that global too, but if think automatic casting would be a nice feature. |
I'm not talking about "automagical" stuff, just having methods on the types. The global functions wouldn't change anything, this would be just an addition, a (in my opinion) more pleasant way to do these conversions (for all types, not only for FP). |
Aha, I see! Are there Python editors that pop up a list of members e.g., like in Visual Studio or Eclipse? |
There's PyCharm which does pretty much everything, but I think there are others too. |
* local changes Signed-off-by: Nikolaj Bjorner <[email protected]> * add bound extraction for variables Signed-off-by: Nikolaj Bjorner <[email protected]> * adding fixed equality propagation Signed-off-by: Nikolaj Bjorner <[email protected]> * adding fixed equality propagation Signed-off-by: Nikolaj Bjorner <[email protected]> * adding fixed equality propagation Signed-off-by: Nikolaj Bjorner <[email protected]> * adding bounds propagation Signed-off-by: Nikolaj Bjorner <[email protected]> * add eager bounds propagation Signed-off-by: Nikolaj Bjorner <[email protected]> * add configuration parameters for LP solver Signed-off-by: Nikolaj Bjorner <[email protected]> * remove wrong assert Signed-off-by: Nikolaj Bjorner <[email protected]> * fix wrong assert Signed-off-by: Nikolaj Bjorner <[email protected]> * add timeout, signals to interface Signed-off-by: Nikolaj Bjorner <[email protected]> * add stats Signed-off-by: Nikolaj Bjorner <[email protected]> * getting rid of typename Signed-off-by: Nikolaj Bjorner <[email protected]> * outline compound bound propagation functionality Signed-off-by: Nikolaj Bjorner <[email protected]> * disable repropagation on pop Signed-off-by: Nikolaj Bjorner <[email protected]> * add compound bound propagation code, remains disabled Signed-off-by: Nikolaj Bjorner <[email protected]> * stronger ad-hoc bounds propagation Signed-off-by: Nikolaj Bjorner <[email protected]> * stronger ad-hoc bounds propagation Signed-off-by: Nikolaj Bjorner <[email protected]> * merge Signed-off-by: Nikolaj Bjorner <[email protected]> * adding validation Signed-off-by: Nikolaj Bjorner <[email protected]> * check assignments and conflicts Signed-off-by: Nikolaj Bjorner <[email protected]> * check assignments and conflicts Signed-off-by: Nikolaj Bjorner <[email protected]> * relax assertion check to take care of cancellation Signed-off-by: Nikolaj Bjorner <[email protected]>
Hi!
I just played a little with the FP support in the unstable branch (in Python), and while doing so, I noticed some things that I think could be improved:
fpTo*
functions that convert FP values to something else returnFPRef
s instead of what they convert to. This is a problem because some functions and operators don't work correctly this way if for example both of their arguments arefpToIEEEBV(foo)
fpTo*
functions that actually convert from something to FP (likefpToFPUnsigned
) and the naming makes this pretty confusing (something likeUBVToFp
would be much clearer, mirroringfpToUBV
)That is all for now, If I notice anything else I'll add it. If I'm wrong about something, please do tell me :)
The text was updated successfully, but these errors were encountered: