Module Typing

module Typing: sig .. end

Typing


type tenv = {
   te_vars : (string * Types.typ) list;
   te_ctors : (string * Types.typ) list;
   te_rfields : (string * Types.typ) list;
   te_defns : (string * Types.typ) list;
   te_prims : (string * Types.typ_scheme) list;
}
val builtin_tenv : tenv

Exceptions

exception Undef_symbol of string * string * string

where, what, name

exception Type_error of Expr.t * Types.typ * Types.typ
exception Typing_error of string * string * Types.typ * Types.typ

what, where, type, type

exception Illegal_cast of Expr.t
exception Unbound_type_ctor of string
exception Invalid_record_access of Expr.t

Typing

val type_of_type_expr : tenv -> Type_expr.t -> Types.typ

type_expression env te returns the type represented by type expression te in environment env

val type_expression : tenv -> Expr.t -> Types.typ

type_expression env e returns the type of expression e in environment env, performing all required type checks.

val type_check_stim : tenv -> string -> Types.typ -> Global.stim_desc -> unit

type_stimuli env id ty sd type checks an input stimuli description sd against type ty

val type_fsm_model : tenv -> Fsm.model -> unit

type_fsm_model env m type checks an FSM model in environment env

val type_fsm_inst : tenv -> Fsm.inst -> unit

type_fsm_inst env f type checks an FSM instance f in environment env.

Printers

val dump_tenv : Pervasives.out_channel -> tenv -> unit