Created
October 27, 2016 16:00
-
-
Save mikhailramalho/94a4bcc43e2fa3c851f7000efd7cfa56 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <math.h> | |
#include <assert.h> | |
float nondet(); | |
int main(void) | |
{ | |
float from = nondet(); | |
__ESBMC_assume(from > 0.0f); | |
__ESBMC_assume(!isinf(from)); | |
__ESBMC_assume(!isnan(from)); | |
union { | |
float a; | |
long b; | |
} from_union = { .a = from }; | |
from_union.b++; | |
assert(from < from_union.a); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment