From 220072cecdcc0b0b8292c40d93e793b3219b506f Mon Sep 17 00:00:00 2001
From: Patrick Baudin <patrick.baudin@cea.fr>
Date: Fri, 17 Jun 2022 08:07:41 +0200
Subject: [PATCH] lint some files

---
 doc/code/docgen.ml                            |  8 +--
 doc/developer/METADOC.txt                     | 34 ++++++------
 doc/developer/TODO                            | 16 +++---
 doc/developer/check_api/check_and_compare.ml  | 48 ++++++++---------
 doc/developer/check_api/check_code.ml         | 52 +++++++++----------
 .../examples/acsl_extension_ext_types.ml      |  2 +-
 doc/developer/examples/syntactic_check.ml     |  2 +-
 doc/developer/examples/use_callstack.ml       |  6 +--
 .../tutorial/viewcfg/src/dump_function.ml     |  2 +-
 .../src/dump_function_memo_clear_cache.ml     |  2 +-
 .../src/dump_function_memo_no_clear_cache.ml  |  2 +-
 .../viewcfg/src/dump_to_string_memoized.ml    |  4 +-
 .../src/extend_with_run_with_options.ml       |  2 +-
 doc/developer/tutorial/viewcfg/src/gui.ml     |  6 +--
 .../tutorial/viewcfg/src/print_cfg_vglob.ml   |  2 +-
 .../src/print_cfg_vstmt_aux_novalue.ml        |  2 +-
 .../viewcfg/src/print_cfg_vstmt_aux_value.ml  |  6 +--
 .../tutorial/viewcfg/src/print_stmt.ml        |  1 -
 doc/slicing/algo.ml                           |  2 +-
 .../developer/sources/basic_script.ml         |  4 +-
 20 files changed, 101 insertions(+), 102 deletions(-)

diff --git a/doc/code/docgen.ml b/doc/code/docgen.ml
index 86d4520c370..3eb1f0ebc97 100644
--- a/doc/code/docgen.ml
+++ b/doc/code/docgen.ml
@@ -363,8 +363,8 @@ struct
     method private html_of_ignore _t = ""
 
     method private html_of_modify t = match t with
-      | [] -> 
-        Odoc_info.warning "Found an empty @modify tag"; 
+      | [] ->
+        Odoc_info.warning "Found an empty @modify tag";
         ""
       | Raw s :: l ->
         let time, explanation =
@@ -386,8 +386,8 @@ struct
         assert false
 
     method private html_of_call t = match t with
-      | [] -> 
-        Odoc_info.warning "Found an empty @call tag"; 
+      | [] ->
+        Odoc_info.warning "Found an empty @call tag";
         ""
       | l ->
         let buf = Buffer.create 97 in
diff --git a/doc/developer/METADOC.txt b/doc/developer/METADOC.txt
index 229eedcfa07..e17f478eed5 100644
--- a/doc/developer/METADOC.txt
+++ b/doc/developer/METADOC.txt
@@ -1,25 +1,25 @@
 =========================================================================
-Ce fichier contient les règles à suivre pour écrire la doc du développeur
+Ce fichier contient les règles à suivre pour écrire la doc du développeur
 =========================================================================
 
-* Les instructions de "doc/www/src/metadoc.NE_PAS_ECRIRE" doivent être 
-  appliquées.
+* Les instructions de "doc/www/src/metadoc.NE_PAS_ECRIRE" doivent être 
+  appliquées.
 
 * Les fichiers portent l'extension .pretex pour permettre leur preprocessing
 
-* L'index doit être tenu à jour
+* L'index doit être tenu à jour
 
-* Les redondances dans l'index (deux entrées différentes correspondant à la
-  même chose) ne sont autorisées seulement si une des deux entrées référence
-  proprement l'autre à l'aide d'un tag "see".
+* Les redondances dans l'index (deux entrées différentes correspondant à la
+  même chose) ne sont autorisées seulement si une des deux entrées référence
+  proprement l'autre à l'aide d'un tag "see".
 
-* L'annexe "Changes" doit être tenue à jour.
+* L'annexe "Changes" doit être tenue à jour.
 
-* Les macros doivent être définies dans macros.tex
+* Les macros doivent être définies dans macros.tex
 
-* Les macros doivent être au maximum utilisées. 
+* Les macros doivent être au maximum utilisées. 
   En particulier:
-    o les environnements dérivés de "code" pour le code
+    o les environnements dérivés de "code" pour le code
         - autoconfcode pour les configure.in
         - makecode pour les makefile
 	- ccode pour le C
@@ -27,10 +27,10 @@ Ce fichier contient les r
 	- code pour les autres codes (ligne de commandes par exemple)
     o l'environnement "example" pour les exemples
     o l'environnement "important" pour les choses importantes
-    o l'environnement "convention" pour les conventions qu'un développeur doit
+    o l'environnement "convention" pour les conventions qu'un développeur doit
       respecter
-    o l'environnement "prereq" pour les prérequis nécessaires à la bonne
-      compréhension 
-    o les macros pour les noms de langage/d'outils (c'est la même macro
-      \langage à l'origine)
-    o les macros pour les entrées d'index
+    o l'environnement "prereq" pour les prérequis nécessaires à la bonne
+      compréhension 
+    o les macros pour les noms de langage/d'outils (c'est la même macro
+      \langage à l'origine)
+    o les macros pour les entrées d'index
diff --git a/doc/developer/TODO b/doc/developer/TODO
index b0d6d62fa4c..489e0e1eebf 100644
--- a/doc/developer/TODO
+++ b/doc/developer/TODO
@@ -18,26 +18,26 @@ Advance
   [advanced plugin development]
     o lien avec les exemples de chargement dynamique
   [refman]
-    o spécification du module "Type" dans répertoire "lib": 
-      ajouté un lien vers Section "Journalisation" quand cette 
-      dernière sera écrite.
+    o spécification du module "Type" dans répertoire "lib": 
+      ajouté un lien vers Section "Journalisation" quand cette 
+      dernière sera écrite.
 
 * Documentation des sources:
-    o test d'intégrité du code wrt plugin dev guide
+    o test d'intégrité du code wrt plugin dev guide
 
 * GUI:
-    o améliorer la doc: mieux expliquer comment utiliser les hooks pour coder 
-      les parties similaires à chaque greffon (panneau latéral, etc).
+    o améliorer la doc: mieux expliquer comment utiliser les hooks pour coder 
+      les parties similaires à chaque greffon (panneau latéral, etc).
     o GUI des greffons dynamiques
 
 Refman
 ======
 
 * Figure des makefiles: 
-    o ajouter le fait que Makefile.dynamic est généré à partir de 
+    o ajouter le fait que Makefile.dynamic est généré à partir de 
       Makefile.dynamic.internal/external
 
-* Makefile.dynamic: ce qui lui est spécifique
+* Makefile.dynamic: ce qui lui est spécifique
 
 List of recommendations (?)
 =======================
diff --git a/doc/developer/check_api/check_and_compare.ml b/doc/developer/check_api/check_and_compare.ml
index e7005ca2585..281d6644267 100644
--- a/doc/developer/check_api/check_and_compare.ml
+++ b/doc/developer/check_api/check_and_compare.ml
@@ -61,10 +61,10 @@ let inspect_entry line =
 
 let external_names = [ "Landmarks"; "Makefile" ]
 
-(** [fill_tbl] takes a file containing data which is 
+(** [fill_tbl] takes a file containing data which is
     as "element_name/type/comment/" or "element_name".
     It fills the hashtable [tbl]
-    with all the element [type;comment] or [] recorded 
+    with all the element [type;comment] or [] recorded
     with the key "element_name". *)
 let fill_tbl tbl file_name =
   try
@@ -83,22 +83,22 @@ let fill_tbl tbl file_name =
       done
     with End_of_file -> close_in c
   with Sys_error _ as exn ->
-    Format.eprintf "cannot handle file %s: %s" file_name 
+    Format.eprintf "cannot handle file %s: %s" file_name
       (Printexc.to_string exn)
 
 (** [run_oracle] takes two hashtables [t1] and [t2] when called.
     It first tests if the file "run.oracle" is already existing.
     If this file exists, it uses the function [w_tbl] and creates
     [tbl] a hashtable that contains the information found in "run.oracle".
-    It first looks for all the elements in common in [t1] and [t2] and then 
+    It first looks for all the elements in common in [t1] and [t2] and then
     compares the corresponding pieces of information of [t1] and [tbl]
     If the pieces of information are different, it writes this difference.
     It eventually overwrites the "run.oracle" file with
-    the pieces of information of the common elements of [t1] and [t2]. 
-    If the file "run.oracle" does not exit, it only fills this file with 
+    the pieces of information of the common elements of [t1] and [t2].
+    If the file "run.oracle" does not exit, it only fills this file with
     the pieces of information in common using the function [wo_tbl]. *)
 let run_oracle t1 t2 =
-  let to_fill = ref "" 
+  let to_fill = ref ""
   in
   let fill_oracle s =
     try let chan_out = open_out "run.oracle"
@@ -106,8 +106,8 @@ let run_oracle t1 t2 =
       output_string chan_out s;
       close_out chan_out
     with Sys_error _ as exn ->
-      Format.eprintf "cannot handle file %s: %s" "run.oracle" 
-        (Printexc.to_string exn) 
+      Format.eprintf "cannot handle file %s: %s" "run.oracle"
+        (Printexc.to_string exn)
   in
   let rec string_of_list l = match l with
     | []    -> ""
@@ -122,23 +122,23 @@ let run_oracle t1 t2 =
       then h ^ "\n" ^ (string_of_info_list q)
       else (string_of_info_list q)
   in
-  let wo_tbl t k _d = 
+  let wo_tbl t k _d =
     try let element_info = Hashtbl.find t k
       in
-      to_fill := 
+      to_fill :=
         !to_fill ^ "\n" ^ k ^ "/" ^ (string_of_list element_info)
     with Not_found -> ()
   in
-  let w_tbl t k _d = 
+  let w_tbl t k _d =
     let tbl: (string,string list) Hashtbl.t = Hashtbl.create 197
     in
     fill_tbl tbl "run.oracle";
-    try 
+    try
       let element_info = Hashtbl.find t k
       in
-      to_fill := 
+      to_fill :=
         !to_fill ^ "\n" ^ k ^ "/"^ string_of_list element_info;
-      let previous_element_info = Hashtbl.find tbl k 
+      let previous_element_info = Hashtbl.find tbl k
       in
       if not (element_info = previous_element_info) then
         Format.printf " \n \n ----%s---- \n\n ** Information \
@@ -146,7 +146,7 @@ let run_oracle t1 t2 =
                        the current API :\n %s \n "
           k (string_of_info_list previous_element_info)
           (string_of_info_list element_info)
-    with Not_found -> 
+    with Not_found ->
       (* element not previously registered *)
       ()
   in
@@ -155,18 +155,18 @@ let run_oracle t1 t2 =
                       \nELEMENTS OF THE INDEX OF THE DEVELOPER GUIDE EXISTING \
                       IN THE CODE: \n*****************************************\
                       *************************\n\n";
-  if (Sys.file_exists "run.oracle") 
-  then (Hashtbl.iter (w_tbl t2) t1; 
+  if (Sys.file_exists "run.oracle")
+  then (Hashtbl.iter (w_tbl t2) t1;
         fill_oracle !to_fill)
   else (Hashtbl.iter (wo_tbl t2) t1 ;
         fill_oracle !to_fill)
 
 
-(** [compare] takes two lists and returns the elements 
+(** [compare] takes two lists and returns the elements
     of the first list not in the second list and then the elements
     of the second list not in the first list.
     The two names are corresponding (same order) to the two tables
-    and are used in the introduction sentences. *)    
+    and are used in the introduction sentences. *)
 let compare t1 t2 name1 name2 =
   let compare_aux t k =
     if not(List.mem k t) then Format.printf "%s" (k ^ "\n") in
@@ -174,7 +174,7 @@ let compare t1 t2 name1 name2 =
                  *******************\
                  \nELEMENTS OF %s NOT IN %s: \n***********************************\
                  *************************\
-                 \n\n" 
+                 \n\n"
     name1 name2;
   List.iter (compare_aux t2) t1;
   Format.printf " \n \n*******************************************\
@@ -182,7 +182,7 @@ let compare t1 t2 name1 name2 =
                  \nELEMENTS OF %s NOT IN %s: \n************************************\
                  ************************\
                  \n\n"
-    name2 name1; 
+    name2 name1;
   List.iter (compare_aux t1) t2
 
 let sort_keys tbl =
@@ -190,7 +190,7 @@ let sort_keys tbl =
   List.sort String.compare l
 
 (** here are used the lexer and parser "check_index_lexer" and
-    "check_index_grammar" to create the file "index_file". 
+    "check_index_grammar" to create the file "index_file".
     The files "main.idx" and "code_file" must already exist. *)
 let () =
   let index_hstbl: (string,string list) Hashtbl.t = Hashtbl.create 197 in
@@ -218,5 +218,5 @@ let () =
       Format.eprintf "cannot handle file %s: %s" "index_file"
         (Printexc.to_string exn)
   with Sys_error _ as exn ->
-    Format.eprintf "cannot handle file %s: %s" "main.idx" 
+    Format.eprintf "cannot handle file %s: %s" "main.idx"
       (Printexc.to_string exn)
diff --git a/doc/developer/check_api/check_code.ml b/doc/developer/check_api/check_code.ml
index 9a2cab0b2c1..2fcb3fc4aa5 100644
--- a/doc/developer/check_api/check_code.ml
+++ b/doc/developer/check_api/check_code.ml
@@ -15,7 +15,7 @@ open Odoc_html
 open Odoc_module
 open Odoc_info
 
-let remove_nl s = Str.global_replace (Str.regexp "\n") "" s 
+let remove_nl s = Str.global_replace (Str.regexp "\n") "" s
 let remove_useless_space s = Str.global_replace (Str.regexp "  ") " " s
 
 let doc_dev_path = ref "."
@@ -26,14 +26,14 @@ let print_in_file l =
     | h :: q ->  h ^ "\n" ^ string_of_list q
   in
   let file_path = !doc_dev_path ^ "/code_file" in
-  try 
+  try
     let chan_out = open_out_gen [Open_append; Open_creat] 0o644 file_path in
     output_string chan_out (string_of_list l) ;
     flush chan_out ;
-    close_out chan_out 
+    close_out chan_out
   with Sys_error _ as exn ->
     Format.eprintf
-      "cannot handle file %s: %s" 
+      "cannot handle file %s: %s"
       file_path
       (Printexc.to_string exn)
 
@@ -41,7 +41,7 @@ module Generator (G : Odoc_html.Html_generator) = struct
 
   class html = object (self)
 
-    inherit G.html as super 
+    inherit G.html as super
     val mutable last_name = ""
     val mutable last_type = ""
     val mutable last_info = ""
@@ -53,11 +53,11 @@ module Generator (G : Odoc_html.Html_generator) = struct
       | (s, t) :: [] ->
         self#html_of_text b t;
         let temp =
-          last_info ^ " raised exception: " 
-          ^ Odoc_info.string_of_text [Raw s] ^ "." 
+          last_info ^ " raised exception: "
+          ^ Odoc_info.string_of_text [Raw s] ^ "."
         in
         last_info <- temp
-      | _ -> 
+      | _ ->
         let temp = last_info ^ " raised exceptions: " in
         last_info <- temp;
         List.iter
@@ -73,13 +73,13 @@ module Generator (G : Odoc_html.Html_generator) = struct
       | Some info ->
         (match info.Odoc_info.i_deprecated with
          | None -> ()
-         | Some d -> 
+         | Some d ->
            self#html_of_text b d;
            last_info <- string_of_text d);
         (match info.Odoc_info.i_desc with
          | None -> ()
          | Some d when d = [Odoc_info.Raw ""] -> ()
-         | Some d -> 
+         | Some d ->
            self#html_of_text b d;
            last_info <- string_of_text d);
         self#html_of_raised_exceptions b info.Odoc_info.i_raised_exceptions;
@@ -87,7 +87,7 @@ module Generator (G : Odoc_html.Html_generator) = struct
         self#html_of_custom b info.Odoc_info.i_custom
 
     (** Print html code for the first sentence of a description.
-        	The titles and lists in this first sentence has been removed.*)
+ The titles and lists in this first sentence has been removed.*)
     method html_of_info_first_sentence b = function
       | None -> ()
       | Some info ->
@@ -108,12 +108,12 @@ module Generator (G : Odoc_html.Html_generator) = struct
 
     method private html_of_type_expr_param_list_1 b m_name t =
       if string_of_type_param_list t <> "" then
-        last_type <- 
-          last_type ^ "parameters: "^ string_of_type_param_list t 
-          ^ ", constructors: " 
+        last_type <-
+          last_type ^ "parameters: "^ string_of_type_param_list t
+          ^ ", constructors: "
 
     method private html_of_type_expr_list_2 ?par b m_name sep l =
-      last_type <- last_type ^ " of " ^ string_of_type_list ?par sep l 
+      last_type <- last_type ^ " of " ^ string_of_type_list ?par sep l
 
     method private html_of_type_expr_3 b m_name t =
       last_type <- last_type ^ ": " ^ string_of_type_expr t
@@ -122,16 +122,16 @@ module Generator (G : Odoc_html.Html_generator) = struct
       last_type <- string_of_type_expr t
 
     method html_of_class_type_param_expr_list b m_name l =
-      last_type <- string_of_class_type_param_list l 
+      last_type <- string_of_class_type_param_list l
 
     method html_of_class_parameter_list b father c =
-      last_type <- string_of_class_params c 
+      last_type <- string_of_class_params c
 
     method html_of_type_expr_param_list b m_name t =
-      last_type <- string_of_type_param_list t 
+      last_type <- string_of_type_param_list t
 
     method html_of_module_type b ?code m_name t =
-      last_type <- string_of_module_type ?code t 
+      last_type <- string_of_module_type ?code t
 
     method html_of_module_parameter b father p =
       let s_functor, s_arrow =
@@ -195,7 +195,7 @@ module Generator (G : Odoc_html.Html_generator) = struct
         last_type <- last_type ^ " ( " ;
         self#html_of_module_kind b father k2;
         self#html_of_text b [Code ")"];
-        last_type <- last_type ^ " ) " 
+        last_type <- last_type ^ " ) "
       | Module_with (k, s) ->
         self#html_of_module_type_kind b father ?modu k;
         last_type <- last_type ^ s
@@ -215,7 +215,7 @@ module Generator (G : Odoc_html.Html_generator) = struct
 
     method html_of_exception b e =
       last_name <- e.Exception.ex_name;
-      last_type <- 
+      last_type <-
         (match e.Exception.ex_args with
          | Odoc_type.Cstr_tuple t -> Odoc_info.string_of_type_list " " t
          | Odoc_type.Cstr_record r -> Odoc_info.string_of_record r
@@ -262,9 +262,9 @@ module Generator (G : Odoc_html.Html_generator) = struct
       super#html_of_attribute b a
 
     method html_of_method b m =
-      last_name <- m.Value.met_value.Value.val_name; 
+      last_name <- m.Value.met_value.Value.val_name;
       last_type <- "";
-      super#html_of_method b m  
+      super#html_of_method b m
 
     method html_of_module b ?(info=true) ?(complete=true) ?(with_link=true) m =
       last_name <- m.Module.m_name;
@@ -302,11 +302,11 @@ module Generator (G : Odoc_html.Html_generator) = struct
     method html_of_class_type b ?(complete=true) ?(with_link=true) ct =
       last_name <- ct.Class.clt_name;
       last_type <- "" ;
-      super#html_of_class_type b ~complete:complete ~with_link:with_link ct 
+      super#html_of_class_type b ~complete:complete ~with_link:with_link ct
 
     method private html_of_plugin_developer_guide _t =
-      let temp = 
-        last_name ^ "/" 
+      let temp =
+        last_name ^ "/"
         ^ remove_useless_space
           (remove_useless_space (remove_nl (last_type ^ "/" ^ last_info ^ "/")))
       in
diff --git a/doc/developer/examples/acsl_extension_ext_types.ml b/doc/developer/examples/acsl_extension_ext_types.ml
index a387bad3fef..bd8efcd6e76 100644
--- a/doc/developer/examples/acsl_extension_ext_types.ml
+++ b/doc/developer/examples/acsl_extension_ext_types.ml
@@ -39,4 +39,4 @@ let short_printer = gen_printer true
 
 let () =
   Acsl_extension.register_global
-    "ext_type" ~preprocessor typer ~visitor ~printer ~short_printer false
\ No newline at end of file
+    "ext_type" ~preprocessor typer ~visitor ~printer ~short_printer false
diff --git a/doc/developer/examples/syntactic_check.ml b/doc/developer/examples/syntactic_check.ml
index 6049b37e8d8..d18c8fb7ffa 100644
--- a/doc/developer/examples/syntactic_check.ml
+++ b/doc/developer/examples/syntactic_check.ml
@@ -67,7 +67,7 @@ end
 (* This function creates a new project initialized with the current file plus
    the annotations related to division. *)
 let create_syntactic_check_project () =
-  ignore 
+  ignore
     (File.create_project_from_visitor "syntactic check" (new non_zero_divisor))
 
 let () = Db.Main.extend create_syntactic_check_project
diff --git a/doc/developer/examples/use_callstack.ml b/doc/developer/examples/use_callstack.ml
index 0b4c456d065..956b27d41cf 100644
--- a/doc/developer/examples/use_callstack.ml
+++ b/doc/developer/examples/use_callstack.ml
@@ -25,17 +25,17 @@ let callstack_ref = ref (get "empty" C.ty)
 
 (* operations over this mutable callstack *)
 
-let push_callstack = 
+let push_callstack =
   (* getting the function outside the closure is more efficient *)
   let push = get "push" (Datatype.func3 kf_ty stmt_ty C.ty C.ty) in
   fun kf stmt -> callstack_ref := push kf stmt !callstack_ref
 
-let pop_callstack = 
+let pop_callstack =
   (* getting the function outside the closure is more efficient *)
   let pop = get "pop" (Datatype.func C.ty C.ty) in
   fun () -> callstack_ref := pop !callstack_ref
 
-let print_callstack = 
+let print_callstack =
   (* getting the function outside the closure is more efficient *)
   let print = get "print" (Datatype.func C.ty Datatype.unit) in
   fun () -> print !callstack_ref
diff --git a/doc/developer/tutorial/viewcfg/src/dump_function.ml b/doc/developer/tutorial/viewcfg/src/dump_function.ml
index 29afbf83841..3be7ef642dc 100644
--- a/doc/developer/tutorial/viewcfg/src/dump_function.ml
+++ b/doc/developer/tutorial/viewcfg/src/dump_function.ml
@@ -1,4 +1,4 @@
-let dump_function fundec fmt = 
+let dump_function fundec fmt =
   Format.fprintf fmt "@[<hov 2>digraph cfg {@ ";
   ignore(Visitor.visitFramacFunction (new print_cfg fmt) fundec);
   Format.fprintf fmt "}@]@\n"
diff --git a/doc/developer/tutorial/viewcfg/src/dump_function_memo_clear_cache.ml b/doc/developer/tutorial/viewcfg/src/dump_function_memo_clear_cache.ml
index 36eb30f1166..224843d7def 100644
--- a/doc/developer/tutorial/viewcfg/src/dump_function_memo_clear_cache.ml
+++ b/doc/developer/tutorial/viewcfg/src/dump_function_memo_clear_cache.ml
@@ -1,5 +1,5 @@
 let dump_function fundec fmt =
-  if not (Value_is_computed.get ()) && Eva.Analysis.is_computed () then begin 
+  if not (Value_is_computed.get ()) && Eva.Analysis.is_computed () then begin
     Value_is_computed.set true;
     let selection = State_selection.with_dependencies Cfg_graph_state.self in
     Project.clear ~selection ();
diff --git a/doc/developer/tutorial/viewcfg/src/dump_function_memo_no_clear_cache.ml b/doc/developer/tutorial/viewcfg/src/dump_function_memo_no_clear_cache.ml
index 4db72d2e9b3..4352e8ddbf4 100644
--- a/doc/developer/tutorial/viewcfg/src/dump_function_memo_no_clear_cache.ml
+++ b/doc/developer/tutorial/viewcfg/src/dump_function_memo_no_clear_cache.ml
@@ -1,3 +1,3 @@
 let dump_function fundec fmt =
-  Format.fprintf fmt "@[digraph cfg {%s}@]@\n" 
+  Format.fprintf fmt "@[digraph cfg {%s}@]@\n"
     (dump_to_string_memoized fundec)
diff --git a/doc/developer/tutorial/viewcfg/src/dump_to_string_memoized.ml b/doc/developer/tutorial/viewcfg/src/dump_to_string_memoized.ml
index fee1b811f65..360e8be2922 100644
--- a/doc/developer/tutorial/viewcfg/src/dump_to_string_memoized.ml
+++ b/doc/developer/tutorial/viewcfg/src/dump_to_string_memoized.ml
@@ -1,6 +1,6 @@
-let dump_to_string fundec = 
+let dump_to_string fundec =
   Self.feedback "Computing CFG for function %s" (fundec.svar.vorig_name);
-  ignore 
+  ignore
     (Visitor.visitFramacFunction (new print_cfg Format.str_formatter) fundec);
   Format.flush_str_formatter ()
 
diff --git a/doc/developer/tutorial/viewcfg/src/extend_with_run_with_options.ml b/doc/developer/tutorial/viewcfg/src/extend_with_run_with_options.ml
index c5f060af17e..b498fdb3da4 100644
--- a/doc/developer/tutorial/viewcfg/src/extend_with_run_with_options.ml
+++ b/doc/developer/tutorial/viewcfg/src/extend_with_run_with_options.ml
@@ -1,5 +1,5 @@
 let run () =
-  if Enabled.get() then 
+  if Enabled.get() then
     let filename = OutputFile.get () in
     let chan = open_out filename in
     let fmt = Format.formatter_of_out_channel chan in
diff --git a/doc/developer/tutorial/viewcfg/src/gui.ml b/doc/developer/tutorial/viewcfg/src/gui.ml
index 81ba16c1478..0768259a120 100644
--- a/doc/developer/tutorial/viewcfg/src/gui.ml
+++ b/doc/developer/tutorial/viewcfg/src/gui.ml
@@ -1,9 +1,9 @@
 let cfg_selector
-    (popup_factory:GMenu.menu GMenu.factory) main_ui ~button:_ localizable = 
+    (popup_factory:GMenu.menu GMenu.factory) main_ui ~button:_ localizable =
   match localizable with
   (* Matches global declarations that are functions. *)
-  | Pretty_source.PVDecl(_, _, ({vtype = TFun(_,_,_,_)} as vi)) -> 
-    let callback () = 
+  | Pretty_source.PVDecl(_, _, ({vtype = TFun(_,_,_,_)} as vi)) ->
+    let callback () =
       let kf = Globals.Functions.get vi in
       let fundec = Kernel_function.get_definition kf in
       let window:GWindow.window = main_ui#main_window in
diff --git a/doc/developer/tutorial/viewcfg/src/print_cfg_vglob.ml b/doc/developer/tutorial/viewcfg/src/print_cfg_vglob.ml
index 999f7c3de63..1635fc5bf02 100644
--- a/doc/developer/tutorial/viewcfg/src/print_cfg_vglob.ml
+++ b/doc/developer/tutorial/viewcfg/src/print_cfg_vglob.ml
@@ -2,7 +2,7 @@ method! vglob_aux g =
   match g with
   | GFun(f,_) ->
     Format.fprintf out "@[<hov 2>subgraph cluster_%a {@ \
-                        @[<hv 2>graph@ [label=\"%a\"];@]@ " 
+                        @[<hv 2>graph@ [label=\"%a\"];@]@ "
       Printer.pp_varinfo f.svar
       Printer.pp_varinfo f.svar;
     Cil.DoChildrenPost(fun g -> Format.fprintf out "}@]@ "; g)
diff --git a/doc/developer/tutorial/viewcfg/src/print_cfg_vstmt_aux_novalue.ml b/doc/developer/tutorial/viewcfg/src/print_cfg_vstmt_aux_novalue.ml
index cadcb03391b..be96d4afdba 100644
--- a/doc/developer/tutorial/viewcfg/src/print_cfg_vstmt_aux_novalue.ml
+++ b/doc/developer/tutorial/viewcfg/src/print_cfg_vstmt_aux_novalue.ml
@@ -1,7 +1,7 @@
 method! vstmt_aux s =
   Format.fprintf out "@[<hov 2>s%d@ [label=%S]@];@ "
     s.sid (Pretty_utils.to_string print_stmt s.skind);
-  List.iter 
+  List.iter
     (fun succ -> Format.fprintf out "@[s%d -> s%d;@]@ " s.sid succ.sid)
     s.succs;
   Format.fprintf out "@]";
diff --git a/doc/developer/tutorial/viewcfg/src/print_cfg_vstmt_aux_value.ml b/doc/developer/tutorial/viewcfg/src/print_cfg_vstmt_aux_value.ml
index 585fc9e6948..cff0f6c0b40 100644
--- a/doc/developer/tutorial/viewcfg/src/print_cfg_vstmt_aux_value.ml
+++ b/doc/developer/tutorial/viewcfg/src/print_cfg_vstmt_aux_value.ml
@@ -1,15 +1,15 @@
 method! vstmt_aux s =
-  let color = 
+  let color =
     if Eva.Analysis.is_computed () then
       let state = Db.Value.get_stmt_state s in
       let reachable = Db.Value.is_reachable state in
       if reachable then "fillcolor=\"#ccffcc\" style=filled"
       else "fillcolor=pink style=filled"
-    else "" 
+    else ""
   in
   Format.fprintf out "@[s%d@ [label=%S %s]@];@ "
     s.sid (Pretty_utils.to_string print_stmt s.skind) color;
-  List.iter 
+  List.iter
     (fun succ -> Format.fprintf out "@[s%d -> s%d;@]@ " s.sid succ.sid)
     s.succs;
   Cil.DoChildren
diff --git a/doc/developer/tutorial/viewcfg/src/print_stmt.ml b/doc/developer/tutorial/viewcfg/src/print_stmt.ml
index 7b3d97a77a6..20fd996d6dc 100644
--- a/doc/developer/tutorial/viewcfg/src/print_stmt.ml
+++ b/doc/developer/tutorial/viewcfg/src/print_stmt.ml
@@ -13,4 +13,3 @@ let print_stmt out = function
   | UnspecifiedSequence _ -> Format.fprintf out "<unspecified sequence>"
   | TryFinally _ | TryExcept _ | TryCatch _ -> Format.fprintf out "<try>"
   | Throw _ -> Format.fprintf out "<throw>"
-
diff --git a/doc/slicing/algo.ml b/doc/slicing/algo.ml
index 86e953be8da..a5efc17891d 100644
--- a/doc/slicing/algo.ml
+++ b/doc/slicing/algo.ml
@@ -11,7 +11,7 @@ let rec mark_rec_pdg_elem pdg stmt_elems m e ff =
 and
   (* [add_elem_mark] ajoute la marque [m] à l'instruction correspondant à
      l'élément [e] et marque les autres éléments éventuels comme superflus. *)
-  add_elem_mark pdg stmt_elems m e ff = 
+  add_elem_mark pdg stmt_elems m e ff =
   let stmt = H.get_stmt e stmt_elems in
   let old_m = H.get_stmt_mark stmt ff in
   let new_m = H.combine_mark old_m m in
diff --git a/doc/training/developer/sources/basic_script.ml b/doc/training/developer/sources/basic_script.ml
index e3f7ddfe0de..3399eec4e32 100644
--- a/doc/training/developer/sources/basic_script.ml
+++ b/doc/training/developer/sources/basic_script.ml
@@ -15,7 +15,7 @@ let run f () =
 (*# Main driver function*)
 let all_entry_points () =
   (*## Setting options. *)
-  let files = [ "huffman.c"; "rice.c"; "shannonfano.c"; "lz.c"; "rle.c"; 
+  let files = [ "huffman.c"; "rice.c"; "shannonfano.c"; "lz.c"; "rle.c";
                 "systimer.c" ]
   in
   let files = List.map (Filename.concat "bcl") files in
@@ -27,7 +27,7 @@ let all_entry_points () =
   (*## Find entry points *)
   Globals.Functions.iter
     (fun kf ->
-       if Kernel_function.is_definition kf && 
+       if Kernel_function.is_definition kf &&
           (Kernel_function.find_syntactic_callsites kf = [])
        then
          run (Kernel_function.get_name kf) ());
-- 
GitLab