module Decl:sig..end
Logic Declarations
typeconstructor =Why3.Term.lsymbol * Why3.Term.lsymbol option list
constructor symbol with the list of projections
typedata_decl =Why3.Ty.tysymbol * constructor list
type ls_defn
typelogic_decl =Why3.Term.lsymbol * ls_defn
val make_ls_defn : Why3.Term.lsymbol ->
Why3.Term.vsymbol list -> Why3.Term.term -> logic_decl
val open_ls_defn : ls_defn -> Why3.Term.vsymbol list * Why3.Term.term
val open_ls_defn_cb : ls_defn ->
Why3.Term.vsymbol list * Why3.Term.term *
(Why3.Term.lsymbol ->
Why3.Term.vsymbol list -> Why3.Term.term -> logic_decl)
val ls_defn_axiom : ls_defn -> Why3.Term.term
val ls_defn_of_axiom : Why3.Term.term -> logic_decl optiontries to reconstruct a definition from a defining axiom. Do not apply this to recursive definitions: it may successfully build a logic_decl, which will fail later because of non-assured termination
val ls_defn_decrease : ls_defn -> int listls_defn_decrease ld returns a list of argument positions
(numbered from 0) that ensures a lexicographical structural
descent for every recursive call. Triggers are ignored.
NOTE: This is only meaningful if the ls_defn comes
from a declaration; on the result of make_ls_defn,
ls_defn_decrease will always return an empty list.
type call_set
type vs_graph
val create_call_set : unit -> call_set
val create_vs_graph : Why3.Term.vsymbol list -> vs_graph
val register_call : call_set ->
Why3.Ident.ident ->
vs_graph -> Why3.Ident.ident -> Why3.Term.term list -> unit
val vs_graph_drop : vs_graph -> Why3.Term.vsymbol -> vs_graph
val vs_graph_let : vs_graph -> Why3.Term.term -> Why3.Term.vsymbol -> vs_graph
val vs_graph_pat : vs_graph -> Why3.Term.term -> Why3.Term.pattern -> vs_graph
val find_variant : exn -> call_set -> Why3.Ident.ident -> int listtype prsymbol = private {
|
pr_name : |
}
module Mpr:Extmap.Swith type key = prsymbol
module Spr:Extset.Swith module M = Mpr
module Hpr:Exthtbl.Swith type key = prsymbol
module Wpr:Weakhtbl.Swith type key = prsymbol
val create_prsymbol : Why3.Ident.preid -> prsymbol
val pr_equal : prsymbol -> prsymbol -> bool
val pr_hash : prsymbol -> inttypeind_decl =Why3.Term.lsymbol * (prsymbol * Why3.Term.term) list
type ind_sign =
| |
Ind |
| |
Coind |
typeind_list =ind_sign * ind_decl list
type prop_kind =
| |
Plemma |
(* | prove, use as a premise | *) |
| |
Paxiom |
(* | do not prove, use as a premise | *) |
| |
Pgoal |
(* | prove, do not use as a premise | *) |
typeprop_decl =prop_kind * prsymbol * Why3.Term.term
type decl = private {
|
d_node : |
|||
|
d_news : |
(* | idents introduced in declaration | *) |
|
d_tag : |
(* | unique magical tag | *) |
}
type decl_node = private
| |
Dtype of |
(* | abstract types and aliases | *) |
| |
Ddata of |
(* | recursive algebraic types | *) |
| |
Dparam of |
(* | abstract functions and predicates | *) |
| |
Dlogic of |
(* | defined functions and predicates (possibly recursively) | *) |
| |
Dind of |
(* | (co)inductive predicates | *) |
| |
Dprop of |
(* | axiom / lemma / goal | *) |
module Mdecl:Extmap.Swith type key = decl
module Sdecl:Extset.Swith module M = Mdecl
module Wdecl:Weakhtbl.Swith type key = decl
module Hdecl:Exthtbl.Swith type key = decl
val d_equal : decl -> decl -> bool
val d_hash : decl -> intval create_ty_decl : Why3.Ty.tysymbol -> decl
val create_data_decl : data_decl list -> decl
val create_param_decl : Why3.Term.lsymbol -> decl
val create_logic_decl : logic_decl list -> decl
val create_ind_decl : ind_sign -> ind_decl list -> decl
val create_prop_decl : prop_kind -> prsymbol -> Why3.Term.term -> declval get_used_syms_ty : Why3.Ty.ty -> Why3.Ident.Sid.tget_used_syms_ty ty returns the set of identifiers used (i.e.,
assumed to be defined before) in ty
val get_used_syms_decl : decl -> Why3.Ident.Sid.tget_used_syms_decl d returns the set of identifiers used (i.e.,
assumed to be defined before) in d
exception IllegalTypeAlias of Why3.Ty.tysymbol
exception NonPositiveTypeDecl of Why3.Ty.tysymbol * Why3.Term.lsymbol * Why3.Ty.ty
exception InvalidIndDecl of Why3.Term.lsymbol * prsymbol
exception NonPositiveIndDecl of Why3.Term.lsymbol * prsymbol * Why3.Term.lsymbol
exception NoTerminationProof of Why3.Term.lsymbol
exception BadLogicDecl of Why3.Term.lsymbol * Why3.Term.lsymbol
exception UnboundVar of Why3.Term.vsymbol
exception ClashIdent of Why3.Ident.ident
exception EmptyDecl
exception EmptyAlgDecl of Why3.Ty.tysymbol
exception EmptyIndDecl of Why3.Term.lsymbol
exception BadConstructor of Why3.Term.lsymbol
exception BadRecordField of Why3.Term.lsymbol
exception BadRecordCons of Why3.Term.lsymbol * Why3.Ty.tysymbol
exception BadRecordType of Why3.Term.lsymbol * Why3.Ty.tysymbol
exception BadRecordUnnamed of Why3.Term.lsymbol * Why3.Ty.tysymbol
exception RecordFieldMissing of Why3.Term.lsymbol
exception DuplicateRecordField of Why3.Term.lsymbol
exception UnexpectedProjOrConstr of Why3.Term.lsymbol
val decl_map : (Why3.Term.term -> Why3.Term.term) -> decl -> decl
val decl_fold : ('a -> Why3.Term.term -> 'a) -> 'a -> decl -> 'aopen recursion style. Need a Why3.Term.fold for looking at subterms
val decl_map_fold : ('a -> Why3.Term.term -> 'a * Why3.Term.term) ->
'a -> decl -> 'a * decl
module DeclTF:sig..end
typeknown_map =decl Why3.Ident.Mid.t
val known_id : known_map -> Why3.Ident.ident -> unit
val known_add_decl : known_map -> decl -> known_map
val merge_known : known_map -> known_map -> known_map
exception KnownIdent of Why3.Ident.ident
exception UnknownIdent of Why3.Ident.ident
exception RedeclaredIdent of Why3.Ident.ident
exception NonFoundedTypeDecl of Why3.Ty.tysymbol
val find_constructors : known_map -> Why3.Ty.tysymbol -> constructor list
val find_inductive_cases : known_map -> Why3.Term.lsymbol -> (prsymbol * Why3.Term.term) list
val find_logic_definition : known_map -> Why3.Term.lsymbol -> ls_defn option
val find_prop : known_map -> prsymbol -> Why3.Term.term
val find_prop_decl : known_map -> prsymbol -> prop_kind * Why3.Term.termexception EmptyRecord
val parse_record : known_map ->
(Why3.Term.lsymbol * 'a) list ->
Why3.Term.lsymbol * Why3.Term.lsymbol list * 'a Why3.Term.Mls.tparse_record kn field_list takes a list of record field assignments,
checks it for well-formedness and returns the corresponding constructor,
the full list of projection symbols, and the map from projection symbols
to assigned values.
val make_record : known_map ->
(Why3.Term.lsymbol * Why3.Term.term) list -> Why3.Ty.ty -> Why3.Term.term
val make_record_update : known_map ->
Why3.Term.term ->
(Why3.Term.lsymbol * Why3.Term.term) list -> Why3.Ty.ty -> Why3.Term.term
val make_record_pattern : known_map ->
(Why3.Term.lsymbol * Why3.Term.pattern) list ->
Why3.Ty.ty -> Why3.Term.pattern