package rfsm

  1. Overview
  2. Docs

Static description of systems

module DepG : Graph.Sig.IM with type V.label = string and type E.label = string
type t = {
  1. m_name : string;
  2. m_models : Fsm.model list;
  3. m_fsms : Fsm.inst list;
  4. m_inputs : (string * global) list;
  5. m_outputs : (string * global) list;
  6. m_types : (string * Types.typ) list;
  7. m_fns : (string * global) list;
  8. m_consts : (string * global) list;
  9. m_shared : (string * global) list;
  10. m_deps : dependencies;
    (*

    dependency graph

    *)
}
and global = Types.typ * mg_desc
and mg_desc =
  1. | MInp of Global.stim_desc * string list
    (*

    stimuli desc, reader(s)

    *)
  2. | MOutp of string list
    (*

    writer(s)

    *)
  3. | MFun of string list * Expr.t
    (*

    args, body

    *)
  4. | MConst of Expr.value
    (*

    value

    *)
  5. | MShared of string list * string list
    (*

    writer(s), reader(s)

    *)
and dependencies = {
  1. md_graph : DepG.t;
  2. md_node : string -> DepG.V.t;
}

Exceptions

exception Illegal_const_expr of Expr.t

Builders

val build : name:string -> ?gtyps:(string * Types.typ) list -> ?gfns:(string * global) list -> ?gcsts:(string * global) list -> Fsm.model list -> Fsm.inst list -> t

build name gtyps gfns gcsts models fsms builds a system description from a list of global types, function and constant declarations, FSM models and instances

Transformers

val normalize : t -> t

Transform a Moore-style description to a Mealy-style one, by moving output assignations from states to transitions in all models and instances

Printers

val dot_output : string -> ?dot_options:Utils.Dot.graph_style list -> ?fsm_options:Fsm.dot_options list -> t -> string list

dot_output dir m writes a DOT representation of system m in directory dir and returns a list of the written files

val dump : out_channel -> t -> unit
OCaml

Innovation. Community. Security.