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
506306c7
Commit
506306c7
authored
2 years ago
by
Valentin Perrelle
Committed by
David Bühler
2 years ago
Browse files
Options
Downloads
Patches
Plain Diff
[Eva] multidim: more precise oracles for indexes increment
parent
56ff49f9
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/domains/multidim_domain.ml
+6
-6
6 additions, 6 deletions
src/plugins/value/domains/multidim_domain.ml
with
6 additions
and
6 deletions
src/plugins/value/domains/multidim_domain.ml
+
6
−
6
View file @
506306c7
...
@@ -661,7 +661,7 @@ struct
...
@@ -661,7 +661,7 @@ struct
let
update
valuation
state
=
let
update
valuation
state
=
assume_valuation
valuation
state
assume_valuation
valuation
state
let
update_array_segmentation_bounds
vi
expr
(
base_map
,
tracked
as
state
)
=
let
update_array_segmentation_bounds
~
oracle
vi
expr
(
base_map
,
tracked
)
=
let
incr
=
Option
.
bind
expr
(
fun
expr
->
let
incr
=
Option
.
bind
expr
(
fun
expr
->
match
expr
.
Cil_types
.
enode
with
match
expr
.
Cil_types
.
enode
with
|
BinOp
((
PlusA
|
PlusPI
)
,
{
enode
=
Lval
(
Var
vi'
,
NoOffset
)
}
,
exp
,
_typ
)
|
BinOp
((
PlusA
|
PlusPI
)
,
{
enode
=
Lval
(
Var
vi'
,
NoOffset
)
}
,
exp
,
_typ
)
...
@@ -678,7 +678,6 @@ struct
...
@@ -678,7 +678,6 @@ struct
(* Very important : oracle must be the oracle before a non-invertible
(* Very important : oracle must be the oracle before a non-invertible
assignement of the bound to allow removing of eventual empty slice
assignement of the bound to allow removing of eventual empty slice
before the bound leaves the segmentation. *)
before the bound leaves the segmentation. *)
let
oracle
=
mk_oracle
state
in
let
references
=
snd
(
BaseMap
.
find_or_top
base_map
(
Base
.
of_varinfo
vi
))
in
let
references
=
snd
(
BaseMap
.
find_or_top
base_map
(
Base
.
of_varinfo
vi
))
in
let
update_ref
base
base_map
=
let
update_ref
base
base_map
=
let
update
(
memory
,
refs
)
=
let
update
(
memory
,
refs
)
=
...
@@ -701,7 +700,7 @@ struct
...
@@ -701,7 +700,7 @@ struct
in
in
base_map
,
tracked
base_map
,
tracked
let
update_array_segmentation
lval
expr
state
=
let
update_array_segmentation
~
oracle
lval
expr
state
=
match
lval
with
match
lval
with
|
Mem
_
,
_
->
state
(* Do nothing *)
|
Mem
_
,
_
->
state
(* Do nothing *)
|
Var
vi
,
offset
->
|
Var
vi
,
offset
->
...
@@ -709,7 +708,7 @@ struct
...
@@ -709,7 +708,7 @@ struct
|
NoOffset
->
expr
|
NoOffset
->
expr
|
_
->
None
|
_
->
None
in
in
update_array_segmentation_bounds
vi
expr
state
update_array_segmentation_bounds
~
oracle
vi
expr
state
let
assign_lval
lval
assigned_value
oracle
state
=
let
assign_lval
lval
assigned_value
oracle
state
=
match
Location
.
of_lval
oracle
lval
with
match
Location
.
of_lval
oracle
lval
with
...
@@ -728,7 +727,7 @@ struct
...
@@ -728,7 +727,7 @@ struct
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
oracle
=
valuation_to_oracle
state
valuation
in
let
state
=
update_array_segmentation
left
.
lval
(
Some
expr
)
state
in
let
state
=
update_array_segmentation
~
oracle
left
.
lval
(
Some
expr
)
state
in
assume_valuation
valuation
state
>>-:
fun
state
->
assume_valuation
valuation
state
>>-:
fun
state
->
assign_lval
left
.
lval
assigned_value
oracle
state
assign_lval
left
.
lval
assigned_value
oracle
state
...
@@ -775,9 +774,10 @@ struct
...
@@ -775,9 +774,10 @@ struct
List
.
fold_left
enter_one
state
vars
List
.
fold_left
enter_one
state
vars
let
leave_scope
_kf
vars
state
=
let
leave_scope
_kf
vars
state
=
let
oracle
=
mk_oracle
state
in
let
state
=
let
state
=
List
.
fold_left
List
.
fold_left
(
fun
state
vi
->
update_array_segmentation_bounds
vi
None
state
)
(
fun
state
vi
->
update_array_segmentation_bounds
~
oracle
vi
None
state
)
state
vars
state
vars
in
in
let
(
base_map
,
tracked
)
=
state
in
let
(
base_map
,
tracked
)
=
state
in
...
...
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