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
297cc069
Commit
297cc069
authored
5 years ago
by
Valentin Perrelle
Committed by
David Bühler
4 years ago
Browse files
Options
Downloads
Patches
Plain Diff
[Dive] Add command dive.clear
parent
d28a290b
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/dive/build.ml
+12
-5
12 additions, 5 deletions
src/plugins/dive/build.ml
src/plugins/dive/build.mli
+2
-0
2 additions, 0 deletions
src/plugins/dive/build.mli
src/plugins/dive/server_interface.ml
+6
-0
6 additions, 0 deletions
src/plugins/dive/server_interface.ml
with
20 additions
and
5 deletions
src/plugins/dive/build.ml
+
12
−
5
View file @
297cc069
...
...
@@ -161,10 +161,10 @@ module BaseSet = Cil_datatype.Varinfo.Set
module
FunctionMap
=
Kernel_function
.
Map
type
t
=
{
graph
:
Graph
.
t
;
node_table
:
node
NodeTable
.
t
;
file_table
:
node
FileTable
.
t
;
callstack_table
:
node
CallstackTable
.
t
;
mutable
graph
:
Graph
.
t
;
mutable
node_table
:
node
NodeTable
.
t
;
mutable
file_table
:
node
FileTable
.
t
;
mutable
callstack_table
:
node
CallstackTable
.
t
;
mutable
unfolded_bases
:
BaseSet
.
t
;
mutable
hidden_bases
:
BaseSet
.
t
;
mutable
focus
:
bool
FunctionMap
.
t
;
...
...
@@ -411,7 +411,6 @@ let build_node_deps context node =
|
Cluster
->
()
(* --- Graph initialization --- *)
let
create
()
=
...
...
@@ -427,6 +426,14 @@ let create () =
roots
=
[]
;
}
let
clear
context
=
context
.
graph
<-
Graph
.
create
()
;
context
.
node_table
<-
NodeTable
.
create
13
;
context
.
file_table
<-
FileTable
.
create
13
;
context
.
callstack_table
<-
CallstackTable
.
create
13
;
context
.
focus
<-
FunctionMap
.
empty
;
context
.
roots
<-
[]
(* --- Accessors --- *)
...
...
This diff is collapsed.
Click to expand it.
src/plugins/dive/build.mli
+
2
−
0
View file @
297cc069
...
...
@@ -23,6 +23,8 @@
type
t
val
create
:
unit
->
t
val
clear
:
t
->
unit
(* reset to almost an empty context,
but keeps folded and hidden bases *)
val
get_graph
:
t
->
Imprecision_graph
.
t
val
get_roots
:
t
->
Graph_types
.
node
list
...
...
This diff is collapsed.
Click to expand it.
src/plugins/dive/server_interface.ml
+
6
−
0
View file @
297cc069
...
...
@@ -103,6 +103,12 @@ let () = Request.register ~page
~
input
:
(
module
Data
.
Junit
)
~
output
:
(
module
Graph
)
(
fun
()
->
Build
.
get_graph
(
get_graph
()
))
let
()
=
Request
.
register
~
page
~
kind
:
`EXEC
~
name
:
"dive.clear"
~
descr
:
(
Markdown
.
rm
"Erase the graph and start over with an empty one"
)
~
input
:
(
module
Data
.
Junit
)
~
output
:
(
module
Data
.
Junit
)
(
fun
()
->
Build
.
clear
(
get_graph
()
))
let
()
=
Request
.
register
~
page
~
kind
:
`EXEC
~
name
:
"dive.add_var"
~
descr
:
(
Markdown
.
rm
"Add a variable to the graph"
)
...
...
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