Module WpFol


module WpFol: sig .. end
This file manage tables of global things that have to be exported in WHY file like variable declarations, axioms, etc.


type 'a epath =
| Pfield of Cil_types.fieldinfo
| Pidx of 'a
val eq_epath : ('a -> 'b -> bool) -> 'a epath -> 'b epath -> bool

Axioms


val axiom_table : (string, Fol.predicate) Hashtbl.t
val add_axiom : string -> Fol.predicate -> unit
val mk_array_length : 'a Fol.d_term -> Cil_types.typ -> 'a Fol.d_term Fol.t_pred option
build array_length t = sz when we know how to interpet the size sz

Variables


val globals_table : (int, Cil_types.logic_var) Hashtbl.t
val pp_lv : Format.formatter -> Cil_types.logic_var -> unit
val add_glob_var : Cil_types.logic_var -> bool
val lv_to_fol_var : Cil_types.logic_var -> Fol.variable
val cvar_to_folvar : Cil_types.varinfo -> Fol.variable
val cvar_of_folvar_opt : Fol.variable -> Cil_types.varinfo option
val cvar_of_folvar : Fol.variable -> Cil_types.varinfo
val var_addr : (bool * int, Fol.variable) Hashtbl.t
table to store for each lv (identified by its lv_id) the corresponding addr_var.
exception No_addr
val addr_lvar : create:bool -> Cil_types.logic_var -> Fol.variable
val addr_cvar : create:bool -> Cil_types.varinfo -> Fol.variable

Operators


val field_table : (string, Fol.pure_type) Hashtbl.t

Access functions


val fol_field_access : Fol.data Fol.d_term -> Cil_types.fieldinfo -> Fol.term
s..field
val field_name : Cil_types.fieldinfo -> string
val get_field : Cil_types.fieldinfo -> string * Fol.pure_type
val add_neq_field_axioms : Cil_types.compinfo -> unit
val add_all_field_eq_axiom : Cil_types.compinfo -> unit
val add_field_array_length_axiom : Cil_types.fieldinfo -> unit
val fol_offset_access : (Cil_types.exp -> Fol.term) -> Fol.term -> Cil_types.offset -> Fol.term
t..(i)
val mk_toffset_access : (Cil_types.term -> Fol.term) -> Fol.term -> Cil_types.term_offset -> Fol.term

Update functions


val fol_field_update : 'a Fol.d_term -> Cil_types.fieldinfo -> 'a Fol.d_term -> 'a Fol.d_term
mu (s, .(field) -> v)
val fol_offset_update : (Cil_types.exp -> Fol.term) ->
Fol.term -> Fol.term -> Cil_types.offset -> Fol.term

Shift functions


val fol_field_shift : 'a Fol.d_term -> Cil_types.fieldinfo -> 'a Fol.d_term
ps is a structure address : build the address of ps.f ie ps.+f
val fol_offset_shift : (Cil_types.exp -> 'a Fol.d_term) ->
'a Fol.d_term -> Cil_types.offset -> 'a Fol.d_term
val fol_toffset_shift : (Cil_types.term -> 'a Fol.d_term) ->
'a Fol.d_term -> Cil_types.term_offset -> 'a Fol.d_term

Export and clear tables


val export_and_clear : ('a, 'b) Hashtbl.t -> ('a -> 'b -> 'c) -> 'c list -> 'c list
val export_and_clear_fields : 'a Fol.gen_decl list -> 'a Fol.gen_decl list
val export_and_clear_axioms : Fol.term Fol.gen_decl list -> Fol.term Fol.gen_decl list
val export_and_clear_globs : 'a Fol.gen_decl list -> 'a Fol.gen_decl list
val export_tables : Fol.term Fol.gen_decl list -> Fol.term Fol.gen_decl list