Module Message_stack


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

val message_stack : (string * string * string, string) Hashtbl.t
contains all the messages to send and to receive in the waiting line. The value of the hash table is a message, and the key is a 3-uplet (name_of_an_agent, state_of_the_agent, string_value) where string_value is a string equal to "_rcv_stack" for indicate the messages to wait, or string_value is equal to "_message_stack" for indicate the message to send
val remove_stack_story : ((string * string * string) * string) list list Pervasives.ref
contains all the messages sent and received in the waiting line since the begin of the protocol execution. each element is a step of the protocol : all the messages sent and received in the waiting line in this step of the protocol. it is use for create an historic
val add_stack_story : ((string * string * string) * string) list list Pervasives.ref
contains all the messages to send and to receive in the waiting line since the begin of the protocol execution. each element is a step of the protocol : all the messages to send and to received in the waiting line in this step of the protocol. it is use for create an historic
val remove_of_stack : ((string * string * string) * string) list Pervasives.ref
contains all the messages sent and received in the waiting line in the current step of the protocol
val add_on_stack : ((string * string * string) * string) list Pervasives.ref
contains all the messages to send and to receive in the waiting line in the current step of the protocol
val next_add_stack : unit -> unit
add the current value add_on_stack in add_stack_story : add the current value to the historic, and initialize the value of add_on_stack
val previous_add_stack : unit -> unit
the variables add_stack_story and add_on_stack comme back to her previous value in the previous step of the protocol.
val next_remove_stack : unit -> unit
add the current value remove_of_stack in remove_stack_story : add the current value to the historic, and initialize the value of remove_of_stack
val previous_remove_stack : unit -> unit
the variables remove_stack_story and remove_of_stack comme back to her previous value in the previous step of the protocol.
val next_message_stack : unit -> unit
This function call next_add_stack () and next_remove_stack (), then this function :
val previous_message_stack : unit -> unit
the variables add_stack_story and add_on_stack comme back to her previous value in the previous step of the protocol, and the variables remove_stack_story and remove_of_stack comme back to her previous value in the previous step of the protocol.
val in_message_stack : string -> string -> string -> bool
test if the message "message" in the stack of messages to send by the agent "name_in_session" in the state "state" is in the hash table message_stack.
Returns unit
val add_in_message_stack : string -> string -> string -> unit
add the message "message" in the stack of messages to send by the agent "name_in_session" in the state "state".
Returns unit
val get_message_stack : string -> string -> string list
return the stack of messages to send by the agent "name_in_session" in the state "state".
Returns a list of messages
val message_stack_is_empty : string -> string -> bool
test if the stack of messages to send is empty for the agent "name_in_session" in the state "state".
Returns true is the stack of messages to send is emplty, else false
val remove_message_stack : string -> string -> string -> bool
delete the message "message" in the stack of messages to send by the agent name_in_session in the state "state".
Returns true is the message is deleted, else false is the message is not deleted or if the message is not in the stack
val remove_state_message_stack : string -> string -> unit
delete all the messages "message" in the stack of the messages to send by the agent "name_in_session" in the state "state".
Returns unit
val remove_all_message_stack : string -> unit
delete all the messages "message" in the stack of the messages to send by the "agent name_in_session" in all the states of this agent.
Returns unit
val add_in_rcv_stack : string -> string -> string -> unit
add the message "message" in the stack of messages to receive by the agent "name_in_session" in the state "state".
Returns unit
val get_rcv_stack : string -> string -> string list
return the stack of messages to receive by the agent "name_in_session" in the state "state".
Returns a list of messages
val rcv_stack_is_empty : string -> string -> bool
test if the stack of messages to receive is empty for the agent "name_in_session" in the state "state".
Returns true is the stack of messages to receive is emplty, else false
val remove_rcv_stack : string -> string -> string -> bool
delete the message "message" in the stack of messages to receive by the agent "name_in_session" in the state "state".
Returns true is the message is deleted, else false is the message is not deleted or if the message is not in the stack
val remove_state_rcv_stack : string -> string -> unit
delete all the messages "message" in the stack of the messages to receive by the agent "name_in_session" in the state "state".
Returns unit
val remove_all_rcv_stack : string -> unit
delete all the messages "message" in the stack of the messages to receive by the agent "name_in_session" in all the states of this agent.
Returns unit