Library
Module
Module type
Parameter
Class
Class type
type fsm_config = {
mutable act_sep : string;
Default value: " "
mutable act_sem : act_semantics;
Default value: Sequential
}
val cfg : fsm_config
exception Dubious_output_assignment of string * string * Action.t * string
output name, state, action, where
module State : sig ... end
module Attr : sig ... end
module TransLabel : sig ... end
module Repr :
Lascar.Ltsa.T
with type state = State.t
and type attr = Attr.t
and type label = TransLabel.t
type state = State.t
type attr = Attr.t
type transition = State.t * TransLabel.t * State.t
type itransition = TransLabel.t * State.t
val string_of_transition : transition -> string
val string_of_state : state -> string
type inst = {
f_name : string;
f_model : model;
f_params : (string * (Types.typ * Expr.value)) list;
name, type, actual value
*)f_inps : (string * (Types.typ * Global.global)) list;
local name, (type, global)
*)f_outps : (string * (Types.typ * Global.global)) list;
local name, (type, global)
*)f_inouts : (string * (Types.typ * Global.global)) list;
local name, (type, global)
*)f_vars : (string * Types.typ) list;
name, type
*)f_repr : Repr.t;
Static representation as a LTS (with _local_ names)
*)f_l2g : string -> string;
local -> global name
*)}
val build_model :
name:string ->
states:(state * attr) list ->
params:(string * Types.typ) list ->
ios:(Types.dir * string * Types.typ) list ->
vars:(string * Types.typ) list ->
trans:
(state
* (Condition.event * Condition.guard list)
* Action.t list
* state
* int)
list ->
itrans:(state * Action.t list) ->
model
val build_instance :
name:string ->
model:model ->
params:(string * Expr.value) list ->
ios:Global.global list ->
inst
Transform a Moore-style FSM model (resp. instance), with output values assigned to states, to a Mealy-style one, with all output values set on transitions
val transitions_of_inst : inst -> transition list
val itransitions_of_inst : inst -> itransition list
val succs_inst : inst -> state -> (state * TransLabel.t) list
val input_events_of_inst : inst -> string list
val output_events_of_inst : inst -> string list
val is_rtl_inst : inst -> bool
is_rtl f
is true
iff all is_rtl a
for all actions a
of f
val transitions_of_model : model -> transition list
val itransitions_of_model : model -> itransition list
val succs_model : model -> state -> (state * TransLabel.t) list
val input_events_of_model : model -> string list
val output_events_of_model : model -> string list
val is_rtl_model : model -> bool
is_rtl f
is true
iff all is_rtl a
for all actions a
of f
val dot_output_oc :
out_channel ->
?dot_options:Utils.Dot.graph_style list ->
?options:dot_options list ->
inst ->
unit
val dot_output :
?fname:string ->
?dot_options:Utils.Dot.graph_style list ->
?options:dot_options list ->
dir:string ->
inst ->
string
dot_output dir f
writes a DOT representation of FSM instance f
in directory dir
. Returns the name of the written file.
val dot_output_model :
?fname:string ->
?dot_options:Utils.Dot.graph_style list ->
?options:dot_options list ->
dir:string ->
model ->
string
dot_output_model dir m
writes a DOT representation of FSM model m
in directory dir
. Returns the name of the written file.
val dump_model : out_channel -> model -> unit
val dump_inst : out_channel -> inst -> unit