Module Rfsm.EvalSource

Evaluating and manipulating expressions

Sourceexception Unknown_id of string
Sourceexception Illegal_expr of Expr.t
Sourceexception Illegal_application of Expr.t
Sourceexception Illegal_array_access of Expr.t
Sourceexception Illegal_bit_range_access of Expr.t
Sourceexception Invalid_array_access of string * int
Sourceexception Illegal_record_access of Expr.t
Sourceexception Non_static_expr of Expr.t * Expr.t

Evaluation environment

Sourcetype env = (string * Expr.value) list
Sourceval subst : (string * Expr.value) list -> Expr.t -> Expr.t

subst senv e substitutes each occurence of variable v listed in senv by its value in e

Sourceval eval : (string * Expr.value) list -> Expr.t -> Expr.value

eval env e evaluates expression e in the context of environment env