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
38710221
Commit
38710221
authored
2 years ago
by
Valentin Perrelle
Browse files
Options
Downloads
Patches
Plain Diff
[Interpreted_automata] dataflow analysis: implements an ordered iteration over results
parent
6b4ed04e
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/kernel_services/analysis/interpreted_automata.ml
+14
-0
14 additions, 0 deletions
src/kernel_services/analysis/interpreted_automata.ml
src/kernel_services/analysis/interpreted_automata.mli
+4
-0
4 additions, 0 deletions
src/kernel_services/analysis/interpreted_automata.mli
with
18 additions
and
0 deletions
src/kernel_services/analysis/interpreted_automata.ml
+
14
−
0
View file @
38710221
...
...
@@ -1215,6 +1215,7 @@ sig
val
after
:
result
->
Cil_types
.
stmt
->
state
option
val
iter_vertex
:
(
vertex
->
state
->
unit
)
->
result
->
unit
val
iter_stmt
:
(
Cil_types
.
stmt
->
state
->
unit
)
->
result
->
unit
val
iter_stmt_asc
:
(
Cil_types
.
stmt
->
state
->
unit
)
->
result
->
unit
val
to_dot_output
:
(
Format
.
formatter
->
state
->
unit
)
->
result
->
out_channel
->
unit
val
to_dot_file
:
(
Format
.
formatter
->
state
->
unit
)
->
...
...
@@ -1324,6 +1325,19 @@ struct
in
States
.
iter
f'
states
let
iter_stmt_asc
f
(
_automaton
,_
wto
,
states
)
=
let
filter
(
v
,
s
)
=
match
v
.
vertex_start_of
with
|
None
->
None
|
Some
stmt
->
Some
(
stmt
,
s
)
in
let
cmp
(
stmt1
,_
)
(
stmt2
,_
)
=
stmt1
.
sid
-
stmt2
.
sid
in
States
.
to_seq
states
|>
Seq
.
filter_map
filter
|>
List
.
of_seq
|>
List
.
fast_sort
cmp
|>
List
.
iter
(
fun
(
stmt
,
s
)
->
f
stmt
s
)
let
to_dot_output
pp_value
(
automaton
,
wto
,
states
)
out
=
let
pp_vertex
fmt
v
=
match
States
.
find_opt
states
v
with
...
...
This diff is collapsed.
Click to expand it.
src/kernel_services/analysis/interpreted_automata.mli
+
4
−
0
View file @
38710221
...
...
@@ -347,6 +347,10 @@ sig
returned None) *)
val
iter_stmt
:
(
Cil_types
.
stmt
->
state
->
unit
)
->
result
->
unit
(** Same as [iter_stmt] but guarantee that the iteration will always
be in the same increasing order of statements sid *)
val
iter_stmt_asc
:
(
Cil_types
.
stmt
->
state
->
unit
)
->
result
->
unit
(** Output result to the given channel. Must be supplied with a pretty
printer for abstract values *)
val
to_dot_output
:
(
Format
.
formatter
->
state
->
unit
)
->
...
...
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