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
69fafaa0
Commit
69fafaa0
authored
5 years ago
by
David Bühler
Browse files
Options
Downloads
Patches
Plain Diff
[Dive] Fixes the server interface to comply with frama-c changes.
parent
92db4bbf
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/plugins/dive/server_interface.ml
+23
-24
23 additions, 24 deletions
src/plugins/dive/server_interface.ml
with
23 additions
and
24 deletions
src/plugins/dive/server_interface.ml
+
23
−
24
View file @
69fafaa0
...
@@ -53,26 +53,25 @@ struct
...
@@ -53,26 +53,25 @@ struct
end
end
module
Variable
=
Data
.
Collection
(
struct
module
Variable
=
Data
.
Collection
(
struct
module
Info
=
struct
let
name
=
"dive-variable-name"
let
page
=
page
let
descr
=
Markdown
.
plain
"The name of variable of the program"
let
name
=
"dive-variable-name"
let
descr
=
Markdown
.
rm
"The name of variable of the program"
end
module
R
=
Data
.
Record
(
Info
)
type
t
=
Cil_types
.
varinfo
let
signature
=
Data
.
Record
.
signature
~
page
~
name
~
descr
()
let
syntax
=
R
.
syntax
let
_fun_field
=
R
.
option
"fun"
let
_fun_field
=
Data
.
Record
.
option
signature
~
descr
:
(
Markdown
.
rm
"owner function for a local variable"
)
~
descr
:
(
Markdown
.
plain
"owner function for a local variable"
)
(
module
Data
.
Jstring
)
(
module
Data
.
Jstring
)
let
_var_field
=
R
.
field
"var"
let
_var_field
=
Data
.
Record
.
field
signature
~
descr
:
(
Markdown
.
rm
"variable name"
)
~
descr
:
(
Markdown
.
plain
"variable name"
)
(
module
Data
.
Jstring
)
(
module
Data
.
Jstring
)
type
t
=
Cil_types
.
varinfo
module
R
=
(
val
(
Data
.
Record
.
publish
signature
)
:
Data
.
Record
.
S
with
type
r
=
t
)
let
syntax
=
R
.
syntax
let
to_json
v
=
let
to_json
v
=
let
varname
=
v
.
Cil_types
.
vname
in
let
varname
=
v
.
Cil_types
.
vname
in
let
fields
=
[
"var"
,
`String
varname
]
in
let
fields
=
[
"var"
,
`String
varname
]
in
...
@@ -119,7 +118,7 @@ module Function = Data.Collection (struct
...
@@ -119,7 +118,7 @@ module Function = Data.Collection (struct
let
syntax
=
Syntax
.
publish
~
page
~
name
:
"dive-function-name"
let
syntax
=
Syntax
.
publish
~
page
~
name
:
"dive-function-name"
~
synopsis
:
Syntax
.
string
~
synopsis
:
Syntax
.
string
~
descr
:
(
Markdown
.
rm
"The name of a function of the program"
)
()
~
descr
:
(
Markdown
.
plain
"The name of a function of the program"
)
()
let
to_json
kf
=
let
to_json
kf
=
`String
(
Kernel_function
.
get_name
kf
)
`String
(
Kernel_function
.
get_name
kf
)
...
@@ -138,7 +137,7 @@ module Node = Data.Collection (struct
...
@@ -138,7 +137,7 @@ module Node = Data.Collection (struct
let
syntax
=
Syntax
.
publish
~
page
~
name
:
"dive-node"
let
syntax
=
Syntax
.
publish
~
page
~
name
:
"dive-node"
~
synopsis
:
Syntax
.
int
~
synopsis
:
Syntax
.
int
~
descr
:
(
Markdown
.
rm
"A node identifier in the graph"
)
()
~
descr
:
(
Markdown
.
plain
"A node identifier in the graph"
)
()
let
to_json
node
=
let
to_json
node
=
`Int
node
.
Graph_types
.
node_key
`Int
node
.
Graph_types
.
node_key
...
@@ -155,19 +154,19 @@ module Node = Data.Collection (struct
...
@@ -155,19 +154,19 @@ module Node = Data.Collection (struct
let
()
=
Request
.
register
~
page
let
()
=
Request
.
register
~
page
~
kind
:
`GET
~
name
:
"dive.graph"
~
kind
:
`GET
~
name
:
"dive.graph"
~
descr
:
(
Markdown
.
rm
"Retrieve the whole graph"
)
~
descr
:
(
Markdown
.
plain
"Retrieve the whole graph"
)
~
input
:
(
module
Data
.
Junit
)
~
output
:
(
module
Graph
)
~
input
:
(
module
Data
.
Junit
)
~
output
:
(
module
Graph
)
(
fun
()
->
Build
.
get_graph
(
get_graph
()
))
(
fun
()
->
Build
.
get_graph
(
get_graph
()
))
let
()
=
Request
.
register
~
page
let
()
=
Request
.
register
~
page
~
kind
:
`EXEC
~
name
:
"dive.clear"
~
kind
:
`EXEC
~
name
:
"dive.clear"
~
descr
:
(
Markdown
.
rm
"Erase the graph and start over with an empty one"
)
~
descr
:
(
Markdown
.
plain
"Erase the graph and start over with an empty one"
)
~
input
:
(
module
Data
.
Junit
)
~
output
:
(
module
Data
.
Junit
)
~
input
:
(
module
Data
.
Junit
)
~
output
:
(
module
Data
.
Junit
)
(
fun
()
->
Build
.
clear
(
get_graph
()
))
(
fun
()
->
Build
.
clear
(
get_graph
()
))
let
()
=
Request
.
register
~
page
let
()
=
Request
.
register
~
page
~
kind
:
`EXEC
~
name
:
"dive.add_var"
~
kind
:
`EXEC
~
name
:
"dive.add_var"
~
descr
:
(
Markdown
.
rm
"Add a variable to the graph"
)
~
descr
:
(
Markdown
.
plain
"Add a variable to the graph"
)
~
input
:
(
module
Variable
)
~
output
:
(
module
GraphDiff
)
~
input
:
(
module
Variable
)
~
output
:
(
module
GraphDiff
)
begin
fun
var
->
begin
fun
var
->
let
depth
=
Self
.
DepthLimit
.
get
()
in
let
depth
=
Self
.
DepthLimit
.
get
()
in
...
@@ -178,7 +177,7 @@ let () = Request.register ~page
...
@@ -178,7 +177,7 @@ let () = Request.register ~page
let
()
=
Request
.
register
~
page
let
()
=
Request
.
register
~
page
~
kind
:
`EXEC
~
name
:
"dive.add_function_alarms"
~
kind
:
`EXEC
~
name
:
"dive.add_function_alarms"
~
descr
:
(
Markdown
.
rm
"Add all alarms of the given function"
)
~
descr
:
(
Markdown
.
plain
"Add all alarms of the given function"
)
~
input
:
(
module
Function
)
~
output
:
(
module
GraphDiff
)
~
input
:
(
module
Function
)
~
output
:
(
module
GraphDiff
)
begin
fun
kf
->
begin
fun
kf
->
let
depth
=
Self
.
DepthLimit
.
get
()
in
let
depth
=
Self
.
DepthLimit
.
get
()
in
...
@@ -189,7 +188,7 @@ let () = Request.register ~page
...
@@ -189,7 +188,7 @@ let () = Request.register ~page
let
()
=
Request
.
register
~
page
let
()
=
Request
.
register
~
page
~
kind
:
`EXEC
~
name
:
"dive.explore"
~
kind
:
`EXEC
~
name
:
"dive.explore"
~
descr
:
(
Markdown
.
rm
"Explore the graph starting from an existing vertex"
)
~
descr
:
(
Markdown
.
plain
"Explore the graph starting from an existing vertex"
)
~
input
:
(
module
Node
)
~
output
:
(
module
GraphDiff
)
~
input
:
(
module
Node
)
~
output
:
(
module
GraphDiff
)
begin
fun
node
->
begin
fun
node
->
let
depth
=
Self
.
DepthLimit
.
get
()
in
let
depth
=
Self
.
DepthLimit
.
get
()
in
...
@@ -200,7 +199,7 @@ let () = Request.register ~page
...
@@ -200,7 +199,7 @@ let () = Request.register ~page
let
()
=
Request
.
register
~
page
let
()
=
Request
.
register
~
page
~
kind
:
`EXEC
~
name
:
"dive.show"
~
kind
:
`EXEC
~
name
:
"dive.show"
~
descr
:
(
Markdown
.
rm
"Show the dependencies of an existing vertex"
)
~
descr
:
(
Markdown
.
plain
"Show the dependencies of an existing vertex"
)
~
input
:
(
module
Node
)
~
output
:
(
module
GraphDiff
)
~
input
:
(
module
Node
)
~
output
:
(
module
GraphDiff
)
begin
fun
node
->
begin
fun
node
->
let
depth
=
Self
.
DepthLimit
.
get
()
in
let
depth
=
Self
.
DepthLimit
.
get
()
in
...
@@ -211,10 +210,10 @@ let () = Request.register ~page
...
@@ -211,10 +210,10 @@ let () = Request.register ~page
let
()
=
Request
.
register
~
page
let
()
=
Request
.
register
~
page
~
kind
:
`EXEC
~
name
:
"dive.hide"
~
kind
:
`EXEC
~
name
:
"dive.hide"
~
descr
:
(
Markdown
.
rm
"Hide the dependencies of an existing vertex"
)
~
descr
:
(
Markdown
.
plain
"Hide the dependencies of an existing vertex"
)
~
input
:
(
module
Node
)
~
output
:
(
module
GraphDiff
)
~
input
:
(
module
Node
)
~
output
:
(
module
GraphDiff
)
begin
fun
node
->
begin
fun
node
->
let
g
=
get_graph
()
in
let
g
=
get_graph
()
in
Build
.
hide
g
node
;
Build
.
hide
g
node
;
Build
.
get_graph
g
,
Build
.
take_last_differences
g
Build
.
get_graph
g
,
Build
.
take_last_differences
g
end
end
\ No newline at end of file
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