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
7768ac8a
Commit
7768ac8a
authored
4 years ago
by
Allan Blanchard
Committed by
Loïc Correnson
4 years ago
Browse files
Options
Downloads
Patches
Plain Diff
[wp] constructor init as function calls
parent
23816fb2
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/wp/cfgCalculus.ml
+17
-19
17 additions, 19 deletions
src/plugins/wp/cfgCalculus.ml
with
17 additions
and
19 deletions
src/plugins/wp/cfgCalculus.ml
+
17
−
19
View file @
7768ac8a
...
@@ -238,31 +238,29 @@ struct
...
@@ -238,31 +238,29 @@ struct
(* Compute a single instruction *)
(* Compute a single instruction *)
and
instr
env
s
instr
(
w
:
W
.
t_prop
)
:
W
.
t_prop
=
and
instr
env
s
instr
(
w
:
W
.
t_prop
)
:
W
.
t_prop
=
let
do_call
res
fct
args
_loc
=
match
Kernel_function
.
get_called
fct
with
|
Some
kf
->
call
env
s
res
kf
args
w
|
None
->
match
Dyncall
.
get
~
bhv
:
env
.
mode
.
bhv
.
b_name
s
with
|
None
->
WpLog
.
warning
~
once
:
true
"Missing dynamic-call infos."
;
let
ad
=
WpPropId
.
mk_stmt_assigns_any_desc
s
in
W
.
use_assigns
env
.
we
None
ad
(
W
.
merge
env
.
we
w
env
.
wk
)
|
Some
(
prop
,
kfs
)
->
let
id
=
WpPropId
.
mk_property
prop
in
W
.
call_dynamic
env
.
we
s
id
fct
@@
List
.
map
(
fun
kf
->
kf
,
call
env
s
res
kf
args
w
)
kfs
in
match
instr
with
match
instr
with
|
Skip
_
|
Code_annot
_
->
w
|
Skip
_
|
Code_annot
_
->
w
|
Set
(
lv
,
e
,_
)
->
W
.
assign
env
.
we
s
lv
e
w
|
Set
(
lv
,
e
,_
)
->
W
.
assign
env
.
we
s
lv
e
w
|
Local_init
(
x
,
AssignInit
i
,_
)
->
W
.
init
env
.
we
x
(
Some
i
)
w
|
Local_init
(
x
,
AssignInit
i
,_
)
->
W
.
init
env
.
we
x
(
Some
i
)
w
|
Local_init
(
x
,
ConsInit
_
,_
)
->
|
Local_init
(
x
,
ConsInit
(
fct
,
args
,
kind
)
,
loc
)
->
WpLog
.
warning
~
once
:
true
Cil
.
treat_constructor_as_func
do_call
x
fct
args
kind
loc
"Ignored constructor init for '%a' (sound)."
|
Call
(
res
,
fct
,
args
,
loc
)
->
do_call
res
fct
args
loc
Varinfo
.
pretty
x
;
w
|
Asm
_
->
|
Asm
_
->
W
.
use_assigns
env
.
we
None
(
WpPropId
.
mk_asm_assigns_desc
s
)
w
W
.
use_assigns
env
.
we
None
(
WpPropId
.
mk_asm_assigns_desc
s
)
w
|
Call
(
r
,
fct
,
es
,_
)
->
begin
match
Kernel_function
.
get_called
fct
with
|
Some
kf
->
call
env
s
r
kf
es
w
|
None
->
match
Dyncall
.
get
~
bhv
:
env
.
mode
.
bhv
.
b_name
s
with
|
None
->
WpLog
.
warning
~
once
:
true
"Missing dynamic-call infos."
;
let
ad
=
WpPropId
.
mk_stmt_assigns_any_desc
s
in
W
.
use_assigns
env
.
we
None
ad
(
W
.
merge
env
.
we
w
env
.
wk
)
|
Some
(
prop
,
kfs
)
->
let
id
=
WpPropId
.
mk_property
prop
in
W
.
call_dynamic
env
.
we
s
id
fct
@@
List
.
map
(
fun
kf
->
kf
,
call
env
s
r
kf
es
w
)
kfs
end
and
call
env
s
r
kf
es
wr
:
W
.
t_prop
=
and
call
env
s
r
kf
es
wr
:
W
.
t_prop
=
let
c
=
CfgAnnot
.
get_call_contract
kf
in
let
c
=
CfgAnnot
.
get_call_contract
kf
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