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
e0c30c56
Commit
e0c30c56
authored
5 years ago
by
David Bühler
Browse files
Options
Downloads
Patches
Plain Diff
[Server] Adds a request to get the list of logical properties.
parent
4e7e011f
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/server/kernel_ast.ml
+49
-0
49 additions, 0 deletions
src/plugins/server/kernel_ast.ml
with
49 additions
and
0 deletions
src/plugins/server/kernel_ast.ml
+
49
−
0
View file @
e0c30c56
...
...
@@ -164,3 +164,52 @@ let () = Request.register ~page
(
fun
kf
->
Jbuffer
.
to_json
PP
.
pp_global
(
Kernel_function
.
get_global
kf
))
(* -------------------------------------------------------------------------- *)
(* --- Properties --- *)
(* -------------------------------------------------------------------------- *)
module
Property
=
struct
type
p
let
signature
=
Record
.
signature
~
page
~
name
:
"property"
~
descr
:
(
Md
.
plain
"logical property"
)
()
let
name
=
Record
.
field
signature
~
name
:
"name"
~
descr
:
(
Md
.
plain
"name"
)
(
module
Jstring
)
let
property
=
Record
.
field
signature
~
name
:
"property"
~
descr
:
(
Md
.
plain
"logical property"
)
(
module
Jstring
)
let
status
=
Record
.
field
signature
~
name
:
"status"
~
descr
:
(
Md
.
plain
"logical status"
)
(
module
Jstring
)
let
file
=
Record
.
field
signature
~
name
:
"file"
~
descr
:
(
Md
.
plain
"file"
)
(
module
Jstring
)
let
kf
=
Record
.
field
signature
~
name
:
"function"
~
descr
:
(
Md
.
plain
"kernel function"
)
(
module
Kf
.
Joption
)
let
kinstr
=
Record
.
field
signature
~
name
:
"kinstr"
~
descr
:
(
Md
.
plain
"kinstr"
)
(
module
Ki
)
module
R
=
(
val
(
Record
.
publish
signature
)
:
Record
.
S
with
type
r
=
p
)
include
R
let
make
ip
=
let
st
=
Property_status
.
Feedback
.
get
ip
in
let
st
=
Format
.
asprintf
"%a"
Property_status
.
Feedback
.
pretty
st
in
let
p
=
Format
.
asprintf
"%a"
Property
.
pretty
ip
in
let
loc
=
Property
.
location
ip
in
let
path
=
Filepath
.(
Normalized
.
to_pretty_string
(
fst
loc
)
.
pos_path
)
in
default
|>
set
property
p
|>
set
status
st
|>
set
kf
(
Property
.
get_kf
ip
)
|>
set
kinstr
(
Property
.
get_kinstr
ip
)
|>
set
name
(
Property
.
Names
.
get_prop_name_id
ip
)
|>
set
file
path
end
let
get_properties
()
=
Property_status
.
fold
(
fun
ip
acc
->
Property
.
make
ip
::
acc
)
[]
let
()
=
Request
.
register
~
page
~
kind
:
`GET
~
name
:
"kernel.getProperties"
~
descr
:
(
Md
.
plain
"Collect all logical properties"
)
~
input
:
(
module
Junit
)
~
output
:
(
module
Jlist
(
Property
))
get_properties
(* -------------------------------------------------------------------------- *)
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