Module Data_for_ltl


module Data_for_ltl: sig .. end
Return the buchi automata as stored after parsing

Module of data management used in all the plugin Aorai. Operations are mainly accessors for data. The use of this module is mainly done through the ltl_utils module.


val raise_error : string -> 'a
val ltl_exps : (string, Cil_types.exp * string * Cil_types.predicate) Hashtbl.t
Pervasives.ref
val setLtl_expressions : (string, Cil_types.exp * string * Cil_types.predicate) Hashtbl.t -> unit
val ltl_expressions_iter : (string -> Cil_types.exp * string * Cil_types.predicate -> unit) -> unit
val get_exp_from_tmpident : string -> Cil_types.exp
val get_str_exp_from_tmpident : string -> string
val get_pred_from_tmpident : string -> Cil_types.predicate
val debug_ltl_expressions : unit -> unit
val declared_logics : (string, Cil_types.logic_info) Hashtbl.t
val add_logic : string -> Cil_types.logic_info -> unit
val get_logic : string -> Cil_types.logic_info
val declared_predicates : (string, Cil_types.logic_info) Hashtbl.t
val add_predicate : string -> Cil_types.logic_info -> unit
val get_predicate : string -> Cil_types.logic_info
val transStart : string
Name of TransStart logic generated variable
val transStop : string
Name of transStop logic generated variable
val transCond : string
Name of transCond logic generated variable
val transCondP : string
Name of transCondP logic generated variable
val loopInit : string
Name of the fresh loopInit logic generated variable
val curState : string
Name of curState C generated variable (Table of states that can be synchronized with the program)
val curStateOld : string
Name of curStateOld C generated variable (Last value of curState)
val curTrans : string
Name of curTrans C generated variable (Last transitions that can be crossed)
val curOp : string
Name of curOp C generated variable (Name of the curent operation)
val curOpStatus : string
Name of curOpStatus C generated variable (Status Return or Call of the curent operation)
val acceptSt : string
val nbOp : string
DEPRECATED ?
val nbStates : string
DEPRECATED ?
val nbAcceptSt : string
DEPRECATED ?
val nbTrans : string
DEPRECATED ?
val macro_ligth : string
DEPRECATED ?
val macro_full : string
DEPRECATED ?
val macro_pure : string
DEPRECATED ?
val listOp : string
Name of listOp C generated enumeration (List of operation names prefixed with 'op_')
val listStatus : string
Name of listStatus C generated enumeration (Status are Call or Return)
val callStatus : string
Name of callStatus C generated enumeration (Name of the Call status)
val termStatus : string
Name of termStatus C generated enumeration (Name of the return status)
val buch_sync : string
DEPRECATED ?
val automata : (Promelaast.state list * Promelaast.trans list) Pervasives.ref
val variables_from_auto : string list Pervasives.ref
val functions_from_auto : string list Pervasives.ref
val variables_from_c : string list Pervasives.ref
val functions_from_c : string list Pervasives.ref
val ignored_functions : String.t list Pervasives.ref
val getAutomata : unit -> Promelaast.state list * Promelaast.trans list
Return the buchi automata as stored after parsing

Return the buchi automata as stored after parsing

val getNumberOfTransitions : unit -> int
Return the number of transitions of the automata

return the number of transitions of the automata

val getNumberOfStates : unit -> int
Return the number of states of the automata

return the number of states of the automata

val setAutomata : Promelaast.state list * Promelaast.trans list ->
(string, 'a) Hashtbl.t -> (string, 'b) Hashtbl.t -> unit
Stores the buchi automata and its variables and functions as such as it is return by the parsing

Stores the buchi automata and its variables and functions as such as it is return by the parsing

val setCData : unit -> unit
Initializes some tables according to data from Cil AST.

Initializes some tables according to data from Cil AST.

val getFunctions_from_auto : unit -> string list
Return the list of all function name observed in the promela file.

Return the list of all function name observed in the promela file.

val getVariables_from_auto : unit -> string list
Return the list of all variables name observed in the promela file.

Return the list of all variables name observed in the promela file.

val getFunctions_from_c : unit -> string list
Return the list of all function name observed in the C file, except ignored functions.

Return the list of all function name observed in the C file.

val getVariables_from_c : unit -> string list
Return the list of all variables name observed in the C file.

Return the list of all variables name observed in the C file.

val getIgnoredFunctions : unit -> String.t list
Return the list of names of all ignored functions. A function is ignored if it is used in C file and if its declaration is unavailable.

Return the list of names of all ignored functions. A function is ignored if it is used in C file and if its declaration is unavailable.

val addIgnoredFunction : String.t -> unit
Return the list of names of all ignored functions. A function is ignored if it is used in C file and if its declaration is unavailable.

Return the list of names of all ignored functions. A function is ignored if it is used in C file and if its declaration is unavailable.

val isIgnoredFunction : String.t -> bool
Return true if and only if the given string fname denotes an ignored function.

Return true if and only if the given string fname denotes an ignored function.

val check_consistency : unit -> bool
Manage particular consistency verification between C file and promela specification. It returns true if and only if these checks are ok.
val varinfos : (string, Cil_types.varinfo) Hashtbl.t
val set_varinfo : string -> Cil_types.varinfo -> unit
Add a new variable into the association table name -> varinfo
val get_varinfo : string -> Cil_types.varinfo
Given a variable name, it returns its associated varinfo. If the variable is not found then an error message is print and an assert false is raised.
val get_varinfo_option : string -> Cil_types.varinfo option
Same as get_varinfo, but the result is an option. Hence, if the variable is not found then None is return.

Pre and post condition of C functions In our point of view, the pre or the post condition of a C function are defined by the set of states authorized just before/after the call, as such as the set of crossable transitions. The following functions manages these stored informations. Usually, the first array is for the authorized states, while the second one is for the crossable conditions
val pre_status : (string, bool array * bool array) Hashtbl.t
val post_status : (string, bool array * bool array) Hashtbl.t
val post_status_bycase : (string, bool array array * bool array array) Hashtbl.t
val get_func_pre : ?securised:bool -> string -> bool array * bool array
Returns the pre condition associated to the given C function

Returns the pre condition associated to the given C function

val set_func_pre : string -> bool array * bool array -> unit
Sets the pre condition of the given C function

Sets the pre condition of the given C function

val get_func_post : ?securised:bool -> string -> bool array * bool array
Returns the post condition associated to the given C function

Returns the post condition associated to the given C function

val set_func_post : string -> bool array * bool array -> unit
Sets the pre condition of the given C function

Sets the post condition of the given C function

val get_func_post_bycase : ?securised:bool -> string -> bool array array * bool array array
Returns the post condition associated to the given C function

Returns the post condition associated to the given C function

val set_func_post_bycase : string -> bool array array * bool array array -> unit
Sets the pre condition of the given C function

Sets the pre condition of the given C function

val pre_call_status : (string * int, bool array * bool array) Hashtbl.t
val get_func_pre_call : string -> int -> bool array * bool array
Gives the specification of the call stmt in the given C function at the given StmtId. if the key (caller,sid) is not in table, then a full spec is returned.

Gives the specification of the call stmt in the given C function at the given StmtId.

val set_func_pre_call : string -> int -> bool array * bool array -> unit
Sets the specification of the call stmt in the given C function at the given StmtId.

Sets the specification of the call stmt in the given C function at the given StmtId.

val set_func_pre_call_bycase : string -> int -> bool array array * bool array array -> unit
Sets the specification of the call stmt in the given C function at the given StmtId.

Sets the specification of the call stmt in the given C function at the given StmtId.


Pre and post condition of loops In our point of view, the pre or the post condition are defined by the set of states authorized just before/after the loop (external pre/post), and by the set of states authorized just before/after the execution of the internal block of the loop (internal pre/post). The following functions manages these stored informations. Usually, the first array is for the authorized states, while the second one is for the crossable conditions.
val loop_ext_pre : (Cil_types.stmt Pervasives.ref, bool array * bool array) Hashtbl.t
val loop_int_pre : (Cil_types.stmt Pervasives.ref, bool array * bool array) Hashtbl.t
val loop_ext_post : (Cil_types.stmt Pervasives.ref, bool array * bool array) Hashtbl.t
val loop_int_post : (Cil_types.stmt Pervasives.ref, bool array * bool array) Hashtbl.t
val get_loop_ext_pre : Cil_types.stmt Pervasives.ref -> bool array * bool array
Returns the pre condition associated to the given C function
val get_loop_int_pre : Cil_types.stmt Pervasives.ref -> bool array * bool array
Returns the pre condition associated to the given C function
val set_loop_ext_pre : Cil_types.stmt Pervasives.ref -> bool array * bool array -> unit
Sets the external or the block pre condition of the given loop
val set_loop_int_pre : Cil_types.stmt Pervasives.ref -> bool array * bool array -> unit
Sets the external or the block pre condition of the given loop
val get_loop_ext_post : Cil_types.stmt Pervasives.ref -> bool array * bool array
Returns the post condition associated to the given C function
val get_loop_int_post : Cil_types.stmt Pervasives.ref -> bool array * bool array
Returns the post condition associated to the given C function
val set_loop_ext_post : Cil_types.stmt Pervasives.ref -> bool array * bool array -> unit
Sets the external or the block post condition of the given loop
val set_loop_int_post : Cil_types.stmt Pervasives.ref -> bool array * bool array -> unit
Sets the external or the block post condition of the given loop
val loop_ext_pre_bycase : (Cil_types.stmt Pervasives.ref, bool array array * bool array array)
Hashtbl.t
val loop_int_pre_bycase : (Cil_types.stmt Pervasives.ref, bool array array * bool array array)
Hashtbl.t
val loop_ext_post_bycase : (Cil_types.stmt Pervasives.ref, bool array array * bool array array)
Hashtbl.t
val loop_int_post_bycase : (Cil_types.stmt Pervasives.ref, bool array array * bool array array)
Hashtbl.t
val get_loop_ext_pre_bycase : Cil_types.stmt Pervasives.ref -> bool array array * bool array array
Returns the pre condition associated to the given C function
val get_loop_int_pre_bycase : Cil_types.stmt Pervasives.ref -> bool array array * bool array array
Returns the pre condition associated to the given C function
val set_loop_ext_pre_bycase : Cil_types.stmt Pervasives.ref -> bool array array * bool array array -> unit
Sets the external or the block pre condition of the given loop
val set_loop_int_pre_bycase : Cil_types.stmt Pervasives.ref -> bool array array * bool array array -> unit
Sets the external or the block pre condition of the given loop
val get_loop_ext_post_bycase : Cil_types.stmt Pervasives.ref -> bool array array * bool array array
Returns the post condition associated to the given C function
val get_loop_int_post_bycase : Cil_types.stmt Pervasives.ref -> bool array array * bool array array
Returns the post condition associated to the given C function
val set_loop_ext_post_bycase : Cil_types.stmt Pervasives.ref -> bool array array * bool array array -> unit
Sets the external or the block post condition of the given loop
val set_loop_int_post_bycase : Cil_types.stmt Pervasives.ref -> bool array array * bool array array -> unit
Sets the external or the block post condition of the given loop
val get_loops_index : unit -> Cil_types.stmt Pervasives.ref list
Returns a stmt_ref list. It is the set of all registered loop in loop_specs hashtables

Returns a stmt_ref list. It is the set of all registered loop in loop_specs hashtables

val removeUnusedTransitionsAndStates : unit -> unit
val func_to_op_func : string -> string
Given the name of a function, it return the name of the associated element in the operation list.
val used_enuminfo : (string, Cil_types.enuminfo) Hashtbl.t
val set_usedinfo : string -> Cil_types.enuminfo -> unit
These functions are direct accesses to the table memorizing the enuminfo data associated to the name of an enumeration structure, from which cenum info are computed.
val get_usedinfo : string -> Cil_types.enuminfo
These functions are direct accesses to the table memorizing the enuminfo data associated to the name of an enumeration structure, from which cenum info are computed.
val get_cenum_option : string -> Cil_types.constant option
Given the name of an enumeration element, this function returns the associated cenum structure. This function is not efficient. Thus if the enumeration is known it is recommended to use one of the following functions.
val func_to_cenum : string -> Cil_types.constant
Given the name of a C operation, this function returns the associated cenum structure.
val op_status_to_cenum : Promelaast.funcStatus -> Cil_types.constant
Given the name of a C operation status (Call or Return), this function returns the associated cenum structure.
val is_in_vi_list : string -> Cil_types.varinfo list -> bool
val get_fresh_name : Cil_types.varinfo list -> string -> string
val local_tmp_vars : (string, Cil_types.varinfo) Hashtbl.t
val make_local_tmp : string -> Cil_types.varinfo
val get_local_tmp_name : string -> string
val local_iter_vars : (string, Cil_types.varinfo) Hashtbl.t
val make_local_iter : string -> Cil_types.varinfo
val get_local_iter_name : string -> string