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
b8685d44
Commit
b8685d44
authored
1 year ago
by
Thibault Martin
Committed by
Allan Blanchard
1 year ago
Browse files
Options
Downloads
Patches
Plain Diff
Emit status property for Safe mode (when combined)
parent
1d40be1a
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/kernel_internals/typing/populate_spec.ml
+28
-29
28 additions, 29 deletions
src/kernel_internals/typing/populate_spec.ml
with
28 additions
and
29 deletions
src/kernel_internals/typing/populate_spec.ml
+
28
−
29
View file @
b8685d44
...
...
@@ -25,7 +25,7 @@ open Cil_types
type
mode
=
|
ACSL
|
Safe
|
Frama_C
(* Modes available for specification generation. *)
|
Skip
(* Internally used to skip generation. *)
|
Other
of
string
(* Allow user to use a custom mode, see
{!
register
}
. *)
|
Other
of
string
(* Allow user to use a custom mode, see
[
register
]
. *)
(* Allow customization, each clause can be handled with a different [mode]. *)
type
config
=
{
...
...
@@ -201,7 +201,8 @@ struct
else
if
has_body
then
Generated
g
,
None
else
Generated
g
,
Some
(
combined
,
G
.
name
)
(* Interface to call [G.emit]. *)
(* Interface to call [G.emit]. Only emit properties for non empty clauses
generated for a prototype. *)
let
emit
mode
kf
bhv
=
function
|
Kept
->
()
|
Generated
_
when
Kernel_function
.
has_definition
kf
->
()
...
...
@@ -219,13 +220,13 @@ end
(* | false | false | ACSL | ACSL | ----- | false | ??? | ?? | *)
(* |-------------------------------------------------------------| *)
(* *****************************************************************)
(* *** Status emitted on prototypes ****)
(* |---------------------------------| *)
(* | ACSL | Frama-c | Safe | Other | *)
(* |------|-----------|------|-------| *)
(* | True | Dont_know |
----
| ??? | *)
(* |---------------------------------| *)
(***************************************)
(* ***
***
Status emitted on prototypes
**
****)
(* |---------------------------------
-----
| *)
(* | ACSL | Frama-c |
Safe
| Other | *)
(* |------|-----------|------
-----
|-------| *)
(* | True | Dont_know |
Dont_know
| ??? | *)
(* |---------------------------------
-----
| *)
(***************************************
*****
)
module
Exits_generator
=
struct
...
...
@@ -290,8 +291,8 @@ struct
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
|
ACSL
|
Safe
|
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
...
...
@@ -314,13 +315,13 @@ end
(* | Any | Any | Auto | ACSL | Any | Nothing | ??? | ?? | *)
(* |---------------------------------------------------------------| *)
(* *******************************************************************)
(* *** Status emitted on prototypes ****)
(* |---------------------------------| *)
(* | ACSL | Frama-c | Safe | Other | *)
(* |------|-----------|------|-------| *)
(* | ---- | Dont_know |
----
| ??? | *)
(* |---------------------------------| *)
(***************************************)
(* ***
***
Status emitted on prototypes
**
****)
(* |---------------------------------
-----
| *)
(* | ACSL | Frama-c |
Safe
| Other | *)
(* |------|-----------|------
-----
|-------| *)
(* | ---- | Dont_know |
Dont_know
| ??? | *)
(* |---------------------------------
-----
| *)
(***************************************
*****
)
module
Assigns_generator
=
struct
...
...
@@ -418,8 +419,7 @@ struct
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
|
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
...
...
@@ -519,13 +519,13 @@ end
(* | Nothing | Nothing | ACSL | ACSL | Any | Nothing | ??? | ?? | *)
(* |-------------------------------------------------------------------| *)
(* ***********************************************************************)
(* **** Status emitted on prototypes ***)
(* |---------------------------------| *)
(* | ACSL | Frama-c | Safe | Other | *)
(* |------|-----------|------|-------| *)
(* | True | Dont_know |
----
| ??? | *)
(* |---------------------------------| *)
(***************************************)
(* ****
**
Status emitted on prototypes
***
***)
(* |---------------------------------
-----
| *)
(* | ACSL | Frama-c |
Safe
| Other | *)
(* |------|-----------|------
-----
|-------| *)
(* | True | Dont_know |
Dont_know
| ??? | *)
(* |---------------------------------
-----
| *)
(***************************************
*****
)
module
Allocates_generator
=
struct
...
...
@@ -593,10 +593,9 @@ struct
let
emit
mode
kf
bhv
allocates
=
match
mode
with
|
Skip
->
assert
false
|
Safe
->
()
|
ACSL
->
emit_status
kf
bhv
allocates
Property_status
.
True
|
Frama_C
->
|
Safe
|
Frama_C
->
emit_status
kf
bhv
allocates
Property_status
.
Dont_know
|
Other
mode
->
let
custom_mode
=
get_custom_mode
mode
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