More comments for I/O

This commit is contained in:
Denis Merigoux 2022-02-14 10:29:17 +01:00
parent a56d9f674a
commit a9f5495cf1
No known key found for this signature in database
GPG Key ID: EE99DCFA365C3EE3

View File

@ -84,15 +84,22 @@ type expr =
val locations_used : expr Pos.marked -> LocationSet.t
(** This type characterizes the three levels of visibility for a given scope variable with regards
to the scope's input and possible redefinitions inside the scope.. *)
type io_input =
| NoInput (** For an internal variable defined only in the scope *)
| OnlyInput (** For variables that should not be redefined in the scope *)
| Reentrant (** For variables defined in the scope that can also be redefined by the caller *)
| NoInput
(** For an internal variable defined only in the scope, and does not appear in the input. *)
| OnlyInput
(** For variables that should not be redefined in the scope, because they appear in the input. *)
| Reentrant
(** For variables defined in the scope that can also be redefined by the caller as they appear
in the input. *)
type io = {
io_output : bool Pos.marked;
io_input : io_input Pos.marked; (** True if present in the scope's input (reentrant) *)
io_output : bool Pos.marked; (** [true] is present in the output of the scope. *)
io_input : io_input Pos.marked;
}
(** Characterization of the input/output status of a scope variable. *)
type rule =
| Definition of location Pos.marked * typ Pos.marked * io * expr Pos.marked