Module Automate


module Automate: sig .. end
automate.ml
Author(s): Yann GLOUCHE
Version: 1.0
Since 12/12/2005


automate.ml

Automate and automatic historic
val findIknows : string * string -> string
in a pair (state, message), findIknows return the message
Returns string
s : is a pair of string (state, message)
val findState : string * string -> string
in a pair (state,message), findIknows return the state
Returns string
s : is a pair of string (state, message)
val automate : (string * int * (string * bool Pervasives.ref) list Pervasives.ref *
((string * string) *
((string list * string list) * (string list * string list)) *
(string * string))
list)
list Pervasives.ref
the automate is a very important structure. automate describes the current state of all the agents of the protocol. automate is a list of uplet where each uplet is an instanciation of a role.

The form of the uplet is : (name_of_the_agent, number_of_the_instanciation, ((current_state, bool ref);...list ref), ((state,received_message),(([left_conditions;...list],[left_affectations;...list]),([right_conditions;...lists],[right_affectations;...list])),(state,sent_message))list_of_transitions)

if !bool=true then the received_message is not received else the received_message is received

val automate_story : (string * int * (string * bool) list) list list Pervasives.ref
contains the historic of the automate. The transition are not save in this structure (it is not an interesting thing)
val add_in_automate_story : unit -> unit
save the current state of the automate in automate_story
Returns unit
val load_last_state : (string * int * (string * bool) list) list ->
(string * int * (string * bool Pervasives.ref) list Pervasives.ref * 'a) list ->
unit
load the previous state of the automate
Returns unit
val previous_state : unit -> unit
the automate comme back to the previous state
Returns unit
val max_length_message : int Pervasives.ref
val get_max_length_message : unit -> int