Mlsem_lang.Astmodule SA = Mlsem_system.Asttype pattern_constructor = | PCTuple of int| PCCons| PCRec of string list * bool| PCTag of Mlsem_types.Tag.t| PCEnum of Mlsem_types.Enum.t| PCCustom of SA.ccustom * SA.pcustom listtype pattern = | PType of Mlsem_types.Ty.t| PVar of Mlsem_types.Ty.t list * Mlsem_common.Variable.tThe first parameter is a suggested type decomposition, similarly to let-bindings
*)| PConstructor of pattern_constructor * pattern list| PAnd of pattern * pattern| POr of pattern * pattern| PAssign of Mlsem_types.Ty.t list * Mlsem_common.Variable.t * Mlsem_types.GTy.tThe first parameter is a suggested type decomposition, similarly to let-bindings
*)Patterns must be linear and their alternatives must agree on the variables they bind: a variable must occur in at most one component of a PAnd or of a PConstructor, and in both sides of a POr. Transforming a PatMatch over a pattern that violates this raises Invalid_argument (see Transform.eliminate_cf).
type e = | Hole of int| ExcExpression of type empty
| VoidExpression of type void
| Voidify of tEvaluate the expression inside, but give it the void type, even if it diverges
| Ignore of tEvaluate the expression inside, but give it the void type, or empty if it diverges
| Isolate of tPrevent duplications of the outer context when eliminating control flow inside
*)| Value of Mlsem_types.GTy.t| Var of Mlsem_common.Variable.t| Constructor of SA.constructor * t list| GConstructor of SA.gconstructor * t list| Lambda of Mlsem_types.Ty.t list * SA.param_annot * Mlsem_common.Variable.t * tThe first parameter is a suggested type decomposition, similarly to let-bindings
*)| LambdaRec of (SA.param_annot * Mlsem_common.Variable.t * t) list| Ite of t * Mlsem_types.Ty.t * t * t| PatMatch of t * (pattern * t) list| App of t * t| Operation of SA.operation * t| Projection of SA.projection * t| Declare of Mlsem_types.Ty.t list * Mlsem_common.Variable.t * tDeclaration of an uninitialized mutable variable. The variable provided must be mutable (cf. MVariable.create). The type system will not check that the variable is assigned before use. The first parameter is a suggested type decomposition, similarly to let-bindings: it applies to the values later assigned to the variable.
| Let of Mlsem_types.Ty.t list * Mlsem_common.Variable.t * t * tThe first parameter is a suggested type decomposition. If the variable is mutable, it is equivalent to a Declare followed by an assignment: in particular, the whole expression diverges if the definition diverges, regardless of the decomposition.
| TypeCast of t * Mlsem_types.GTy.t * SA.check| TypeCoerce of t * Mlsem_types.GTy.t * SA.check| VarAssign of Mlsem_common.Variable.t * t| Loop of tA void expression that may be evaluated multiple times.
*)| Seq of t * tEvaluate the first expression, then the second.
*)| Try of t listMay jump from a branch to another. Used to model try-with expressions.
*)| Alt of SA.alt_settings * t listEvaluate branches independently. The result is (the intersection of) the result of the branches that do not fail.
*)| Block of blockid * tIdentifies a block to which a Ret can refer to.
*)| Ret of blockid * t optionEvaluate the expression (Exc if not specified), and use it as the value of block specified. Used to encode Return and Break.
| If of t * Mlsem_types.Ty.t * t * t optionIf-else block statement. Returns void.
*)| While of t * Mlsem_types.Ty.t * tWhile block statement. Returns void.
*)| Return of tExits the current function.
*)| BreakExits the current while loop.
*)and t = Mlsem_common.Eid.t * eval fv : t -> Mlsem_common.VarSet.tval vars : t -> Mlsem_common.VarSet.tval rename_fv : Mlsem_common.Variable.t -> Mlsem_common.Variable.t -> t -> tval pp_blockid : Stdlib.Format.formatter -> blockid -> unitval pp_pattern_constructor :
Stdlib.Format.formatter ->
pattern_constructor ->
unitval pp_pattern : Stdlib.Format.formatter -> pattern -> unitval pp_e : Stdlib.Format.formatter -> e -> unitval pp : Stdlib.Format.formatter -> t -> unit