123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081(******************************************************************************)(* *)(* The Alt-Ergo theorem prover *)(* Copyright (C) 2006-2013 *)(* *)(* Sylvain Conchon *)(* Evelyne Contejean *)(* *)(* Francois Bobot *)(* Mohamed Iguernelala *)(* Stephane Lescuyer *)(* Alain Mebsout *)(* *)(* CNRS - INRIA - Universite Paris Sud *)(* *)(* This file is distributed under the terms of the Apache Software *)(* License version 2.0 *)(* *)(* ------------------------------------------------------------------------ *)(* *)(* Alt-Ergo: The SMT Solver For Software Verification *)(* Copyright (C) 2013-2018 --- OCamlPro SAS *)(* *)(* This file is distributed under the terms of the Apache Software *)(* License version 2.0 *)(* *)(******************************************************************************)openOptionstypet={content:string;id:int}moduleS=Hconsing.Make(structtypeelt=tlethashs=Hashtbl.hashs.contentleteqs1s2=String.equals1.contents2.contentletset_idnv={vwithid=n}letinitial_size=9001letdisable_weaks()=Options.disable_weaks()end)letmakes=S.make{content=s;id=-1}letviews=s.contentletprintfmtv=Format.fprintffmt"%s"(viewv)letequals1s2=s1.id==s2.idletcompares1s2=compares1.ids2.idlethashs=s.idletempty=make""letreclist_assocx=function|[]->raiseNot_found|(y,v)::l->ifequalxythenvelselist_assocxlletfresh_string=letcpt=ref0infun()->incrcpt;"!k"^(string_of_int!cpt)letis_fresh_strings=trys.[0]=='!'&&s.[1]=='k'withInvalid_arguments->assert(String.compares"index out of bounds"=0);falseletis_fresh_skolems=trys.[0]=='!'&&s.[1]=='?'withInvalid_arguments->assert(String.compares"index out of bounds"=0);falsemoduleArg=structtypet'=ttypet=t'letcompare=compareendmoduleSet:Set.Swithtypeelt=t=Set.Make(Arg)moduleMap:Map.Swithtypekey=t=Map.Make(Arg)