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
6ac06792
Commit
6ac06792
authored
5 years ago
by
David Bühler
Committed by
Andre Maroneze
5 years ago
Browse files
Options
Downloads
Patches
Plain Diff
[Eva] Eval_terms: fully supports is_plus_infinity and is_minus_infinity.
parent
6eb796a0
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/plugins/value/legacy/eval_terms.ml
+15
-0
15 additions, 0 deletions
src/plugins/value/legacy/eval_terms.ml
with
15 additions
and
0 deletions
src/plugins/value/legacy/eval_terms.ml
+
15
−
0
View file @
6ac06792
...
...
@@ -640,6 +640,8 @@ let known_logic_funs = [
let
known_predicates
=
[
"
\\
warning"
,
ACSL
;
"
\\
is_finite"
,
ACSL
;
"
\\
is_plus_infinity"
,
ACSL
;
"
\\
is_minus_infinity"
,
ACSL
;
"
\\
is_NaN"
,
ACSL
;
"
\\
eq_float"
,
ACSL
;
"
\\
ne_float"
,
ACSL
;
...
...
@@ -1788,9 +1790,22 @@ let reduce_by_known_papp ~alarm_mode env positive li _labels args =
with
LogicEvalError
_
|
Not_an_exact_loc
|
Cvalue
.
V
.
Not_based_on_null
->
env
in
let
reduce_by_infinity
~
pos
prec
f
=
let
inf
=
if
pos
then
Fval
.
pos_infinity
prec
else
Fval
.
neg_infinity
prec
in
let
fval
=
if
positive
then
inf
else
Fval
.(
join
nan
(
join
(
Fval
.
neg
inf
)
(
top_finite
prec
)))
in
Fval
.
narrow
fval
f
in
match
positive
,
li
.
l_var_info
.
lv_name
,
args
with
|
_
,
"
\\
is_finite"
,
[
arg
]
->
reduce_float
(
Fval
.
backward_is_finite
~
positive
)
arg
|
_
,
"
\\
is_plus_infinity"
,
[
arg
]
->
reduce_float
(
reduce_by_infinity
~
pos
:
true
)
arg
|
_
,
"
\\
is_minus_infinity"
,
[
arg
]
->
reduce_float
(
reduce_by_infinity
~
pos
:
false
)
arg
|
_
,
"
\\
is_NaN"
,
[
arg
]
->
reduce_float
(
fun
_fkind
->
Fval
.
backward_is_nan
~
positive
)
arg
|
_
,
(
"
\\
eq_float"
|
"
\\
eq_double"
)
,
[
t1
;
t2
]
->
...
...
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