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
bbec67ab
Commit
bbec67ab
authored
1 year ago
by
Thibault Martin
Browse files
Options
Downloads
Patches
Plain Diff
Add the new behavior only if it is not empty
parent
ca5e6751
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
+12
-8
12 additions, 8 deletions
src/kernel_internals/typing/populate_spec.ml
with
12 additions
and
8 deletions
src/kernel_internals/typing/populate_spec.ml
+
12
−
8
View file @
bbec67ab
...
...
@@ -869,19 +869,23 @@ let do_populate ?loc kf clauses =
let
generated
original
=
function
|
Kept
->
original
|
Generated
g
->
g
|
Generated
clauses
->
clauses
in
let
bhv
=
Cil
.
mk_behavior
()
in
let
bhv
=
{
bhv
with
b_post_cond
=
generated
bhv
.
b_post_cond
exits
}
in
let
bhv
=
{
bhv
with
b_assigns
=
generated
bhv
.
b_assigns
assigns
}
in
let
bhv
=
{
bhv
with
b_requires
=
generated
bhv
.
b_requires
requires
}
in
let
bhv
=
{
bhv
with
b_allocation
=
generated
bhv
.
b_allocation
allocates
}
in
bhv
.
b_post_cond
<-
generated
bhv
.
b_post_cond
exits
;
bhv
.
b_assigns
<-
generated
bhv
.
b_assigns
assigns
;
bhv
.
b_requires
<-
generated
bhv
.
b_requires
requires
;
bhv
.
b_allocation
<-
generated
bhv
.
b_allocation
allocates
;
let
is_empty_bhv
=
exits
=
Kept
&&
assigns
=
Kept
&&
requires
=
Kept
&&
allocates
=
Kept
in
let
spec
=
Cil
.
empty_funspec
()
in
let
spec
=
{
spec
with
spec_behavior
=
[
bhv
]
}
in
let
spec
=
{
spec
with
spec_terminates
=
generated
spec
.
spec_terminates
terminates
}
in
spec
.
spec_behavior
<-
if
is_empty_bhv
then
spec
.
spec_behavior
else
[
bhv
]
;
spec
.
spec_terminates
<-
generated
spec
.
spec_terminates
terminates
;
Annotations
.
add_spec
emitter_populate
kf
spec
;
Exits
.
emit
config
.
c_exits
kf
bhv
exits
;
Assigns
.
emit
config
.
c_assigns
kf
bhv
assigns
;
...
...
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