-
Notifications
You must be signed in to change notification settings - Fork 0
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
Add all math.h functions in libraryFunctions.ml with readsAll in libraryFunctions.ml #12
Conversation
2c3657e
to
bc77792
Compare
5921855
to
0d93409
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
At this point, i have to trust in your understanding of that... ;)
Do we want to add a regression test to proof/check it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking good.
I think a test is not really needed here.
I can also put in a test for one or two of them (ideally ones we don't directly implement) when I add a test for the Implementation of isnan
, cos
, etc
Have you also considered something like |
I had a regression test that had all these functions inside. If you want I can add it again, but it seemed kind of useless to me, which is why I removed it again. @Dudeldu By That's a good question, but I guess this is just accepted. At least stuff like I think we can just keep it like this. Is that fine with you? Otherwise I can of course ask :) |
I'll quickly bud in here, we currently ignore |
If |
Ah, really cool, thanks for the quick clarification! Then I would just ignore it for now - or should I open an issue anyway, just for you guys to have it on the list? |
That would be great, especially if you can come up with an example where we are actually unsound! |
I looked at this again now (I didn't have time yesterday anymore) and it actually seems like this is handled. There even is a test for this: I also wrote a test with something where I knew that
This goes into the However, I tried to find where this is handled in the code but could not find, which is why I'm still a bit unsure. @michael-schwarz Can you confirm that this is fine then? |
I checked, and I think the reason it works is because /* The error code set by various library functions. */
extern int *__errno_location (void) __THROW __attribute_const__;
# define errno (*__errno_location ()) We also have a test of this in |
Ah ok, thanks for the explanation! Then I won't create an issue for that :-) |
This makes it s.t. globals are not invalidated anymore when math.h functions are encountered.