1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960(* This file is free software, part of dolmen. See file "LICENSE" for more information *)(** Interfaces for Terms.
This module defines Interfaces that implementation of terms must
respect in order to be used to instantiated the corresponding
language classes. *)(** {2 Signature for Parsing Logic languages} *)moduletypeLogic=sig(** Signature used by the Logic class, which parses languages
such as tptp, smtlib, etc...
Mainly used to parse first-order terms, it is also used to
parse tptp's THF language, which uses higher order terms, so
some first-order constructs such as conjunction, equality, etc...
also need to be represented by standalone terms. *)typet(** The type of terms. *)typeid(** The type of identifiers used for constants. *)typelocation(** The type of locations attached to terms. *)(** {3 Predefined terms} *)valeq_t:?loc:location->unit->tvalneq_t:?loc:location->unit->t(** The terms representing equality and disequality, respectively. *)valwildcard:?loc:location->unit->t(** The wildcard term, usually used in place of type arguments
to explicit polymorphic functions to not explicit types that
can be inferred by the type-checker. *)valtType:?loc:location->unit->t(** The type of types, defined as specific token by the Zipperposition format;
in other languages, will be represented as a constant (the "$tType" constant
in tptp for instance). Used to define new types, or quantify type variables
in languages that support polymorphism. *)valprop:?loc:location->unit->t(** The type of propositions. Also defined as a lexical token by the Zipperposition
format. Will be defined as a constant in most other languages (for instance,
"$o" in tptp). *)valbool:?loc:location->unit->t(** The type of boolean, defined as a specific token by the Alt-ergo format;
in other languages, it might be represented as a constant with a specific name. *)valty_unit:?loc:location->unit->t(** The type unit, defined as a specific token by the Alt-ergo format;
in other languages, it might be represented as a constant with a specific name. *)valty_int:?loc:location->unit->t(** The type of integers, defined as a specific token by the Zipperposition and Alt-ergo
formats;
in other languages, it might be represented as a constant with a specific name
(for isntance, tptp's "$int") .*)valty_real:?loc:location->unit->t(** The type of integers, defined as a specific token by the Alt-ergo format;
in other languages, it might be represented as a constant with a specific name
(for isntance, tptp's "$int") .*)valty_bitv:?loc:location->int->t(** The type of bitvectors of the given constant length, defined as a specifi token
by the Alt-ergo format;
in other languages, it might be represented as a constant with a specific name
(for isntance, smtlib(s "bitv") .*)valvoid:?loc:location->unit->t(** The only value of type unit, defined as a specific token by the Alt-ergo format. *)valtrue_:?loc:location->unit->tvalfalse_:?loc:location->unit->t(** The constants for the true and false propositional constants. Again defined
as lexical token in the Zipperposition format, while treated as a constant
in other languages ("$true" in tptp). *)valnot_t:?loc:location->unit->tvalor_t:?loc:location->unit->tvaland_t:?loc:location->unit->tvalxor_t:?loc:location->unit->tvalnor_t:?loc:location->unit->tvalnand_t:?loc:location->unit->tvalequiv_t:?loc:location->unit->tvalimplied_t:?loc:location->unit->tvalimplies_t:?loc:location->unit->tvalpi_t:?loc:location->unit->tvalsigma_t:?loc:location->unit->t(** Standard logical connectives viewed as terms. [implies_t] is usual
right implication, i.e [apply implies_t \[p; q\] ] is "p implies q",
while [apply implied_t \[p; q \]] means "p is implied by q" or
"q implies p". *)valdata_t:?loc:location->unit->t(** Term without semantic meaning, used for creating "data" terms.
Used in tptp's annotations, and with similar meaning as smtlib's
s-expressions (as used in the [sexpr] function defined later). *)(** {3 Terms leaf constructors} *)valvar:?loc:location->id->tvalconst:?loc:location->id->t(** Variable and constant constructors. While in some languages
they can distinguished at the lexical level (in tptp for instance),
in most languages, it is an issue dependant on scoping rules,
so terms parsed from an smtlib file will have all variables
parsed as constants. *)valatom:?loc:location->int->t(** Atoms are used for dimacs cnf parsing. Positive integers denotes variables,
and negative integers denote the negation of the variable corresponding to
their absolute value. *)valdistinct:?loc:location->id->t(** Used in tptp to specify constants different from other constants, for instance the
'distinct' "Apple" should be syntactically different from the "Apple"
constant. Can be safely aliased to the [const] function as the
[distinct] function is always given strings already enclosed with quotes,
so in the example above, [const] would be called with ["Apple"] as
string argument, while [distinct] would be called with the string ["\"Apple\""] *)valstr:?loc:location->string->tvalint:?loc:location->string->tvalrat:?loc:location->string->tvalreal:?loc:location->string->tvalhexa:?loc:location->string->tvalbinary:?loc:location->string->t(** Constructors for words defined as numeric or string formats by the languages
specifications. These also can be safely aliased to [const], but then the
provenance information is lost, which might complicate the task of a
type-checker. *)valbitv:?loc:location->string->t(** Bitvetor literal, defined as a specific token in Alt-ergo;
Expects a decimal integer in the string to be extended as a bitvector. *)(** {3 Term constructors} *)valcolon:?loc:location->t->t->t(** Represents juxtaposition of two terms, usually denoted "t : t'"
in most languages, and mainly used to annotated terms with their
supposed, or defined, type. *)valeq:?loc:location->t->t->tvalneq:?loc:location->tlist->t(** Equality and dis-equality of terms. *)valnot_:?loc:location->t->tvalor_:?loc:location->tlist->tvaland_:?loc:location->tlist->tvalxor:?loc:location->t->t->tvalimply:?loc:location->t->t->tvalequiv:?loc:location->t->t->t(** Proposition construction functions. The conjunction and disjunction
are n-ary instead of binary mostly because they are in smtlib (and
that is subsumes the binary case). *)valapply:?loc:location->t->tlist->t(** Application constructor, seen as higher order application
rather than first-order application for the following reasons:
being able to parse tptp's THF, having location attached
to function symbols. *)valite:?loc:location->t->t->t->t(** Conditional constructor, both for first-order terms and propositions.
Used in the following schema: [ite condition then_branch else_branch]. *)valmatch_:?loc:location->t->(t*t)list->t(** Pattern matching. The first term is the term to match,
and each tuple in the list is a match case, which is a pair
of a pattern and a match branch. *)valpi:?loc:location->tlist->t->tvalpar:?loc:location->tlist->t->tvalletin:?loc:location->tlist->t->tvalletand:?loc:location->tlist->t->tvalforall:?loc:location->tlist->t->tvalexists:?loc:location->tlist->t->tvallambda:?loc:location->tlist->t->tvalchoice:?loc:location->tlist->t->tvaldescription:?loc:location->tlist->t->t(** Binders for variables. Takes a list of terms as first argument
for simplicity, the lists will almost always be a list of variables,
optionally typed using the [colon] term constructor.
- Pi is the polymorphic type quantification, for instance
the polymorphic identity function has type: "Pi alpha. alpha -> alpha"
- Letin is local binding, takes a list of equality of equivalences
whose left hand-side is a variable. Letand is the parrallel version
of Letin.
- Forall is universal quantification
- Par is universal quantification over type variables specifically
(i.e. the same as forall, but only for a list of type variables,
which thus may omit the [colon] annotations in the arguments).
- Exists is existential quantification
- Lambda is used for function construction
- Choice is the choice operator, also called indefinite description, or
also epsilon terms, i.e "Choice x. p(x)" is one "x" such that "p(x)"
is true.
- Description is the definite description, i.e "Description x. p(x)"
is the {b only} "x" that satisfies p.
*)(** {3 Type constructors} *)valarrow:?loc:location->t->t->t(** Function type constructor, for curryfied functions. Functions
that takes multiple arguments in first-order terms might take
a product as only argument (see the following [product] function)
in some languages (e.g. tptp), or be curryfied using this constructor
in other languages (e.g. alt-ergo). *)valproduct:?loc:location->t->t->t(** Product type constructor, used for instance in the types of
functions that takes multiple arguments in a non-curry way. *)valunion:?loc:location->t->t->t(** Union type constructor, currently used in tptp's THF format. *)valsubtype:?loc:location->t->t->t(** Subtype relation for types. *)(** {3 Record constructors} *)valrecord:?loc:location->tlist->t(** Create a record expression. *)valrecord_with:?loc:location->t->tlist->t(** Record "with" update (e.g. "{ r with ....}"). *)valrecord_access:?loc:location->t->id->t(** Field record access. *)(** {3 Algebraic datatypes} *)valadt_check:?loc:location->t->id->t(** Check whether some expression matches a given adt constructor
(in head position). *)valadt_project:?loc:location->t->id->t(** Project a field of an adt constructor (usually unsafe except when
guarded by an adt_check function). *)(** {3 Array constructors} *)valarray_get:?loc:location->t->t->t(** Array getter. *)valarray_set:?loc:location->t->t->t->t(** Array setter. *)(** {3 Bitvector constructors} *)valbitv_extract:?loc:location->t->int->int->t(** Bitvector extraction. *)valbitv_concat:?loc:location->t->t->t(** Bitvector concatenation. *)(** {3 Arithmetic constructors} *)valuminus:?loc:location->t->t(** Arithmetic unary minus. *)valadd:?loc:location->t->t->t(** Arithmetic addition. *)valsub:?loc:location->t->t->t(** Arithmetic substraction. *)valmult:?loc:location->t->t->t(** Arithmetic multiplication. *)valdiv:?loc:location->t->t->t(** Arithmetic division quotient. *)valmod_:?loc:location->t->t->t(** Arithmetic modulo (aka division reminder). *)valint_pow:?loc:location->t->t->t(** Integer power. *)valreal_pow:?loc:location->t->t->t(** Real power. *)vallt:?loc:location->t->t->t(** Arithmetic "lesser than" comparison (strict). *)valleq:?loc:location->t->t->t(** Arithmetic "lesser or equal" comparison. *)valgt:?loc:location->t->t->t(** Arithmetic "greater than" comparison (strict). *)valgeq:?loc:location->t->t->t(** Arithmetic "greater or equal" comparison. *)(** {3 Triggers} *)valin_interval:?loc:location->t->(t*bool)->(t*bool)->t(** Create a predicate for whether a term is within the given bounds
(each bound is represented by a term which is tis value and a boolean
which specifies whether it is strict or not). *)valmaps_to:?loc:location->id->t->t(** Id mapping (see alt-ergo). *)valtrigger:?loc:location->tlist->t(** Create a multi-trigger (i.e. all terms in the lsit must match to
trigger). *)valtriggers:?loc:location->t->tlist->t(** [triggers ~loc f l] annotates formula/term [f] with a list of triggers. *)valfilters:?loc:location->t->tlist->t(** [filters ~loc f l] annotates formula/term [f] with a list of filters. *)(** {3 Special constructions} *)valtracked:?loc:location->id->t->t(** Name a term for tracking purposes. *)valquoted:?loc:location->string->t(** Create an attribute from a quoted string (in Zf). *)valsequent:?loc:location->tlist->tlist->t(** Sequents as terms *)valcheck:?loc:location->t->t(** Check a term (see alt-ergo). *)valcut:?loc:location->t->t(** Create a cut (see alt-ergo). *)valannot:?loc:location->t->tlist->t(** Attach a list of attributes (also called annotations) to a term. Attributes
have no logical meaning (they can be safely ignored), but may serve to give
hints or meta-information. *)valsexpr:?loc:location->tlist->t(** S-expressions (for smtlib attributes), should probably be related
to the [data_t] term. *)end(** {2 Signature for Response terms} *)moduletypeResponse=Logic(** Simply an alias to the Logic signature. *)(** {2 Signature for Typechecked terms} *)moduletypeTff=sig(** Signature required by terms for typing first-order
polymorphic terms. *)typet(** The type of terms and term variables. *)typepath(** The type of patsh to constants. *)typetytypety_vartypety_consttypety_def(** The representation of term types, type variables, and type constants,
and lastly type definitions. *)type'atag(** The type of tags used to annotate arbitrary terms. *)valty:t->ty(** Returns the type of a term. *)valprint:Format.formatter->t->unit(** Printing function for terms. *)(** A module for variables that occur in terms. *)moduleVar:sigtypet(** The type of variables the can occur in terms *)valprint:Format.formatter->t->unit(** Printing function for term variables. *)valcompare:t->t->int(** Comparison function on variables. *)valmk:string->ty->t(** Create a new typed variable. *)valty:t->ty(** Return the type of the variable. *)valget_tag:t->'atag->'aoption(** Return the value bound to a tag (if any). *)valset_tag:t->'atag->'a->unit(** Set the value bound to the tag. *)valunset_tag:t->_tag->unit(** Remove the binding to the given tag. *)end(** A module for constant symbols that occur in terms. *)moduleConst:sigtypet(** The type of constant symbols that can occur in terms *)valprint:Format.formatter->t->unit(** Printing function for term constants. *)valcompare:t->t->int(** Comparison function on constant symbols. *)valty:t->ty(** Return the type of the constant. *)valmk:path->ty->t(** Create a constant symbol. *)valset_tag:t->'atag->'a->unit(** Tag a constant. *)valadd_tag:t->'alisttag->'a->unit(** Add a value to the list of values bound to a tag. *)end(** A module for Algebraic datatype constructors. *)moduleCstr:sigtypet(** An algebraic type constructor. Note that such constructors are used to
build terms, and not types, e.g. consider the following:
[type 'a list = Nil | Cons of 'a * 'a t], then [Nil] and [Cons] are the
constructors, while [list] would be a type constant of arity 1 used to
name the type. *)valty:t->ty(** Return the type of the constant. *)valcompare:t->t->int(** Comparison function on constant symbols. *)valpattern_arity:t->ty->tylist->tylist(** Used in the type-checking of pattern matching.
[pattern_arity cstr ret ty_args] should return the types of the expected arguments
[args] such that [apply_cstr cstr ty_args args] has type [ret]. *)endmoduleField:sigtypet(** A field of a record. *)valcompare:t->t->int(** Comparison function on constant symbols. *)endvaldefine_adt:ty_const->ty_varlist->(path*(ty*pathoption)list)list->ty_def*(Cstr.t*(ty*Const.toption)list)list(** [define_aft t vars cstrs] defines the type constant [t], parametrised over
the type variables [ty_vars] as defining an algebraic datatypes with constructors
[cstrs]. [cstrs] is a list where each elements of the form [(name, l)] defines
a new constructor for the algebraic datatype, with the given name. The list [l]
defines the arguments to said constructor, each element of the list giving the
type [ty] of the argument expected by the constructor (which may contain any of the type
variables in [vars]), as well as an optional destructor name. If the construcotr name
is [Some s], then the ADT definition also defines a function that acts as destructor
for that particular field. This polymorphic function is expected to takes as arguments
as many types as there are variables in [vars], an element of the algebraic datatype
being defined, and returns a value for the given field.
For instance, consider the following definition for polymorphic lists:
[define_adt list \[ty_var_a\] \[
"nil", \[\];
"const", \[
(Ty.of_var ty_var_a , Some "hd");
(ty_list_a , Some "tl");
\];
\]
]
This definition defines the usual type of polymorphic linked lists, as well as two
destructors "hd" and "tl". "hd" would have type [forall alpha. alpha list -> a], and
be the partial function returning the head of the list.
*)valdefine_record:ty_const->ty_varlist->(path*ty)list->ty_def*Field.tlist(** Define a (previously abstract) type to be a record type, with the given fields. *)exceptionWrong_typeoft*ty(** Exception raised in case of typing error during term construction.
[Wrong_type (t, ty)] should be raised by term constructor functions when some term [t]
is expected to have type [ty], but does not have that type. *)exceptionWrong_sum_typeofCstr.t*ty(** Raised when some constructor was expected to belong to some type but does not
belong to the given type. *)exceptionWrong_record_typeofField.t*ty_const(** Exception raised in case of typing error during term construction.
This should be raised when the returned field was expected to be a field
for the returned record type constant, but it was of another record type. *)exceptionField_repeatedofField.t(** Field repeated in a record expression. *)exceptionField_missingofField.t(** Field missing in a record expression. *)exceptionPattern_expectedoft(** Raised when trying to create a pattern matching, but a non-pattern term
was provided where a pattern was expected. *)exceptionEmpty_pattern_matching(** Raise when creating a pattern matching but an empty list of branches
was provided *)exceptionPartial_pattern_matchoftlist(** Raised when a partial pattern matching was created. A list of terms not
covered by the patterns is provided. *)exceptionOver_applicationoftlist(** Raised when an application was provided too many term arguments. The
extraneous arguments are returned by the exception. *)exceptionBad_poly_arityofty_varlist*tylist(** Raised when a polymorphic application does not have an
adequate number of arguments. *)valensure:t->ty->t(** Ensure that a given term has the given type. *)valof_var:Var.t->t(** Create a term from a variable *)valapply_cst:Const.t->tylist->tlist->t(** Polymorphic application of a constant. *)valapply_cstr:Cstr.t->tylist->tlist->t(** Polymorphic application of a constructor. *)valapply_field:Field.t->t->t(** Apply a field to a record. *)valrecord:(Field.t*t)list->t(** Create a record. *)valrecord_with:t->(Field.t*t)list->t(** Create an updated record *)valcstr_tester:Cstr.t->t->t(** Given a constructor [c] and a term [t], returns a terms that evaluates
to [true] iff [t] has [c] as head constructor. *)val_true:t(** The `true` literal. *)val_and:tlist->t(** Conjunction of formulas *)vallam:ty_varlist*Var.tlist->t->t(** Create a local function. *)valall:ty_varlist*Var.tlist->t->t(** Universally quantify the given formula over the type and terms variables. *)valex:ty_varlist*Var.tlist->t->t(** Existencially quantify the given formula over the type and terms variables. *)valbind:Var.t->t->t(** Bind a variable to an expressions. This function is called when typing
a let-binding, before the body of the let-binding is typed. The returned
expressions is used to replace the variable everywhere in the body of the
let-binding being typed. *)valletin:(Var.t*t)list->t->t(** Create a sequential let-binding. *)valletand:(Var.t*t)list->t->t(** Create a parrallel let-binding. *)valpattern_match:?redundant:(t->unit)->t->(t*t)list->t(** [pattern_match scrutinee branches] creates a pattern match expression
on the scrutinee with the given branches, each of the form
[(pattern, body)] *)valset_tag:t->'atag->'a->unit(** Annotate the given formula wiht the tag and value. *)valadd_tag:t->'alisttag->'a->unit(** Add a value to the list of values bound to a tag. *)valfv:t->ty_varlist*Var.tlist(** Returns the list of free variables in the formula. *)endmoduletypeThf=sigincludeTffvalapply:t->tylist->tlist->t(** Polymorphic application. *)end(** Minimum required to type dimacs *)moduletypeDimacs=sigtypet(** The type of terms *)valneg:t->t(** Logical negation. *)end(** Minimum required to type ae's tff *)moduletypeAe_Base=sigtypet(** The type of terms *)typeterm_var(** The type of term variables *)valvoid:t(** The only value of type unit. *)valeq:t->t->t(** Build the equality of two terms. *)val_true:t(** The smybol for [true] *)val_false:t(** The symbol for [false] *)valneg:t->t(** Negation. *)val_or:tlist->t(** Disjunction of formulas *)val_and:tlist->t(** Conjunction of formulas *)valimply:t->t->t(** Implication *)valequiv:t->t->t(** Equivalence *)valxor:t->t->t(** Exclusive disjunction. *)valite:t->t->t->t(** [ite condition then_t else_t] creates a conditional branch. *)valdistinct:tlist->t(** Distinct constraints on terms. *)valmulti_trigger:tlist->t(** Create a multi trigger from a list of arbtirary terms. *)valsemantic_trigger:t->t(** Semantic triggers for alt-ergo. *)valmaps_to:term_var->t->t(** Semantic trigger: maps to. *)endmoduletypeAe_Arith_Common=sigtypet(** The type of terms *)valminus:t->t(** Arithmetic unary minus/negation. *)valadd:t->t->t(** Arithmetic addition. *)valsub:t->t->t(** Arithmetic substraction *)valmul:t->t->t(** Arithmetic multiplication *)valpow:t->t->t(** Arithmetic exponentiation *)vallt:t->t->t(** Arithmetic "less than" comparison. *)valle:t->t->t(** Arithmetic "less or equal" comparison. *)valgt:t->t->t(** Arithmetic "greater than" comparison. *)valge:t->t->t(** Arithmetic "greater or equal" comparison. *)end(** Minimum required to type ae's arith *)moduletypeAe_Arith=sigtypet(** The type of terms. *)typety(** The type of types. *)valty:t->ty(** Get the type of a term. *)valint:string->t(** Integer literals *)valreal:string->t(** Real literals *)valsemantic_trigger:t->t(** Semantic triggers for alt-ergo. *)moduleInt:sigincludeAe_Arith_Commonwithtypet:=tvaldiv_e:t->t->t(** Euclidian division quotient *)valrem_e:t->t->t(** Euclidian division remainder *)valto_real:t->t(** Conversion from an integer term to a real term. *)endmoduleReal:sigincludeAe_Arith_Commonwithtypet:=tvaldiv:t->t->t(** Exact division on reals. *)endendmoduletypeAe_Array=sigtypet(** The type of terms *)valselect:t->t->t(** [select arr idx] creates the get operation on functionnal
array [arr] for index [idx]. *)valstore:t->t->t->t(** [store arr idx value] creates the set operation on
functional array [arr] for value [value] at index [idx]. *)end(** Minimum required to type ae's bitvectors *)moduletypeAe_Bitv=sigtypet(** The type of terms *)valmk:string->t(** Create a bitvector litteral from a string representation.
The string should only contain characters '0' or '1'. *)valconcat:t->t->t(** Bitvector concatenation. *)valextract:int->int->t->t(** Bitvector extraction, using in that order,
the start and then end positions of the
bitvector to extract. *)valrepeat:int->t->t(** Repetition of a bitvector. *)valzero_extend:int->t->t(** Extend the given bitvector with the given number of 0s. *)valsign_extend:int->t->t(** Extend the given bitvector with its most significant bit
repeated the given number of times. *)valrotate_right:int->t->t(** [rotate_right i x] means rotate bits of x to the right i times. *)valrotate_left:int->t->t(** [rotate_left i x] means rotate bits of x to the left i times. *)valnot:t->t(** Bitwise negation. *)valand_:t->t->t(** Bitwise conjunction. *)valor_:t->t->t(** Bitwise disjunction. *)valnand:t->t->t(** [nand s t] abbreviates [not (and_ s t)]. *)valnor:t->t->t(** [nor s t] abbreviates [not (or_ s t)]. *)valxor:t->t->t(** [xor s t] abbreviates [or_ (and_ s (not t)) (and_ (not s) t)]. *)valxnor:t->t->t(** [xnor s t] abbreviates [or_ (and_ s t) (and_ (not s) (not t))]. *)valcomp:t->t->t(** Bitwise comparison. [comp s t] equals [#b1] iff [s] and [t]
are bitwise equal. *)valneg:t->t(** Arithmetic complement on bitvectors.
Supposing an input bitvector of size [m] representing
an integer [k], the resulting term should represent
the integer [2^m - k]. *)valadd:t->t->t(** Arithmetic addition on bitvectors, modulo the size of
the bitvectors (overflows wrap around [2^m] where [m]
is the size of the two input bitvectors). *)valsub:t->t->t(** Arithmetic substraction on bitvectors, modulo the size
of the bitvectors (2's complement subtraction modulo).
[sub s t] should be equal to [add s (neg t)]. *)valmul:t->t->t(** Arithmetic multiplication on bitvectors, modulo the size
of the bitvectors (see {!add}). *)valudiv:t->t->t(** Arithmetic euclidian integer division on bitvectors. *)valurem:t->t->t(** Arithmetic euclidian integer remainder on bitvectors. *)valsdiv:t->t->t(** Arithmetic 2's complement signed division.
(see smtlib's specification for more information). *)valsrem:t->t->t(** Arithmetic 2's complement signed remainder (sign follows dividend).
(see smtlib's specification for more information). *)valsmod:t->t->t(** Arithmetic 2's complement signed remainder (sign follows divisor).
(see smtlib's specification for more information). *)valshl:t->t->t(** Logical shift left. [shl t k] return the result of
shifting [t] to the left [k] times. In other words,
this should return the bitvector representing
[t * 2^k] (since bitvectors represent integers using
the least significatn bit in cell 0). *)vallshr:t->t->t(** Logical shift right. [lshr t k] return the result of
shifting [t] to the right [k] times. In other words,
this should return the bitvector representing
[t / (2^k)]. *)valashr:t->t->t(** Arithmetic shift right, like logical shift right except that the most
significant bits of the result always copy the most significant
bit of the first argument*)valult:t->t->t(** Boolean arithmetic comparison (less than).
[ult s t] should return the [true] term iff [s < t]. *)valule:t->t->t(** Boolean arithmetic comparison (less or equal than). *)valugt:t->t->t(** Boolean arithmetic comparison (greater than). *)valuge:t->t->t(** Boolean arithmetic comparison (greater or equal than). *)valslt:t->t->t(** Boolean signed arithmetic comparison (less than).
(See smtlib's specification for more information) *)valsle:t->t->t(** Boolean signed arithmetic comparison (less or equal than). *)valsgt:t->t->t(** Boolean signed arithmetic comparison (greater than). *)valsge:t->t->t(** Boolean signed arithmetic comparison (greater or equal than). *)end(** Minimum required to type tptp's tff *)moduletypeTptp_Tff_Core=sigtypet(** The type of terms *)val_true:t(** The smybol for [true] *)val_false:t(** The symbol for [false] *)valneg:t->t(** Negation. *)val_or:tlist->t(** Disjunction of formulas *)val_and:tlist->t(** Conjunction of formulas *)valnand:t->t->t(** Not-and *)valnor:t->t->t(** Not-or *)valimply:t->t->t(** Implication *)valimplied:t->t->t(** Implication *)valequiv:t->t->t(** Equivalence *)valxor:t->t->t(** Exclusive disjunction. *)valite:t->t->t->t(** [ite condition then_t else_t] creates a conditional branch. *)valeq:t->t->t(** Build the equality of two terms. *)valneq:t->t->t(** Disequality. *)valdistinct:tlist->t(** Distinct constraints on terms. *)endmoduletypeTptp_Thf_Core_Const=sigtypet(** Type for term constans *)val_true:t(** The smybol for [true] *)val_false:t(** The symbol for [false] *)valneg:t(** Negation. *)valor_:t(** Binary disjunction of formulas *)valand_:t(** Binary conjunction of formulas *)valnand:t(** Not-and *)valnor:t(** Not-or *)valimply:t(** Implication *)valimplied:t(** Reverse implication *)valequiv:t(** Equivalence *)valxor:t(** Exclusive disjunction. *)valite:t(** [ite condition then_t else_t] creates a conditional branch. *)valeq:t(** Build the equality of two terms. *)valneq:t(** Binary disequality. *)valpi:t(** Higher-order encoding of universla quantification. *)valsigma:t(** Higher-order encoding of existancial quantification. *)end(** Minimum required to type tptp's thf *)moduletypeTptp_Thf_Core=sigtypet(** The type of terms *)typety(** The type of types *)moduleConst:Tptp_Thf_Core_Const(** Constants *)valof_cst:Const.t->t(** Create a term out of aconstant. *)valdistinct:tlist->t(** Distinct constraints on terms. *)end(** Common signature for tptp arithmetics *)moduletypeTptp_Tff_Arith_Common=sigtypet(** The type of terms *)valminus:t->t(** Arithmetic unary minus/negation. *)valadd:t->t->t(** Arithmetic addition. *)valsub:t->t->t(** Arithmetic substraction *)valmul:t->t->t(** Arithmetic multiplication *)valdiv_e:t->t->t(** Euclidian division quotient *)valdiv_t:t->t->t(** Truncation of the rational/real division. *)valdiv_f:t->t->t(** Floor of the ration/real division. *)valrem_e:t->t->t(** Euclidian division remainder *)valrem_t:t->t->t(** Remainder for the truncation of the rational/real division. *)valrem_f:t->t->t(** Remaidner for the floor of the ration/real division. *)vallt:t->t->t(** Arithmetic "less than" comparison. *)valle:t->t->t(** Arithmetic "less or equal" comparison. *)valgt:t->t->t(** Arithmetic "greater than" comparison. *)valge:t->t->t(** Arithmetic "greater or equal" comparison. *)valfloor:t->t(** Floor function. *)valceiling:t->t(** Ceiling *)valtruncate:t->t(** Truncation. *)valround:t->t(** Rounding to the nearest integer. *)valis_int:t->t(** Integer testing *)valis_rat:t->t(** Rationality testing. *)valto_int:t->t(** Convesion to an integer. *)valto_rat:t->t(** Conversion to a rational. *)valto_real:t->t(** Conversion to a real. *)end(** Signature required by terms for typing tptp arithmetic. *)moduletypeTptp_Tff_Arith=sigtypet(** The type of terms. *)typety(** The type of types. *)valty:t->ty(** Get the type of a term. *)valint:string->t(** Integer literals *)valrat:string->t(** Rational literals *)valreal:string->t(** Real literals *)moduleInt:sigincludeTptp_Tff_Arith_Commonwithtypet:=tendmoduleRat:sigincludeTptp_Tff_Arith_Commonwithtypet:=tvaldiv:t->t->t(** Exact division on rationals. *)endmoduleReal:sigincludeTptp_Tff_Arith_Commonwithtypet:=tvaldiv:t->t->t(** Exact division on reals. *)endend(** Minimum required to type smtlib's core theory. *)moduletypeSmtlib_Base=sigtypet(** The type of terms. *)typecstr(** The type of ADT constructor *)val_true:t(** The smybol for [true] *)val_false:t(** The symbol for [false] *)valneg:t->t(** Negation. *)val_or:tlist->t(** Disjunction of formulas *)val_and:tlist->t(** Disjunction of formulas *)valnand:t->t->t(** Not-and *)valnor:t->t->t(** Not-or *)valimply:t->t->t(** Implication *)valequiv:t->t->t(** Equivalence *)valxor:t->t->t(** Exclusive disjunction. *)valite:t->t->t->t(** [ite condition then_t else_t] creates a conditional branch. *)valeq:t->t->t(** Create a chain of equalities. *)valdistinct:tlist->t(** Distinct constraints on terms. *)valmulti_trigger:tlist->t(** Create a multi trigger from a list of arbtirary terms. *)end(** Common signature for first-order arithmetic *)moduletypeSmtlib_Arith_Common=sigtypet(** The type of terms *)typecst(** The type of term constants. *)valmk:string->t(** Build a constant. The literal is passed
as a string to avoid overflow caused
by the limited precision of native number formats. *)valminus:t->t(** Arithmetic unary minus/negation. *)valadd:t->t->t(** Arithmetic addition. *)valsub:t->t->t(** Arithmetic substraction *)valmul:t->t->t(** Arithmetic multiplication *)vallt:t->t->t(** Arithmetic "less than" comparison. *)valle:t->t->t(** Arithmetic "less or equal" comparison. *)valgt:t->t->t(** Arithmetic "greater than" comparison. *)valge:t->t->t(** Arithmetic "greater or equal" comparison. *)end(** Signature required by terms for typing smtlib int arithmetic. *)moduletypeSmtlib_Int=sigincludeSmtlib_Arith_Commonvaldiv':cst(** Constant for the division. *)valdiv:t->t->t(** Euclidian division. See Smtlib theory for a full description. *)valrem':cst(** Constant for the remainder. *)valrem:t->t->t(** Euclidian integer remainder See Smtlib theory for a full description. *)valabs:t->t(** Arithmetic absolute value. *)valdivisible:string->t->t(** Arithmetic divisibility predicate. Indexed over
constant integers (represented as strings, see {!int}). *)end(** Signature required by terms for typing smtlib real arithmetic. *)moduletypeSmtlib_Real=sigincludeSmtlib_Arith_Commonvaldiv':cst(** Constant for the division. *)valdiv:t->t->t(** Real division. See Smtlib theory for a full description. *)end(** Signature required by terms for typing smtlib real_int arithmetic. *)moduletypeSmtlib_Real_Int=sigtypet(** The type of terms. *)typety(** The type of types. *)valty:t->ty(** Get the type of a term. *)moduleInt:sigincludeSmtlib_Intwithtypet:=tvalto_real:t->t(** Conversion from an integer term to a real term. *)endmoduleReal:sigincludeSmtlib_Realwithtypet:=tvalis_int:t->t(** Arithmetic predicate, true on reals that are also integers. *)valfloor_to_int:t->t(** Greatest integer smaller than the given real *)endendmoduletypeSmtlib_Array=sigtypet(** The type of terms *)typety(** Type of of types. *)valconst:ty->t->t(** [const ty base] creates a constant array that maps any value
of type [ty] to [base]. *)valselect:t->t->t(** [select arr idx] creates the get operation on functionnal
array [arr] for index [idx]. *)valstore:t->t->t->t(** [store arr idx value] creates the set operation on
functional array [arr] for value [value] at index [idx]. *)endmoduletypeSmtlib_Bvconv=sigtypet(** The type of terms *)valto_nat:t->t(** Application of the bv2nat conversion function. *)valof_int:int->t->t(** Application of the int2bv conversion function. *)endmoduletypeSmtlib_Bitv=sigtypet(** The type of terms *)valmk:string->t(** Create a bitvector litteral from a string representation.
The string should only contain characters '0' or '1'. *)valconcat:t->t->t(** Bitvector concatenation. *)valextract:int->int->t->t(** Bitvector extraction, using in that order,
the end (exclusive) and then the start (inclusive)
position of the bitvector to extract. *)valrepeat:int->t->t(** Repetition of a bitvector. *)valzero_extend:int->t->t(** Extend the given bitvector with the given number of 0s. *)valsign_extend:int->t->t(** Extend the given bitvector with its most significant bit
repeated the given number of times. *)valrotate_right:int->t->t(** [rotate_right i x] means rotate bits of x to the right i times. *)valrotate_left:int->t->t(** [rotate_left i x] means rotate bits of x to the left i times. *)valnot:t->t(** Bitwise negation. *)valand_:t->t->t(** Bitwise conjunction. *)valor_:t->t->t(** Bitwise disjunction. *)valnand:t->t->t(** [nand s t] abbreviates [not (and_ s t)]. *)valnor:t->t->t(** [nor s t] abbreviates [not (or_ s t)]. *)valxor:t->t->t(** [xor s t] abbreviates [or_ (and_ s (not t)) (and_ (not s) t)]. *)valxnor:t->t->t(** [xnor s t] abbreviates [or_ (and_ s t) (and_ (not s) (not t))]. *)valcomp:t->t->t(** Bitwise comparison. [comp s t] equals [#b1] iff [s] and [t]
are bitwise equal. *)valneg:t->t(** Arithmetic complement on bitvectors.
Supposing an input bitvector of size [m] representing
an integer [k], the resulting term should represent
the integer [2^m - k]. *)valadd:t->t->t(** Arithmetic addition on bitvectors, modulo the size of
the bitvectors (overflows wrap around [2^m] where [m]
is the size of the two input bitvectors). *)valsub:t->t->t(** Arithmetic substraction on bitvectors, modulo the size
of the bitvectors (2's complement subtraction modulo).
[sub s t] should be equal to [add s (neg t)]. *)valmul:t->t->t(** Arithmetic multiplication on bitvectors, modulo the size
of the bitvectors (see {!add}). *)valudiv:t->t->t(** Arithmetic euclidian integer division on bitvectors. *)valurem:t->t->t(** Arithmetic euclidian integer remainder on bitvectors. *)valsdiv:t->t->t(** Arithmetic 2's complement signed division.
(see smtlib's specification for more information). *)valsrem:t->t->t(** Arithmetic 2's complement signed remainder (sign follows dividend).
(see smtlib's specification for more information). *)valsmod:t->t->t(** Arithmetic 2's complement signed remainder (sign follows divisor).
(see smtlib's specification for more information). *)valshl:t->t->t(** Logical shift left. [shl t k] return the result of
shifting [t] to the left [k] times. In other words,
this should return the bitvector representing
[t * 2^k] (since bitvectors represent integers using
the least significatn bit in cell 0). *)vallshr:t->t->t(** Logical shift right. [lshr t k] return the result of
shifting [t] to the right [k] times. In other words,
this should return the bitvector representing
[t / (2^k)]. *)valashr:t->t->t(** Arithmetic shift right, like logical shift right except that the most
significant bits of the result always copy the most significant
bit of the first argument*)valult:t->t->t(** Boolean arithmetic comparison (less than).
[ult s t] should return the [true] term iff [s < t]. *)valule:t->t->t(** Boolean arithmetic comparison (less or equal than). *)valugt:t->t->t(** Boolean arithmetic comparison (greater than). *)valuge:t->t->t(** Boolean arithmetic comparison (greater or equal than). *)valslt:t->t->t(** Boolean signed arithmetic comparison (less than).
(See smtlib's specification for more information) *)valsle:t->t->t(** Boolean signed arithmetic comparison (less or equal than). *)valsgt:t->t->t(** Boolean signed arithmetic comparison (greater than). *)valsge:t->t->t(** Boolean signed arithmetic comparison (greater or equal than). *)end(** Bitvector part of the smtlib float requirements *)moduletypeSmtlib_Float_Bitv=sigtypet(** the type of terms *)valmk:string->t(** Bitvector litteral. *)end(** Real part of the smtlib float requirements *)moduletypeSmtlib_Float_Real=sigtypet(** the type of terms *)valmk:string->t(** Bitvector litteral. *)end(** Float part of the smtlib float requirements *)moduletypeSmtlib_Float_Float=sigtypet(** the type of terms *)typecst(** The type of term constants. *)valfp:t->t->t->t(** Construct a floating point from bitvector literals
(sign, exponent, significand). The sign should be of size 1. *)valroundNearestTiesToEven:t(** constant for rounding mode RNE *)valroundNearestTiesToAway:t(** constant for rounding mode RNA *)valroundTowardPositive:t(** constant for rounding mode RTP *)valroundTowardNegative:t(** constant for rounding mode RTN *)valroundTowardZero:t(** constant for rounding mode RTZ *)valplus_infinity:int->int->t(** The constant plus infinity, it is also equivalent to a literal *)valminus_infinity:int->int->t(** The constant minus infinity, it is also equivalent to a literal *)valplus_zero:int->int->t(** The constant plus zero, it is also equivalent to a literal *)valminus_zero:int->int->t(** The constant minus zero, it is also equivalent to a literal *)valnan:int->int->t(** The constant Non-numbers, it is also equivalent to many literals which are
equivalent together *)valabs:t->t(** absolute value *)valneg:t->t(** negation *)valadd:t->t->t->t(** [add rm f1 f2] addition *)valsub:t->t->t->t(** [sub rm f1 f2] subtraction *)valmul:t->t->t->t(** [mul rm f1 f2] multiplication *)valdiv:t->t->t->t(** [mul rm f1 f2] division *)valfma:t->t->t->t->t(** [mul rm f1 f2] fused multiplication and addition *)valsqrt:t->t->t(** [sqrt rm f] square root *)valrem:t->t->t(** [rem f1 f2] remainder *)valroundToIntegral:t->t->t(** [roundToIntegral rm f] rounding to integral *)valmin:t->t->t(** [min f1 f2] minimum *)valmin':int*int->cst(** Constant for float min. *)valmax:t->t->t(** [max f1 f2] maximum *)valmax':int*int->cst(** Constant for float max. *)valleq:t->t->t(** [leq f1 f2] less or equal floating point comparison *)vallt:t->t->t(** [lt f1 f2] less than floating point comparison *)valgeq:t->t->t(** [geq f1 f2] greater or equal floating point comparison *)valgt:t->t->t(** [lt f1 f2] greater than floating point comparison *)valeq:t->t->t(** [eq f1 f2] floating point equality *)valisNormal:t->t(** [isNormal f] test if it is a normal floating point *)valisSubnormal:t->t(** [isSubnormal f] test if it is a subnormal floating point *)valisZero:t->t(** [isZero f] test if it is a zero *)valisInfinite:t->t(** [isInfinite f] test if it is an infinite *)valisNaN:t->t(** [isNaN f] test if it is NaN *)valisNegative:t->t(** [isNegative f] test if it is a negative floating point *)valisPositive:t->t(** [isPositive f] test if it is a positive floating point *)valieee_format_to_fp:int->int->t->t(** [ieee_format_to_fp e s bv] Convert a bitvector into a floating point using IEEE 754-2008 interchange format.
(reinterpret the bitvector into floating-point)
*)valto_fp:int->int->t->t->t(** [to_fp e s rm f] convert from one floating point format to another *)valreal_to_fp:int->int->t->t->t(** [real_to_fp e s rm r] convert from a real *)valsbv_to_fp:int->int->t->t->t(** [sbv_to_fp e s rm bv] convert from a signed integer *)valubv_to_fp:int->int->t->t->t(** [ubv_to_fp e s rm bv] convert from an unsigned integer *)valto_ubv:int->t->t->t(** [to_ubv m rm f] convert to an unsigned integer (bitvector of size m) *)valto_ubv':int->int*int->cst(** constant for [to_ubv] *)valto_sbv:int->t->t->t(** [to_ubv m rm f] convert to a signed integer (bitvector of size m) *)valto_sbv':int->int*int->cst(** constant for [to_sbv] *)valto_real:t->t(** [to_real f] convert to a real *)end(* Requirement for the Floats SMTLIB theory *)moduletypeSmtlib_Float=sig(** Floating points are complicated so this documentation is not in anyway
sufficient. A detailed description of the theory together with the
rationale of several models decisions as well as a formal semantics of the
theory can be found in
[BTRW15] Martin Brain, Cesare Tinelli, Philipp Ruemmer, and Thomas Wahl. An
Automatable Formal Semantics for IEEE-754 Floating-Point Arithmetic
Technical Report, 2015. (http://smt-lib.org/papers/BTRW15.pdf)
*)typet(** The type of terms *)typety(** The type of types. *)typecst(** The type of term constants *)valty:t->ty(** Type of a term. *)moduleReal:Smtlib_Float_Realwithtypet:=t(** Sub-module used for namespacing the real part
of the theory requirements *)moduleBitv:Smtlib_Float_Bitvwithtypet:=t(** Sub-module used for namespacing the bitvector part
of the theory requirements *)moduleFloat:Smtlib_Float_Floatwithtypet:=tandtypecst:=cst(** Sub-module used for namespacing the floating number part
of the theory requirements *)endmoduletypeSmtlib_String_RegLan=sigtypet(** The type of terms *)valempty:t(** The empty regular language. *)valall:t(** The language that contains all strings *)valallchar:t(** The language that contains all strings of length 1 *)valof_string:t->t(** Singleton language containing a single string. *)valrange:t->t->t(** [range s1 s2] is the language containing all singleton strings
(i.e. string of length 1) that are lexicographically beetween
[s1] and [s2], **assuming [s1] and [s2] are singleton strings**.
Else it is the empty language. *)valconcat:t->t->t(** Language concatenation. *)valunion:t->t->t(** Language union. *)valinter:t->t->t(** language intersection. *)valstar:t->t(** Kleene closure. *)valcross:t->t(** Kleene cross. [cross e] abbreviates [concat e (star e)] *)valcomplement:t->t(** Complement. *)valdiff:t->t->t(** Difference *)valoption:t->t(** Option. [option e] abbreviates [union e (of_string "")] *)valpower:int->t->t(** [power n e] is [n]-th power of [e]. *)valloop:int->int->t->t(** Loop. See SMTLIb documentation. *)endmoduletypeSmtlib_String_String=sigtypet(** The type of terms *)valof_ustring:string->t(** Create a string from a unicode UTF-8 encoded string (with escape sequences
already interpreted as unicode characters). *)vallength:t->t(** Length of a string expression. *)valat:t->t->t(** Get the char at the given position. *)valis_digit:t->t(** Is the string a singleton string with a single digit character ? *)valto_code:t->t(** Returns the code point of the single character of the string,
or [(-1)] is the string is not a singleton. *)valof_code:t->t(** Returns the singleton string whose only character is the given
code point. *)valto_int:t->t(** Evaluates the string as a decimal natural number, or [(-1)] if
it's not possible. *)valof_int:t->t(** Convert an int expression to a string in decimal representation. *)valconcat:t->t->t(** String concatenation. *)valsub:t->t->t->t(** Substring extraction. *)valindex_of:t->t->t->t(** Index of the first occurrence of the second string in
first one, starting at the position of the third argument. *)valreplace:t->t->t->t(** Replace the first occurrence. *)valreplace_all:t->t->t->t(** Replace all occurrences. *)valreplace_re:t->t->t->t(** Replace the leftmost, shortest re ocurrence. *)valreplace_re_all:t->t->t->t(** Replace left-to-right, each shortest non empty re occurrence. *)valis_prefix:t->t->t(** First string is a prefix of the second one. *)valis_suffix:t->t->t(** First string is a suffix of the second one. *)valcontains:t->t->t(** First string contains the second one. *)vallt:t->t->t(** Lexicographic strict ordering. *)valleq:t->t->t(** Lexicographic large ordering. *)valin_re:t->t->t(** String Regular languager membership *)moduleRegLan:Smtlib_String_RegLanwithtypet:=t(** Sub-module used for namespacing for the regular language part
of the theory requirements. *)endmoduletypeSmtlib_String=sigtypet(** The type of terms *)moduleString:Smtlib_String_Stringwithtypet:=t(** Sub-module used for namespacing for the string part
of the theory requirements. *)endmoduletypeZf_Base=sigtypet(** The type of terms *)val_true:t(** The smybol for [true] *)val_false:t(** The symbol for [false] *)valneg:t->t(** Negation. *)val_or:tlist->t(** Disjunction of formulas *)val_and:tlist->t(** Conjunction of formulas *)valimply:t->t->t(** Logical Implication. *)valequiv:t->t->t(** Logical Equivalence. *)valeq:t->t->t(** Build the equality of two terms. *)valneq:t->t->t(** Disequality. *)valite:t->t->t->t(** If-then-else *)endmoduletypeZf_Arith=sigtypet(** The type of terms *)valint:string->t(** Integer literals *)moduleInt:sigvalminus:t->t(** Arithmetic unary minus/negation. *)valadd:t->t->t(** Arithmetic addition. *)valsub:t->t->t(** Arithmetic substraction *)valmul:t->t->t(** Arithmetic multiplication *)vallt:t->t->t(** Arithmetic "less than" comparison. *)valle:t->t->t(** Arithmetic "less or equal" comparison. *)valgt:t->t->t(** Arithmetic "greater than" comparison. *)valge:t->t->t(** Arithmetic "greater or equal" comparison. *)endend