-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move CBMC float tests to main regression folder
- Loading branch information
Showing
32 changed files
with
329 additions
and
117 deletions.
There are no files selected for viewing
11 changes: 10 additions & 1 deletion
11
...at-flags-simp1_true-unreach-call__PART1.i → ...ression/c/cbmc_float-flags-simp1__PART1.i
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
11 changes: 10 additions & 1 deletion
11
...at-flags-simp1_true-unreach-call__PART2.i → ...ression/c/cbmc_float-flags-simp1__PART2.i
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
11 changes: 10 additions & 1 deletion
11
...at-flags-simp1_true-unreach-call__PART3.i → ...ression/c/cbmc_float-flags-simp1__PART3.i
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
20 changes: 20 additions & 0 deletions
20
trunk/examples/programs/FloatingPoint/regression/c/cbmc_float-no-simp1_.i
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
//#Safe | ||
|
||
/* | ||
* Taken from CBMC's regression test suite | ||
* (http://svn.cprover.org/svn/cbmc/trunk/regression/cbmc/). | ||
* | ||
* The overflow checks were omitted as these require more elaborate assertions. | ||
*/ | ||
|
||
extern void __VERIFIER_error(void); | ||
int main() | ||
{ | ||
unsigned int i, j; | ||
double d; | ||
|
||
i=100.0; | ||
d=i; | ||
j=d; | ||
if(!(j==100)) __VERIFIER_error(); | ||
} |
11 changes: 10 additions & 1 deletion
11
..._true-unreach-call__COMMENTED_DIFFICULT.i → ...bmc_float-no-simp2__COMMENTED_DIFFICULT.i
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
18 changes: 18 additions & 0 deletions
18
trunk/examples/programs/FloatingPoint/regression/c/cbmc_float-no-simp3_.i
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
//#Safe | ||
|
||
/* | ||
* Taken from CBMC's regression test suite | ||
* (http://svn.cprover.org/svn/cbmc/trunk/regression/cbmc/). | ||
* | ||
* The overflow checks were omitted as these require more elaborate assertions. | ||
*/ | ||
|
||
extern void __VERIFIER_error(void); | ||
|
||
int main() | ||
{ | ||
|
||
float fs1=2.0f/6.0f; | ||
float fs2=fs1*6.0f; | ||
if(!((int)fs2==2)) __VERIFIER_error(); | ||
} |
11 changes: 10 additions & 1 deletion
11
...ession/float-no-simp4_true-unreach-call.i → ...Point/regression/c/cbmc_float-no-simp4_.i
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
11 changes: 10 additions & 1 deletion
11
...ession/float-no-simp6_true-unreach-call.i → ...Point/regression/c/cbmc_float-no-simp6_.i
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
22 changes: 22 additions & 0 deletions
22
trunk/examples/programs/FloatingPoint/regression/c/cbmc_float-no-simp7_.i
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
//#Safe | ||
|
||
/* | ||
* Taken from CBMC's regression test suite | ||
* (http://svn.cprover.org/svn/cbmc/trunk/regression/cbmc/). | ||
* | ||
* The overflow checks were omitted as these require more elaborate assertions. | ||
*/ | ||
|
||
extern void __VERIFIER_error(void); | ||
|
||
int main (int argc, char **argv) { | ||
float f = 0x1.9e0c22p-101f; | ||
float g = -0x1.3c9014p-50f; | ||
float target = -0x1p-149f; | ||
|
||
float result = f * g; | ||
|
||
if(!(result == target)) __VERIFIER_error(); | ||
|
||
return 0; | ||
} |
11 changes: 10 additions & 1 deletion
11
...ession/float-no-simp8_true-unreach-call.i → ...Point/regression/c/cbmc_float-no-simp8_.i
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
21 changes: 21 additions & 0 deletions
21
trunk/examples/programs/FloatingPoint/regression/c/cbmc_float-to-double2_.i
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
//#Safe | ||
|
||
/* | ||
* Taken from CBMC's regression test suite | ||
* (http://svn.cprover.org/svn/cbmc/trunk/regression/cbmc/). | ||
* | ||
* The overflow checks were omitted as these require more elaborate assertions. | ||
*/ | ||
|
||
extern void __VERIFIER_error(void); | ||
|
||
int main(void) | ||
{ | ||
float f = -0x1.0p-127f; | ||
double d = -0x1.0p-127; | ||
double fp = (double)f; | ||
|
||
if(!(d == fp)) __VERIFIER_error(); | ||
|
||
return 0; | ||
} |
11 changes: 10 additions & 1 deletion
11
...mc-regression/float11_true-unreach-call.i → ...loatingPoint/regression/c/cbmc_float11_.i
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
21 changes: 21 additions & 0 deletions
21
trunk/examples/programs/FloatingPoint/regression/c/cbmc_float12_.i
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
//#Safe | ||
|
||
/* | ||
* Taken from CBMC's regression test suite | ||
* (http://svn.cprover.org/svn/cbmc/trunk/regression/cbmc/). | ||
* | ||
* The overflow checks were omitted as these require more elaborate assertions. | ||
*/ | ||
|
||
extern void __VERIFIER_error(void); | ||
int main() | ||
{ | ||
float f; | ||
double d; | ||
unsigned char x; | ||
|
||
d=f; | ||
|
||
if(f==x) | ||
if(!(d==x)) __VERIFIER_error(); | ||
} |
11 changes: 10 additions & 1 deletion
11
...mc-regression/float13_true-unreach-call.i → ...loatingPoint/regression/c/cbmc_float13_.i
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
9 changes: 9 additions & 0 deletions
9
...mc-regression/float14_true-unreach-call.i → ...loatingPoint/regression/c/cbmc_float14_.i
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
11 changes: 10 additions & 1 deletion
11
...mc-regression/float19_true-unreach-call.i → ...loatingPoint/regression/c/cbmc_float19_.i
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
27 changes: 27 additions & 0 deletions
27
trunk/examples/programs/FloatingPoint/regression/c/cbmc_float1_.i
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
//#Safe | ||
|
||
/* | ||
* Taken from CBMC's regression test suite | ||
* (http://svn.cprover.org/svn/cbmc/trunk/regression/cbmc/). | ||
* | ||
* The overflow checks were omitted as these require more elaborate assertions. | ||
*/ | ||
|
||
extern void __VERIFIER_error(void); | ||
int main() { | ||
double x; | ||
int y; | ||
|
||
x=2; | ||
x-=0.6; | ||
y=x; | ||
|
||
if(!(y==1)) __VERIFIER_error(); | ||
|
||
x=2; | ||
x-=0.4; | ||
y=x; | ||
|
||
|
||
if(!(y==1)) __VERIFIER_error(); | ||
} |
11 changes: 10 additions & 1 deletion
11
...ession/float20_true-unreach-call__Part1.i → ...gPoint/regression/c/cbmc_float20__Part1.i
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
11 changes: 10 additions & 1 deletion
11
...ession/float20_true-unreach-call__Part3.i → ...gPoint/regression/c/cbmc_float20__Part3.i
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
31 changes: 31 additions & 0 deletions
31
trunk/examples/programs/FloatingPoint/regression/c/cbmc_float2_.i
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
//#Safe | ||
|
||
/* | ||
* Taken from CBMC's regression test suite | ||
* (http://svn.cprover.org/svn/cbmc/trunk/regression/cbmc/). | ||
* | ||
* The overflow checks were omitted as these require more elaborate assertions. | ||
*/ | ||
|
||
extern void __VERIFIER_error(void); | ||
|
||
int main() | ||
{ | ||
float a; | ||
double b; | ||
|
||
|
||
a=1.25L; | ||
if(!(a==1.25)) __VERIFIER_error(); | ||
|
||
b=1.250; | ||
if(!(b==1.25)) __VERIFIER_error(); | ||
|
||
|
||
a=0.5e2; | ||
if(!(a==50)) __VERIFIER_error(); | ||
|
||
|
||
a=0x1.4p+4; | ||
if(!(a==20)) __VERIFIER_error(); | ||
} |
11 changes: 10 additions & 1 deletion
11
...ression/float4_true-unreach-call__PART1.i → ...ngPoint/regression/c/cbmc_float4__PART1.i
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
11 changes: 10 additions & 1 deletion
11
...ression/float4_true-unreach-call__PART2.i → ...ngPoint/regression/c/cbmc_float4__PART2.i
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
Oops, something went wrong.