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
938be451
Commit
938be451
authored
4 years ago
by
David Bühler
Browse files
Options
Downloads
Patches
Plain Diff
[server] Kernel AST: adds new columns to the synchronized arrays of functions.
Do not include builtins Frama_C_show_each & cie in the array.
parent
aa3a4c5f
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/plugins/server/kernel_ast.ml
+37
-1
37 additions, 1 deletion
src/plugins/server/kernel_ast.ml
src/plugins/server/tests/batch/oracle/ast_services.out.json
+18
-2
18 additions, 2 deletions
src/plugins/server/tests/batch/oracle/ast_services.out.json
with
55 additions
and
3 deletions
src/plugins/server/kernel_ast.ml
+
37
−
1
View file @
938be451
...
...
@@ -354,6 +354,22 @@ struct
let
global
=
Kernel_function
.
get_global
kf
in
Rich_text
.
to_string
Printer_tag
.
pretty
(
PGlobal
global
)
let
is_builtin
kf
=
Cil
.
is_builtin
(
Kernel_function
.
get_vi
kf
)
let
is_stdlib
kf
=
let
vi
=
Kernel_function
.
get_vi
kf
in
Cil
.
hasAttribute
"fc_stdlib"
vi
.
vattr
||
Cil
.
hasAttribute
"fc_stdlib_generated"
vi
.
vattr
let
is_analyzed
kf
=
if
Db
.
Value
.
is_computed
()
then
Some
(
!
Db
.
Value
.
is_called
kf
)
else
None
let
iter
f
=
Globals
.
Functions
.
iter
(
fun
kf
->
let
name
=
Kernel_function
.
get_name
kf
in
if
not
(
Ast_info
.
is_frama_c_builtin
name
)
then
f
kf
)
let
array
:
kernel_function
States
.
array
=
begin
let
model
=
States
.
model
()
in
...
...
@@ -367,11 +383,31 @@ struct
~
descr
:
(
Md
.
plain
"Signature"
)
~
data
:
(
module
Data
.
Jstring
)
~
get
:
signature
;
States
.
column
model
~
name
:
"defined"
~
descr
:
(
Md
.
plain
"Is the function defined?"
)
~
data
:
(
module
Data
.
Jbool
)
~
get
:
Kernel_function
.
is_definition
;
States
.
column
model
~
name
:
"stdlib"
~
descr
:
(
Md
.
plain
"Is the function from the Frama-C stdlib?"
)
~
data
:
(
module
Data
.
Jbool
)
~
get
:
is_stdlib
;
States
.
column
model
~
name
:
"builtin"
~
descr
:
(
Md
.
plain
"Is the function a Frama-C builtin?"
)
~
data
:
(
module
Data
.
Jbool
)
~
get
:
is_builtin
;
States
.
column
model
~
name
:
"eva_analyzed"
~
descr
:
(
Md
.
plain
"Has the function been analyzed by Eva"
)
~
data
:
(
module
Data
.
Joption
(
Data
.
Jbool
))
~
get
:
is_analyzed
;
States
.
register_array
model
~
package
~
key
~
name
:
"functions"
~
descr
:
(
Md
.
plain
"AST Functions"
)
~
iter
:
Globals
.
Functions
.
iter
~
iter
~
add_reload_hook
:
Ast
.
add_hook_on_update
;
end
...
...
This diff is collapsed.
Click to expand it.
src/plugins/server/tests/batch/oracle/ast_services.out.json
+
18
−
2
View file @
938be451
...
...
@@ -3,8 +3,24 @@
"id"
:
"GET-1"
,
"data"
:
{
"updated"
:
[
{
"key"
:
"kf#24"
,
"name"
:
"g"
,
"signature"
:
"int g(int y);"
},
{
"key"
:
"kf#20"
,
"name"
:
"f"
,
"signature"
:
"int f(int x);"
}
{
"key"
:
"kf#24"
,
"name"
:
"g"
,
"signature"
:
"int g(int y);"
,
"defined"
:
true
,
"stdlib"
:
false
,
"builtin"
:
false
,
"eva_analyzed"
:
null
},
{
"key"
:
"kf#20"
,
"name"
:
"f"
,
"signature"
:
"int f(int x);"
,
"defined"
:
true
,
"stdlib"
:
false
,
"builtin"
:
false
,
"eva_analyzed"
:
null
}
],
"removed"
:
[],
"reload"
:
true
,
...
...
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