Module Aorai_utils

module Aorai_utils: sig .. end
Given a transition a function name and a function status (call or return) it returns if the cross condition can be statisfied with only function status.

Given a transition a function and a function status (call or return) it returns if the cross condition can be statisfied with only function status.


val rename_pred : Cil_datatype.Logic_var.t ->
Cil_types.logic_var ->
Cil_types.predicate Cil_types.named -> Cil_types.predicate Cil_types.named
val isCrossable : (Promelaast.typed_condition * 'a) Promelaast.trans ->
Kernel_function.t -> Promelaast.funcStatus -> bool
Given a transition a function name and a function status (call or return) it returns if the cross condition can be statisfied with only function status.
val isCrossableAtInit : (Promelaast.typed_condition * 'a) Promelaast.trans ->
Kernel_function.t -> bool
Given a transition a function name and a function status (call or return) it returns if the cross condition can be statisfied with only function status.

Given a transition and the main entry point it returns if the cross condition can be statisfied at the beginning of the program.


Expressions management
val mk_int_exp : int -> Cil_types.exp
Returns an int constant expression which represents the given int value.
val crosscond_to_pred : Promelaast.typed_condition ->
Kernel_function.t ->
Promelaast.funcStatus -> Cil_types.predicate Cil_types.named
This function rewrites a cross condition into an ACSL expression. Moreover, by giving current operation name and its status (call or return) the generation simplifies the generated expression.

This function rewrites a cross condition into an ACSL expression. Moreover, by giving current operation name and its status (call or return) the generation simplifies the generated expression.


Globals management
val file : Cil_types.file Pervasives.ref
Local copy of the file pointer
val initFile : Cil_types.file -> unit
Copy the file pointer locally in the class in order to ease globals management and initializes some tables.

Copy the file pointer locally in the class in order to easiest globals management and initializes some tables.

val globals_queue : Cil_types.global list Pervasives.ref
List of globals awaiting for adding into C file globals
val flush_globals : unit -> unit
Flush all queued globals declarations into C file globals.
val mk_global : Cil_types.global -> unit
val mk_global_c_initialized_vars : string -> Cil_types.typ -> Cil_types.initinfo -> unit
val mk_global_var_init : Cil_types.varinfo -> Cil_types.initinfo -> unit
val mk_global_var : Cil_types.varinfo -> unit
val mk_global_c_vars : string -> Cil_types.typ -> unit
val mk_global_c_var_init : string -> Cil_types.exp -> unit
val mk_int_const : int -> Cil_types.exp
val mk_global_c_enum_type_tagged : string -> (string * int) list -> Cil_types.enuminfo
val mk_global_c_enum_type : string -> string list -> unit
val mk_global_c_initialized_enum : string -> string -> Cil_types.initinfo -> unit

Terms management / computation
val mk_int_term : int -> Cil_types.term
Return an integer constant term from the given value.
val zero_term : unit -> Cil_types.term
Deprecated.use directly Cil.lzero
Return an integer constant term with the 0 value.

Return an integer constant term with the 0 value.

val one_term : unit -> Cil_types.term
val mk_term_from_vi : Cil_types.varinfo -> Cil_types.term
Returns a term representing the variable associated to the given varinfo

Returns a term representing the given logic variable (usually a fresh quantified variable).

val mk_offseted_array : Cil_types.term_lval -> int -> Cil_types.term
Given an lval term 'host' and an integer value 'off', it returns a lval term hostoff.

Given an lval term 'host' and an integer value 'off', it returns a lval term hostoff.

val int2enumstate : int -> Cil_types.term
val mk_offseted_array_states_as_enum : Cil_types.term_lval -> int -> Cil_types.term
Given an lval term 'host' and an integer value 'off', it returns a lval term hostoff.
val host_state_term : unit -> Cil_types.term_lval
Returns a lval term associated to the curState generated variable.

base lhost corresponding to curState.

val state_term : unit -> Cil_types.term
val is_state_pred : Promelaast.state -> Cil_types.predicate Cil_types.named
returns the predicate saying that automaton is in corresponding state.
val is_out_of_state_pred : Promelaast.state -> Cil_types.predicate Cil_types.named
returns the predicate saying that automaton is NOT in corresponding state.
val mk_global_comment : string -> unit

Initialization management / computation
val mk_global_states_init : Kernel_function.t -> unit
val func_to_init : string -> Cil_types.initinfo
val funcStatus_to_init : Promelaast.funcStatus -> Cil_types.initinfo
class visit_decl_loops_init : unit -> object .. end
val mk_decl_loops_init : unit -> unit
val change_vars : Cil_types.logic_var Cil_datatype.Logic_var.Hashtbl.t ->
Cil_types.logic_var Kernel_function.Hashtbl.t ->
Kernel_function.Hashtbl.key option ->
Cil_types.logic_label -> Cil_types.predicate -> Cil_types.predicate
val pred_of_condition : Cil_types.logic_var Cil_datatype.Logic_var.Hashtbl.t ->
Cil_types.logic_var Kernel_function.Hashtbl.t ->
Cil_types.logic_label ->
Promelaast.typed_condition -> Cil_types.predicate Cil_types.named
val mk_deterministic_lemma : unit -> unit
val make_enum_states : unit -> unit
val getInitialState : unit -> Cil_types.exp
val initGlobals : Kernel_function.t -> bool -> unit
This function computes all newly introduced globals (variables, enumeration structure, invariants, etc.

Given the name of the main function, this function computes all newly introduced globals (variables, enumeration structure, invariants, etc.)


Pre/post management
val aorai_assigns : Cil_datatype.Location.t -> Cil_types.identified_term Cil_types.assigns
returns assigns clause corresponding to updating automaton's state.
Since Nitrogen-20111001
val action_assigns : ('a * Promelaast.single_action list) Promelaast.trans ->
Cil_types.identified_term Cil_types.assigns
val get_reachable_trans : Data_for_aorai.Aorai_state.Map.key ->
Promelaast.funcStatus ->
'a * 'b Promelaast.trans list ->
('c * Data_for_aorai.Aorai_state.Set.t * 'd) Data_for_aorai.Aorai_state.Map.t
Data_for_aorai.Aorai_state.Map.t -> 'b Promelaast.trans list
val get_reachable_trans_to : Data_for_aorai.Aorai_state.Map.key ->
Promelaast.funcStatus ->
'a * 'b Promelaast.trans list ->
('c * Data_for_aorai.Aorai_state.Set.t * 'd) Data_for_aorai.Aorai_state.Map.t
Data_for_aorai.Aorai_state.Map.t -> 'b Promelaast.trans list
val force_transition : Cil_types.location ->
Kernel_function.t ->
Promelaast.funcStatus ->
('a * Data_for_aorai.Aorai_state.Set.t * 'b) Data_for_aorai.Aorai_state.Map.t
Data_for_aorai.Aorai_state.Map.t -> Cil_types.identified_predicate list
returns the list of predicates expressing that for each current state the automaton currently is in, there is at least one transition that is crossed.
val partition_action : ('a * Promelaast.single_action list) Promelaast.trans list ->
Data_for_aorai.Aorai_state.Set.t Cil_datatype.Term_lval.Map.t
val disjoint_states : Cil_types.location ->
'a ->
Data_for_aorai.Aorai_state.Set.t ->
Cil_types.identified_predicate list -> Cil_types.identified_predicate list
val incompatible_states : Cil_types.location ->
Promelaast.funcStatus ->
('a * Data_for_aorai.Aorai_state.Set.t * 'b) Data_for_aorai.Aorai_state.Map.t
Data_for_aorai.Aorai_state.Map.t -> Cil_types.identified_predicate list
val auto_func_preconditions : Cil_types.location ->
Kernel_function.t ->
Promelaast.funcStatus ->
('a * Data_for_aorai.Aorai_state.Set.t * 'b) Data_for_aorai.Aorai_state.Map.t
Data_for_aorai.Aorai_state.Map.t -> Cil_types.identified_predicate list
return list of preconditions for the given auxiliary function (f_pre_func or f_post_func).
val find_pebble_origin : Cil_types.logic_label -> Promelaast.single_action list -> Cil_types.term
val mk_sub : loc:Cil_types.location ->
Cil_types.term -> Cil_types.logic_var -> Cil_types.predicate Cil_types.named
val pebble_guard : loc:Cil_types.location ->
Cil_types.term ->
Cil_datatype.Logic_var.t ->
Cil_types.predicate Cil_types.named -> Cil_types.predicate Cil_types.named
val pebble_guard_neg : loc:Cil_types.location ->
Cil_types.term ->
Cil_datatype.Logic_var.t ->
Cil_types.predicate Cil_types.named -> Cil_types.predicate Cil_types.named
val pebble_post : loc:Cil_types.location ->
Cil_types.term ->
Cil_datatype.Logic_var.t ->
Cil_types.predicate Cil_types.named -> Cil_types.predicate Cil_types.named
val add_behavior_pebble_actions : loc:Cil_types.location ->
Kernel_function.t ->
Promelaast.funcStatus ->
(Cil_types.identified_predicate, 'a) Cil_types.behavior list ->
Promelaast.state ->
(Promelaast.typed_condition * Promelaast.single_action list) Promelaast.trans
list -> (Cil_types.identified_predicate, 'a) Cil_types.behavior list
val mk_action : loc:Cil_datatype.Location.t ->
Promelaast.single_action -> Cil_types.predicate Cil_types.named list
val is_reachable : Data_for_aorai.Aorai_state.Map.key ->
'a Data_for_aorai.Aorai_state.Map.t Data_for_aorai.Aorai_state.Map.t -> bool
val concat_assigns : Cil_types.identified_term Cil_types.assigns ->
Cil_types.identified_term Cil_types.assigns ->
Cil_types.identified_term Cil_types.assigns
val get_accessible_transitions : 'a * 'b Promelaast.trans list ->
Data_for_aorai.Aorai_state.t ->
('c * Data_for_aorai.Aorai_state.Set.t * 'd) Data_for_aorai.Aorai_state.Map.t
Data_for_aorai.Aorai_state.Map.t -> 'b Promelaast.trans list
val mk_unchanged_aux_vars : ('a * Promelaast.single_action list) Promelaast.trans list ->
(Cil_types.termination_kind * Cil_types.identified_predicate) list
val mk_behavior : loc:Cil_types.location ->
'a *
(Promelaast.typed_condition * Promelaast.single_action list) Promelaast.trans
list ->
Kernel_function.t ->
Promelaast.funcStatus ->
('b * Data_for_aorai.Aorai_state.Set.t * 'c) Data_for_aorai.Aorai_state.Map.t
Data_for_aorai.Aorai_state.Map.t ->
Data_for_aorai.Aorai_state.Map.key ->
Cil_types.identified_term Cil_types.assigns *
(Cil_types.identified_predicate, 'd) Cil_types.behavior list
val auto_func_behaviors : Cil_types.location ->
Kernel_function.t ->
Promelaast.funcStatus ->
('a * Data_for_aorai.Aorai_state.Set.t * 'b) Data_for_aorai.Aorai_state.Map.t
Data_for_aorai.Aorai_state.Map.t ->
(Cil_types.identified_predicate, Cil_types.identified_term)
Cil_types.behavior list
auto_func_behaviors f st (st_status, tr_status) generates behaviors corresponding to the transitions authorized by tr_status for function f in status st
Since Nitrogen-20111001
val get_preds_wrt_params_reachable_states : Data_for_aorai.end_state Data_for_aorai.Aorai_state.Map.t ->
Kernel_function.t ->
Promelaast.funcStatus -> Cil_types.predicate Cil_types.named
val get_preds_wrt_params_reachable_states : Data_for_aorai.end_state Data_for_aorai.Aorai_state.Map.t ->
Kernel_function.t ->
Promelaast.funcStatus -> Cil_types.predicate Cil_types.named
val get_preds_pre_wrt_params : Kernel_function.t -> Cil_types.predicate Cil_types.named
val get_preds_post_bc_wrt_params : Kernel_function.t -> Cil_types.predicate Cil_types.named
val dkey : Aorai_option.category
val treat_val : Cil_types.term ->
Cil_types.term ->
Data_for_aorai.range ->
Cil_types.predicate Cil_types.named -> Cil_types.predicate Cil_types.named
val possible_states_preds : 'a Data_for_aorai.Aorai_state.Map.t Data_for_aorai.Aorai_state.Map.t ->
Cil_types.predicate Cil_types.named list
Returns a list of predicate giving for each possible start state the disjunction of possible current states
val update_to_pred : pre_state:Promelaast.state ->
post_state:Promelaast.state ->
Cil_types.term ->
Data_for_aorai.range Cil_datatype.Term.Map.t ->
Cil_types.predicate Cil_types.named
Possible values of the given auxiliary variable under the current path.
val action_to_pred : pre_state:Promelaast.state ->
post_state:Promelaast.state ->
Data_for_aorai.range Cil_datatype.Term.Map.t Cil_datatype.Term.Map.t ->
Cil_types.predicate Cil_types.named list
for a given starting and ending state, returns the post-conditions related to the possible values of the auxiliary variables at the exit of the function, guarded by the fact that we have followed this path.
val all_actions_preds : ('a * 'b *
Data_for_aorai.range Cil_datatype.Term.Map.t Cil_datatype.Term.Map.t)
Data_for_aorai.Aorai_state.Map.t Data_for_aorai.Aorai_state.Map.t ->
Cil_types.predicate Cil_types.named list
All actions that might have been performed on aux variables from the start of the function, guarded by the path followed.