Module Interface


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


size of canva let width = (ref (545.) : float Pervasives.ref);; let height = (ref (530.) : float Pervasives.ref);; let width = (ref (650.) : float Pervasives.ref);; let height = (ref (690.) : float Pervasives.ref);; let width = (ref (805.) : float Pervasives.ref);; let height = (ref (670.) : float Pervasives.ref);;
val width : float Pervasives.ref
val height : float Pervasives.ref
val esc : string

private coordinate system
val xmin : float Pervasives.ref
val xmax : float Pervasives.ref
val ymin : float Pervasives.ref
val ymax : float Pervasives.ref
val xscale : float Pervasives.ref
val yscale : float Pervasives.ref

graphicals objects
val base : Widget.frame Widget.widget
principal frame
val bar : Widget.frame Widget.widget
Menu bar
val canvasFrame : Widget.frame Widget.widget
frame for the canva
val canvas : Widget.canvas Widget.widget
canva for draw the MSC
val canvas_sb_v : Widget.scrollbar Widget.widget
val canvas_sb_h : Widget.scrollbar Widget.widget
val commandFrame : Widget.frame Widget.widget
frame for the buttons "Next step" "Previous step" "untyped_variables" and for for the incoming events and the past events
val infoFrame : Widget.frame Widget.widget
frame for the incoming events and the past events
val lstFrame : Widget.frame Widget.widget
frame for the incoming events
val label_lst : Widget.label Widget.widget
label for the incoming events
val lst : Widget.listbox Widget.widget
list box for the incoming events
val lst_sb_v : Widget.scrollbar Widget.widget
scroll bar of lst
val lst_sb_h : Widget.scrollbar Widget.widget
val storyFrame : Widget.frame Widget.widget
frame for the incoming events
val label_story : Widget.label Widget.widget
label for the incoming events
val story : Widget.listbox Widget.widget
list box for the incoming events
val story_sb_v : Widget.scrollbar Widget.widget
scroll bar of story
val story_sb_h : Widget.scrollbar Widget.widget
val buttonFrame : Widget.frame Widget.widget
frame for the buttons "Next step" "Previous step" "untyped_variables"
val tag_number : int Pervasives.ref
tag number for design each step of protocol
val previous_tag_number : unit -> unit
compute tag_number at the previous step of the protocol and respect the rule : !tag_number>0
Returns unit
val add_tag_number : unit -> unit
compute tag_number at the next step of the protocol
Returns unit
val remove_graphics_obj : unit -> unit
remove the graphical objects (arrow, text, message) created by the execution of the previous step of the protocol
Returns unit
val remove_graphics_obj_with_tag_value : string -> unit
remove the graphical objects associated with the parameter tag
Returns unit
tag : string
val remove_graphics_obj_with_tag : int -> string -> unit
remove the graphical objects associated with the two parameters tag_num and tag_string
Returns unit
tag_num : int
tag_string : string
val yDelta : float Pervasives.ref
the distance between two arrows
val xconv : float -> int
converse a abscissa value in the private coordinate system to the real coordinate system of the canva
Returns int
x : float
val yconv : float -> int
converse a Y-axis value in the private coordinate system to the real coordinate system of the canva
Returns int
y : float
val draw_line : float -> float -> float -> float -> Tk.color -> int -> unit
draw between (x1, y1) and (x2, y2) with the color col and the tag tag_number
Returns unit
x1 : float
y1 : float
x2 : float
y2 : float
col : Tk.color
tag_number : int
val draw_click_zone : float -> float -> int -> string -> unit
For the variable monitoring

draw a rectangle around the point (x,y) the tags values tag_number1 and tag2.
Returns unit

x : float
y : float
tag_number1 : int
tag2 : string
val message_emission : bool Pervasives.ref
if !message_emission=true then the animator displays all the messages send in the network for each transitions
val message_sender : bool Pervasives.ref
if !message_sender=true then the animator displays the pattern of the message send in the network for each transitions
val message_receiver : bool Pervasives.ref
if !message_receiver=true then the animator displays the pattern of the message receiver in the network for each transitions
val message_real : bool Pervasives.ref
if !message_real=true then the animator displays the message send by an agent and receive by another
val message_principal_sender : bool Pervasives.ref
if !message_principal_sender=true then the animator displays the pattern of the message send in the network for each transitions in the middle of the arrow
val draw_text : float -> float -> string -> Tk.color -> string list -> Tk.anchor -> unit
draw a text at the position (x,y) with color col with tag value tag
Returns unit
x : float
y : float
text : string
col : Tk.color
tag : string list
val draw_text_left : float -> float -> string -> Tk.color -> int -> string -> unit
For the variable monitoring

draw a text at the position (x,y) with color col with tag value tag_number and tag2
Returns unit

x : float
y : float
text : string
col : Tk.color
tag_number : int
tag2 : string
val draw_step : float -> float -> string -> Tk.color -> int -> string -> unit
For display the number of the step of protocol

draw a text at the position (x,y) with color col with tag value tag_number and tag2
Returns unit

x : float
y : float
text : string
col : Tk.color
tag_number : int
tag2 : string
val role_var_monitoring : (string, string) Hashtbl.t
role_var_monitoring contains all the name the variables of the roles for which it is possible to display the value
val var_in_monitor : (string, string) Hashtbl.t
var_monitoring contains all the name the variables of the roles for which the user wants to display the value
val infos_zones : ((float * float) * float list) list Pervasives.ref
the infos_zones is the zones used for the variable monitoring is a click of all the click_zones associated with the Y-axis position of the information
val find_number_of_var_in_monitor : float -> float -> int
compute the number of the values of var displayed on the MSC associated with the click zone (abs,ord).
Returns int
abs : float
ord : float
val in_zone : float -> bool
Test if the Y-axis position ord is contained in a infos_zones (a zone for the display the values of variables)
Returns bool
ord : float
val in_click_zone : float -> float -> bool
test if point (x,y) is contained in a zone of click
Returns boolean, true if (x,y) is in a zone of click, else false
x : is the abscissa value of the point (x,y)
y : is the Y-axis value of the point (x,y)
val in_click_zone_y : float -> bool
test if a zone of click with the Y-axis value equals to y, exists
Returns boolean, true if the zone of exists, else false
y : is the Y-axis value of the zone of click that we search with this function
val number_of_common_line_between_all_zones : float -> float -> int
compute the number of common line between the zone associates with the click zone (x,y), and all the others zones (the zones for the display the values of variables : "variable monitoring") with the Y-axis value equals to "y".
Returns a number of lines
x : is an abscissa value
y : is an Y-axis value
val del_zone : float -> float -> unit
remove the infos zone for which the click zone position is (x,y)
Returns unit
x : in an abscissa value
y : is an Y-axis value
val del_zone_y : float -> unit
remove all the infos zones for which the Y-axis value of the click zone is equals to "y"
Returns unit
y : is an Y-axis value
val add_in_zone : float -> float -> float list -> unit
add a zone for which the click zone position is equal to (x,y), and the list of Y-axis position of the info zones is y.
Returns unit
y : is an Y-axis value
val nbAgents : int Pervasives.ref
The number of the agents in the protocol execution
val yMarge : float Pervasives.ref
A marge at the top of the MSC
val yOrd : float Pervasives.ref
The Y-axis position of the transition during the protocol execution
val yOrd_init : unit -> unit
Initializationof yOrd
val yAction : unit -> float
Adjust the value of yOrd after the execution of a transition
val previous_yAction : unit -> unit
Adjust the value of yOrd when the user come back to the previous step of the execution of the protocol
val role_position : (string, float) Hashtbl.t
the abscissa of the agents
val draw_plot : float -> string -> Tk.color -> unit
draw an agent of the protocol
Returns unit
x_pos : float
text : string
col : Tk.color
val draw_row : float ->
float ->
float ->
Tk.color ->
string -> string -> string -> Tk.color -> string -> Tk.color -> unit
draw an arrow beteween (x1, y) and (x2,y) with the color col_line, for symbolise an execution of a step of the protocol, with the texts message_sender, real_message and message_receiver with the color col_message, and with the text message_emission with the color col_emission. message_emission is all the messages send the network during the execution of the step, and txt is message send by an agent to anoter for the execution of the transition
Returns unit
x1 : float
x2 : float
y : float
col_line : Tk.color
message_receiver : string
real_message : string
message_sender : string
col_message : Tk.color
message_emission : string
col_emission : Tk.color
val draw_action : string ->
string ->
Tk.color ->
string -> string -> string -> Tk.color -> string -> Tk.color -> unit
draw an arrow between then agentA and the agentB with the color col_line, for symbolise an execution of a step of the protocol, with the text sender_pattern, real_message, and message_receiver with the color col_txt, and with the text message2 with the color col_txt2. message2 is all the messages send the network during the execution of the step, and sender_pattern is message send by an agent to anoter for the execution of the transition. receive_pattern is the pattern of the message receive by an agent, and message is the pattern of the message send by an agennt to another. real_message is the instanciation of the pattern of message_sender
Returns unit
agentA : string
agentB : string
col : Tk.color
sender_pattern : string
real_message : string
receive_pattern : string
col_txt : Tk.color
message2 : string
col_txt2 : Tk.color
val xinit_coord : int -> unit
initialize the X-axis
Returns unit
nb_agents : int
val contains_term_list : (Types.if_value_type * Types.if_value_type) list Pervasives.ref
val roles_printed : string list Pervasives.ref
val list_to_string : ('a -> string) -> string -> 'a list -> string
val print_list : ('a -> string) -> string -> 'a list -> unit
val prerr_list : ('a -> string) -> string -> 'a list -> unit
val list2_to_string : ('a -> string) -> string -> 'a list -> string
val term_type_to_string : Types.basic_type Types.term_structure -> string
val prerr_term_type : Types.basic_type Types.term_structure -> unit
val if_value_to_string : (Types.if_value_type -> string) -> Types.if_value_type -> string
val print_if_value : (Types.if_value_type -> string) -> Types.if_value_type -> unit
val prerr_if_value : (Types.if_value_type -> string) -> Types.if_value_type -> unit
val atom_ground_value_to_string : Types.if_value_type -> string
val ground_if_value_to_string : Types.if_value_type -> string
val print_ground_if_value : Types.if_value_type -> unit
val prerr_ground_if_value : Types.if_value_type -> unit
val term_to_string : Types.atoms_type Types.term_structure -> string
val print_term : Types.atoms_type Types.term_structure -> unit
val prerr_term : Types.atoms_type Types.term_structure -> unit
val term_value_to_string : int -> Types.atoms_type Types.term_structure -> string
val if_term_to_string : string -> Types.if_term -> string
val print_if_term : string -> Types.if_term -> unit
val prerr_if_term : string -> Types.if_term -> unit
val ltl_formula_to_string : Types.ltl_type -> string
val atoms_type_to_string : bool -> Types.basic_type Types.term_structure -> string
val global_id_to_type_string : int -> string
val print_section_types : unit -> unit
val is_convertible_property : Types.ltl_type -> bool
val ltl_to_neg_dnf : Types.ltl_type -> Types.if_term list list
val print_section_goals : (Types.atoms_type Types.term_structure list ->
Types.atoms_type Types.term_structure list ->
Types.atoms_type Types.term_structure list -> 'a) ->
Types.goals_type list -> unit
val print_section_signatureA : Types.role_instance list -> unit
record the signature of the roles
Returns unit
val initial_states : (string, string) Hashtbl.t
contains the initial states of all the agent. Each pair is (name_of _the_agent, initial_state)
val add_state : string -> string -> unit
Record an initial state "stae" of the agent "name" in the hash table initial_states
Returns unit
name : is an agent
state : is an initial stae of the agent "name"
val get_initial_state : string -> string
return the initial state of the agent "name"
Returns the initial state of the agent "name"
name : is an agent
val list_to_stringA : ('a -> unit) -> 'a list -> unit
val print_initial_stateA : Types.if_term list -> unit
Record the initial state of the roles
Returns init
val print_section_init : Types.role_instance list -> unit
record the initial states, the initial knowledge of the intruder
Returns unit
val print_if_states_listA : string -> Types.if_term list -> string * string list
val multi_transition : string * string list ->
string list ->
string list ->
string * string list ->
((string * string) *
((string list * string list) * (string list * string list)) *
(string * string))
list
print the transitions of the agents
val print_if_states_list : string -> Types.if_term list -> unit
val print_section_rulesA : Types.role_instance list ->
Types.term list ->
Types.term list ->
Types.term list ->
(string * int * 'a list Pervasives.ref *
((string * string) *
((string list * string list) * (string list * string list)) *
(string * string))
list)
list
print the transitions of the agents
val trace_story : string list Pervasives.ref
!trace_story contains all past events in the present execution of the protocol. It's can be seen like an execution trace. Each string of the list is an event in Intermediate Format
val next_story : string list Pervasives.ref
!next_story contains all the events executed before the user of the tool use the "Previous Step" button. It's can be seen like an execution trace. Each string of the list is an event in Intermediate Format
val incomming_events : string list Pervasives.ref
contains all incoming events pruposed to the user. Each string is an event in Intermediate Format.
val insert_lst : string -> string -> unit
update the list box lst for purpose to the user all incoming events
Returns unit
val match_message_with_one_state_of_agent : string -> string Pervasives.ref -> string -> string -> string -> bool
val state_refresh : string -> string -> string -> string -> unit
Refresh the automate variable after the execution of transition
Returns unit
sender : is the sender of the message
message : is the message
reciever : is the reciever of the message

Widgets for intruder mode
val intruderFrameForButton : Widget.frame Widget.widget
frame for the "window_compose_intruder_knowledge" button and the "label_intruder" label in the intruder knowledge
val intruderFrame : Widget.frame Widget.widget
frame for display intuder knowledge and for the button for compose a message with the intruder knowledge
val intruder_knowledge_lst : Widget.listbox Widget.widget
a listbox for display the intruder knowledge
val intruder_knowledge_v : Widget.scrollbar Widget.widget
scroll bar vertical of intruder_knowledge_lst
val intruder_knowledge_h : Widget.scrollbar Widget.widget
scroll bar horizontal of intruder_knowledge_lst
val display_intruder_knowledge : unit -> unit
display the intruder knowledge in the list box intruder_knowledge_lst
Returns unit
val label_intruder : Widget.label Widget.widget
create a label in the intruder knowledge
val window_compose_intruder_knowledge : Widget.button Widget.widget
create a window for compose a message with the intruder knowledge
val click : int Pervasives.ref
click is used for create a double-click.
val emission : Widget.listbox Widget.widget -> string -> string -> string
Compute the string for display the message send on the network during the execution of a step
Returns string sdqf
lst : listbox lst
sender : is the name of the sender of the message
message : is the message send by the sender and receive by another agent
val tv_untypedButton : Textvariable.textVariable
Text variable for the check button "Untyped variables"
val untypedButton : Widget.checkbutton Widget.widget
checkbutton "Untyped variables"
val goButton : Widget.button Widget.widget
Button "Next Step"
val previousButton : Widget.button Widget.widget
Button "Previous Step"

Variables manitoring
val draw_role_click_zone : string -> unit
role_click_zone draw the zone for which the user can click and see value of variables of the role
Returns unit
name : of the role
val button_list : (Textvariable.textVariable * Widget.checkbutton Widget.widget) list
Pervasives.ref
list of pair : textvariable and checkbutton for create a frame for select the name of the variables for which the user wants toknow the value. Each element is a checkbutton of the frame and his Textvariable
val var_frame : string -> unit
var_frame create a frale with button for select the variable of a role for which the user wants to see the value
Returns unit
name : of the role
val fileName : string Pervasives.ref
file of the HLPSL spceicification of the protocol
val traceFileName : string Pervasives.ref
file of the execution trace of the protocol

Menu and Menubutton
val meb : Widget.menubutton Widget.widget
Menu_button "Trace Files"
val men : Widget.menu Widget.widget
Menu "Trace Files"
val meb_modes : Widget.menubutton Widget.widget
Menu_button "Modes"
val men_modes : Widget.menu Widget.widget
Menu "Modes"
val tv_messageEmissionButton : Textvariable.textVariable
Textvariable for the checkbutton "view messages emissions"
val tv_messageSender : Textvariable.textVariable
Textvariable for the checkbutton "view sender pattern message"
val tv_messageReceiver : Textvariable.textVariable
Textvariable for the checkbutton "view receiver pattern message"
val tv_messageReal : Textvariable.textVariable
Textvariable for the checkbutton "view real message"
val tv_principalSender : Textvariable.textVariable
Textvariable for the checkbutton "view sender pattern in principal position"
val meb_var : Widget.menubutton Widget.widget
Menu_button "Variables monitoring"
val men_var : Widget.menu Widget.widget
Menu "Variables monitoring"
val meb_msc_label : Widget.menubutton Widget.widget
MSC label
val print_if : Types.role_instance list -> Types.goals_type list -> unit
Principal of this modul call in main.ml