123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869(***************************************************************************)(* 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/>. *)(***************************************************************************)type_param=|Timeout:intparam|Model:boolparam|Unsat_core:boolparam|Ematching:boolparamtypet={timeout:int;model:bool;unsat_core:bool;ematching:bool}letdefault_timeout=2147483647letdefault_model=trueletdefault_unsat_core=falseletdefault_ematching=trueletdefault_value(typea)(param:aparam):a=matchparamwith|Timeout->default_timeout|Model->default_model|Unsat_core->default_unsat_core|Ematching->default_ematchingletdefault()={timeout=default_timeout;model=default_model;unsat_core=default_unsat_core;ematching=default_ematching}letset(typea)(params:t)(param:aparam)(value:a):t=matchparamwith|Timeout->{paramswithtimeout=value}|Model->{paramswithmodel=value}|Unsat_core->{paramswithunsat_core=value}|Ematching->{paramswithematching=value}let($)(typea)(params:t)((param,value):aparam*a):t=setparamsparamvalueletget(typea)(params:t)(param:aparam):a=matchparamwith|Timeout->params.timeout|Model->params.model|Unsat_core->params.unsat_core|Ematching->params.ematching