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
91300226
Commit
91300226
authored
1 year ago
by
Thibault Martin
Committed by
Allan Blanchard
1 year ago
Browse files
Options
Downloads
Patches
Plain Diff
Generic function for emit, using G.is_empty
parent
20e9957a
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/populate_spec.ml
+63
-72
63 additions, 72 deletions
src/kernel_internals/typing/populate_spec.ml
with
63 additions
and
72 deletions
src/kernel_internals/typing/populate_spec.ml
+
63
−
72
View file @
91300226
...
...
@@ -160,7 +160,7 @@ sig
val
combine_default
:
clause
list
->
clause
(* Emit property status depending on the selected mode. *)
val
emit
:
mode
->
kernel_function
->
funbehavior
->
clause
result
->
unit
val
emit
:
mode
->
kernel_function
->
funbehavior
->
clause
->
unit
end
...
...
@@ -216,8 +216,11 @@ struct
Generated
g
(* Interface to call [G.emit]. *)
let
emit
=
G
.
emit
let
emit
mode
kf
bhv
=
function
|
Kept
->
()
|
Generated
_
when
Kernel_function
.
has_definition
kf
->
()
|
Generated
clauses
->
G
.
emit
mode
kf
bhv
clauses
end
(*******************************************************************)
...
...
@@ -298,22 +301,19 @@ struct
in
List
.
iter
(
emit_status
status
)
ppt_l
let
emit
mode
kf
bhv
=
function
|
Kept
|
Generated
[]
->
()
|
Generated
_
when
Kernel_function
.
has_definition
kf
->
()
|
Generated
exits
->
match
mode
with
|
Skip
->
assert
false
|
Safe
->
()
|
ACSL
|
Frama_C
->
emit_status
kf
bhv
exits
Property_status
.
Dont_know
|
Other
mode
->
let
custom_mode
=
get_custom_mode
mode
in
match
custom_mode
.
custom_exits
.
status
with
|
None
->
Kernel
.
warning
~
once
:
true
"Custom status from mode %s not defined for exits"
mode
;
()
|
Some
pst
->
emit_status
kf
bhv
exits
pst
let
emit
mode
kf
bhv
exits
=
match
mode
with
|
Skip
->
assert
false
|
Safe
->
()
|
ACSL
|
Frama_C
->
emit_status
kf
bhv
exits
Property_status
.
Dont_know
|
Other
mode
->
let
custom_mode
=
get_custom_mode
mode
in
match
custom_mode
.
custom_exits
.
status
with
|
None
->
Kernel
.
warning
~
once
:
true
"Custom status from mode %s not defined for exits"
mode
;
()
|
Some
pst
->
emit_status
kf
bhv
exits
pst
end
...
...
@@ -429,22 +429,19 @@ struct
in
List
.
iter
emit
froms
let
emit
mode
kf
bhv
=
function
|
Kept
|
Generated
WritesAny
->
()
|
Generated
_
when
Kernel_function
.
has_definition
kf
->
()
|
Generated
assigns
->
match
mode
with
|
Skip
|
ACSL
->
assert
false
|
Safe
->
()
|
Frama_C
->
emit_status
kf
bhv
assigns
Property_status
.
Dont_know
|
Other
mode
->
let
custom_mode
=
get_custom_mode
mode
in
match
custom_mode
.
custom_assigns
.
status
with
|
None
->
Kernel
.
warning
~
once
:
true
"Custom status from mode %s not defined for assigns"
mode
;
()
|
Some
pst
->
emit_status
kf
bhv
assigns
pst
let
emit
mode
kf
bhv
assigns
=
match
mode
with
|
Skip
|
ACSL
->
assert
false
|
Safe
->
()
|
Frama_C
->
emit_status
kf
bhv
assigns
Property_status
.
Dont_know
|
Other
mode
->
let
custom_mode
=
get_custom_mode
mode
in
match
custom_mode
.
custom_assigns
.
status
with
|
None
->
Kernel
.
warning
~
once
:
true
"Custom status from mode %s not defined for assigns"
mode
;
()
|
Some
pst
->
emit_status
kf
bhv
assigns
pst
end
...
...
@@ -607,25 +604,22 @@ struct
in
Option
.
iter
(
emit_status
status
)
ppt_opt
let
emit
mode
kf
bhv
=
function
|
Kept
|
Generated
FreeAllocAny
->
()
|
Generated
_
when
Kernel_function
.
has_definition
kf
->
()
|
Generated
allocates
->
match
mode
with
|
Skip
->
assert
false
|
Safe
->
()
|
ACSL
->
emit_status
kf
bhv
allocates
Property_status
.
True
|
Frama_C
->
emit_status
kf
bhv
allocates
Property_status
.
Dont_know
|
Other
mode
->
let
custom_mode
=
get_custom_mode
mode
in
match
custom_mode
.
custom_allocates
.
status
with
|
None
->
Kernel
.
warning
~
once
:
true
"Custom status from mode %s not defined for allocates"
mode
;
()
|
Some
pst
->
emit_status
kf
bhv
allocates
pst
let
emit
mode
kf
bhv
allocates
=
match
mode
with
|
Skip
->
assert
false
|
Safe
->
()
|
ACSL
->
emit_status
kf
bhv
allocates
Property_status
.
True
|
Frama_C
->
emit_status
kf
bhv
allocates
Property_status
.
Dont_know
|
Other
mode
->
let
custom_mode
=
get_custom_mode
mode
in
match
custom_mode
.
custom_allocates
.
status
with
|
None
->
Kernel
.
warning
~
once
:
true
"Custom status from mode %s not defined for allocates"
mode
;
()
|
Some
pst
->
emit_status
kf
bhv
allocates
pst
end
...
...
@@ -695,24 +689,21 @@ struct
Property
.
ip_of_terminates
kf
Kglobal
terminates
|>
emit_status
status
let
emit
mode
kf
bhv
=
function
|
Kept
|
Generated
None
->
()
|
Generated
_
when
Kernel_function
.
has_definition
kf
->
()
|
Generated
terminates
->
match
mode
with
|
Skip
->
assert
false
|
ACSL
->
emit_status
kf
bhv
terminates
Property_status
.
True
|
Safe
|
Frama_C
->
emit_status
kf
bhv
terminates
Property_status
.
Dont_know
|
Other
mode
->
let
custom_mode
=
get_custom_mode
mode
in
match
custom_mode
.
custom_terminates
.
status
with
|
None
->
Kernel
.
warning
~
once
:
true
"Custom status from mode %s not defined for terminates"
mode
;
()
|
Some
pst
->
emit_status
kf
bhv
terminates
pst
let
emit
mode
kf
bhv
terminates
=
match
mode
with
|
Skip
->
assert
false
|
ACSL
->
emit_status
kf
bhv
terminates
Property_status
.
True
|
Safe
|
Frama_C
->
emit_status
kf
bhv
terminates
Property_status
.
Dont_know
|
Other
mode
->
let
custom_mode
=
get_custom_mode
mode
in
match
custom_mode
.
custom_terminates
.
status
with
|
None
->
Kernel
.
warning
~
once
:
true
"Custom status from mode %s not defined for terminates"
mode
;
()
|
Some
pst
->
emit_status
kf
bhv
terminates
pst
end
...
...
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