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
e762f5a6
Commit
e762f5a6
authored
3 years ago
by
Basile Desloges
Browse files
Options
Downloads
Patches
Plain Diff
[eacsl] Remove hypotheses when reemitting invalid properties during AST preparation
parent
c77f1655
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/e-acsl/src/project_initializer/prepare_ast.ml
+31
-4
31 additions, 4 deletions
src/plugins/e-acsl/src/project_initializer/prepare_ast.ml
with
31 additions
and
4 deletions
src/plugins/e-acsl/src/project_initializer/prepare_ast.ml
+
31
−
4
View file @
e762f5a6
...
@@ -203,7 +203,34 @@ let dup_global loc spec sound_verdict_vi kf vi new_vi =
...
@@ -203,7 +203,34 @@ let dup_global loc spec sound_verdict_vi kf vi new_vi =
let
e
=
Emitter
.
Usable_emitter
.
get
ep
.
emitter
in
let
e
=
Emitter
.
Usable_emitter
.
get
ep
.
emitter
in
if
ep
.
logical_consequence
if
ep
.
logical_consequence
then
logical_consequence
e
new_ip
ep
.
properties
then
logical_consequence
e
new_ip
ep
.
properties
else
emit
e
new_ip
~
hyps
:
ep
.
properties
status
else
let
status
,
hyps
=
match
status
,
ep
.
properties
with
|
True
,
_
|
Dont_know
,
_
|
False_and_reachable
,
[]
|
False_if_reachable
,
[]
->
(* Valid emission: either [true] status with arbitrary hypotheses or
[false] status with empty hypotheses. *)
status
,
ep
.
properties
|
False_and_reachable
,
[
IPReachable
_
]
|
False_if_reachable
,
[
IPReachable
_
]
->
(* [False] status with a reachability hypothesis: remove the
hypothesis and set the status to [False_if_reachable]. *)
False_if_reachable
,
[]
|
False_and_reachable
,
hyps
|
False_if_reachable
,
hyps
->
(* Invalid emission: [false] status with arbitrary hypotheses. *)
Options
.
fatal
"Property with status '%s' and non-empty hypotheses:
\n
\
* Property: %a
\n
\
* Hypotheses:
\n
- %a"
(
match
status
with
|
True
->
"True"
|
Dont_know
->
"Dont_know"
|
False_if_reachable
->
"False_if_reachable"
|
False_and_reachable
->
"False_and_reachable"
)
Property
.
short_pretty
new_ip
(
Pretty_utils
.
pp_list
~
sep
:
"
\n
- "
Property
.
short_pretty
)
hyps
in
emit
e
new_ip
~
hyps
status
in
in
match
get
old_ip
with
match
get
old_ip
with
|
Never_tried
->
|
Never_tried
->
...
@@ -212,9 +239,9 @@ let dup_global loc spec sound_verdict_vi kf vi new_vi =
...
@@ -212,9 +239,9 @@ let dup_global loc spec sound_verdict_vi kf vi new_vi =
List
.
iter
(
cp
s
)
epl
List
.
iter
(
cp
s
)
epl
|
Inconsistent
icst
->
|
Inconsistent
icst
->
List
.
iter
(
cp
True
)
icst
.
valid
;
List
.
iter
(
cp
True
)
icst
.
valid
;
(*
either the program is reachable and
[False_and_reachable] i
s
(*
Copy invalid properties with
[False_and_reachable]
,
i
f a reachability
fine, or the program point is not reachable and it does not
hypothesis is present then the [cp] function will convert it to
matter for E-ACSL that checks it at runtime
. *)
[False_if_reachable]
. *)
List
.
iter
(
cp
False_and_reachable
)
icst
.
invalid
List
.
iter
(
cp
False_and_reachable
)
icst
.
invalid
in
in
let
ips
kf
s
=
Property
.
ip_of_spec
kf
Kglobal
~
active
:
[]
s
in
let
ips
kf
s
=
Property
.
ip_of_spec
kf
Kglobal
~
active
:
[]
s
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