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
5fff66fc
Commit
5fff66fc
authored
1 year ago
by
David Bühler
Browse files
Options
Downloads
Patches
Plain Diff
[Eva] Octagons: optimizes Deps.add.
parent
6bab9ac2
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/eva/domains/octagons.ml
+12
-10
12 additions, 10 deletions
src/plugins/eva/domains/octagons.ml
with
12 additions
and
10 deletions
src/plugins/eva/domains/octagons.ml
+
12
−
10
View file @
5fff66fc
...
@@ -1044,17 +1044,19 @@ module Deps = struct
...
@@ -1044,17 +1044,19 @@ module Deps = struct
is_increasing
previous_deps
.
indirect
deps
.
indirect
is_increasing
previous_deps
.
indirect
deps
.
indirect
let
add
var
deps
(
m
,
i
:
t
)
:
t
=
let
add
var
deps
(
m
,
i
:
t
)
:
t
=
(* If [var] already exists in the state and had bigger dependencies (in rare
let
add_to
(
m
,
i
)
=
cases, a dependency can disappear by reduction), remove the previous deps
VariableToDeps
.
add
var
deps
m
,
from the inverse map to ensure consistency between both maps. *)
BaseToVariables
.
add_deps
var
deps
i
let
i
=
match
VariableToDeps
.
find_opt
var
m
with
|
Some
previous_deps
when
not
(
are_bases_increasing
previous_deps
deps
)
->
BaseToVariables
.
remove_deps
var
previous_deps
i
|
_
->
i
in
in
VariableToDeps
.
add
var
deps
m
,
match
VariableToDeps
.
find_opt
var
m
with
BaseToVariables
.
add_deps
var
deps
i
|
Some
previous_deps
when
Function_Froms
.
Deps
.
equal
previous_deps
deps
->
m
,
i
|
Some
previous_deps
when
not
(
are_bases_increasing
previous_deps
deps
)
->
(* If [var] already exists in the state and had bigger dependencies (a
dependency can disappear by reduction), remove the previous deps
from the inverse map to ensure consistency between both maps. *)
add_to
(
m
,
BaseToVariables
.
remove_deps
var
previous_deps
i
)
|
_
->
add_to
(
m
,
i
)
let
remove
(
var
:
Variable
.
t
)
((
m
,
i
)
:
t
)
:
t
option
=
let
remove
(
var
:
Variable
.
t
)
((
m
,
i
)
:
t
)
:
t
option
=
match
VariableToDeps
.
find_opt
var
m
with
match
VariableToDeps
.
find_opt
var
m
with
...
...
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