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
3b1d68a1
Commit
3b1d68a1
authored
1 year ago
by
Thibault Martin
Committed by
Allan Blanchard
1 year ago
Browse files
Options
Downloads
Patches
Plain Diff
Add a mode 'skip' to turn off specifications
parent
dca7c755
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/kernel_internals/typing/populate_spec.ml
+14
-11
14 additions, 11 deletions
src/kernel_internals/typing/populate_spec.ml
src/kernel_services/plugin_entry_points/kernel.ml
+1
-2
1 addition, 2 deletions
src/kernel_services/plugin_entry_points/kernel.ml
with
15 additions
and
13 deletions
src/kernel_internals/typing/populate_spec.ml
+
14
−
11
View file @
3b1d68a1
...
...
@@ -22,7 +22,7 @@
open
Cil_types
type
mode
=
ACSL
|
Safe
|
Frama_C
|
Other
of
string
type
mode
=
ACSL
|
Safe
|
Frama_C
|
Skip
|
Other
of
string
[
@@
warning
"-37"
]
(* TODO: to build Other value *)
type
config
=
{
...
...
@@ -77,7 +77,7 @@ module Make(G : Generator) =
struct
let
get_default
mode
kf
spec
=
let
table
=
G
.
collect_behaviors
spec
in
if
G
.
has_behavior
default
table
then
if
mode
=
Skip
||
G
.
has_behavior
default
table
then
Kept
else
if
mode
=
ACSL
then
Generated
(
G
.
acsl_default
()
)
...
...
@@ -91,7 +91,7 @@ struct
Generated
(
G
.
frama_c_default
kf
)
|
None
->
match
mode
with
|
ACSL
|
Safe
|
Frama_C
->
assert
false
|
ACSL
|
Safe
|
Frama_C
|
Skip
->
assert
false
|
Other
mode
->
Generated
(
G
.
custom_default
mode
kf
spec
)
...
...
@@ -154,7 +154,7 @@ struct
|
Generated
exits
->
match
mode
with
|
Frama_C
->
emit_status
kf
bhv
exits
Property_status
.
Dont_know
|
ACSL
|
Safe
|
Other
_
->
()
|
Skip
|
ACSL
|
Safe
|
Other
_
->
()
end
...
...
@@ -245,7 +245,7 @@ struct
|
Generated
assigns
->
match
mode
with
|
Frama_C
->
emit_status
kf
bhv
assigns
Property_status
.
Dont_know
|
ACSL
|
Safe
|
Other
_
->
()
|
ACSL
|
Safe
|
Skip
|
Other
_
->
()
end
...
...
@@ -358,7 +358,7 @@ struct
emit_status
kf
bhv
allocates
Property_status
.
True
|
Frama_C
->
emit_status
kf
bhv
allocates
Property_status
.
Dont_know
|
Other
_
|
Safe
->
()
|
Other
_
|
Safe
|
Skip
->
()
end
...
...
@@ -409,7 +409,7 @@ struct
emit_status
kf
bhv
terminates
Property_status
.
True
|
Safe
|
Frama_C
->
emit_status
kf
bhv
terminates
Property_status
.
Dont_know
|
Other
_
->
()
|
Skip
|
Other
_
->
()
end
...
...
@@ -423,10 +423,12 @@ let get_mode = function
|
"frama-c"
->
Frama_C
|
"acsl"
->
ACSL
|
"safe"
->
Safe
|
"skip"
->
Skip
|
s
->
(* TODO: to build Other value *)
Kernel
.
abort
"
\'
%s
\'
is not a
vali
d mode for
spec
generat
ion, accepted values
\
are 'frama-c', '
acsl
' and 's
afe'
"
s
"
@[@['%s'@]
is not a
supporte
d mode for
-
generat
ed-spec-mode.@ Accepted
\
keys
are
'acsl',
'frama-c', '
safe
' and 's
kip'.@]@.
"
s
let
build_config
mode
=
{
exits
=
mode
;
...
...
@@ -451,8 +453,9 @@ let get_config () =
|
"terminates"
->
{
conf
with
terminates
=
mode
}
|
s
->
Kernel
.
abort
"
\'
%s
\'
is not a valid key for -generated-spec-custom, accepted keys \
are 'exits', 'assigns', 'requires', 'allocates' and 'terminates'"
s
"@[@['%s'@] is not a valid key for -generated-spec-custom.@ Accepted \
keys are 'exits', 'assigns', 'requires', 'allocates' and \
'terminates'.@]@."
s
in
Kernel
.
GeneratedSpecCustom
.
fold
collect
default
...
...
This diff is collapsed.
Click to expand it.
src/kernel_services/plugin_entry_points/kernel.ml
+
1
−
2
View file @
3b1d68a1
...
...
@@ -1482,7 +1482,6 @@ module GeneratedSpecMode =
"Select which mode will be used to generate missing specs \
(defaults to frama-c), see user manual for more informations"
end
)
let
()
=
GeneratedSpecMode
.
set_possible_values
[
"frama-c"
;
"acsl"
;
"safe"
]
let
()
=
Parameter_customize
.
set_group
normalisation
let
()
=
Parameter_customize
.
do_not_reset_on_copy
()
...
...
@@ -1496,7 +1495,7 @@ module GeneratedSpecCustom =
end
)
(
struct
let
option_name
=
"-generated-spec-custom"
let
arg_name
=
"
exits|assigns|allocates|terminates:frama-c|acsl|safe
"
let
arg_name
=
"
c1:m1,c2:m2,...
"
let
default
=
Datatype
.
String
.
Map
.
empty
let
help
=
"Fine-tune missing specs configuration by manually choosing modes for\
...
...
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