123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127(**************************************************************************)(* *)(* 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). *)(* *)(**************************************************************************)(* -------------------------------------------------------------------------- *)(* --- Empty Memory Model --- *)(* -------------------------------------------------------------------------- *)openLang.FopenSigsmoduleLogic=Qed.Logicletdatatype="MemEmpty"letconfigure()=beginletorig_pointer=Context.pushLang.pointerLogic.Intinletorig_null=Context.pushCvalues.null(p_equale_zero)inletrollback()=Context.popLang.pointerorig_pointer;Context.popCvalues.nullorig_null;inrollbackendletno_binder={bind=fun_fv->fv}letconfigure_ia_=no_binderlethypothesesp=pmoduleChunk=structtypet=unitletself="empty"lethash()=0letequal()()=trueletcompare()()=0letpretty_fmt()=()lettau_of_chunk()=Logic.Intletbasename_of_chunk()="u"letis_framed()=trueendmoduleHeap=Qed.Collection.Make(Chunk)moduleSigma=Sigma.Make(Chunk)(Heap)typeloc=unittypechunk=Chunk.ttypesigma=Sigma.ttypedomain=Sigma.domaintypesegment=locrloctypestate=unitletstate_=()letiter__=()letlookup__=Mtermletupdates__=Bag.emptyletapply__=()letpretty_fmt()=()letvars_l=Vars.emptyletoccurs_x_l=falseletnull=()letliteral~eid_=ignoreeidletcvar_x=()letpointer_loc_t=()letpointer_val()=e_zeroletfield_l_f=()letshift_l_obj_k=()letbase_addr_l=()letbase_offset_l=e_zeroletblock_length_s_obj_l=e_zeroletcast__l=()letloc_of_int__=()letint_of_loc_()=e_zeroletdomain_obj_l=Sigma.Chunk.Set.emptyletis_well_formed_s=p_trueletsource="Empty Model"letload_sigma_obj()=Warning.error~source"Can not load value in Empty model"letload_init_sigma_obj()=Warning.error~source"Can not load init in Empty model"letcopied_s_obj()()=[]letcopied_init_s_obj()()=[]letstored_s_obj()_=[]letstored_init_s_obj()_=[]letassigned_s_obj_sloc=[]letno_pointer()=Warning.error~source"Can not compare pointers in Empty model"letis_null_=no_pointer()letloc_eq__=no_pointer()letloc_lt__=no_pointer()letloc_leq__=no_pointer()letloc_neq__=no_pointer()letloc_diff___=no_pointer()letframe_sigma=[]letallocsigma_xs=sigmaletscope_seq_s_xs=[]letvalid_sigma_acs_l=Warning.error~source"No validity"letinvalid_sigma_l=Warning.error~source"No validity"letinitialized_sigma_l=Warning.error~source"MemEmpty: No initialized"letglobal_sigma_p=p_trueletincluded_s1_s2=no_pointer()letseparated_s1_s2=no_pointer()