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
413f5980
Commit
413f5980
authored
5 years ago
by
Patrick Baudin
Committed by
Patrick Baudin
5 years ago
Browse files
Options
Downloads
Patches
Plain Diff
[WP] fixes some points about \exit_status
parent
88263636
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/plugins/wp/LogicSemantics.ml
+1
-1
1 addition, 1 deletion
src/plugins/wp/LogicSemantics.ml
src/plugins/wp/RefUsage.ml
+3
-1
3 additions, 1 deletion
src/plugins/wp/RefUsage.ml
src/plugins/wp/normAtLabels.ml
+1
-1
1 addition, 1 deletion
src/plugins/wp/normAtLabels.ml
with
5 additions
and
3 deletions
src/plugins/wp/LogicSemantics.ml
+
1
−
1
View file @
413f5980
...
@@ -912,7 +912,7 @@ struct
...
@@ -912,7 +912,7 @@ struct
let
assignable_lval
env
~
unfold
lv
=
let
assignable_lval
env
~
unfold
lv
=
match
fst
lv
with
match
fst
lv
with
|
TResult
_
->
[]
(* special case ! *)
|
TResult
_
|
TVar
{
lv_name
=
"
\\
exit_status"
}
->
[]
(* special case ! *)
|
_
->
|
_
->
let
offsets
=
let
offsets
=
let
obj
=
Ctypes
.
object_of_logic_type
(
Cil
.
typeOfTermLval
lv
)
in
let
obj
=
Ctypes
.
object_of_logic_type
(
Cil
.
typeOfTermLval
lv
)
in
...
...
This diff is collapsed.
Click to expand it.
src/plugins/wp/RefUsage.ml
+
3
−
1
View file @
413f5980
...
@@ -449,7 +449,7 @@ and term (env:ctx) (t:term) : model = match t.term_node with
...
@@ -449,7 +449,7 @@ and term (env:ctx) (t:term) : model = match t.term_node with
(* --- Lvalues --- *)
(* --- Lvalues --- *)
and
term_lval
env
(
h
,
ofs
)
=
match
h
with
and
term_lval
env
(
h
,
ofs
)
=
match
h
with
|
TResult
_
->
nothing
|
TResult
_
|
TVar
{
lv_name
=
"
\\
exit_status"
}
->
nothing
|
TVar
(
{
lv_origin
=
None
;
lv_kind
=
LVLocal
}
as
lvar
)
->
|
TVar
(
{
lv_origin
=
None
;
lv_kind
=
LVLocal
}
as
lvar
)
->
(* var bound by a \\let *)
(* var bound by a \\let *)
load
(
term_offset
env
(
get_tlet
env
.
local
lvar
)
ofs
)
load
(
term_offset
env
(
get_tlet
env
.
local
lvar
)
ofs
)
...
@@ -470,6 +470,8 @@ and term_offset env (l:model) = function
...
@@ -470,6 +470,8 @@ and term_offset env (l:model) = function
and
addr_lval
env
(
h
,
ofs
)
=
match
h
with
and
addr_lval
env
(
h
,
ofs
)
=
match
h
with
|
TResult
_
->
Wp_parameters
.
abort
~
current
:
true
"Address of
\\
result"
|
TResult
_
->
Wp_parameters
.
abort
~
current
:
true
"Address of
\\
result"
|
TVar
{
lv_name
=
"
\\
exit_status"
}
->
Wp_parameters
.
abort
~
current
:
true
"Address of
\\
exit_status"
|
TMem
t
->
term_offset
env
(
term
env
t
)
ofs
|
TMem
t
->
term_offset
env
(
term
env
t
)
ofs
|
TVar
(
{
lv_origin
=
Some
x
}
)
->
term_offset
env
(
Loc_var
x
)
ofs
|
TVar
(
{
lv_origin
=
Some
x
}
)
->
term_offset
env
(
Loc_var
x
)
ofs
|
TVar
(
{
lv_origin
=
None
}
as
x
)
->
|
TVar
(
{
lv_origin
=
None
}
as
x
)
->
...
...
This diff is collapsed.
Click to expand it.
src/plugins/wp/normAtLabels.ml
+
1
−
1
View file @
413f5980
...
@@ -65,7 +65,7 @@ class norm_at (mapping : label_mapping) =
...
@@ -65,7 +65,7 @@ class norm_at (mapping : label_mapping) =
|
TAddrOf
(
h
,
_
)
|
TLval
(
h
,
_
)
|
TStartOf
(
h
,
_
)
->
|
TAddrOf
(
h
,
_
)
|
TLval
(
h
,
_
)
|
TStartOf
(
h
,
_
)
->
let
old_label
=
current_label
in
let
old_label
=
current_label
in
let
at_label
=
match
h
with
let
at_label
=
match
h
with
|
TResult
_
->
Some
Clabels
.
post
|
TResult
_
|
TVar
{
lv_name
=
"
\\
exit_status"
}
->
Some
Clabels
.
post
|
_
->
old_label
|
_
->
old_label
in
in
current_label
<-
None
;
current_label
<-
None
;
...
...
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