12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364(**************************************************************************)(* *)(* This file is part of Frama-C. *)(* *)(* Copyright (C) 2007-2023 *)(* 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). *)(* *)(**************************************************************************)moduleP=State_builder.Option_ref(SlicingTypes.Sl_project)(structletname="Slicing.Project"letdependencies=[](* others delayed in Register *)end)letself=P.selflet()=Cmdline.run_after_extended_stage(fun()->State_dependency_graph.add_codependencies~onto:self[Pdg.Api.self;!Db.Inputs.self_external;!Db.Outputs.self_external])letget()=tryP.get()withNot_found->SlicingParameters.fatal"slicing not initialized."letmayf=matchP.get_option()with|None->()|Some_->f()letmay_map~nonef=matchP.get_option()with|None->none|Some_->f()letreset_slicing()=Eva.Analysis.compute();letinitialized=matchP.get_option()with|None->false|Some_->trueinifnotinitializedthenSlicingParameters.feedback~level:1"initializing slicing ..."elseSlicingParameters.feedback~level:1"reinitializing slicing ...";P.setSlicingInternals.{functions=Cil_datatype.Varinfo.Hashtbl.create17;actions=[]};ifnotinitializedthenSlicingParameters.feedback~level:2"done (initializing slicing)."elseSlicingParameters.feedback~level:2"done (reinitializing slicing)."