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
*)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
| 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| Lambda of Mlsem_types.Ty.t list
* Mlsem_types.GTy.t
* Mlsem_common.Variable.t
* tThe first parameter is a suggested type decomposition, similarly to let-bindings
*)| LambdaRec of (Mlsem_types.GTy.t * Mlsem_common.Variable.t * t) list| Ite of t * Mlsem_types.GTy.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_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.
| Let of Mlsem_types.Ty.t list * Mlsem_common.Variable.t * t * tThe first parameter is a suggested type 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 tAn expression that may be evaluated multiple times. Used to encode While expressions.
*)| Try of t * tMay jump from a branch to another. Used to model try-with expressions.
*)| Seq of t * tEvaluate the first expression, then the second.
*)| Alt of t * tEvaluate both 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 specified (Exc if not specified), and use it as the value of block specified. Used to encode Return and Break.
| If of t * Mlsem_types.GTy.t * t * t optionIf-else block statement. Returns void.
*)| While of t * Mlsem_types.GTy.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