Module Sasacore.SimuState

The module is used by

type 'v t = {
  1. config : 'v Conf.t;
  2. sasarg : SasArg.t;
  3. network : 'v Process.t list;
  4. neighbors : 'v Register.neighbor list Stdlib.Map.Make(Stdlib.String).t;
}
val make : bool -> string array -> 'v t
type 'v enable_processes = ('v Process.t * 'v Register.neighbor list * Register.action) list list * bool list list
val get_enable_processes : 'v t -> 'v enable_processes
val update_config : 'v Conf.t -> 'v t -> 'v t

update_config e c updates c using e

val update_env_with_init : 'v Conf.t -> 'v Process.t list -> 'v Conf.t
val inject_fault : (int -> string -> 'v -> 'v) -> 'v t -> 'v t

inject a fault in a configuration using the registered (user) fault function

nb : inject_fault_in_conf uses only the static part of SimuState.t

val inject_fault_in_conf : (int -> string -> 'v -> 'v) -> 'v t -> 'v Conf.t -> 'v Conf.t
val neigbors_of_pid : 'v t -> string -> 'v * ('v Register.neighbor * string) list

Get pid's state and neighbors

val compute_potentiel : 'v t -> float
val legitimate : 'v t -> bool
val get_inputs_rif_decl : SasArg.t -> 'v Process.t list -> (string * string) list
val get_outputs_rif_decl : SasArg.t -> 'v Process.t list -> (string * string) list
val to_dot : 'v t -> string