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
173a828c
Commit
173a828c
authored
4 years ago
by
Loïc Correnson
Browse files
Options
Downloads
Patches
Plain Diff
[wp] fix code-annot selection
parent
1f8e73f2
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/plugins/wp/cfgCalculus.ml
+8
-8
8 additions, 8 deletions
src/plugins/wp/cfgCalculus.ml
with
8 additions
and
8 deletions
src/plugins/wp/cfgCalculus.ml
+
8
−
8
View file @
173a828c
...
...
@@ -63,23 +63,23 @@ let is_selected_bhv (m: mode) (bhv: funbehavior) =
m
.
bhv
.
b_name
=
bhv
.
b_name
let
is_selected_for
(
m
:
mode
)
(
fors
:
string
list
)
=
List
.
mem
m
.
bhv
.
b_name
fors
fors
=
[]
||
List
.
mem
m
.
bhv
.
b_name
fors
let
is_selected_ca
~
goal
(
m
:
mode
)
(
ca
:
code_annotation
)
=
let
is_selected_ca
(
m
:
mode
)
(
ca
:
code_annotation
)
=
match
ca
.
annot_content
with
|
AAssigns
(
forb
,_
)
|
AAllocation
(
forb
,_
)
|
AAssert
(
forb
,_
)
|
AInvariant
(
forb
,_,_
)
->
not
goal
||
is_selected_for
m
forb
->
is_selected_for
m
forb
|
AVariant
_
->
is_default_bhv
m
|
AExtended
_
|
AStmtSpec
_
|
APragma
_
->
assert
false
(* n/a *)
let
is_
selected_mode
~
goal
~
mode
(
p
:
Property
.
t
)
=
let
is_
active_mode
~
mode
(
p
:
Property
.
t
)
=
let
open
Property
in
match
p
with
|
IPCodeAnnot
{
ica_ca
}
->
is_selected_ca
~
goal
mode
ica_ca
|
IPCodeAnnot
{
ica_ca
}
->
is_selected_ca
mode
ica_ca
|
IPPredicate
{
ip_kind
}
->
begin
match
ip_kind
with
|
PKRequires
bhv
|
PKAssumes
bhv
->
...
...
@@ -89,11 +89,11 @@ let is_selected_mode ~goal ~mode (p: Property.t) =
end
|
IPAllocation
{
ial_bhv
=
bhv
}
|
IPAssigns
{
ias_bhv
=
bhv
}
->
begin
match
bhv
with
|
Id_loop
ca
->
is_selected_ca
~
goal
mode
ca
|
Id_loop
ca
->
is_selected_ca
mode
ca
|
Id_contract
(
_
,
bhv
)
->
is_selected_bhv
mode
bhv
end
|
IPDecrease
{
id_ca
=
None
}
->
is_default_bhv
mode
|
IPDecrease
{
id_ca
=
Some
ca
}
->
is_selected_ca
~
goal
mode
ca
|
IPDecrease
{
id_ca
=
Some
ca
}
->
is_selected_ca
mode
ca
|
IPComplete
_
|
IPDisjoint
_
|
IPFrom
_
|
IPGlobalInvariant
_
|
IPTypeInvariant
_
->
(*TODO: is it in pass or not ? *)
assert
false
...
...
@@ -133,7 +133,7 @@ struct
let
is_selected
~
goal
{
mode
;
props
}
(
pid
,_
)
=
let
p
=
WpPropId
.
property_of_id
pid
in
is_
selected_mode
~
goal
~
mode
p
&&
is_
active_mode
~
mode
p
&&
(
not
goal
||
match
props
with
|
`All
|
`Names
[]
->
true
...
...
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