1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253(**************************************************************************)(* *)(* 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). *)(* *)(**************************************************************************)letpred_opt_from_expr_statestmte=tryValue2acsl.lval_to_predicatestmtewith|Cvalue.V.Not_based_on_null->Misc.not_implemented~what:"Value not based on null";None|Misc.Not_implementedwhat->Misc.not_implemented~what;Noneclasshypotheses_visitor(env:Collect.env)=object(self)inheritVisitor.generic_frama_c_visitor(Visitor_behavior.inplace())method!vstmt_auxstmt=letkf=Option.get(self#current_kf)inifCollect.should_annotate_stmtenvstmtthenbeginletvars=Collect.get_relevant_vars_stmtenvkfstmtinList.iter(fune->letp_opt=pred_opt_from_expr_statestmteinOption.iter(Misc.assert_and_validate~kfstmt)p_opt)varsend;Cil.DoChildrenendletgenerate_hypothesesenv=letvisitor=newhypotheses_visitorenvinCil.visitCilFileSameGlobals(visitor:>Cil.cilVisitor)(Ast.get())