(* Time-stamp: <modified the 10/03/2019 (at 20:38) by Erwan Jahier> *) (** Process programmer API *) type value = I of int | F of float | B of bool | S of string | N of int (* neighbor canal number *) type local_env = string -> value type action = string (* label *) type varT = It | Nt | Ft | Bt | Et of int type vars = (string * varT) list type neighbor = { lenv: local_env; n_vars: vars; } type enable_fun = neighbor list -> local_env -> action list type step_fun = neighbor list -> local_env -> action -> local_env (** Those 4 registering functions must be called! *) type algo_id = string (* XXX comment s'en passer ??? *) val reg_vars : algo_id -> vars -> unit val reg_enable : algo_id -> enable_fun -> unit val reg_step : algo_id -> step_fun -> unit (** nb: The initialisation done in the dot file have priority over this one *) val reg_init_vars : algo_id -> (neighbor list -> local_env) -> unit (** util(s) *) val value_to_string : value -> string (**/**) val vart_to_rif_string: varT -> string val verbose_level: int ref (** raised by get_* functions *) exception Unregistred of string * string (** the following functions are used by sasa *) val get_vars : algo_id -> vars val get_init_vars : algo_id -> (string * varT) list -> (neighbor list -> local_env) val get_enable : algo_id -> enable_fun val get_step : algo_id -> step_fun