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
f68e12f7
Commit
f68e12f7
authored
3 years ago
by
Allan Blanchard
Browse files
Options
Downloads
Patches
Plain Diff
[wp] Consider that builtins terminate
parent
4ee990bf
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/plugins/wp/cfgAnnot.ml
+13
-6
13 additions, 6 deletions
src/plugins/wp/cfgAnnot.ml
src/plugins/wp/wp_parameters.ml
+1
-1
1 addition, 1 deletion
src/plugins/wp/wp_parameters.ml
src/plugins/wp/wp_parameters.mli
+1
-1
1 addition, 1 deletion
src/plugins/wp/wp_parameters.mli
with
15 additions
and
8 deletions
src/plugins/wp/cfgAnnot.ml
+
13
−
6
View file @
f68e12f7
...
...
@@ -202,18 +202,25 @@ let get_terminates_clause kf =
* - then handled in a Some case (as user defined) and returns Defined *)
let
defined
p
=
Defined
(
WpPropId
.
mk_terminates_id
kf
Kglobal
p
,
normalize_terminates
p
)
in
let
populate_true
()
=
let
populate_true
?
(
silence
=
false
)
()
=
let
p
=
Logic_const
.
new_predicate
@@
Logic_const
.
ptrue
in
Wp_parameters
.
warning
~
source
:
(
fst
@@
Kernel_function
.
get_location
kf
)
~
once
:
true
"Missing terminates clause for %a, populates 'terminates
\\
true'"
Kernel_function
.
pretty
kf
;
if
not
silence
then
Wp_parameters
.
warning
~
source
:
(
fst
@@
Kernel_function
.
get_location
kf
)
~
once
:
true
"Missing terminates clause for %a, populates 'terminates
\\
true'"
Kernel_function
.
pretty
kf
;
Annotations
.
add_terminates
wp_populate_terminates
kf
p
;
defined
p
in
let
kf_vi
=
Kernel_function
.
get_vi
kf
in
let
kf_name
=
Kernel_function
.
get_name
kf
in
match
Annotations
.
terminates
kf
with
|
None
when
Cil_builtins
.
is_builtin
kf_vi
||
Cil_builtins
.
is_special_builtin
kf_name
->
populate_true
~
silence
:
true
()
|
None
when
Kernel_function
.
is_in_libc
kf
->
if
not
@@
Wp_parameters
.
Terminates
FC
Declarations
.
get
()
if
not
@@
Wp_parameters
.
Terminates
Stdlib
Declarations
.
get
()
then
Assumed
Logic_const
.
pfalse
else
populate_true
()
|
None
when
Kernel_function
.
is_definition
kf
->
...
...
This diff is collapsed.
Click to expand it.
src/plugins/wp/wp_parameters.ml
+
1
−
1
View file @
f68e12f7
...
...
@@ -487,7 +487,7 @@ module TerminatesDefinitions =
considered to terminate when called."
end
)
module
Terminates
FC
Declarations
=
module
Terminates
Stdlib
Declarations
=
False
(
struct
let
option_name
=
"-wp-frama-c-stdlib-terminate"
let
help
=
"Frama-C stdlib functions without terminates specification \
...
...
This diff is collapsed.
Click to expand it.
src/plugins/wp/wp_parameters.mli
+
1
−
1
View file @
f68e12f7
...
...
@@ -102,7 +102,7 @@ module SimplifyType : Parameter_sig.Bool
module
CalleePreCond
:
Parameter_sig
.
Bool
module
PrecondWeakening
:
Parameter_sig
.
Bool
module
TerminatesExtDeclarations
:
Parameter_sig
.
Bool
module
Terminates
FC
Declarations
:
Parameter_sig
.
Bool
module
Terminates
Stdlib
Declarations
:
Parameter_sig
.
Bool
module
TerminatesDefinitions
:
Parameter_sig
.
Bool
module
TerminatesVariantHyp
:
Parameter_sig
.
Bool
...
...
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