Skip to content
Snippets Groups Projects
Commit e3648f09 authored by Patrick Baudin's avatar Patrick Baudin Committed by Allan Blanchard
Browse files

[Gui] fixes frama-c-gui -no-autoload-plugins tests/rte/memaccess.c

parent 18689461
No related branches found
No related tags found
No related merge requests found
...@@ -25,8 +25,8 @@ module Rte = struct ...@@ -25,8 +25,8 @@ module Rte = struct
string string
* (Cil_types.kernel_function -> bool -> unit) * (Cil_types.kernel_function -> bool -> unit)
* (Cil_types.kernel_function -> bool) * (Cil_types.kernel_function -> bool)
let get_all_status = Extlib.mk_fun "Property_navigator.Rte.get_all_status" let get_all_status: (unit -> status_accessor list) option ref = ref None
let register_get_all_status getter = get_all_status := getter let register_get_all_status getter = get_all_status := Some getter
end end
open Design open Design
...@@ -229,6 +229,10 @@ struct ...@@ -229,6 +229,10 @@ struct
checks := chk :: !checks; checks := chk :: !checks;
chk chk
let hint_rte hint =
if Option.is_some !Rte.get_all_status then hint
else hint ^ " (but RteGen plugin is inactive)"
let onlyCurrent = add ~name:"Current function" ~default:false let onlyCurrent = add ~name:"Current function" ~default:false
~hint:"Only show properties related to current function" () ~hint:"Only show properties related to current function" ()
...@@ -257,7 +261,7 @@ struct ...@@ -257,7 +261,7 @@ struct
(* Function called when RTEs are enabled or disabled. *) (* Function called when RTEs are enabled or disabled. *)
let set_rte = ref (fun _b -> ()) let set_rte = ref (fun _b -> ())
let rte = add ~set:(fun b -> !set_rte b) ~name:"RTEs" let rte = add ~set:(fun b -> !set_rte b) ~name:"RTEs"
~hint:"Show runtime errors" () ~hint:(hint_rte "Show runtime errors") ()
let invariant = add ~name:"Invariant" let invariant = add ~name:"Invariant"
~hint:"Show loop invariants" () ~hint:"Show loop invariants" ()
let variant = add ~name:"Variant" let variant = add ~name:"Variant"
...@@ -282,9 +286,9 @@ struct ...@@ -282,9 +286,9 @@ struct
~hint:"Show 'reachable' hypotheses" () ~hint:"Show 'reachable' hypotheses" ()
let rteNotGenerated = add ~default:false ~name:"Non generated" let rteNotGenerated = add ~default:false ~name:"Non generated"
~hint:"Show RTEs assertions that remain to generate" () ~hint:(hint_rte "Show RTEs assertions that remain to generate") ()
let rteGenerated = add ~default:false ~name:"Generated" let rteGenerated = add ~default:false ~name:"Generated"
~hint:"Show RTEs assertions that have been generated" () ~hint:(hint_rte "Show RTEs assertions that have been generated") ()
let valid = add ~name:"Valid" let valid = add ~name:"Valid"
~hint:"Show properties that are proven valid" () ~hint:"Show properties that are proven valid" ()
...@@ -714,7 +718,10 @@ let make_panel (main_ui:main_window_extension_points) = ...@@ -714,7 +718,10 @@ let make_panel (main_ui:main_window_extension_points) =
) main_ui#file_tree#selected_globals) ) main_ui#file_tree#selected_globals)
in in
let rte_get_all_statuses = !Rte.get_all_status () in let rte_get_all_statuses = match !Rte.get_all_status with
| None -> []
| Some registered_getter -> registered_getter ()
in
(* All non-filtered RTE statuses for a given function *) (* All non-filtered RTE statuses for a given function *)
let rte_kf kf = List.fold_left (aux_rte kf) [] rte_get_all_statuses in let rte_kf kf = List.fold_left (aux_rte kf) [] rte_get_all_statuses in
(* Add RTE statuses for all functions. We cannot simply iterate over (* Add RTE statuses for all functions. We cannot simply iterate over
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment