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
7205a418
Commit
7205a418
authored
3 months ago
by
Loïc Correnson
Committed by
David Bühler
2 months ago
Browse files
Options
Downloads
Patches
Plain Diff
[eva] fix main extend
parent
2e30975d
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/eva/utils/export.ml
+23
-19
23 additions, 19 deletions
src/plugins/eva/utils/export.ml
with
23 additions
and
19 deletions
src/plugins/eva/utils/export.ml
+
23
−
19
View file @
7205a418
...
...
@@ -72,7 +72,7 @@ let predicate ~loc ?(name=[]) (p : pred) : predicate =
let
ts
=
List
.
map
(
Exp
.
cil_term
~
loc
)
es
in
let
ls
=
Logic_env
.
find_all_logic_functions
f
in
match
List
.
find_opt
(
matches_params
ts
)
ls
with
|
None
->
raise
(
I
nvalid_arg
ument
(
"Eva.Annot."
^
f
))
|
None
->
i
nvalid_arg
"Eva.Export.predicate"
|
Some
li
->
Logic_const
.
papp
~
loc
(
li
,
[]
,
ts
)
in
{
(
aux
p
)
with
pred_name
=
name
}
...
...
@@ -333,26 +333,30 @@ let cleaner () = (new cleaner :> visitor)
(* -------------------------------------------------------------------------- *)
let
main
()
=
if
Analysis
.
is_computed
()
then
let
ast
=
Ast
.
get
()
in
let
cleaner
=
cleaner
()
in
Self
.
feedback
~
ontty
:
`Transient
"Cleaning annotations..."
;
Visitor
.
visitFramacFile
cleaner
ast
;
let
generator
=
new
generator
in
Parameters
.
Annot
.
iter
begin
fun
kf
->
if
Kernel_function
.
has_definition
kf
then
if
Results
.
are_available
kf
then
let
fundec
=
Kernel_function
.
get_definition
kf
in
Self
.
feedback
"Annotate %a"
Kernel_function
.
pretty
kf
;
ignore
@@
Visitor
.
visitFramacFunction
generator
fundec
else
Self
.
warning
"Can not annotate %a (no available results)"
Kernel_function
.
pretty
kf
let
generator
=
lazy
begin
Analysis
.
compute
()
;
let
ast
=
Ast
.
get
()
in
let
cleaner
=
cleaner
()
in
Self
.
feedback
~
ontty
:
`Transient
"Cleaning annotations..."
;
Visitor
.
visitFramacFile
cleaner
ast
;
new
generator
end
in
Parameters
.
Annot
.
iter
begin
fun
kf
->
let
generator
=
Lazy
.
force
generator
in
if
Kernel_function
.
has_definition
kf
then
if
Results
.
are_available
kf
then
let
fundec
=
Kernel_function
.
get_definition
kf
in
Self
.
feedback
"Annotate %a"
Kernel_function
.
pretty
kf
;
ignore
@@
Visitor
.
visitFramacFunction
generator
fundec
else
Self
.
warning
"Can not annotate %a (no
definition
)"
Self
.
warning
"Can not annotate %a (no
available results
)"
Kernel_function
.
pretty
kf
end
else
Self
.
warning
"Can not annotate %a (no definition)"
Kernel_function
.
pretty
kf
end
let
()
=
Boot
.
Main
.
extend
main
...
...
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