12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152(************************************************************************)(* * The Coq Proof Assistant / The Coq Development Team *)(* v * Copyright INRIA, CNRS and contributors *)(* <O___,, * (see version control and CREDITS file for authors & dates) *)(* \VV/ **************************************************************)(* // * This file is distributed under the terms of the *)(* * GNU Lesser General Public License Version 2.1 *)(* * (see LICENSE file for the text of the license) *)(************************************************************************)typet=intletinitial=1letdummy=0letfresh=letcur=refinitialinfun()->incrcur;!curletto_string=string_of_intletof_intid=idletto_intid=idletnewer_thanid1id2=id1>id2letstate_id_info:(t*t)Exninfo.t=Exninfo.make"stateid"letaddexn~validid=Exninfo.addexnstate_id_info(valid,id)letgetexn=Exninfo.getexnstate_id_infoletequal=Int.equalletcompare=Int.compareletprintid=Pp.intidmoduleSelf=structtypet=intletcompare=compareendmoduleSet=Set.Make(Self)typeexn_info={id:t;valid:t}type('a,'b)request={exn_info:exn_info;stop:t;document:'b;loc:Loc.toption;uuid:'a;name:string}letis_valid_ref=ref(fun~doc:_(_:t)->true)letis_valid~docid=!is_valid_ref~docidletset_is_validf=is_valid_ref:=f