module Pmodule:sig..end
type prog_symbol =
| |
PV of |
| |
RS of |
| |
OO of |
type namespace = {
|
ns_ts : |
|
ns_ps : |
|
ns_xs : |
|
ns_ns : |
}
val empty_ns : namespace
val ns_find_prog_symbol : namespace -> string list -> prog_symbol
val ns_find_its : namespace -> string list -> Why3.Ity.itysymbol
val ns_find_pv : namespace -> string list -> Why3.Ity.pvsymbol
val ns_find_xs : namespace -> string list -> Why3.Ity.xsymbol
val ns_find_ns : namespace -> string list -> namespace
val ns_find_rs : namespace -> string list -> Why3.Expr.rsymbol
type overload =
| |
FixedRes of |
| |
SameType |
| |
NoOver |
val overload_of_rs : Why3.Expr.rsymbol -> overload
val overload_of_oo : Why3.Expr.Srs.t -> overload
val ref_attr : Why3.Ident.attribute
exception IncompatibleNotation of string
type pmodule0 = private {
|
mod_theory : |
|
mod_units : |
|
mod_export : |
|
mod_known : |
|
mod_local : |
|
mod_used : |
}
type mod_unit =
| |
Udecl of |
| |
Uuse of |
| |
Uclone of |
| |
Umeta of |
| |
Uscope of |
type mod_inst = {
|
mi_mod : |
|
mi_ty : |
|
mi_ts : |
|
mi_ls : |
|
mi_pr : |
|
mi_pk : |
|
mi_pv : |
|
mi_rs : |
|
mi_xs : |
|
mi_df : |
}
type pmodule = private {
|
mod_inst : |
|
mod_intf : |
|
mod_impl : |
}
A pmodule m consists of two old-style pmodule0. Its interface
m.mod_intf is the "logical" version of the module, to be used in most
place. It is a copy of I in the case of a module A : I module. Its
implementation m.mod_impl is the "execution" version of the module, to be
used during extraction or execution. It corresponds to the body of A in
the module A : I case. m.mod_inst maps the symbols from the interface
to the corresponding ones in the implementation.
val mod_name : pmodule -> Why3.Ident.identreturns the name of the given pmodule, that is the name of is interface.
val mod_theory : pmodule -> Why3.Theory.theoryreturns the pmodule's theory, that is, the theory of its interface.
val mod_export_intf : pmodule -> namespacereturns the mod_export field from the interface of this pmodule
val mod_export_impl : pmodule -> namespacereturns the mod_export field from the implementation of this pmodule
val mod_known_intf : pmodule -> Why3.Pdecl.known_mapreturns the mod_known field from the interface of this pmodule
val mod_known_impl : pmodule -> Why3.Pdecl.known_mapreturns the mod_known field from the implementation of this pmodule
val empty_mod_inst : pmodule -> mod_insttype pmodule_uc0 = private {
|
muc_theory : |
|
muc_units : |
|
muc_import : |
|
muc_export : |
|
muc_known : |
|
muc_local : |
|
muc_used : |
|
muc_env : |
}
type pmodule_uc = private {
|
muc_intf : |
|
muc_impl : |
}
val create_module : Why3.Env.env -> ?path:string list -> Why3.Ident.preid -> pmodule_uc
val close_module : pmodule_uc -> pmodule
val open_scope : pmodule_uc -> string -> pmodule_uc
val close_scope : pmodule_uc -> import:bool -> pmodule_uc
val import_scope : pmodule_uc -> string list -> pmodule_uc
val restore_path : Why3.Ident.ident -> string list * string * string listrestore_path id returns the triple (library path, module,
qualified symbol name) if the ident was ever introduced in
a module declaration. If the ident was declared in several
different modules, the first association is retained.
If id is a module name, the third component is an empty list.
Raises Not_found if the ident was never declared in/as a module.
val restore_module_id : Why3.Ident.ident -> pmoduleretrieves a module from a program symbol defined in it Raises Not_found if the ident was never declared in/as a module.
val restore_module : Why3.Theory.theory -> pmoduleretrieves a module from its underlying theory
raises Not_found if no such module exists
val use_export : pmodule_uc -> pmodule -> pmodule_uc
val clone_export : ?loc:Why3.Loc.position ->
pmodule_uc ->
pmodule -> mod_inst -> pmodule_ucval add_meta : pmodule_uc ->
Why3.Theory.meta -> Why3.Theory.meta_arg list -> pmodule_ucval add_pdecl : ?warn:bool ->
vc:bool -> pmodule_uc -> Why3.Pdecl.pdecl -> pmodule_ucadd_pdecl ~vc m d adds declaration d in module m.
If vc is true, VC is computed and added to m.
val close_module_with_intf : pmodule_uc -> pmodule -> pmodule * pmoduleval builtin_module : pmodule
val bool_module : pmodule
val unit_module : pmodule
val highord_module : pmodule
val tuple_module : int -> pmodule
val ref_module : pmodule
val its_ref : Why3.Ity.itysymbol
val ts_ref : Why3.Ty.tysymbol
val rs_ref : Why3.Expr.rsymbol
val rs_ref_cons : Why3.Expr.rsymbol
val rs_ref_proj : Why3.Expr.rsymbol
val ls_ref_cons : Why3.Term.lsymbol
val ls_ref_proj : Why3.Term.lsymboltypemlw_file =pmodule Why3.Wstdlib.Mstr.t
val mlw_language : mlw_file Why3.Env.language
val mlw_language_builtin : Why3.Env.pathname -> mlw_file
exception ModuleNotFound of Why3.Env.pathname * string
val read_module : Why3.Env.env -> Why3.Env.pathname -> string -> pmoduleval print_unit : Stdlib.Format.formatter -> mod_unit -> unit
val print_module : Stdlib.Format.formatter -> pmodule -> unit