sig
type var = string
type typ = Real | Int | Single | Double | Extended | Quad
type unop = Neg | Cast | Sqrt
type binop = Add | Sub | Mul | Div | Mod
type round = Near | Zero | Up | Down | Rnd
type scalar = Float of float | Mpqf of unit
type interval = {
mutable inf : Scm_syn.scalar;
mutable sup : Scm_syn.scalar;
}
type coeff = Scalar of Scm_syn.scalar | Interval of Scm_syn.interval
type iexpr =
Cst of Scm_syn.coeff
| Var of Scm_syn.var
| Unop of Scm_syn.unop * Scm_syn.iexpr * Scm_syn.typ * Scm_syn.round
| Binop of Scm_syn.binop * Scm_syn.iexpr * Scm_syn.iexpr * Scm_syn.typ *
Scm_syn.round
type constyp = EQ | NEQ | GT | GEQ | LEQ | LT
type cons = Scm_syn.iexpr * Scm_syn.constyp * Scm_syn.iexpr
type bexpr =
TRUE
| FALSE
| BRANDOM
| CONS of Scm_syn.cons
| AND of Scm_syn.bexpr * Scm_syn.bexpr
| OR of Scm_syn.bexpr * Scm_syn.bexpr
| NOT of Scm_syn.bexpr
type point = { line : int; col : int; char : int; }
type taction = SEND | RECEIVE
type transition = {
new_state : string;
guard : Scm_syn.bexpr;
action : (int * Scm_syn.taction * Scm_syn.var) option;
assignement : (Scm_syn.var * Scm_syn.iexpr) list;
}
and trans = {
transition : Scm_syn.transition;
mutable tpoint : Scm_syn.point;
}
type state = { id_state : string; ltrans : Scm_syn.transition list; }
type declaration = Scm_syn.var * Scm_syn.typ * Scm_syn.iexpr option
type automaton = {
id_auto : string;
ldec : Scm_syn.declaration list;
init_states : string list;
lstate : Scm_syn.state list;
}
type scm = {
id_scm : string;
nb_channels : int;
lossy_list : int list;
params : Scm_syn.declaration list;
lauto : Scm_syn.automaton list;
threshold : Scm_syn.cons list;
bad_states : (string * (string * Scm_syn.bexpr) list) list list;
}
type global_scm = {
gb_id_scm : string;
gb_nb_channels : int;
gb_lossy_list : int list;
gb_vars : Scm_syn.declaration list;
gb_params : Scm_syn.declaration list;
gb_init_states : string list;
gb_lstates : Scm_syn.state list;
gb_threshold : Scm_syn.cons list;
gb_bad_states : (string * Scm_syn.bexpr) list;
}
exception Wrong_scm of string
val check_global_scm : Scm_syn.global_scm -> unit
val start_of_comment : Lexing.position Pervasives.ref
exception Error
exception Unterminated_comment of Lexing.position
end