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
56ff49f9
Commit
56ff49f9
authored
2 years ago
by
Valentin Perrelle
Committed by
David Bühler
2 years ago
Browse files
Options
Downloads
Patches
Plain Diff
[Eva] multidim: improve precision when an expression is not in the valuation
parent
47820e55
No related branches found
Branches containing commit
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/domains/multidim_domain.ml
+7
-6
7 additions, 6 deletions
src/plugins/value/domains/multidim_domain.ml
with
7 additions
and
6 deletions
src/plugins/value/domains/multidim_domain.ml
+
7
−
6
View file @
56ff49f9
...
@@ -628,15 +628,16 @@ struct
...
@@ -628,15 +628,16 @@ struct
(* Eva Transfer *)
(* Eva Transfer *)
let
make_oracle
valuation
:
Cil_types
.
exp
->
value
=
fun
exp
->
let
valuation_to_oracle
state
valuation
:
Cil_types
.
exp
->
value
=
fun
exp
->
let
multidim_oracle
=
mk_oracle
state
in
match
valuation
.
Abstract_domain
.
find
exp
with
match
valuation
.
Abstract_domain
.
find
exp
with
|
`Top
->
Value
.
to
p
|
`Top
->
multidim_oracle
ex
p
|
`Value
{
value
=
{
v
=
`Bottom
}}
->
Value
.
bottom
|
`Value
{
value
=
{
v
=
`Bottom
}}
->
Value
.
bottom
|
`Value
{
value
=
{
v
=
`Value
value
}}
->
value
|
`Value
{
value
=
{
v
=
`Value
value
}}
->
value
let
assume_exp
valuation
expr
record
state'
=
let
assume_exp
valuation
expr
record
state'
=
state'
>>-
fun
state
->
state'
>>-
fun
state
->
let
oracle
=
make_oracl
e
valuation
in
let
oracle
=
valuation_to_oracle
stat
e
valuation
in
match
expr
.
enode
with
match
expr
.
enode
with
|
Lval
lv
->
|
Lval
lv
->
let
value
=
Value_or_Uninitialized
.
from_flagged
record
.
value
in
let
value
=
Value_or_Uninitialized
.
from_flagged
record
.
value
in
...
@@ -726,9 +727,9 @@ struct
...
@@ -726,9 +727,9 @@ struct
overwrite
~
oracle
state
dst
src
overwrite
~
oracle
state
dst
src
let
assign
_kinstr
left
expr
assigned_value
valuation
state
=
let
assign
_kinstr
left
expr
assigned_value
valuation
state
=
let
oracle
=
valuation_to_oracle
state
valuation
in
let
state
=
update_array_segmentation
left
.
lval
(
Some
expr
)
state
in
let
state
=
update_array_segmentation
left
.
lval
(
Some
expr
)
state
in
assume_valuation
valuation
state
>>-:
fun
state
->
assume_valuation
valuation
state
>>-:
fun
state
->
let
oracle
=
make_oracle
valuation
in
assign_lval
left
.
lval
assigned_value
oracle
state
assign_lval
left
.
lval
assigned_value
oracle
state
let
assume
_stmt
_expr
_pos
valuation
state
=
let
assume
_stmt
_expr
_pos
valuation
state
=
...
@@ -739,7 +740,7 @@ struct
...
@@ -739,7 +740,7 @@ struct
then
then
Self
.
abort
~
current
:
true
Self
.
abort
~
current
:
true
"The multidim domain does not support recursive calls yet"
;
"The multidim domain does not support recursive calls yet"
;
let
oracle
=
make_oracl
e
valuation
in
let
oracle
=
valuation_to_oracle
stat
e
valuation
in
let
bind
state
arg
=
let
bind
state
arg
=
state
>>-:
assign_lval
(
Cil
.
var
arg
.
formal
)
arg
.
avalue
oracle
state
>>-:
assign_lval
(
Cil
.
var
arg
.
formal
)
arg
.
avalue
oracle
in
in
...
@@ -756,7 +757,7 @@ struct
...
@@ -756,7 +757,7 @@ struct
let
show_expr
valuation
state
fmt
expr
=
let
show_expr
valuation
state
fmt
expr
=
match
expr
.
enode
with
match
expr
.
enode
with
|
Lval
lval
|
StartOf
lval
->
|
Lval
lval
|
StartOf
lval
->
let
oracle
=
make_oracl
e
valuation
in
let
oracle
=
valuation_to_oracle
stat
e
valuation
in
begin
match
Location
.
of_lval
oracle
lval
with
begin
match
Location
.
of_lval
oracle
lval
with
|
`Top
->
Format
.
fprintf
fmt
"%s"
(
Unicode
.
top_string
()
)
|
`Top
->
Format
.
fprintf
fmt
"%s"
(
Unicode
.
top_string
()
)
|
`Value
loc
->
|
`Value
loc
->
...
...
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