1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374(**************************************************************************)(* This file is part of BINSEC. *)(* *)(* Copyright (C) 2016-2024 *)(* 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). *)(* *)(**************************************************************************)openOptionsopenTypesletget_worklist()=matchSearch_heuristics.get()with|Dfs->(moduleHeuristic.Dfs:WORKLIST)|Bfs->(moduleHeuristic.Bfs:WORKLIST)|Nurs->letseed=matchSeed.get_opt()with|Somes->s|None->letv=Utils.random_max_int()inLogger.info"Random search seed is %d"v;Seed.setv;vinRandom.initseed;(moduleHeuristic.Nurs:WORKLIST)letget_state()=ifLegacyEngine.get()thenLogger.warning"'-sse-legacy-engine' is deprecated. Use '-sse-engine legacy' instead.";ifAlternativeEngine.get()thenLogger.warning"'-sse-alternative-engine' is deprecated. Use '-sse-engine vanilla' \
instead.";ifEngine.is_set()then(ifLegacyEngine.get()thenLogger.warning"'-sse-legacy-engine' is incompatible with '-sse-engine'. It will be \
ignored.";ifAlternativeEngine.get()thenLogger.warning"'-sse-alternative-engine' is incompatible with '-sse-engine'. It will \
be ignored.")elseifLegacyEngine.get()thenifAlternativeEngine.get()then(Logger.warning"'-sse-legacy-engine' is incompatible with '-sse-alternative-engine'. \
It will be ignored.";Engine.setSenv.Vanilla)elseEngine.setSse_symbolic.LegacyelseEngine.setSenv.Vanilla;Engine.get_factory()letrun()=ifis_enabled()&&Kernel_options.ExecFile.is_set()thenletmoduleR=Exec.Run((valget_state()))((valget_worklist()))()inR.unitlet_=Cli.Boot.enlist~name:"SSE"~f:run