123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437(* This file is free software, part of dolmen. See file "LICENSE" for more information *)(** Interfaces for Types
This module defines Interfaces that implementation of types must
respect in order to be used to instantiate functors. *)(** {2 Signature for Typecheked types} *)(** Signature required by types for typing first-order
polymorphic terms. *)moduletypeTff=sigtypet(** The type of types. *)typedef(** The type of type definitions *)typepath(** The type of paths to constants. *)type'atag(** A type for tags to attach to arbitrary types. *)valprint:Format.formatter->t->unit(** Printing function. *)exceptionPrenex_polymorphismoft(** Raised when the type provided is polymorphic, but occurred in a
place where polymorphic types are forbidden by prenex/rank-1
polymorphism. *)(** A module for variables that occur in types. *)moduleVar:sigtypet(** The type of variables the can occur in types *)valcompare:t->t->int(** Comparison function on variables. *)valprint:Format.formatter->t->unit(** Printing function. *)valmk:string->t(** Create a new type variable with the given name. *)valwildcard:unit->t(** Create a fresh type wildcard. *)valis_wildcard:t->bool(** Is the variable a type wildcard ? *)valset_tag:t->'atag->'a->unit(** Set the value bound to a tag. *)valget_tag:t->'atag->'aoption(** Return the value bound to a tag (if any). *)valadd_tag:t->'alisttag->'a->unit(** Add a value to the list of values bound to a tag. *)valget_tag_list:t->'alisttag->'alist(** Returns all the values tagged on a variable. *)valunset_tag:t->_tag->unit(** Remove the binding to a tag. *)end(** A module for constant symbols the occur in types. *)moduleConst:sigtypet(** The type of constant symbols the can occur in types *)valcompare:t->t->int(** Comparison function on type constants. *)valprint:Format.formatter->t->unit(** Printing function. *)valarity:t->int(** Return the arity of the given symbol. *)valmk:path->int->t(** Create a type constant with the given arity. *)valset_tag:t->'atag->'a->unit(** Set the value bound to a tag. *)valadd_tag:t->'alisttag->'a->unit(** Add a value to the list of values bound to a tag. *)endvalequal:t->t->bool(** Test equality of types. *)valprop:t(** The type of propositions *)valof_var:Var.t->t(** Create a type from a variable. *)valapply:Const.t->tlist->t(** Application for types. *)valarrow:tlist->t->t(** Create an arrow type. *)valpi:Var.tlist->t->t(** Create a polymorphic type. *)valfv:t->Var.tlist(** Returns the list of free_variables in the type. *)valset_wildcard:Var.t->t->unit(** Set a wildcard. *)valadd_wildcard_hook:hook:(Var.t->t->unit)->Var.t->unit(** Add a hook to a wildcard, the hook will be run *)valset_tag:t->'atag->'a->unit(** Annotate the given type with the given tag and value. *)valadd_tag:t->'alisttag->'a->unit(** Add a value to the list of values bound to a tag. *)typeview=private[>|`WildcardofVar.t|`Arrowoftlist*t|`PiofVar.tlist*t](** Partial views for types. *)valview:t->view(** Partial view of a type. *)valfreshen:t->t(** Replaces all bound variables in a type, ensuring that the returned type
contains only fresh bound type variables. *)valinstance_of:t->t->tlistoption(** [instance_of poly t] decides whether [t] is an instance of [poly],
that is whether there are some types [l] such that a term of
type [poly] applied to type arguments [l] gives a term of type
[t]. *)endmoduletypeThf=sigincludeTffvalarrow:tlist->t->t(** Create a function type. *)valpi:Var.tlist->t->t(** Create a rank-1/prenex polymorphc type. *)end(** Signature required by types for typing ae *)moduletypeAe_Base=sigtypet(** The type of types. *)valbool:t(** The type of booleans *)valunit:t(** Unit type *)valint:t(** The type of integers *)valreal:t(** The type of reals *)end(** Signature required by types for typing ae's arithmetic *)moduletypeAe_Arith=sigtypet(** The type of types *)valint:t(** The type of integers *)valreal:t(** The type of reals *)typeview=private[>|`Int|`Real](** Partial view for types. *)valview:t->view(** Partial view of a type. *)end(** Signature required by types for typing ae arrays *)moduletypeAe_Array=sigtypet(** The type of types *)valint:t(** The type of integers, used as a default type of indexes
when no type is provided *)valarray:t->t->t(** The type of functionnal arrays from one type to another. *)end(** Signature required by types for typing ae's bitvectors *)moduletypeAe_Bitv=sigtypet(** The type of types *)valbitv:int->t(** Create a fixed size bitvector type. *)end(** Signature required by types for typing tptp *)moduletypeTptp_Base=sigtypet(** The type of types *)valprop:t(** The type of propositions. *)valbase:t(** An arbitrary base type. *)end(** Signature required by types for typing tptp *)moduletypeTptp_Arith=sigtypet(** The type of types *)valint:t(** The type of integers *)valrat:t(** The type of rationals *)valreal:t(** The type of reals *)valequal:t->t->bool(** Equality on types. *)end(** Signature required by types for typing smtlib core theory *)moduletypeSmtlib_Base=sigtypet(** The type of type constants (i.e. type constructors) *)valprop:t(** The type constructor of propositions. *)end(** Signature required by types for typing smtlib integer arithmetic *)moduletypeSmtlib_Int=sigtypet(** The type of types *)valint:t(** The type for integer expressions. *)end(** Signature required by types for typing smtlib real arithmetic *)moduletypeSmtlib_Real=sigtypet(** The type of types *)valreal:t(** The type for integer expressions. *)end(** Signature required by types for typing smtlib real_int arithmetic. *)moduletypeSmtlib_Real_Int=sigincludeSmtlib_IntincludeSmtlib_Realwithtypet:=ttypeview=private[>|`Int|`Real](** Partial view for types. These are used by the Reals_Ints theory
to perform type-based dispatch, and automatic conversion of Ints
to Reals when specified by the specification. *)valview:t->view(** Partial view of a type. *)end(** Signature required by types for typing smtlib arrays *)moduletypeSmtlib_Array=sigtypet(** The type of types *)valarray:t->t->t(** The type of functionnal arrays from one type to another. *)typeview=private[>|`Int|`Real|`Bitvofint|`Arrayoft*t](** Partial views for types. These are used in the Array theory
to enforce some restrictions logics impose on the types of
arrays that cna occur. *)valview:t->view(** Partial view of a type. *)end(** Signature required by types for typing smtlib bitvectors *)moduletypeSmtlib_Bitv=sigtypet(** The type of types *)valbitv:int->t(** Create a fixed size bitvector type. *)typeview=private[>|`Bitvofint](** Partial views for types. These are used in the bitv theory
to check invariant on indexes of bitv operations (e.g.
check that the indexes of an extract do not go out of bounds). *)valview:t->view(** Partial view of a type. *)end(** Signature required by types for typing smtlib bitvectors *)moduletypeSmtlib_Float=sigtypet(** The type of types *)valbitv:int->t(** Create a fixed size bitvector type. *)valfloat:int->int->t(** Create a float type with fixed exponent size in bits and fixed significand,
including the hidden bit. *)valroundingMode:t(** Type of the rounding modes *)typeview=private[>|`Real|`Bitvofint|`Floatofint*int](** Partial views for types. These are used in the Float theory to
perform type-base dispatch for some conversion functions. *)valview:t->view(** Partial view of a type. *)end(* Signature required by types for typing the smtlib string theory *)moduletypeSmtlib_String=sigtypet(** The type of types *)valint:t(** The type of ints *)valstring:t(** The type of strings *)valstring_reg_lang:t(** The type of regular languages over strings *)end(** Signature required by types for typing tptp *)moduletypeZf_Base=sigtypet(** The type of types *)valprop:t(** The type of propositions. *)end(** Signature required by types for typing tptp *)moduletypeZf_Arith=sigtypet(** The type of types *)valint:t(** The type of integers *)end