123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657(**************************************************************************)(* This file is part of BINSEC. *)(* *)(* Copyright (C) 2016-2022 *)(* CEA (Commissariat à l'énergie atomique et aux énergies *)(* alternatives) *)(* *)(* you can redistribute it and/or modify it under the terms of the GNU *)(* Lesser General Public License as published by the Free Software *)(* Foundation, version 2.1. *)(* *)(* It 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 Lesser General Public License for more details. *)(* *)(* See the GNU Lesser General Public License version 2.1 *)(* for more details (enclosed in the file licenses/LGPLv2.1). *)(* *)(**************************************************************************)letsolvers=letopenFormula_optionsin[Bitwuzla;Boolector;Z3;CVC4;Yices]letmap=letopenFormula_optionsinletopenSmt_optionsinfunction|Auto|Bitwuzla_native->assertfalse|Bitwuzla_smtlib->Bitwuzla|Boolector_smtlib->Boolector|Z3_smtlib->Z3|CVC4_smtlib->CVC4|Yices_smtlib->Yicesletget_solver()=letopenFormula_optionsinletopenSmt_optionsinmatchSMTSolver.get()with|(Auto|Bitwuzla_native)whenSmt_bitwuzla.available->(moduleSmt_bitwuzla:Smt_sig.Solver)|Auto->(tryletsolver=List.findProver.pingsolversinLogger.info"Found %a in the path."Prover.ppsolver;Solver.setsolver;(moduleSmt_external.Solver:Smt_sig.Solver)withNot_found->Logger.fatal"No SMT solver found.")|Bitwuzla_native->Logger.fatal"Native bitwuzla binding is required but not available."|solverwhenProver.ping(mapsolver)->Solver.set(mapsolver);(moduleSmt_external.Solver:Smt_sig.Solver)|solver->Logger.fatal"%a is required but not available in path."Prover.pp(mapsolver)