12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485(**************************************************************************)(* *)(* This file is part of WP plug-in of Frama-C. *)(* *)(* Copyright (C) 2007-2023 *)(* CEA (Commissariat a l'energie atomique et aux energies *)(* 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). *)(* *)(**************************************************************************)(* -------------------------------------------------------------------------- *)(* --- Model Setup --- *)(* -------------------------------------------------------------------------- *)letuser_setup():Factory.setup=beginmatchWp_parameters.Model.get()with|["Runtime"]->Wp_parameters.abort"Model 'Runtime' is no more available.@\nIt will be reintroduced \
in a future release."|["Logic"]->Wp_parameters.warning~once:true"Deprecated 'Logic' model.@\nUse 'Typed' with option '-wp-ref' \
instead.";{mheap=Factory.TypedMemTyped.Fits;mvar=Factory.Ref;cint=Cint.Natural;cfloat=Cfloat.Real;}|["Store"]->Wp_parameters.warning~once:true"Deprecated 'Store' model.@\nUse 'Typed' instead.";{mheap=Factory.TypedMemTyped.Fits;mvar=Factory.Var;cint=Cint.Natural;cfloat=Cfloat.Real;}|spec->letsetup=Factory.parsespecinletmref=matchsetup.mvarwith|Caveat->"caveat"|Ref->"ref"|Raw|Var->""inifmref<>""&&RefUsage.has_nullable()&¬(Wp_parameters.RTE.is_set())thenWp_parameters.warning~current:false~once:true"In %s model with nullable arguments, \
-wp-(no)-rte shall be explicitly positioned."mref;setupend(* -------------------------------------------------------------------------- *)(* --- WP Computer (main entry points) --- *)(* -------------------------------------------------------------------------- *)letcreate?dump?(setup:Factory.setupoption)?(driver:Factory.driveroption)():Wpo.generator=letdefaultf=functionSomev->v|None->f()inletdump=defaultWp_parameters.Dump.getdumpinletdriver=defaultDriver.load_driverdriverinletsetup=defaultuser_setupsetupinifdumpthenCfgGenerator.dumpersetupdriverelseCfgGenerator.generatorsetupdriver(* -------------------------------------------------------------------------- *)