From a96cdc848252e22990873119077b474726b65ea2 Mon Sep 17 00:00:00 2001
From: Andre Maroneze <andre.maroneze@cea.fr>
Date: Wed, 20 Apr 2022 11:29:43 +0200
Subject: [PATCH] [Kernel] replace several @modify tags with @before

---
 src/kernel_services/ast_queries/cil.mli              | 12 ++++++------
 src/kernel_services/ast_queries/file.mli             |  2 +-
 .../cmdline_parameters/parameter_customize.mli       |  4 ++--
 src/kernel_services/plugin_entry_points/kernel.mli   |  7 ++++---
 src/kernel_services/plugin_entry_points/plugin.mli   |  7 ++++---
 src/libraries/stdlib/extlib.mli                      |  3 +--
 src/libraries/utils/filepath.mli                     |  6 +++---
 7 files changed, 21 insertions(+), 20 deletions(-)

diff --git a/src/kernel_services/ast_queries/cil.mli b/src/kernel_services/ast_queries/cil.mli
index b150e97185b..3fe14133801 100644
--- a/src/kernel_services/ast_queries/cil.mli
+++ b/src/kernel_services/ast_queries/cil.mli
@@ -977,12 +977,12 @@ val need_cast: ?force:bool -> typ -> typ -> bool
 (** Construct a cast when having the old type of the expression. If the new
     type is the same as the old type, then no cast is added, unless [force]
     is [true] (default is [false])
-    @modify 23.0-Vanadium change order or arguments
+    @before 23.0-Vanadium different order of arguments.
 *)
 val mkCastT: ?force:bool -> oldt:typ -> newt:typ -> exp -> exp
 
 (** Like {!Cil.mkCastT} but uses typeOf to get [oldt]
-    @modify 23.0-Vanadium change order or arguments
+    @before 23.0-Vanadium different order of arguments.
 *)
 val mkCast: ?force:bool -> newt:typ -> exp -> exp
 
@@ -1105,8 +1105,8 @@ val mkPureExpr:
 (** Make a loop. Can contain Break or Continue.
     The kind of loop (while, for, dowhile) is given by [sattr]
     (none by default). Use {!Cil.mkWhile} for a While loop.
-    @modify 23.0-Vanadium add unit argument. Default type is no longer While,
-            use {!Cil.mkWhile} instead.
+    @before 23.0-Vanadium no unit argument, and default type was While
+            (for while loops, there is now {!Cil.mkWhile}).
 *)
 val mkLoop: ?sattr:attributes -> guard:exp -> body:stmt list -> unit ->
   stmt list
@@ -1115,14 +1115,14 @@ val mkLoop: ?sattr:attributes -> guard:exp -> body:stmt list -> unit ->
     can contain Break but not Continue. Can be used with i a pointer
     or an integer. Start and done must have the same type but incr
     must be an integer
-    @modify 23.0-Vanadium add unit argument
+    @before 23.0-Vanadium did not have unit argument.
 *)
 val mkForIncr: ?sattr:attributes -> iter:varinfo -> first:exp -> stopat:exp ->
   incr:exp -> body:stmt list -> unit -> stmt list
 
 (** Make a for loop for(start; guard; next) \{ ... \}. The body can
     contain Break but not Continue !!!
-    @modify 23.0-Vanadium add unit argument
+    @before 23.0-Vanadium did not have unit argument.
 *)
 val mkFor: ?sattr:attributes -> start:stmt list -> guard:exp -> next: stmt list ->
   body: stmt list -> unit -> stmt list
diff --git a/src/kernel_services/ast_queries/file.mli b/src/kernel_services/ast_queries/file.mli
index 222d02f902c..8042cf4420e 100644
--- a/src/kernel_services/ast_queries/file.mli
+++ b/src/kernel_services/ast_queries/file.mli
@@ -146,7 +146,7 @@ val get_name: t -> string
 
 val get_preprocessor_command: unit -> string
 (** Return the preprocessor command to use.
-    @modify 23.0-Vanadium return type now contains only the command
+    @before 23.0-Vanadium return type also contained cpp_opt_kind.
 *)
 
 val pre_register: t -> unit
diff --git a/src/kernel_services/cmdline_parameters/parameter_customize.mli b/src/kernel_services/cmdline_parameters/parameter_customize.mli
index ab2028f106f..2d2d03cc876 100644
--- a/src/kernel_services/cmdline_parameters/parameter_customize.mli
+++ b/src/kernel_services/cmdline_parameters/parameter_customize.mli
@@ -122,7 +122,7 @@ val is_reconfigurable: unit -> unit
     only parameters corresponding to options registered at the
     {!Cmdline.Configuring} stage are reconfigurable.
     @since Nitrogen-20111001
-    @modify 22.0-Titanium [do_iterate] renamed to [is_reconfigurable]
+    @before 22.0-Titanium this function was called [do_iterate].
 *)
 
 val is_not_reconfigurable: unit -> unit
@@ -130,7 +130,7 @@ val is_not_reconfigurable: unit -> unit
     parameters corresponding to options registered at the
     {!Cmdline.Configuring} stage are reconfigurable.
     @since Nitrogen-20111001
-    @modify 22.0-Titanium [do_iterate] renamed to [is_reconfigurable]
+    @before 22.0-Titanium this function was called [do_not_iterate].
 *)
 
 val no_category: unit -> unit
diff --git a/src/kernel_services/plugin_entry_points/kernel.mli b/src/kernel_services/plugin_entry_points/kernel.mli
index 9d3d51cd8c6..b58ecaa79ad 100644
--- a/src/kernel_services/plugin_entry_points/kernel.mli
+++ b/src/kernel_services/plugin_entry_points/kernel.mli
@@ -335,7 +335,8 @@ module AstDiff: Parameter_sig.Bool
 
 (** Behavior of option "-add-symbolic-path"
     @since Neon-20140301
-    @modify 23.0-Vanadium inversed argument order (now uses path:name) *)
+    @before 23.0-Vanadium argument order was inversed (name:path); now it is
+            (path:name). *)
 module SymbolicPath: Parameter_sig.Filepath_map with type value = string
 
 module FloatNormal: Parameter_sig.Bool
@@ -383,13 +384,13 @@ end
 module Session_dir: Parameter_sig.Filepath
 (** Directory in which session files are searched.
     @since Neon-20140301
-    @modify 23.0-Vanadium parameter type is now Filepath instead of string
+    @before 23.0-Vanadium parameter type was string instead of Filepath.
 *)
 
 module Config_dir: Parameter_sig.Filepath
 (** Directory in which config files are searched.
     @since Neon-20140301
-    @modify 23.0-Vanadium parameter type is now Filepath instead of string
+    @before 23.0-Vanadium parameter type was string instead of Filepath.
 *)
 
 (* this stop special comment does not work as expected (and as explained in the
diff --git a/src/kernel_services/plugin_entry_points/plugin.mli b/src/kernel_services/plugin_entry_points/plugin.mli
index 1a761d17e9e..0851fea0859 100644
--- a/src/kernel_services/plugin_entry_points/plugin.mli
+++ b/src/kernel_services/plugin_entry_points/plugin.mli
@@ -68,7 +68,8 @@ module type S_no_log = sig
         [add_plugin_output_aliases [alias]] adds the aliases -alias-help,
         -alias-verbose, etc.
         @since 18.0-Argon
-        @modify 22.0-Titanium add [visible] and [deprecated] arguments. *)
+        @before 22.0-Titanium no [visible] and [deprecated] arguments.
+    *)
 end
 
 (** Provided plug-general services for plug-ins.
@@ -85,8 +86,8 @@ type plugin = private
     p_help: string;
     p_parameters: (string, Typed_parameter.t list) Hashtbl.t }
 (** @since Beryllium-20090901
-    @modify 22.0-Titanium previously only "iterable" parameters were included,
-                        now all parameters are.
+    @before 22.0-Titanium only "iterable" parameters were included;
+            now all parameters are.
 *)
 
 module type General_services = sig
diff --git a/src/libraries/stdlib/extlib.mli b/src/libraries/stdlib/extlib.mli
index 7f071b90096..6eac85cefbc 100644
--- a/src/libraries/stdlib/extlib.mli
+++ b/src/libraries/stdlib/extlib.mli
@@ -208,8 +208,7 @@ val the: exn:exn -> 'a option -> 'a
 (** @raise Exn if the value is [None] and [exn] is specified.
     @raise Invalid_argument if the value is [None] and [exn] is not specified.
     @return v if the value is [Some v].
-    @modify 23.0-Vanadium optional argument [exn] now mandatory; otherwise,
-            use [Option.get], which is equivalent.
+    @before 23.0-Vanadium [exn] was an optional argument.
     @plugin development guide *)
 
 val opt_hash: ('a -> int) -> 'a option -> int
diff --git a/src/libraries/utils/filepath.mli b/src/libraries/utils/filepath.mli
index 32de3d07eeb..ac31e18e9d1 100644
--- a/src/libraries/utils/filepath.mli
+++ b/src/libraries/utils/filepath.mli
@@ -49,7 +49,7 @@ exception File_exists
     - non-existing directories in [realpath] may lead to ENOTDIR errors,
       but [normalize] may accept them.
 
-    @modify 21.0-Scandium optional existence.
+    @before 21.0-Scandium no [existence] argument.
 *)
 val normalize: ?existence:existence -> ?base_name:string -> string -> string
 
@@ -70,7 +70,7 @@ module Normalized: sig
 
   (** [of_string s] converts [s] into a normalized path.
       @raise Invalid_argument if [s] is the empty string.
-      @modify 21.0-Scandium add optional existence parameter.
+      @before 21.0-Scandium no [existence] argument.
   *)
   val of_string: ?existence:existence -> ?base_name:string -> string -> t
 
@@ -169,7 +169,7 @@ end
     (that is, it is prefixed by [base_name]), or to the current
     working directory if no base is specified.
     @since Aluminium-20160501
-    @modify 23.0-Vanadium argument types changed from string to Normalized.t
+    @before 23.0-Vanadium argument types were string instead of Normalized.t.
 *)
 val is_relative: ?base_name:Normalized.t -> Normalized.t -> bool
 
-- 
GitLab