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
12e98c22
Commit
12e98c22
authored
3 years ago
by
Valentin Perrelle
Committed by
David Bühler
3 years ago
Browse files
Options
Downloads
Patches
Plain Diff
[Eva] api: Add callers and callsites requests
parent
2705efe2
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/value/Eva.mli
+5
-1
5 additions, 1 deletion
src/plugins/value/Eva.mli
src/plugins/value/utils/results.ml
+19
-1
19 additions, 1 deletion
src/plugins/value/utils/results.ml
src/plugins/value/utils/results.mli
+5
-1
5 additions, 1 deletion
src/plugins/value/utils/results.mli
with
29 additions
and
3 deletions
src/plugins/value/Eva.mli
+
5
−
1
View file @
12e98c22
...
...
@@ -72,11 +72,15 @@ module Results: sig
val
is_initialized
:
evaluation
->
bool
val
alarms
:
evaluation
->
Alarms
.
t
list
(*
Bottomness
*)
(*
Reachability
*)
val
is_bottom
:
evaluation
->
bool
val
is_called
:
Cil_types
.
kernel_function
->
bool
(* called during the analysis, not by the actual program *)
val
is_reachable
:
Cil_types
.
stmt
->
bool
(* reachable by the analysis, not by the actual program *)
(* Callers / callsites *)
val
callers
:
Cil_types
.
kernel_function
->
Cil_types
.
kernel_function
list
val
callsites
:
Cil_types
.
kernel_function
->
Cil_types
.
stmt
list
end
module
Value_results
:
sig
...
...
This diff is collapsed.
Click to expand it.
src/plugins/value/utils/results.ml
+
19
−
1
View file @
12e98c22
...
...
@@ -631,7 +631,7 @@ let alarms evaluation =
let
module
E
=
(
val
evaluation
:
Evaluation
)
in
E
.
alarms
E
.
v
(*
Bottomness
*)
(*
Reachability
*)
let
is_bottom
evaluation
=
let
module
E
=
(
val
evaluation
:
Evaluation
)
in
...
...
@@ -644,3 +644,21 @@ let is_called kf =
let
is_reachable
stmt
=
let
module
M
=
Make
()
in
M
.
is_reachable
(
before
stmt
)
(* Callers / callsites *)
let
callers
kf
=
let
f
=
function
|
[]
|
[
_
]
->
None
|
_
::
(
kf
,_
)
::
_
->
Some
kf
in
at_start_of
kf
|>
callstacks
|>
List
.
filter_map
f
|>
List
.
sort_uniq
Kernel_function
.
compare
let
callsites
kf
=
let
f
=
function
|
[]
|
(
_
,
Cil_types
.
Kglobal
)
::
_
->
None
|
(
_
,
Kstmt
stmt
)
::
_
->
Some
stmt
in
at_start_of
kf
|>
callstacks
|>
List
.
filter_map
f
|>
List
.
sort_uniq
Cil_datatype
.
Stmt
.
compare
This diff is collapsed.
Click to expand it.
src/plugins/value/utils/results.mli
+
5
−
1
View file @
12e98c22
...
...
@@ -92,9 +92,13 @@ val as_zone : lvaluation -> Locations.Zone.t result
val
is_initialized
:
evaluation
->
bool
val
alarms
:
evaluation
->
Alarms
.
t
list
(*
Bottomness
*)
(*
Reachability
*)
val
is_bottom
:
evaluation
->
bool
val
is_called
:
Cil_types
.
kernel_function
->
bool
(* called during the analysis, not by the actual program *)
val
is_reachable
:
Cil_types
.
stmt
->
bool
(* reachable by the analysis, not by the actual program *)
(* Callers / callsites *)
val
callers
:
Cil_types
.
kernel_function
->
Cil_types
.
kernel_function
list
val
callsites
:
Cil_types
.
kernel_function
->
Cil_types
.
stmt
list
[
@@@
api_end
]
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