Module PyEnv.Label

type info

Information about a "yet to reach" label location, with its name, type of ssa parameters, and a function to update the environment before processing the code after the label. For example, inserting some pruning operations before the label and the code. Since we don't always know the location of the label before-hand, the prelude is expecting one.

We also keep track of the label status: if we already processed it within the nodes function. This is to avoid infinite loops.

val mk : ?ssa_parameters:T.Typ.t list -> ?prelude:(T.Location.t -> t -> t) -> string -> info

Create a label_info with the provided arguments. Mostly used with the defaults

val update_ssa_parameters : info -> T.Typ.t list -> info

Update the ssa_parameters of a label

val is_processed : info -> bool

Returns true iff the label was already encountered during processing

val name : info -> string

Returns the name of a label

val to_textual : t -> T.Location.t -> info -> t * string * (T.Ident.t * T.Typ.t) list

Process a label info and turn it into Textual information