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
5cda474f
Commit
5cda474f
authored
5 years ago
by
David Bühler
Browse files
Options
Downloads
Patches
Plain Diff
[Eva] Eval_terms: minor simplification in the evaluation of TLogic_coerce.
parent
9911824f
No related branches found
No related tags found
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
+9
-15
9 additions, 15 deletions
src/plugins/value/legacy/eval_terms.ml
with
9 additions
and
15 deletions
src/plugins/value/legacy/eval_terms.ml
+
9
−
15
View file @
5cda474f
...
...
@@ -992,21 +992,15 @@ let rec eval_term ~alarm_mode env t =
||
Logic_const
.
is_boolean_type
t
.
term_type
->
r
|
Ctype
typ
when
Cil
.
isIntegralOrPointerType
typ
->
r
|
Lreal
->
if
Logic_typing
.
is_integral_type
t
.
term_type
then
(* Needs to be converted to reals *)
let
eover
=
V
.
cast_int_to_float
Fval
.
Real
r
.
eover
in
{
etype
=
Cil
.
longDoubleType
;
(** hack until logic type *)
ldeps
=
r
.
ldeps
;
eunder
=
under_from_over
eover
;
eover
;
empty
=
r
.
empty
;
}
else
let
eover
=
V
.
cast_float_to_float
Fval
.
Real
r
.
eover
in
{
etype
=
Cil
.
longDoubleType
;
(** hack until logic type *)
ldeps
=
r
.
ldeps
;
eunder
=
under_from_over
eover
;
eover
;
empty
=
r
.
empty
}
let
eover
=
if
Logic_typing
.
is_integral_type
t
.
term_type
then
V
.
cast_int_to_float
Fval
.
Real
r
.
eover
else
V
.
cast_float_to_float
Fval
.
Real
r
.
eover
in
{
etype
=
Cil
.
longDoubleType
;
(** hack until logic type *)
ldeps
=
r
.
ldeps
;
eover
;
eunder
=
under_from_over
eover
;
empty
=
r
.
empty
}
|
_
->
if
Logic_const
.
is_boolean_type
ltyp
&&
Logic_typing
.
is_integral_type
t
.
term_type
...
...
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