123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447(***************************************************************************)(* This file is part of the third-party OCaml library `smtml`. *)(* Copyright (C) 2023-2024 formalsec *)(* *)(* This program is free software: you can redistribute it and/or modify *)(* it under the terms of the GNU General Public License as published by *)(* the Free Software Foundation, either version 3 of the License, or *)(* (at your option) any later version. *)(* *)(* This program is distributed in the hope that it will be useful, *)(* but WITHOUT ANY WARRANTY; without even the implied warranty of *)(* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *)(* GNU General Public License for more details. *)(* *)(* You should have received a copy of the GNU General Public License *)(* along with this program. If not, see <https://www.gnu.org/licenses/>. *)(***************************************************************************)typesatisfiability=[`Sat|`Unsat|`Unknown]moduletypeM=sigtypetytypetermtypeinterptypemodeltypesolvertypehandletypeoptimizervaltrue_:termvalfalse_:termvalint:int->termvalreal:float->termvalconst:string->ty->termvalnot_:term->termvaland_:term->term->termvalor_:term->term->termvalxor:term->term->termvaleq:term->term->termvaldistinct:termlist->termvalite:term->term->term->termmoduleTypes:sigvalint:tyvalreal:tyvalbool:tyvalstring:tyvalbitv:int->tyvalfloat:int->int->tyvalty:term->tyvalto_ety:ty->Ty.tendmoduleInterp:sigvalto_int:interp->intvalto_real:interp->floatvalto_bool:interp->boolvalto_string:interp->stringvalto_bitv:interp->int->int64valto_float:interp->int->int->floatendmoduleInt:sigvalneg:term->termvalto_real:term->termvaladd:term->term->termvalsub:term->term->termvalmul:term->term->termvaldiv:term->term->termvalrem:term->term->termvalpow:term->term->termvallt:term->term->termvalle:term->term->termvalgt:term->term->termvalge:term->term->termendmoduleReal:sigvalneg:term->termvalto_int:term->termvaladd:term->term->termvalsub:term->term->termvalmul:term->term->termvaldiv:term->term->termvalpow:term->term->termvallt:term->term->termvalle:term->term->termvalgt:term->term->termvalge:term->term->termendmoduleString:sigvalv:string->termvallength:term->termvalto_code:term->termvalof_code:term->termvalto_int:term->termvalof_int:term->termvalat:term->pos:term->termvalconcat:term->term->termvalcontains:term->sub:term->termvalis_prefix:term->prefix:term->termvalis_suffix:term->suffix:term->termvalsub:term->pos:term->len:term->termvalindex_of:term->sub:term->pos:term->termvalreplace:term->pattern:term->with_:term->termendmoduleBitv:sigvalv:string->int->termvalneg:term->termvallognot:term->termvaladd:term->term->termvalsub:term->term->termvalmul:term->term->termvaldiv:term->term->termvaldiv_u:term->term->termvallogor:term->term->termvallogand:term->term->termvallogxor:term->term->termvalshl:term->term->termvalashr:term->term->termvallshr:term->term->termvalrem:term->term->termvalrem_u:term->term->termvalrotate_left:term->term->termvalrotate_right:term->term->termvallt:term->term->termvallt_u:term->term->termvalle:term->term->termvalle_u:term->term->termvalgt:term->term->termvalgt_u:term->term->termvalge:term->term->termvalge_u:term->term->termvalconcat:term->term->termvalextract:term->high:int->low:int->termvalzero_extend:int->term->termvalsign_extend:int->term->termendmoduleFloat:sig(* Rounding modes *)moduleRounding_mode:sig(* Round nearest ties to even *)valrne:term(* Round nearest ties to away *)valrna:term(* Round toward positive *)valrtp:term(* Round toward negative *)valrtn:term(* Round toward zero *)valrtz:termendvalv:float->int->int->termvalneg:term->termvalabs:term->term(* [sqrt ~rm t] where [rm] is the rounding mode *)valsqrt:rm:term->term->termvalis_nan:term->term(* [round_to_integral ~rm t] where [rm] is the rounding mode *)valround_to_integral:rm:term->term->term(* [add ~rm t1 t2] where [rm] is the rounding mode *)valadd:rm:term->term->term->term(* [sub ~rm t1 t2] where [rm] is the rounding mode *)valsub:rm:term->term->term->term(* [mul ~rm t1 t2] where [rm] is the rounding mode *)valmul:rm:term->term->term->term(* [div ~rm t1 t2] where [rm] is the rounding mode *)valdiv:rm:term->term->term->termvalmin:term->term->termvalmax:term->term->termvalrem:term->term->termvaleq:term->term->termvallt:term->term->termvalle:term->term->termvalgt:term->term->termvalge:term->term->termvalto_fp:int->int->rm:term->term->termvalsbv_to_fp:int->int->rm:term->term->termvalubv_to_fp:int->int->rm:term->term->termvalto_ubv:int->rm:term->term->termvalto_sbv:int->rm:term->term->termvalof_ieee_bv:int->int->term->termvalto_ieee_bv:term->termendmoduleModel:sigvalget_symbols:model->Symbol.tlistvaleval:?completion:bool->model->term->interpoptionendmoduleSolver:sigvalmake:?params:Params.t->?logic:Ty.logic->unit->solvervalclone:solver->solvervalpush:solver->unitvalpop:solver->int->unitvalreset:solver->unitvaladd:solver->termlist->unitvalcheck:solver->assumptions:termlist->satisfiabilityvalmodel:solver->modeloptionvaladd_simplifier:solver->solvervalinterrupt:unit->unitvalpp_statistics:Format.formatter->solver->unitendmoduleOptimizer:sigvalmake:unit->optimizervalpush:optimizer->unitvalpop:optimizer->unitvaladd:optimizer->termlist->unitvalcheck:optimizer->satisfiabilityvalmodel:optimizer->modeloptionvalmaximize:optimizer->term->handlevalminimize:optimizer->term->handlevalinterrupt:unit->unitvalpp_statistics:Format.formatter->optimizer->unitendendmoduletypeM_with_make=sigmoduleMake():Mvalis_available:boolincludeMendmoduletypeS=sigtypemodeltypesolvertypeoptimizetypehandlevalvalue:model->Expr.t->Value.tvalvalues_of_model:?symbols:Symbol.tlist->model->Model.tvalpp_smt:?status:bool->Format.formatter->Expr.tlist->unitvalset_debug:bool->unitmoduleSolver:sigvalmake:?params:Params.t->?logic:Ty.logic->unit->solvervaladd_simplifier:solver->solvervalclone:solver->solvervalpush:solver->unitvalpop:solver->int->unitvalreset:solver->unitvaladd:solver->Expr.tlist->unitvalcheck:solver->assumptions:Expr.tlist->satisfiabilityvalmodel:solver->modeloptionvalinterrupt:solver->unitvalpp_statistics:Format.formatter->solver->unitendmoduleOptimizer:sigvalmake:unit->optimizevalpush:optimize->unitvalpop:optimize->unitvaladd:optimize->Expr.tlist->unitvalcheck:optimize->satisfiabilityvalmodel:optimize->modeloptionvalmaximize:optimize->Expr.t->handlevalminimize:optimize->Expr.t->handlevalinterrupt:optimize->unitvalpp_statistics:Format.formatter->optimize->unitendendmoduletypeS_with_fresh=sigmoduleFresh:sigmoduleMake():Sendvalis_available:boolincludeSend