1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768(* This file is free software, part of Archsat. See file "LICENSE" for more details. *)(* Arbitrary tags for expressions. *)(* Functor instantiation *)(* ************************************************************************ *)moduleM=Hmap.Make(structtypet=intletcompare(a:int)(b:int)=compareabend)typemap=M.ttype'at={id:int;inj:'aHmap.injection;}letequalkk'=k.id=k'.idletmk_keyid={id;inj=Hmap.create_inj();}letmax_id=ref0letcreate()=incrmax_id;mk_key!max_idletempty=M.emptyletgetmk=M.get~inj:k.injk.idmletget_listmk=matchgetmkwith|None->[]|Somel->lletget_lastmk=matchgetmkwith|None->None|Some[]->None|Some(x::_)->Somexletunsetmk=M.removek.idmletsetmkl=M.add~inj:k.injk.idlmletset_optmk=function|None->m|Somev->setmkvletaddmkv=setmk(v::get_listmk)letadd_optmk=function|None->m|Somev->addmkvletadd_listmk=function|[]->m|l->setmk(List.rev_appendl(get_listmk))