Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
pub
frama-c
Commits
68e3b43a
Commit
68e3b43a
authored
Oct 15, 2020
by
Allan Blanchard
Browse files
[wp] Small refacto for initializers in CfgWP
parent
5221a79e
Changes
1
Show whitespace changes
Inline
Side-by-side
src/plugins/wp/cfgWP.ml
View file @
68e3b43a
...
...
@@ -248,13 +248,6 @@ struct
path
=
path
;
}
let
assume_vcs
?
descr
?
filter
?
init
whs
vc
=
List
.
fold_left
(
fun
vc
(
warn
,
(
hvalue
,
hinit
))
->
let
vc
=
assume_vc
?
descr
?
filter
?
init
~
warn
[
hvalue
]
vc
in
assume_vc
?
descr
?
filter
?
init
~
warn
[
hinit
]
vc
)
vc
whs
(* -------------------------------------------------------------------------- *)
(* --- Branching --- *)
(* -------------------------------------------------------------------------- *)
...
...
@@ -908,13 +901,14 @@ struct
[
C
.
unchanged
shere
sinit
v
]
in
{
wp
with
vcs
=
gmap
const_vc
wp
.
vcs
})
let
init
wenv
var
init
wp
=
in_wenv
wenv
wp
let
init
wenv
var
opt_
init
wp
=
in_wenv
wenv
wp
(
fun
env
wp
->
let
assume
=
assume_vc
~
descr
:
"Initializer"
~
filter
:
true
~
init
:
true
in
let
sigma
=
L
.
current
env
in
let
init_vc
=
assume_vcs
~
init
:
true
~
filter
:
true
~
descr
:
"Initializer"
(
C
.
init
~
sigma
var
init
)
let
init_vc
vc
=
List
.
fold_left
(
fun
vc
(
warn
,
(
hv
,
hi
))
->
assume
~
warn
[
hi
]
(
assume
~
warn
[
hv
]
vc
))
vc
(
C
.
init
~
sigma
var
opt_
init
)
in
{
wp
with
vcs
=
gmap
init_vc
wp
.
vcs
})
(* -------------------------------------------------------------------------- *)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment