1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677(**************************************************************************)(* *)(* SPDX-License-Identifier LGPL-2.1 *)(* Copyright (C) *)(* CEA (Commissariat à l'énergie atomique et aux énergies alternatives) *)(* *)(**************************************************************************)(* -------------------------------------------------------------------------- *)(* --- Normalized C-labels --- *)(* -------------------------------------------------------------------------- *)openCil_typestypec_label=stringletcompare=String.compareletequal(a:string)(b:string)=(a=b)moduleT=structtypet=c_labelletcompare=compareendmoduleLabelMap=Datatype.String.MapmoduleLabelSet=Datatype.String.Setletinit="wp:init"lethere="wp:here"letnext="wp:next"letpre="wp:pre"letpost="wp:post"letexit="wp:exit"letbreak="wp:break"letcontinue="wp:continue"letdefault="wp:default"letloopcurrent="wp:loopcurrent"letloopentry="wp:loopentry"letformala=aletpretty=Format.pp_print_stringletis_hereh=(h=here)letmemllbl=List.memllblletcasen="wp:case"^Int64.to_stringnletstmts="wp:sid"^string_of_ints.sidletstmt_posts="wp:sid:post:"^string_of_ints.sidletloop_entrys=stmts(* same point *)letloop_currents="wp:head"^string_of_ints.sidletto_logica=FormalLabelaletof_logic=function|BuiltinLabelHere->here|BuiltinLabelInit->init|BuiltinLabelPre->pre|BuiltinLabelPost->post|FormalLabelname->name|BuiltinLabelOld->"wp:old"|BuiltinLabelLoopCurrent->loopcurrent|BuiltinLabelLoopEntry->loopentry|StmtLabels->stmt!sletis_post=function|BuiltinLabelPost->true|FormalLabela->a=post||a=exit|_->falseletname=functionFormalLabela->a|_->""letlookuplabelsa=tryList.find(fun(l,_)->namel=a)labels|>sndwithNot_found->Wp_parameters.fatal"Unbound label parameter '%s' in predicate or function call"a(* -------------------------------------------------------------------------- *)