Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
pub
frama-c
Commits
2712368c
Commit
2712368c
authored
Jan 17, 2023
by
David Bühler
Browse files
[kernel] New hook called at each update of a property status.
parent
e713f239
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/kernel_services/ast_data/property_status.ml
View file @
2712368c
...
...
@@ -392,6 +392,13 @@ module Register_hook = Hook.Build (struct type t = Property.t end)
let
register_property_add_hook
=
Register_hook
.
extend
module
Status_hook
=
Hook
.
Build
(
struct
type
t
=
emitter_with_properties
*
Property
.
t
*
emitted_status
end
)
let
register_status_update_hook
f
=
Status_hook
.
extend
(
fun
(
emitter
,
property
,
status
)
->
f
emitter
property
status
)
let
rec
register
ppt
=
Kernel
.
debug
~
dkey
:
Kernel
.
dkey_prop_status_reg
"REGISTERING %a in %a"
...
...
@@ -486,6 +493,7 @@ and unsafe_emit_and_get e ~hyps ~auto ppt ?(distinct=false) s =
add
{
emitter
with
properties
=
[
reach_ppt
]
}
s
|
_
::
_
->
Kernel
.
fatal
"Emitter %a proves invalidity of %a under \
hypotheses: unsound!"
Emitter
.
pretty
e
Property
.
pretty
ppt
));
Status_hook
.
apply
(
emitter
,
ppt
,
s
);
s
in
(
try
...
...
src/kernel_services/ast_data/property_status.mli
View file @
2712368c
...
...
@@ -138,6 +138,11 @@ val fold_on_statuses:
Property
.
t
->
'
a
->
'
a
val
register_status_update_hook
:
(
emitter_with_properties
->
Property
.
t
->
emitted_status
->
unit
)
->
unit
(** Registers an hook to be called each time a property status is emitted.
@since Frama-C+dev *)
(* ************************************************************************ *)
(** {2 Consolidated status} *)
(* ************************************************************************ *)
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment