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
923c1594
Commit
923c1594
authored
5 years ago
by
Allan Blanchard
Browse files
Options
Downloads
Patches
Plain Diff
[ghost] Clarifies a function in 'ghost_accesses'
parent
8a89f4c0
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/kernel_internals/typing/ghost_accesses.ml
+8
-5
8 additions, 5 deletions
src/kernel_internals/typing/ghost_accesses.ml
with
8 additions
and
5 deletions
src/kernel_internals/typing/ghost_accesses.ml
+
8
−
5
View file @
923c1594
...
...
@@ -73,7 +73,7 @@ module Error = struct
"Call via a function pointer cannot be checked"
;
end
let
is_ret_var
vi
=
let
is_
generated_
ret_var
vi
=
String
.
equal
vi
.
vorig_name
"__retres"
let
get_lvalue
=
function
...
...
@@ -81,7 +81,8 @@ let get_lvalue = function
|
Local_init
(
vi
,
_
,
_
)
->
Some
(
Cil
.
var
vi
)
|
_
->
None
let
rec
ghost_term_type
=
function
let
rec
ghost_term_type
t
=
match
(
Logic_utils
.
unroll_type
t
)
with
|
Ctype
t
->
isGhostType
t
|
t
when
Logic_const
.
is_set_type
t
->
ghost_term_type
(
Logic_const
.
type_of_element
t
)
...
...
@@ -128,7 +129,8 @@ class visitor = object(self)
if
vi
.
vghost
&&
vi
.
vreferenced
&&
not
(
Kernel_function
.
has_definition
kf
)
then
begin
let
spec
=
try
Annotations
.
funspec
~
populate
:
false
kf
let
spec
=
try
Annotations
.
funspec
~
populate
:
false
kf
with
_
->
empty_funspec
()
in
if
is_empty_funspec
spec
then
self
#
bad_ghost_function
kf
...
...
@@ -137,11 +139,12 @@ class visitor = object(self)
|
_
->
Cil
.
DoChildren
method
!
vvdec
v
=
let
current
,
source
=
match
prefered_loc
with
let
current
,
source
=
match
prefered_loc
with
|
Some
l
->
false
,
l
|
None
->
true
,
(
Log
.
get_current_source
()
)
in
if
not
(
is_ret_var
v
)
&&
not
(
isWFGhostType
v
.
vtype
)
then
if
not
(
is_
generated_
ret_var
v
)
&&
not
(
isWFGhostType
v
.
vtype
)
then
Error
.
invalid_ghost_type_for_varinfo
~
once
:
true
~
current
~
source
v
;
if
isFunctionType
(
unrollType
v
.
vtype
)
then
begin
let
ftype
=
getReturnType
(
unrollType
v
.
vtype
)
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