Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
frama-c
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container Registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
pub
frama-c
Commits
4a0b63d1
"src/plugins/e-acsl/share/e-acsl/e_acsl_mmodel_api.h" did not exist on "a705f9e9aa68ac8bbe6f368f61aeffcc4cd69c1d"
Commit
4a0b63d1
authored
3 years ago
by
David Bühler
Browse files
Options
Downloads
Patches
Plain Diff
[Eva] Adds tests of the evaluation of ACSL predicate is_infinite.
parent
ccd32410
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
tests/float/oracle/special_floats.res.oracle
+54
-27
54 additions, 27 deletions
tests/float/oracle/special_floats.res.oracle
tests/float/special_floats.c
+24
-1
24 additions, 1 deletion
tests/float/special_floats.c
with
78 additions
and
28 deletions
tests/float/oracle/special_floats.res.oracle
+
54
−
27
View file @
4a0b63d1
...
@@ -8,11 +8,11 @@
...
@@ -8,11 +8,11 @@
global_infinity ∈ {inf}
global_infinity ∈ {inf}
global_nan ∈ NaN
global_nan ∈ NaN
[eva] computing for function nan_comparisons <- main.
[eva] computing for function nan_comparisons <- main.
Called from tests/float/special_floats.c:
94
.
Called from tests/float/special_floats.c:
117
.
[eva] Recording results for nan_comparisons
[eva] Recording results for nan_comparisons
[eva] Done for function nan_comparisons
[eva] Done for function nan_comparisons
[eva] computing for function is_infinite <- main.
[eva] computing for function is_infinite <- main.
Called from tests/float/special_floats.c:
95
.
Called from tests/float/special_floats.c:
118
.
[eva] tests/float/special_floats.c:29: check 'true' got status valid.
[eva] tests/float/special_floats.c:29: check 'true' got status valid.
[eva:alarm] tests/float/special_floats.c:30: Warning:
[eva:alarm] tests/float/special_floats.c:30: Warning:
check 'false' got status invalid.
check 'false' got status invalid.
...
@@ -20,53 +20,80 @@
...
@@ -20,53 +20,80 @@
check 'false' got status invalid.
check 'false' got status invalid.
[eva:alarm] tests/float/special_floats.c:32: Warning:
[eva:alarm] tests/float/special_floats.c:32: Warning:
check 'false' got status invalid.
check 'false' got status invalid.
[eva:alarm] tests/float/special_floats.c:3
4
: Warning:
[eva:alarm] tests/float/special_floats.c:3
3
: Warning:
check 'false' got status invalid.
check 'false' got status invalid.
[eva] tests/float/special_floats.c:35: check 'true' got status valid.
[eva:alarm] tests/float/special_floats.c:35: Warning:
[eva] tests/float/special_floats.c:36: check 'true' got status valid.
[eva:alarm] tests/float/special_floats.c:37: Warning:
check 'false' got status invalid.
check 'false' got status invalid.
[eva] tests/float/special_floats.c:36: check 'true' got status valid.
[eva] tests/float/special_floats.c:37: check 'true' got status valid.
[eva] tests/float/special_floats.c:38: check 'true' got status valid.
[eva:alarm] tests/float/special_floats.c:39: Warning:
[eva:alarm] tests/float/special_floats.c:39: Warning:
check 'false' got status invalid.
check 'false' got status invalid.
[eva] tests/float/special_floats.c:40: check 'true' got status valid.
[eva:alarm] tests/float/special_floats.c:41: Warning:
[eva:alarm] tests/float/special_floats.c:41: Warning:
check 'false' got status invalid.
check 'false' got status invalid.
[eva:alarm] tests/float/special_floats.c:42: Warning:
[eva] tests/float/special_floats.c:42: check 'true' got status valid.
[eva:alarm] tests/float/special_floats.c:43: Warning:
check 'false' got status invalid.
check 'false' got status invalid.
[eva:alarm] tests/float/special_floats.c:46: Warning:
[eva:alarm] tests/float/special_floats.c:44: Warning:
assertion got status unknown.
check 'false' got status invalid.
[eva] tests/float/special_floats.c:47: Frama_C_show_each_pos_infinity: {inf}
[eva:alarm] tests/float/special_floats.c:45: Warning:
check 'false' got status invalid.
[eva:alarm] tests/float/special_floats.c:49: Warning:
check 'unknown' got status unknown.
[eva:alarm] tests/float/special_floats.c:50: Warning:
[eva:alarm] tests/float/special_floats.c:50: Warning:
check 'unknown' got status unknown.
[eva:alarm] tests/float/special_floats.c:51: Warning:
check 'unknown' got status unknown.
[eva:alarm] tests/float/special_floats.c:52: Warning:
check 'false' got status invalid.
[eva:alarm] tests/float/special_floats.c:53: Warning:
check 'unknown' got status unknown.
[eva:alarm] tests/float/special_floats.c:57: Warning:
assertion got status unknown.
assertion got status unknown.
[eva] tests/float/special_floats.c:5
1
: Frama_C_show_each_
neg
_infinity: {
-
inf}
[eva] tests/float/special_floats.c:5
8
: Frama_C_show_each_
pos
_infinity: {inf}
[eva:alarm] tests/float/special_floats.c:
54
: Warning:
[eva:alarm] tests/float/special_floats.c:
61
: Warning:
assertion got status unknown.
assertion got status unknown.
[eva:alarm] tests/float/special_floats.c:55: Warning:
[eva] tests/float/special_floats.c:62: Frama_C_show_each_neg_infinity: {-inf}
[eva:alarm] tests/float/special_floats.c:65: Warning:
assertion got status unknown.
assertion got status unknown.
[eva] tests/float/special_floats.c:56:
[eva] tests/float/special_floats.c:66:
Frama_C_show_each_infinities: [-inf .. inf]
[eva:alarm] tests/float/special_floats.c:69: Warning:
assertion got status unknown.
[eva:alarm] tests/float/special_floats.c:70: Warning:
assertion got status unknown.
[eva] tests/float/special_floats.c:71:
Frama_C_show_each_finite_nan:
[-1.79769313486e+308 .. 1.79769313486e+308] ∪ {NaN}
[eva:alarm] tests/float/special_floats.c:74: Warning:
assertion got status unknown.
[eva] tests/float/special_floats.c:75:
Frama_C_show_each_finite_nan:
Frama_C_show_each_finite_nan:
[-1.79769313486e+308 .. 1.79769313486e+308] ∪ {NaN}
[-1.79769313486e+308 .. 1.79769313486e+308] ∪ {NaN}
[eva:alarm] tests/float/special_floats.c:
59
: Warning:
[eva:alarm] tests/float/special_floats.c:
78
: Warning:
assertion got status unknown.
assertion got status unknown.
[eva] tests/float/special_floats.c:
60
:
[eva] tests/float/special_floats.c:
79
:
Frama_C_show_each_top: [-inf .. inf] ∪ {NaN}
Frama_C_show_each_top: [-inf .. inf] ∪ {NaN}
[eva:alarm] tests/float/special_floats.c:63: Warning:
[eva:alarm] tests/float/special_floats.c:82: Warning:
assertion got status unknown.
[eva] tests/float/special_floats.c:83: Frama_C_show_each_pos_infinity: {inf;NaN}
[eva:alarm] tests/float/special_floats.c:86: Warning:
assertion got status unknown.
assertion got status unknown.
[eva] tests/float/special_floats.c:
64
: Frama_C_show_each_
pos
_infinity: {inf
;NaN
}
[eva] tests/float/special_floats.c:
87
: Frama_C_show_each_
neg
_infinity: {
-
inf}
[eva] Recording results for is_infinite
[eva] Recording results for is_infinite
[eva] Done for function is_infinite
[eva] Done for function is_infinite
[eva] computing for function macro_infinity <- main.
[eva] computing for function macro_infinity <- main.
Called from tests/float/special_floats.c:9
6
.
Called from tests/float/special_floats.c:
11
9.
[eva] tests/float/special_floats.c:7
4
: Frama_C_show_each_infinity: {inf}
[eva] tests/float/special_floats.c:
9
7: Frama_C_show_each_infinity: {inf}
[eva] tests/float/special_floats.c:
75
: assertion got status valid.
[eva] tests/float/special_floats.c:
98
: assertion got status valid.
[eva] Recording results for macro_infinity
[eva] Recording results for macro_infinity
[eva] Done for function macro_infinity
[eva] Done for function macro_infinity
[eva] computing for function macro_nan <- main.
[eva] computing for function macro_nan <- main.
Called from tests/float/special_floats.c:
97
.
Called from tests/float/special_floats.c:
120
.
[eva] tests/float/special_floats.c:
84
: Frama_C_show_each_nan: NaN
[eva] tests/float/special_floats.c:
107
: Frama_C_show_each_nan: NaN
[eva] tests/float/special_floats.c:8
5
: assertion got status valid.
[eva] tests/float/special_floats.c:
10
8: assertion got status valid.
[eva] tests/float/special_floats.c:
86
: assertion got status valid.
[eva] tests/float/special_floats.c:
109
: assertion got status valid.
[eva] tests/float/special_floats.c:
87
: assertion got status valid.
[eva] tests/float/special_floats.c:
110
: assertion got status valid.
[eva] Recording results for macro_nan
[eva] Recording results for macro_nan
[eva] Done for function macro_nan
[eva] Done for function macro_nan
[eva] Recording results for main
[eva] Recording results for main
...
...
This diff is collapsed.
Click to expand it.
tests/float/special_floats.c
+
24
−
1
View file @
4a0b63d1
...
@@ -28,19 +28,30 @@ void is_infinite () {
...
@@ -28,19 +28,30 @@ void is_infinite () {
double
zero
=
-
0
.;
double
zero
=
-
0
.;
/*@ check true: \is_finite(zero); */
/*@ check true: \is_finite(zero); */
/*@ check false: !\is_finite(zero); */
/*@ check false: !\is_finite(zero); */
/*@ check false: \is_infinite(zero); */
/*@ check false: \is_plus_infinity(zero); */
/*@ check false: \is_plus_infinity(zero); */
/*@ check false: \is_minus_infinity(zero); */
/*@ check false: \is_minus_infinity(zero); */
double
inf
=
INFINITY
;
double
inf
=
INFINITY
;
/*@ check false: \is_finite(inf); */
/*@ check false: \is_finite(inf); */
/*@ check true: !\is_finite(inf); */
/*@ check true: !\is_finite(inf); */
/*@ check true: \is_infinite(inf); */
/*@ check true: \is_plus_infinity(inf); */
/*@ check true: \is_plus_infinity(inf); */
/*@ check false: \is_minus_infinity(inf); */
/*@ check false: \is_minus_infinity(inf); */
double
nan
=
NAN
;
double
nan
=
NAN
;
/*@ check false: \is_finite(nan); */
/*@ check false: \is_finite(nan); */
/*@ check true: !\is_finite(nan); */
/*@ check true: !\is_finite(nan); */
/*@ check false: \is_infinite(nan); */
/*@ check false: \is_plus_infinity(nan); */
/*@ check false: \is_plus_infinity(nan); */
/*@ check false: \is_minus_infinity(nan); */
/*@ check false: \is_minus_infinity(nan); */
double
d
=
any_double
;
double
d
;
/* Tests the evaluation on imprecise values. */
d
=
rand
?
zero
:
(
rand
?
-
inf
:
nan
);
/*@ check unknown: \is_finite(d); */
/*@ check unknown: !\is_finite(d); */
/*@ check unknown: \is_infinite(d); */
/*@ check false: \is_plus_infinity(d); */
/*@ check unknown: \is_minus_infinity(d); */
d
=
any_double
;
/* Tests the reduction by assertions. */
/* Tests the reduction by assertions. */
if
(
rand
)
{
if
(
rand
)
{
/*@ assert \is_plus_infinity(d); */
/*@ assert \is_plus_infinity(d); */
...
@@ -50,11 +61,19 @@ void is_infinite () {
...
@@ -50,11 +61,19 @@ void is_infinite () {
/*@ assert \is_minus_infinity(d); */
/*@ assert \is_minus_infinity(d); */
Frama_C_show_each_neg_infinity
(
d
);
Frama_C_show_each_neg_infinity
(
d
);
}
}
if
(
rand
)
{
/*@ assert \is_infinite(d); */
Frama_C_show_each_infinities
(
d
);
}
if
(
rand
)
{
if
(
rand
)
{
/*@ assert !\is_plus_infinity(d); */
/*@ assert !\is_plus_infinity(d); */
/*@ assert !\is_minus_infinity(d); */
/*@ assert !\is_minus_infinity(d); */
Frama_C_show_each_finite_nan
(
d
);
Frama_C_show_each_finite_nan
(
d
);
}
}
if
(
rand
)
{
/*@ assert !\is_infinite(d); */
Frama_C_show_each_finite_nan
(
d
);
}
if
(
rand
)
{
if
(
rand
)
{
/*@ assert !\is_finite(d); */
/*@ assert !\is_finite(d); */
Frama_C_show_each_top
(
d
);
Frama_C_show_each_top
(
d
);
...
@@ -63,6 +82,10 @@ void is_infinite () {
...
@@ -63,6 +82,10 @@ void is_infinite () {
/*@ assert !\is_finite(d); */
/*@ assert !\is_finite(d); */
Frama_C_show_each_pos_infinity
(
d
);
Frama_C_show_each_pos_infinity
(
d
);
}
}
if
(
d
<
0
.)
{
/*@ assert \is_infinite(d); */
Frama_C_show_each_neg_infinity
(
d
);
}
}
}
float
global_infinity
=
INFINITY
;
float
global_infinity
=
INFINITY
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment